Here is the code I am using to load a 3D model in THREE.js:
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 );
});
I am trying to retrieve
myobject.json.geometry.vertex[0].position.x
. Any suggestions on how to achieve this?