mrdoob / three.js

JavaScript 3D Library.
https://threejs.org/
MIT License
102.06k stars 35.34k forks source link

ColladaLoader doesn't support instantiated joints in kinematic models #14880

Open Metalfusion opened 6 years ago

Metalfusion commented 6 years ago

The COLLADA 1.5 specification allows using both <joint> and elements inside kinematics_model\technique_common. The elements can refer to <joint> elements defined elsewhere in the document, usually in .

The COLLADA loader seems to assume that <joint> elements are used, resulting in this error if are used (three.js editor example version r96):

TypeError: joint is undefined ColladaLoader.js:2928:8 
connect/< https://threejs.org/examples/js/loaders/ColladaLoader.js:2928:8
traverse https://threejs.org/build/three.js:8574:4
traverse https://threejs.org/build/three.js:8580:5
traverse https://threejs.org/build/three.js:8580:5
connect https://threejs.org/examples/js/loaders/ColladaLoader.js:2920:5
setupKinematics https://threejs.org/examples/js/loaders/ColladaLoader.js:2909:6
parse https://threejs.org/examples/js/loaders/ColladaLoader.js:3867:3
Loader/this.loadFile/< https://threejs.org/editor/js/Loader.js:179:20

Example COLLADA file using : https://github.com/Metalfusion/public-files/blob/master/Cobra_s350.dae

Three.js version
Mugen87 commented 6 years ago

Yes, instance_joint are currently not processed by the loader.