Define a MeshDescriptor object, which helps creating a LitMesh and its shaders based on the various properties.

interface MeshDescriptor {
    parameters: LitMeshParameters;
    parent: Object3D;
    texturesDescriptors: ShaderTextureDescriptor[];
    nodes: Object3D[];
    extensionsUsed: GLTFExtensionsUsed;
    variantName?: string;
    alternateDescriptors?: Map<string, MeshDescriptor>;
    alternateMaterials?: Map<string, RenderMaterial>;
}

Properties

parameters: LitMeshParameters

ProjectedMeshParameters used to create the LitMesh.

parent: Object3D

LitMesh parent Object3D.

texturesDescriptors: ShaderTextureDescriptor[]

Array of ShaderTextureDescriptor defining the available textures and corresponding sampler names. Useful to build custom shaders from scratch.

nodes: Object3D[]

All the Geometry instances Object3D nodes used to calculate the eventual instances world and normal matrices.

extensionsUsed: GLTFExtensionsUsed

GLTFExtensionsUsed that should be used when creating the shaders.

variantName?: string

Name of the MeshDescriptor variant. Default to Default.

alternateDescriptors?: Map<string, MeshDescriptor>

Optional alternate Map of MeshDescriptor variants using variant names.

alternateMaterials?: Map<string, RenderMaterial>

Optional alternate Map of RenderMaterial variants using variant names.