script src https cdnjs cloudflare com ajax libs three js r126 three min js integrity sha512 n8IpKWzDnBOcBhRlHirMZOUvEq2bLRMuJGjuVqbzUJwtTsgwOgK5aS0c1JA647XWYfqvXve8k3PtZdzpipFjgg crossorigin anonymous script script src https unpkg com three 0 126 0 examples js loaders GLTFLoader js script Or modular version import as THREE from https cdn jsdelivr net npm three 0 121 1 build three module js import GLTFLoader from https cdn jsdelivr net npm three 0 121 1 examples jsm loaders GLTFLoader js script let modelurl https raw githubusercontent com marcofugaro shrimpc at a72fa0ccd56a9eb42316e422bfb3598c5f7c94d9 public assets van gltf async let promise await fetch modelurl let text await promise text console log text text length const gltfLoader new THREE GLTFLoader console log gltfLoader gltfLoader let path https raw githubusercontent com marcofugaro shrimpc at a72fa0ccd56a9eb42316e422bfb3598c5f7c94d9 public assets parse function data path onLoad onError gltfLoader parse text path function gltf console log loaded gltf scene traverse function child if child isMesh console log child console log Object keys child console log gltf scene Object keys gltf scene function ee console log error console log ready script Get vertex data script src https cdnjs cloudflare com ajax libs three js r126 three min js integrity sha512 n8IpKWzDnBOcBhRlHirMZOUvEq2bLRMuJGjuVqbzUJwtTsgwOgK5aS0c1JA647XWYfqvXve8k3PtZdzpipFjgg crossorigin anonymous script script src https unpkg com three 0 126 0 examples js loaders GLTFLoader js script Or modular version import as THREE from https cdn jsdelivr net npm three 0 121 1 build three module js import GLTFLoader from https cdn jsdelivr net npm three 0 121 1 examples jsm loaders GLTFLoader js script let modelurl https raw githubusercontent com marcofugaro shrimpc at a72fa0ccd56a9eb42316e422bfb3598c5f7c94d9 public assets van gltf async let promise await fetch modelurl let text await promise text console log text text length const gltfLoader new THREE GLTFLoader console log gltfLoader gltfLoader let path https raw githubusercontent com marcofugaro shrimpc at a72fa0ccd56a9eb42316e422bfb3598c5f7c94d9 public assets parse function data path onLoad onError gltfLoader parse text path function gltf console log loaded gltf scene traverse function child if child isMesh normal position tangent uv console log typeof typeof child geometry attributes for let i 0 i Object keys child geometry attributes length i let key Object keys child geometry attributes i console log key key cont child geometry attributes key key normal cont null key position cont x 0 y 0 z 0 key tangent cont null key uv cont null let index child geometry index let normal child geometry attributes normal let position child geometry attributes position let tangent child geometry attributes tangent let uv child geometry attributes tangent console log index length index length console log i 3 index array 3 console log position 0 Object keys position array console log position length position count console log v 0 x y z position array 0 position array 1 position array 2 console log gltf scene Object keys gltf scene function ee console log error console log ready script
g text text length const gltfLoader new THREE GLTFLoader console log gltfLoader gltfLoader let path https raw githubusercontent com marcofugaro shrimpc at a72fa0ccd56a9eb42316e422bfb3598c5f7c94d9 public assets parse function data path onLoad onError gltfLoader parse text path function gltf console log loaded gltf scene traverse function child if child isMesh normal position tangent uv console log typeof typeof child geometry attributes for let i 0 i Object keys child geometry attributes length i let key Object keys child geometry attributes i console log key key cont child geometry attributes key key normal cont null key position cont x 0 y 0 z 0 key tangent cont null key uv cont null let index child geometry index let normal child geometry attributes normal let position child geometry attributes position let tangent child geometry attributes tangent let uv child geometry attributes tangent console log index length index length console log i 3 index array 3 console log position 0 Object keys position array console log position length position count console log v 0 x y z position array 0 position array 1 position array 2 console log gltf scene Object keys gltf scene function ee console log error console log ready script