Reputation: 842
I have a 3d model in the format of 3ds. I converted it to obj and then to js format. Now i want to load it in another js file. That's my code for the loading:
var loader = new THREE.JSONLoader();
loader.load( { model: "untitled.js", callback: createScene } );
function createScene( geometry ) {
geometry.materials[0][0].shading = THREE.FlatShading;
geometry.materials[0][0].morphTargets = true;
var material = new THREE.MeshFaceMaterial();
var mesh = new THREE.Mesh( geometry, material );
mesh.scale.set(50, 50, 50);
scene.addObject( mesh );
}
the web developer console show me the error: TypeError: a.split is not a function Three.js:119
How can i fix this? Thanks
Upvotes: 4
Views: 4942
Reputation: 19602
Should be this instead:
loader.load( "untitled.js", createScene );
Upvotes: 3