{"action":"created","issue":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/7312","repository_url":"https://api.github.com/repos/mrdoob/three.js","labels_url":"https://api.github.com/repos/mrdoob/three.js/issues/7312/labels{/name}","comments_url":"https://api.github.com/repos/mrdoob/three.js/issues/7312/comments","events_url":"https://api.github.com/repos/mrdoob/three.js/issues/7312/events","html_url":"https://github.com/mrdoob/three.js/pull/7312","id":110498596,"number":7312,"title":"Animation: Interpolants & extensibility overhaul.","user":{"login":"tschw","id":3916357,"avatar_url":"https://avatars.githubusercontent.com/u/3916357?v=3","gravatar_id":"","url":"https://api.github.com/users/tschw","html_url":"https://github.com/tschw","followers_url":"https://api.github.com/users/tschw/followers","following_url":"https://api.github.com/users/tschw/following{/other_user}","gists_url":"https://api.github.com/users/tschw/gists{/gist_id}","starred_url":"https://api.github.com/users/tschw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tschw/subscriptions","organizations_url":"https://api.github.com/users/tschw/orgs","repos_url":"https://api.github.com/users/tschw/repos","events_url":"https://api.github.com/users/tschw/events{/privacy}","received_events_url":"https://api.github.com/users/tschw/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":83,"created_at":"2015-10-08T16:59:47Z","updated_at":"2016-04-20T22:29:12Z","closed_at":"2015-10-25T16:15:46Z","pull_request":{"url":"https://api.github.com/repos/mrdoob/three.js/pulls/7312","html_url":"https://github.com/mrdoob/three.js/pull/7312","diff_url":"https://github.com/mrdoob/three.js/pull/7312.diff","patch_url":"https://github.com/mrdoob/three.js/pull/7312.patch"},"body":"**What's new?**\r\n\r\n * Smooth interpolation! More importantly, an extensible infrastructure for **interpolation modes**.\r\n\r\n * **Well-defined interfaces within the system**.\r\n   This way, the internal components can easier be used in a stand-alone fashion and the system becomes easier to maintain and extend. The high level Mixer & Actions API remains 100% compatible.\r\n\r\n * Many bugs and inefficiencies removed (see list below). It's now **several factors faster**.\r\n\r\n * **Caching** for very fast `.addAction` / `.removeAction`.\r\n\r\n * **Better readable source code** in many places.\r\n\r\n**Design Issues Solved**\r\n\r\nAnimationClip is documented to be reusable. The track-cached index however did result in tons of (linear!) scans when running multiple instances of the same clip (**not** action) at the same time!\r\n\r\nThe data model was deeply nested (both for \"standard Three\" JSON and at run time). Indirections take their toll. Furthermore, the indirections were completely useless.\r\n\r\nPropertyBindings had no clearly defined role and `.getValue` returned something reference or value, only usable with an extra call to a `.clone` utility function. \r\n\r\n**Bugs**\r\n\r\n`PropertyBinding.apply`: The original value was \"copied\" without AnimationUtils.clone (incorrect for non-reference properties), also contained a lengthy computation of a one-valued constant.\r\n\r\n`KeyframeTrack.trim`: The loop index in KeyframeTrack.trim was counting into the wrong direction.\r\n\r\n`KeyframeTrack.getAt`: The`next_is_constant` \"optimization\" did not update after an interval change and also in fact caused a slowdown (the polymorphism caused more overhead than the work saved, also it only works correctly for linear interpolation and requires a very irregular and inefficient data model).\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/comments/212638556","html_url":"https://github.com/mrdoob/three.js/pull/7312#issuecomment-212638556","issue_url":"https://api.github.com/repos/mrdoob/three.js/issues/7312","id":212638556,"user":{"login":"DelvarWorld","id":79215,"avatar_url":"https://avatars.githubusercontent.com/u/79215?v=3","gravatar_id":"","url":"https://api.github.com/users/DelvarWorld","html_url":"https://github.com/DelvarWorld","followers_url":"https://api.github.com/users/DelvarWorld/followers","following_url":"https://api.github.com/users/DelvarWorld/following{/other_user}","gists_url":"https://api.github.com/users/DelvarWorld/gists{/gist_id}","starred_url":"https://api.github.com/users/DelvarWorld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DelvarWorld/subscriptions","organizations_url":"https://api.github.com/users/DelvarWorld/orgs","repos_url":"https://api.github.com/users/DelvarWorld/repos","events_url":"https://api.github.com/users/DelvarWorld/events{/privacy}","received_events_url":"https://api.github.com/users/DelvarWorld/received_events","type":"User","site_admin":false},"created_at":"2016-04-20T22:29:12Z","updated_at":"2016-04-20T22:29:12Z","body":"Woohoo! Finally found my final problem, which as I suspected, was specific to me. I'm using a custom shader where I computed the `gl_Position` wrong in the end. Thanks for helping me check my assumptions.\r\n\r\nTo come full circle, here's the API that I can now use: https://gist.github.com/DelvarWorld/586e9fb3102a39333f130836c416c87b\r\nUnder the hood I can do this by calling `action.setEffectiveWeight`, `action.time = ...`, and then `mixer.update( 0 );`. @bhouston While this still requires specific knowledge of the class internals (`update( 0 )` especially, since that parameter is supposed to be a delta), I think it's simple enough for me that I don't think I need any API changes made. "}}