Three.js: Collada animations, KeyFrameAnimation removed ?

Created on 22 Jun 2017  路  5Comments  路  Source: mrdoob/three.js

Description of the problem

Hello,

The class KeyFrameAnimation has been removed from the docs and the examples. How am I supposed to animate my collada model when kinematics and skinning methods are not working at all ? How can i use the collada.animations with this latest release ( r86 ) ?

const loader = new ColladaLoader();

loader.load(source, function(collada) 
{
    const obj = collada.scene;
        const animations = collada.animations; // I have to use this.

    obj.traverse(function(child)
    {
        child.castShadow = true;
        child.receiveShadow = true;
    });
});

Thanks for reading.

Three.js version
  • [ ] Dev
  • [x] r86
  • [ ] ...
Browser
  • [x] All of them
  • [ ] Chrome
  • [ ] Firefox
  • [ ] Internet Explorer
OS
  • [x] All of them
  • [ ] Windows
  • [ ] macOS
  • [ ] Linux
  • [ ] Android
  • [ ] iOS
Question

All 5 comments

You can use ColladaLoader2 for skeletal animations. Kinematics support is not yet implemented though.

Besides, the following example shows how you can use the old ColladaLoader with skeletal animations and the core animation system.

KeyFrameAnimation, Animation and AnimationHandler have been deprecated for almost two years and were removed from the project with R86. If you depend on these entities, you can still checkout R85.

BTW: The kinematics example also works with R86: https://threejs.org/examples/#webgl_loader_collada_kinematics

Thanks for reply.

I didn't know that. Do you know some examples with the ColladaLoader2, please ?

These two examples are not yet official but they work with ColladaLoader2 in the master branch.

https://yume.human-interactive.org/examples/collada/index.html
https://yume.human-interactive.org/examples/collada/multi.html (Heads up! Big collada file)

We currently try to enhance ColladaLoader2 because ColladaLoader allocates a lot of memory. Some users already reported problems in this context (see https://github.com/mrdoob/three.js/issues/10592).

Please be aware, that ColladaLoader2 is not perfect yet. If you encounter problems, just report them and i will look into it.

Thanks for all !

I'll try this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

seep picture seep  路  3Comments

zsitro picture zsitro  路  3Comments

boyravikumar picture boyravikumar  路  3Comments

Bandit picture Bandit  路  3Comments

filharvey picture filharvey  路  3Comments