The name of the extension
Static
assignLoad a different resolution of a mesh (if available)
a promise that resolves to the mesh with the requested LOD level
const mesh = this.gameObject as Mesh;
NEEDLE_progressive.assignMeshLOD(context, sourceId, mesh, 1).then(mesh => {
console.log("Mesh with LOD level 1 loaded", mesh);
});
Static
assignLoad a different resolution of a texture (if available)
the context
the sourceid of the file from which the texture is loaded (this is usually the component's sourceId)
the material or texture to load the LOD for (if passing in a material all textures in the material will be loaded)
the level of detail to load (0 is the highest resolution) - currently only 0 is supported
a promise that resolves to the material or texture with the requested LOD level
Static
beginsubscribe to loading event ended event
Static
beginsubscribe to events whenever a loading event starts, invoked for every single loading process that starts
Static
getStatic
hasLODLevelCheck if a LOD level is available for a mesh or a texture
the mesh or texture to check
Optional
level: numberthe level of detail to check for (0 is the highest resolution). If undefined, the function checks if any LOD level is available
true if the LOD level is available (or if any LOD level is available if level is undefined)
Static
stopStatic
stopGenerated using TypeDoc
The NEEDLE_progressive extension for the GLTFLoader is responsible for loading progressive LODs for meshes and textures.
This extension can be used to load different resolutions of a mesh or texture at runtime (e.g. for LODs or progressive textures).
Example