I am attempting to import a .obj file into Three.js using their objLoader.
var loader = new THREE.OBJLoader( manager );
loader.load( 'obj/gate-2.obj', function ( object ) {
object.traverse( function ( child ) {
if ( child instanceof THREE.Mesh ) {
child.material.map = texture;
}
} );
Everything works flawlessly with Blender models, but I encounter an issue when trying to load my custom 3Ds Max models. The .obj file fails to load in the browser and triggers an error message. Could it be due to incorrect exporting or is Three.js incompatible with the 3Ds Max .obj exporter?
Error Message:
Error: Unexpected line: s 2
parseOBJLoader.js:339
(anonymous function)OBJLoader.js:24
(anonymous function)three.min.js:376:387