XYZ Maps Documentation
    Preparing search index...

    Interface MaterialExperimental

    The Material to render the model/geometry using the Phong reflection model.

    interface Material {
        alphaCutoff?: number;
        alphaMode?: ModelAlphaMode;
        ambient?: number[];
        diffuse?: number[];
        diffuseMap?: string;
        emissive?: number[];
        flipY?: boolean;
        illumination?: number;
        mode?: "Triangles" | "Points";
        normalMap?: string;
        opacity?: number;
        opacityMap?: string;
        pointSize?: number;
        shininess?: number;
        shininessMap?: string;
        specular?: number[];
        specularMap?: string;
        useUVMapping?: boolean;
        uvScale?: number;
        wrap?:
            | "clamp"
            | "repeat"
            | "mirror"
            | [
                wrapS: "clamp"
                | "repeat"
                | "mirror",
                wrapT: "clamp" | "repeat" | "mirror",
            ];
    }
    Index
    alphaCutoff?: number

    Alpha threshold for alphaMode: 'mask'.

    0.5
    
    alphaMode?: ModelAlphaMode

    Alpha rendering mode. auto infers blending from material opacity or an opacity map. Alpha in diffuseMap requires an explicit mask or blend mode. See ModelAlphaMode for the current blending and sorting limitations.

    'auto'
    
    ambient?: number[]

    The Ambient color reflection intensity constant of the material.

    [1,1,1] (white)
    
    diffuse?: number[]

    Diffuse color of the material.

    [1, 1, 1] (white)
    
    diffuseMap?: string

    The name of the diffuse map used by the material. The actual texture must be defined in ModelData.textures.

    emissive?: number[]

    The emissive color of the material. Emissive Color is solid and unaffected by other lightning.

    [1,1,1] (white)
    
    flipY?: boolean

    A flag to specify if the texture should be flipped vertically.

    false
    
    illumination?: number

    The Illumination Mode of the material.

    • mode 0: Constant color mode. Colors, no lighting, no shading.
    • mode 1: Diffuse lighting only, without specular highlights.
    • mode 2 (and higher): Diffuse lighting and specular highlights when shininess is positive.

    Explicit modes 0 and 1 disable highlights even when the style adds specular color or shininess. When omitted, mode 2 preserves material/style highlights. Higher MTL modes use the same lighting as mode 2; reflection/refraction is not implemented.

    2
    
    mode?: "Triangles" | "Points"

    The used primitive type to render the model geometry.

    "Triangles"
    
    normalMap?: string

    The name of the normal map used by the material. The actual texture must be defined in ModelData.textures.

    opacity?: number

    The opacity of the material determines how much this material dissolves into the background. The value must be between 0.0 (completely transparent) and 1.0 (fully opaque).

    1
    
    opacityMap?: string

    Opacity map name from MTL map_d. The actual texture must be defined in ModelData.textures.

    pointSize?: number

    The used pointSize in pixels to render when mode is set to "Points".

    shininess?: number

    The shininess of the material determines how shiny the specular highlights are rendered. A higher value results in a sharper, more focused highlight, while lower values cause the highlight to become more blown out. The value range is from 0 to 1000.

    32
    
    shininessMap?: string

    The name of the shininess map (Wavefront MTL map_Ns). Its red channel (0 to 1) multiplies the scalar Material.shininess, including any style shininess contribution, without changing specular color. It is used only when specular lighting is enabled. The actual texture must be defined in ModelData.textures.

    specular?: number[]

    Specular defines the specular highlight color of the material. Materials without an explicit specular color have no specular highlights unless the style adds one.

    [0, 0, 0] (black)
    
    specularMap?: string

    The name of the specular color map used by the material. In Wavefront MTL, this corresponds to map_Ks and modulates the specular color using RGB. The actual texture must be defined in ModelData.textures.

    useUVMapping?: boolean
    uvScale?: number
    wrap?:
        | "clamp"
        | "repeat"
        | "mirror"
        | [
            wrapS: "clamp"
            | "repeat"
            | "mirror",
            wrapT: "clamp" | "repeat" | "mirror",
        ]

    Texture wrapping mode for the U (horizontal) and V (vertical) directions. Supported values are 'clamp', 'repeat', and 'mirror'.

    'repeat'