{"action":"created","issue":{"url":"https://api.github.com/repos/tweenjs/tween.js/issues/287","repository_url":"https://api.github.com/repos/tweenjs/tween.js","labels_url":"https://api.github.com/repos/tweenjs/tween.js/issues/287/labels{/name}","comments_url":"https://api.github.com/repos/tweenjs/tween.js/issues/287/comments","events_url":"https://api.github.com/repos/tweenjs/tween.js/issues/287/events","html_url":"https://github.com/tweenjs/tween.js/issues/287","id":173682629,"number":287,"title":"[Feature] Add a `.properties` method to restrict which properties are tweened.","user":{"login":"mikebolt","id":2136767,"avatar_url":"https://avatars.githubusercontent.com/u/2136767?v=3","gravatar_id":"","url":"https://api.github.com/users/mikebolt","html_url":"https://github.com/mikebolt","followers_url":"https://api.github.com/users/mikebolt/followers","following_url":"https://api.github.com/users/mikebolt/following{/other_user}","gists_url":"https://api.github.com/users/mikebolt/gists{/gist_id}","starred_url":"https://api.github.com/users/mikebolt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikebolt/subscriptions","organizations_url":"https://api.github.com/users/mikebolt/orgs","repos_url":"https://api.github.com/users/mikebolt/repos","events_url":"https://api.github.com/users/mikebolt/events{/privacy}","received_events_url":"https://api.github.com/users/mikebolt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-29T02:01:22Z","updated_at":"2016-09-11T19:50:38Z","closed_at":null,"body":"My idea is to add a `.properties` method on the Tween class that can be chained like the other methods.\r\n\r\nExample:\r\n\r\n    var myTween = new TWEEN.Tween(thingA).properties(['x', 'y', 'scale']).to(thingB, 500);\r\n\r\nIt could be especially useful for something like Three.js's [MeshPhongMaterial](http://threejs.org/docs/#Reference/Materials/MeshPhongMaterial) that has lots of numeric properties. You could tween one material to another material, and specify that only the 'shininess', 'opacity', and 'emissiveIntensity' properties should be tweened.\r\n\r\nThere could also be a `.exclude` or `.excludeProperties` method that does the opposite.\r\n\r\nI think this feature can be added without changing the existing behavior."},"comment":{"url":"https://api.github.com/repos/tweenjs/tween.js/issues/comments/246200447","html_url":"https://github.com/tweenjs/tween.js/issues/287#issuecomment-246200447","issue_url":"https://api.github.com/repos/tweenjs/tween.js/issues/287","id":246200447,"user":{"login":"samreid","id":679486,"avatar_url":"https://avatars.githubusercontent.com/u/679486?v=3","gravatar_id":"","url":"https://api.github.com/users/samreid","html_url":"https://github.com/samreid","followers_url":"https://api.github.com/users/samreid/followers","following_url":"https://api.github.com/users/samreid/following{/other_user}","gists_url":"https://api.github.com/users/samreid/gists{/gist_id}","starred_url":"https://api.github.com/users/samreid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samreid/subscriptions","organizations_url":"https://api.github.com/users/samreid/orgs","repos_url":"https://api.github.com/users/samreid/repos","events_url":"https://api.github.com/users/samreid/events{/privacy}","received_events_url":"https://api.github.com/users/samreid/received_events","type":"User","site_admin":false},"created_at":"2016-09-11T19:50:38Z","updated_at":"2016-09-11T19:50:38Z","body":"Perhaps one way to address this would be to add a 2nd \"options\" argument to the Tween constructor, which can contain attributes to be tweened.  Then the above example would be written like so:\r\n\r\n```js\r\nmrnaNodes.forEach( function( baseNode ) {\r\n  new TWEEN.Tween( baseNode, { attributes: [ 'x' ] } )\r\n    .to( { x: baseNode.x + proteinSynthesisScreenView.distanceMRNATranslated }, 3800 )\r\n    .easing( TWEEN.Easing.Cubic.InOut )\r\n    .start( phet.joist.elapsedTime );\r\n} );\r\n```"}}
{"actor":{"display_login":"samreid"}}