phina.js.d.ts
    Preparing search index...

    Interface CanvasApp

    interface CanvasApp {
        accelerometer: phina.input.Accelerometer;
        awake: boolean;
        currentScene: phina.display.DisplayScene;
        currentTime: number;
        deltaTime: number;
        domElement: HTMLElement;
        elapsedTime: number;
        fps: number;
        frame: number;
        gridX: phina.util.Grid;
        gridY: phina.util.Grid;
        height: number;
        interactive: phina.app.Interactive;
        keyboard: phina.input.Keyboard;
        mouse: phina.input.Mouse;
        pointer: phina.input.Touch;
        pointers: phina.input.Touch[];
        rootScene: phina.display.DisplayScene;
        startTime: number;
        ticker: phina.util.Ticker;
        touch: phina.input.Touch;
        touchList: phina.input.TouchList;
        updater: phina.app.Updater;
        width: number;
        addEventListener(type: string, listener: Function): this;
        clear(type: string): this;
        clearEventListener(type: string): this;
        dispatchEvent(e: { type: string }): this;
        dispatchEventByType(type: string, param: object): this;
        enableDatGUI(callback: Function): this;
        enableStats(): this;
        fire(e: { type: string }): this;
        fitScreen(): void;
        flare(type: string, param?: object): this;
        has(type: string): boolean;
        hasEventListener(type: string): boolean;
        kill(): this;
        off(type: string, listener: Function): this;
        on(type: string, listener: Function): this;
        one(type: string, listener: Function): this;
        popScene(): phina.display.DisplayScene;
        pushScene(scene: phina.display.DisplayScene): this;
        removeEventListener(type: string, listener: Function): this;
        replaceScene(scene: phina.display.DisplayScene): this;
        run(): this;
        start(): this;
    }

    Hierarchy (View Summary)

    Index

    Properties

    accelerometer: phina.input.Accelerometer
    awake: boolean
    currentScene: phina.display.DisplayScene
    currentTime: number
    deltaTime: number
    domElement: HTMLElement
    elapsedTime: number
    fps: number
    frame: number
    gridX: phina.util.Grid
    gridY: phina.util.Grid
    height: number
    interactive: phina.app.Interactive
    keyboard: phina.input.Keyboard
    pointer: phina.input.Touch
    pointers: phina.input.Touch[]
    startTime: number
    ticker: phina.util.Ticker
    touchList: phina.input.TouchList
    updater: phina.app.Updater
    width: number

    Methods

    • Parameters

      • e: { type: string }

      Returns this

    • Parameters

      • type: string
      • Optionalparam: object

      Returns this

    • Parameters

      • type: string
      • listener: Function

      Returns this

    • Parameters

      • type: string
      • listener: Function

      Returns this

    • Parameters

      • type: string
      • listener: Function

      Returns this