Danny Fox
Danny Fox

Reputation: 40719

Is it a Three.js bug with collada loader?

There is a three.js demo here: http://mrdoob.github.com/three.js/examples/webgl_loader_collada.html

It works perfectly, but if I want to use canvas renderer instead of webgl, it's buggy.

renderer = new THREE.CanvasRenderer();

I can't see the texture (the object is white), and the animation also doesn't works. Is it a bug in three.js, or I have to modify more in the code?

Thanks in advance

Upvotes: 0

Views: 1489

Answers (1)

Juan Mellado
Juan Mellado

Reputation: 15113

CanvasRenderer has several limitations. See Issue 1026.

Default skin material is an instance of THREE.MeshLambertMaterial, but you can do a quick overwrite with a THREE.MeshBasicMaterial instance with the original texture map:

...
    skin = collada.skins[ 0 ];

    skin.material = new THREE.MeshBasicMaterial({map: skin.material.map});
...

And AFAIK CanvasRenderer doesn't support morph targets (animation).

Upvotes: 2

Related Questions