Reputation: 31
I am loading a glb-File using GLTFLoader in Three.js: Before I was using the JSONLoader. Accessing the vertices of the loaded mesh was easy:
meh.geometry.vertices
But when looking at the mesh loaded with GLTFloader, I just can not find, where the vertices are?
I need to manipulate each single vertex for some particle animation.
Thanks
Upvotes: 3
Views: 2776
Reputation: 21
Use console.log(gltf)- To view the JSON file, then you will find everything in Scenes. To access the mesh use gltf.scene.traverse( function ( child ) {if ( child.isMesh ){ child.geometries.attributes...}}
Upvotes: 2