Documentation
    Preparing search index...

    Interface SpriteOptions

    Optional construction arguments of Sprite — the quad's own size and anchor, plus every RenderableOptions field.

    Extending the base record (rather than restating a subset) is the round-trip contract: the §79 writer always writes the drawable flags, the reader spreads them into this record, and super(…, options) forwards whatever the base knows. Restating a subset dropped castShadow / receiveShadow / frustumCulled until 2026-08-30; a new Renderable field cannot be dropped the same way again.

    interface SpriteOptions {
        anchor?: { x: number; y: number };
        castShadow?: boolean;
        clip?: boolean;
        frame?: SpriteFrame;
        frustumCulled?: boolean;
        height?: number;
        receiveShadow?: boolean;
        renderLayer?: number;
        renderOrder?: number;
        scissor?: ScissorRect | null;
        width?: number;
    }

    Hierarchy (View Summary)

    Index
    anchor?: { x: number; y: number }

    Initial Sprite.anchor, copied into the sprite's own vector. Defaults to the centre, (0.5, 0.5).

    castShadow?: boolean

    Initial Renderable.castShadow; defaults to true (§69).

    clip?: boolean

    Initial Node.clip; defaults to false (§67).

    Here rather than on a Node options record because a clip is only meaningful on a node that draws — the mask is the node's own geometry — and this is the options record every drawable funnels through. It is also what gives the §79 readers one spelling for the field beside the three §49 flags above.

    frame?: SpriteFrame

    Initial Sprite.frame, copied into the sprite's own record and validated against the material's texture (§85). Omitted means the whole texture, which is what a sprite without a frame draws.

    frustumCulled?: boolean

    Initial Renderable.frustumCulled; defaults to true (§87).

    height?: number

    Initial Sprite.height in world units; defaults to 1.

    receiveShadow?: boolean

    Initial Renderable.receiveShadow; defaults to true (§69).

    renderLayer?: number

    Initial Renderable.renderLayer; defaults to 0.

    renderOrder?: number

    Initial Renderable.renderOrder; defaults to 0.

    scissor?: ScissorRect | null

    Initial Renderable.scissor; defaults to null (§67).

    A per-draw axis-aligned rectangle in drawing-buffer pixels. null (the default) leaves the view scissor alone, so existing scenes stay transcript-identical. See scissor.ts.

    width?: number

    Initial Sprite.width in world units; defaults to 1.