我把objLoader.js放在工程里了,
new THREE.OBJLoader()
//.setMaterials(materials)
.setPath(‘url’)
.load(‘name’,
function(object) {
object.position.z = -10;
object.rotation.x = Math.PI * 0.5;
object.scale.set(0.1, 0.1, 0.1);
scene.add(object);
module= object;
},
function(xhr) {
},
function(err) {
console.log(err);
});
一直报错,报错如下。
THREE.OBJLoader is not a constructor;at SelectorQuery callback function
TypeError: THREE.OBJLoader is not a constructor
at ye.loadmodule (http://127.0.0.1:17823/appservice/index/index.js:80:5)
at ye.initScene (http://127.0.0.1:17823/appservice/index/index.js:65:10)
at n.
at Function.<anonymous> (WAService.js:1:731430)
at WAService.js:1:102353
at WAService.js:1:731549
at Array.forEach (<anonymous>)
at WAService.js:1:731522
有人遇到过么?