请先查看代码:
var o = null;
var loader = new THREE.STLLoader();
loader.load("../model/Ban.stl",function(obj){
o = obj;
objectSTL = new THREE.Mesh(obj,mesh3);
objectSTL.scale.set(0.06,0.06,0.06)
wheelCenterPoint.add(objectSTL);
console.log(1)
});
console.log(o);
chrome输出的信息是: enter image description here
chrome首先打印“null”,然后“1”,所以,我想问一下如何使“o”保存“obj”?