Can't get a functional THREE.js Collada Loader to work, and could use some help
I'm working on a project that would require me to use collada objects in a webgl application. We've settled on THREE.js for a variety of reasons. I'm having issues getting a collada loader working though. It's frustrating because I followed the example code to a "T" and it's not working. Here is my code for it.
var loader = new THREE.ColladaLoader();
var room, scene, stats;
loader.load('../Models/Rooms/boot.dae', function colladaReady( collada ){
collada.scene.getChildByName('Cube',true).doubleSided = true;
room = collada.scene;
room.scale.x = room.scale.y = room.scale.z = 1;
room.position.x = room.position.y = room.position.z = 0;
room.updateMatrix();
init();
});
The init() function looks like this
scene = new THREE.Scene();
scene.add( room );
camera.lookAt( scene.position );
scene.add( camera );
renderer.render( scene, camera );
Does anyone here have any ideas? I've been stuck on this for days and every place I ask seems to treat me like the 13th floor of a hotel(read: I don't exist), so there's been very little help from the normally recommended sources.
(Edit) Here is the site I'm attempting to make. The project is a 3D layout system, and the loader should be adding a room while other loaders would add bits of furniture.
Posted Dec 1, 2011, 11:51 PM UTC · edited