简体   繁体   中英

How to access single vertices of mesh loaded with GLTFLoader in Three.js

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

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...}}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM