Reputation: 360
I have serious problems with not being able to load a model into Three.js. First of all. I've downloaded https://github.com/mrdoob/three.js/ and extracted it into a local WebMatrix server. Most examples run fine, exept for the ones I need the most.
webgl_loader_collada.html gives me
GET http://localhost:26238/three.js-master/examples/models/collada/monster/monster.dae 404 (Not Found)
webgl_loader_obj.html gives me
GET http://localhost:26238/three.js-master/examples/obj/male02/male02.obj 404 (Not Found)
I also have the ColladaLoader.js in the same folder.
When I try to load a Collada file like this:
var loader = new THREE.ColladaLoader();
loader.load("monster.dae", function loadCollada(collada) {
var model = collada.scene;
model.scale.set(0.1, 0.1, 0.1);
model.rotation.x = -Math.PI/2;
model.updateMatrix();
scene.add(model);
});
I get this:
GET http://localhost:26238/monster.dae 404 (Not Found)
ColladaLoader.js:108 load ColladaLoader.js:108
init webgl.html:43
onload webgl.html:107
I can get the JSON loader to load models though, but I need to have other formats working.
I'm stuck. I need this to work, but I have no clue what the problem is. I've copied code from working examples but it still doesn't work.
Upvotes: 2
Views: 2456
Reputation: 25
I assume you're using visual studio express... if so, you are probably using IIS express... to solve the issue I did this:
<staticContent lockAttributes="isDocFooterFileName">
section add the following: <mimeMap fileExtension=".dae" mimeType="text/xml" />
I hope that helps!
Upvotes: 2