我使用此代码加载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
。我怎么能得到它?
答案 0 :(得分:0)
是JGDframe.geometry.vertices[0].x
或y
或z