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

    Interface PhongMaterialOptions

    Configuration options for Phong material.

    interface PhongMaterialOptions {
        alphaTest?: number;
        color?: Color;
        diffuseMap?: Texture;
        normalMap?: Texture;
        normalScale?: Vector2D;
        shininess?: number;
        specularColor?: Color;
        specularMap?: Texture;
        transparent?: boolean;
    }
    Index

    Properties

    alphaTest?: number

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

    color?: Color

    The base color of the material. Defaults to white.

    diffuseMap?: Texture

    The diffuse texture map. Defaults to undefined.

    normalMap?: Texture

    The normal map texture. Defaults to undefined.

    normalScale?: Vector2D

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

    shininess?: number

    The shininess factor. Defaults to 32.0.

    specularColor?: Color

    The specular reflection color. Defaults to white.

    specularMap?: Texture

    The specular map texture. Defaults to undefined.

    transparent?: boolean

    Whether the material is transparent. Defaults to false.