You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Note for
three
>= v0.103.0
Please note, that starting with three.js r103,
GLTFLoader
is included in the
three
package itself and installing
three-gltf-loader
is no longer necessary.
three.js's r111 GLTFLoader wrapped as a module for easy importing, TypeScript type definitions included.
Usage
import*asTHREEfrom'three';importGLTFLoaderfrom'three-gltf-loader';constloader=newGLTFLoader();loader.load('path/to/your/file.gltf',(gltf)=>{// called when the resource is loadedscene.add(gltf.scene);(xhr)=>{// called while loading is progressingconsole.log(`${(xhr.loaded/xhr.total*100)}% loaded`);(error)=>{// called when loading has errorsconsole.error('An error happened',error);