This class can be used to load the glTF file format, which describes scenes and models. It handles all buffer, texture and geometry creation as well as scene generation. Per glTF scene, one SceneNode is generated which represents the hierarchy of the scene.
const loader = new GLTFLoader(this._context); await loader.loadAsset(GltfRenderer.assetURI); const rootNode = loader.defaultScene;
Returns the default scene is specified by glTF, otherwise returns the first scene.
Get a list of all meshes contained in the glTF asset. The meshes are given in the order in which they appear in the glTF file.
A default program, which can be used to render resources loaded with glTF. It supports physically-based rendering as described in the glTF standard.
Returns a map, where the key is an URI referncing image data and the values are the corresponding generated texture by this loader. For textures, where no URI is available (e.g. loaded from an internal data blob), an id generated by the loader is used.
Get a single mesh from the glTF scene.
Name of the mesh as specified in the glTF file