Is it a Three.js bug with collada loader?
-
09-12-2019 - |
Question
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
Solution
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).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow