I am in the process of setting up a WebGl viewer using three.js + colladaloader.js, but I'm encountering some difficulties when attempting to import and visualize my own collada object. The example loads correctly, however, when I try to incorporate my model into it (without modifying the code), I encounter a
Can not convert Transform of type lookat WebGLRenderingContext: GL ERROR :GL_INVALID_OPERATION : glDrawElements: attempt to access out of range vertices in attribute 0
Any suggestions on how to make my own model work?
I want to mention that the ColladaLoader.js I'm using is a customized version available at this link
Here is the specific model I'm trying to load:
This is the code snippet I'm utilizing:
<script>
if ( ! Detector.webgl ) Detector.addGetWebGLMessage();
var container, stats;
var camera, scene, renderer, objects;
var particleLight, pointLight;
var dae, skin;
var loader = new THREE.ColladaLoader();
loader.options.convertUpAxis = true;
loader.load( '/site_media/models/model.dae', function ( collada ) {
dae = collada.scene;
skin = collada.skins[ 0 ];
dae.scale.x = dae.scale.y = dae.scale.z = 0.002;
dae.updateMatrix();
init();
animate();
} );
// Additional code continues...
</script>