Small World Engine API Reference - v0.46.1
    Preparing search index...

    Interface StandardMaterialOptions

    Configuration options for StandardMaterial.

    interface StandardMaterialOptions {
        alphaMap?: Texture;
        alphaTest?: number;
        ao?: number;
        color?: Color;
        diffuseMap?: Texture;
        emissiveColor?: Color;
        emissiveIntensity?: number;
        emissiveMap?: Texture;
        envMap?: CubeTexture;
        metallic?: number;
        metallicMap?: Texture;
        normalMap?: Texture;
        normalScale?: Vector2D;
        reflectionMap?: Texture;
        reflectivity?: number;
        roughness?: number;
        roughnessMap?: Texture;
        transparent?: boolean;
    }
    Index

    Properties

    alphaMap?: Texture

    The alpha mask texture map.

    alphaTest?: number

    Alpha cutoff threshold. Fragments with alpha below this value are discarded. Defaults to 0.0.

    ao?: number

    Ambient occlusion factor (0 to 1). Defaults to 1.

    color?: Color

    The base color of the material. Defaults to white.

    diffuseMap?: Texture

    The diffuse texture map.

    emissiveColor?: Color

    The emissive color. Defaults to black.

    emissiveIntensity?: number

    The intensity of the emissive light. Defaults to 1.0.

    emissiveMap?: Texture

    The emissive texture map.

    envMap?: CubeTexture

    Environment map for Image-Based Lighting reflections.

    metallic?: number

    Metallic factor (0 to 1). Defaults to 0.

    metallicMap?: Texture

    The metallic texture map.

    normalMap?: Texture

    The normal map texture.

    normalScale?: Vector2D

    Scale factor for the normal map to control strength and flip X/Y. Defaults to (1, 1).

    reflectionMap?: Texture

    Planar reflection map.

    reflectivity?: number

    Planar reflection intensity. Defaults to 1.0.

    roughness?: number

    Roughness factor (0 to 1). Defaults to 0.5.

    roughnessMap?: Texture

    The roughness texture map.

    transparent?: boolean

    Whether the material is transparent. Defaults to false.