Interface IScene

interface IScene {
    children: (() => ISceneNode[]);
    destroy: (() => void);
    find: ((key) => null | ISceneNode);
    off: ((event, callback) => void);
    on: ((event, callback) => void);
    parent: (() => null | ISceneNode);
    render: (() => void);
    template: (() => ITemplate);
}

Properties

children: (() => ISceneNode[])

Type declaration

destroy: (() => void)

Type declaration

    • (): void
    • Destroy the scene and all its children.

      Returns void

      Remark

      This will also unregister any previously registered key listeners.

find: ((key) => null | ISceneNode)

Type declaration

    • (key): null | ISceneNode
    • Find a node by key

      Parameters

      • key: string

        string key

      Returns null | ISceneNode

      ISceneNode or null

off: ((event, callback) => void)

Type declaration

    • (event, callback): void
    • Unregister a key listener

      Parameters

      • event: string

        string event name

      • callback: any

        callback function

      Returns void

on: ((event, callback) => void)

Type declaration

    • (event, callback): void
    • Register a new key listener

      Parameters

      • event: string

        string event name

      • callback: any

        callback function

      Returns void

parent: (() => null | ISceneNode)

Type declaration

render: (() => void)

Type declaration

    • (): void
    • Render the scene This will parse the template and render all nodes to the scene

      Returns void

template: (() => ITemplate)

Type declaration

Generated using TypeDoc