-1
我使用此代碼加載three.js所JSON模式:如何獲得three.js所JSON模型頂點位置
var noisenormalmap = THREE.ImageUtils.loadTexture("obj/jgd/noisenormalmap.png");
noisenormalmap.wrapS = THREE.RepeatWrapping;
noisenormalmap.wrapT = THREE.RepeatWrapping;
noisenormalmap.repeat.set(5, 5);
var loader = new THREE.JSONLoader();
loader.load('myobject.json', function (geometry) {
JGDframe = new THREE.Mesh(geometry, new THREE.MeshPhongMaterial({
color: 0xAF0000 ,
side: THREE.DoubleSide,
specular: 0x222222,
shininess: 1000,
emissive:0x000000,
normalMap: noisenormalmap,
normalScale: new THREE.Vector2(0.32, 0.32),
envMap: reflectionCube,
reflectivity:0.82,
refractionRatio:0.1,
combine: THREE.AddOperation
}));
scene.add(JGDframe);
});
我想myobject.json.geometry.vertex[0].position.x
。我怎麼才能得到它 ?