Skip to main content

GLTFLoader

class GLTFLoader extends Loader

glTF/glb 3D model loader

constructor

new GLTFLoader(view3D)

Create a new instance of GLTFLoader

PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
view3DView3D

Methods

load

Load new GLTF model from the given url

Returns: Promise<Model>

  • Promise that resolves Model
PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
urlstringURL to fetch glTF/glb file

loadFromFiles

Load new GLTF model from the given files

Returns: Promise<Model>

  • Promise that resolves Model
PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
filesFile[]Files that has glTF/glb and all its associated resources like textures and .bin data files