@rendley/sdk - v1.15.5
    Preparing search index...

    Class Display

    Manages the project canvas, renderer sizing, background rendering, and display hit-testing.

    Index

    Constructors

    • Creates a display wrapper with default resolution and renderer settings.

      Returns Display

    Properties

    renderer: PixiRenderer

    Methods

    • Destroys the renderer and recreates the DOM canvas element.

      Returns void

      Nothing.

    • Returns the configured display background color.

      Returns string

      The background color string.

    • Returns the top-most clip under the specified cursor position.

      Parameters

      • cursorX: number

        Cursor X coordinate in canvas space.

      • cursorY: number

        Cursor Y coordinate in canvas space.

      Returns null | string

      The matching clip ID, or null if no clip is hit.

    • Returns the current display height.

      Returns number

      The display height in pixels.

    • Returns the current display resolution.

      Returns [number, number]

      The [width, height] tuple in pixels.

    • Returns the renderer canvas element.

      Returns HTMLCanvasElement

      The canvas element, if the renderer is initialized.

    • Returns the current display width.

      Returns number

      The display width in pixels.

    • Initializes the PIXI renderer and applies the requested display configuration.

      Parameters

      • options: DisplayOptions

        Display initialization options, including the target canvas element.

      Returns void

      Nothing.

    • Serializes the current display state.

      Returns { backgroundColor: string; height: number; width: number }

      The serialized display payload.

    • Updates the display background color.

      Parameters

      • color: string

        New CSS color or gradient string.

      Returns void

      Nothing.

    • Resizes the display and notifies dependent subsystems.

      Parameters

      • width: number

        New display width, in pixels.

      • height: number

        New display height, in pixels.

      Returns void

      Nothing.

    • Restores a display instance from serialized data while preserving the current canvas and antialias configuration.

      Parameters

      • data: object

        Serialized display payload.

      Returns Display

      The deserialized display instance.