Collada with LOD issues
===

Is there a correct way to add a collada scenes to the LOD?

I am building a generic model viewer that can handle both collada and json imported models with up to 3 levels of detail.

The business end of the code is below and works fine for json loaded models but collada models just show all the LOD levels at once.

Check out:
http://frontier.lincoln.ac.uk/3d/development/Stage2/tools/modelViewer_v0.1_json.html

The above works and cycles through the models when you zoom in and out (mouse wheel).

Now check out:
http://frontier.lincoln.ac.uk/3d/development/Stage2/tools/modelViewer_v0.1_collada.html

All models are displayed as if not added to the LOD yet the code (below) is the same(ish):

    if(modelType == "js"){
	    var faceMaterial = new THREE.MeshFaceMaterial();
	    modelContainer = new THREE.Object3D();	
	    var model = new THREE.LOD();
	    for ( k = 0; k < meshes.length; k ++ ) { // number of LOD meshes added to the meshes array
	        var tempModel = new THREE.Mesh( meshes[ k ][ 0 ], faceMaterial ); // [k][0] is the gemoetry loaded in via JSONLoader
		    tempModel.scale.set( globalScale, globalScale, globalScale );
		    tempModel.castShadow = true;
		    tempModel.rotation.y = deg2rad(90);
		    model.addLevel( tempModel, meshes[ k ][ 1 ] ); // [k][1] is the distance at which to change LOD
	    }
	    model.updateMatrix();
		model.matrixAutoUpdate = false;
		scene.add( modelContainer );
		modelContainer.name = "model_container";
		modelContainer.add( model );
    } else {
		modelContainer = new THREE.Object3D();	
		var model = new THREE.LOD();
		for ( k = 0; k < meshes.length; k ++ ) {
		    tempModel = meshes[ k ][ 0 ]; // [k][0] is the collada scene loaded in via ColladaLoader
		    tempModel.scale.set( globalScale, globalScale, globalScale );
		    tempModel.castShadow = true;
		    tempModel.rotation.x = -Math.PI/2;
		    model.addLevel( tempModel, meshes[ k ][ 1 ] ); // [k][1] is the distance at which to change LOD
		}
		model.updateMatrix();
		model.matrixAutoUpdate = false;
		scene.add( modelContainer );
		modelContainer.name = "model_container";
		modelContainer.add( model );
    }
Is it something to do with the fact collada scenes are treated as if they are 'another level' deep? If so, what would I have to do differently when setting them up? It sure appears that way from a look at the DOM inspector but I am stumped at how to resolve it.

Thanks in advance.