javascript - Error in OBJLoader of THREE.JS lilbrary -
javascript - Error in OBJLoader of THREE.JS lilbrary -
i'm trying follow examples in book in order larn three.js library "learning three.js: javascript 3d library webgl" , have illustration sets downloaded github link https://github.com/josdirksen/learning-threejs. of examples runing fine of them raises error 1 loads wavefront objects objloader.js file. raises next error in run time
uncaught typeerror: undefined not function vm12649 objloader.js:66
corresponding portion of objloader.js
function meshn( meshname, materialname ) { if ( geometry.vertices.length > 0 ) { geometry.mergevertices(); geometry.computecentroids(); //exception rased here !!!!! geometry.computefacenormals(); geometry.computeboundingsphere(); object.add( mesh ); geometry = new three.geometry(); mesh = new three.mesh( geometry, material ); verticescount = 0; }
you have downloaded latest version of three.js library (probably r68) examples written against version r63 somethings have changed.
as can see @ https://github.com/mrdoob/three.js/releases in r67 method computecentroids
removed geometry
.
javascript three.js
Comments
Post a Comment