Documentation
    Preparing search index...

    Interface SpriteMaterialOptions

    Construction arguments of SpriteMaterial — its texture and tint, plus §57's shared render state from MaterialOptions.

    interface SpriteMaterialOptions {
        blendMode?: BlendMode;
        colorWrite?: boolean;
        depthTest?: boolean;
        depthWrite?: boolean;
        opacity?: number;
        stencil?: StencilState;
        texture: MaterialTexture;
        tint?: readonly [number, number, number, number];
        transparent?: boolean;
    }

    Hierarchy (View Summary)

    Index
    blendMode?: BlendMode

    Initial Material.blendMode; defaults to "normal".

    colorWrite?: boolean

    Initial Material.colorWrite; defaults to true.

    depthTest?: boolean

    Initial Material.depthTest; defaults to true.

    depthWrite?: boolean

    Initial Material.depthWrite; defaults to true.

    opacity?: number

    Initial Material.opacity; defaults to 1 (fully opaque).

    stencil?: StencilState

    Initial Material.stencil; defaults to undefined (no stencil test). A StencilState, which validates itself at construction.

    The texture to sample. Required: a sprite material without one draws nothing, and defaulting it would hide the mistake behind an invisible sprite instead of a type error.

    tint?: readonly [number, number, number, number]

    Initial tint, copied into the material's own array. Defaults to opaque white [1, 1, 1, 1], which multiplies the sampled texel to no change.

    transparent?: boolean

    Initial Material.transparent; defaults to false.