Percept
    Preparing search index...

    Class NodeAbstract

    A Node in the scene-graph, consisting of a Transform

    Hierarchy (View Summary)

    Implements

    Index
    • A scene-graph Node

      Parameters

      • id: string

        A unique identifier for this node

      • position: Vector

        Position where the node will be first initiated

      • controlPoints: Vector[]

        A set of Vectors defining points of control for this Node, for e.g. for a Rectangle, the four corners are its control points, transformations such as position, rotation and scale are applied to these control points

      Returns Node

    context: CanvasRenderingContext2D
    drawing: Drawing
    hitColor: Color
    id: string

    A unique identifier for this node

    offContext: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D
    order: number
    registeredEvents: any
    transform: Transform
    • get localRotation(): number

      Returns number

    • set localRotation(degrees: number): void

      Parameters

      • degrees: number

      Returns void

    • get rotation(): number

      Returns number

    • set rotation(degrees: number): void

      Parameters

      • degrees: number

      Returns void

    • get zIndex(): number

      Returns number

    • set zIndex(zIndex: number): void

      Parameters

      • zIndex: number

      Returns void

    • Calls all the event callbacks registered using on

      Parameters

      • method: string
      • Optionalargs: any[]

      Returns void

    • Calls internal _offRender function for this node

      Returns void

    • Register an event on this Node

      Parameters

      • eventKey: string

        name of the event

      • callback: Function

        callback

      Returns void

    • Calls internal _render/_offRender functions and recursively invokes render functions for all child nodes

      Returns void

    • Sets a unique color for this node on hit-maps

      Returns void