I have a 3D model that I initially had in the 3DS format. I then converted it to OBJ and finally to JS format. Now, my goal is to load this model into another JS file. Below you'll find the code snippet I've written for this purpose:
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 );
}
Upon checking the web developer console, I encountered the following error message: TypeError: a.split is not a function Three.js:119
Any suggestions on how to resolve this issue would be greatly appreciated. Thank you!