dino-ge
    Preparing search index...

    Class default

    A basic line object that can be drawn between two points.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    id: string = ...

    Unique identifier for the game object.

    strokeWidth: number

    Stroke width of the line in pixels.

    x1: number

    Start x coordinate in world space.

    x2: number

    End x coordinate in world space.

    y1: number

    Start y coordinate in world space.

    y2: number

    End y coordinate in world space.

    _registry: typeof default = Registry

    Static helper for tests to bypass Registry circularity if mocked.

    Accessors

    Methods

    • Emits a custom event on this object's event bus.

      Parameters

      • type: string

        The event type.

      • Optionaldetail: unknown

        Optional data to pass with the event.

      Returns void

    • Stops listening for an event on this object's event bus.

      Parameters

      • type: string

        The event type.

      • callback: (event: CustomEvent) => void

        The function to remove.

      Returns void

    • Listens for an event on this object's event bus.

      Parameters

      • type: string

        The event type.

      • callback: (event: CustomEvent) => void

        The function to run when the event occurs.

      Returns void