GLTFScenesManager constructor.
parameters used to create our GLTFScenesManager.
our CameraRenderer class object.
The gltf object used.
The CameraRenderer used.
The gltf object used.
The ScenesManager containing all the useful data.
Private
#primitiveThe PrimitiveInstances Map, to group similar Mesh by instances.
Static
getGet an attribute type, bufferFormat and size from its accessor type.
accessor type to use.
Corresponding attribute type
Corresponding attribute bufferFormat
Corresponding attribute size
Static
getGet the corresponding typed array constructor based on the accessor component type.
accessor component type to use.
Static
gpuGet the GPUPrimitiveTopology based on the WebGL primitive mode.
WebGL primitive mode to use.
Static
gpuGet the GPUAddressMode based on the WebGL texture wrap mode.
WebGL texture wrap mode to use.
Create the Sampler and add them to the scenesManager samplers array.
Create the {ScenesManager.materialsTextures | scenesManager materialsTextures array} and each associated MaterialTexture and their respective Texture.
Create a ChildDescriptor from a parent ChildDescriptor and a GLTF Node
parent ChildDescriptor to use.
GLTF Node to use.
Create the ScenesManager scenes based on the gltf object.
Add all the needed Mesh based on the ScenesManager meshesDescriptors array.
allow to optionally patch the Mesh parameters before creating it (can be used to add custom shaders, uniforms or storages, change rendering options, etc.)
Destroy the current ScenesManager by removing all created meshes and destroying all the Object3D nodes.
Used to create a GLTFScenesManager from a given gltf object.
Parse the gltf object, create all the Sampler and Texture, create all the Object3D nodes to compute the correct transformations and parent -> child relationships, create all the needed MeshDescriptor containing the Geometry, Mesh parameters and so on.
Loading Features
Example