Interface Events

interface Events {
    canvas.onresize: ((width: number, height: number) => void);
    dom_ready: (() => void);
    gamepad.connected: ((gamepad: Gamepad) => void);
    gamepad.disconnected: ((gamepad: Gamepad) => void);
    gamepad.update: ((index: string, type: "buttons" | "axes", button: number, current: {
        pressed: boolean;
        value: number;
    }) => void);
    globalThis.onresize: ((event: Event) => void);
    globalThis.onscroll: ((event: Event) => void);
    globalThis.orientationchange: ((event: Event) => void);
    me.blur: (() => void);
    me.boot: (() => void);
    me.event.pointerlockChange: ((locked: boolean) => void);
    me.event.pointermove: ((pointer: Pointer) => void);
    me.game.afterDraw: ((time: number) => void);
    me.game.afterUpdate: ((time: number) => void);
    me.game.beforeDraw: ((time: number) => void);
    me.game.beforeUpdate: ((time: number) => void);
    me.game.dragend: ((event: unknown, draggable: Draggable) => void);
    me.game.dragstart: ((event: unknown, draggable: Draggable) => void);
    me.game.onInit: (() => void);
    me.game.onLevelLoaded: ((levelId: string) => void);
    me.game.onReset: (() => void);
    me.game.onUpdate: ((time: number) => void);
    me.input.keydown: ((action: undefined | string, keyCode: number, edge: boolean) => void);
    me.input.keyup: ((action: undefined | string, keyCode: number) => void);
    me.loader.onError: ((resource: unknown) => void);
    me.loader.onProgress: ((progress: number, resource: unknown) => void);
    me.loader.onload: (() => void);
    me.stage.onReset: ((stage: Stage) => void);
    me.state.onChange: (() => void);
    me.state.onPause: (() => void);
    me.state.onRestart: ((time: number) => void);
    me.state.onResume: ((time: number) => void);
    me.state.onStop: (() => void);
    me.tick: ((time: number) => void);
    me.video.onInit: ((renderer: Renderer) => void);
    me.world.step: ((dt: number) => void);
    renderer.contextlost: ((renderer: Renderer) => void);
    renderer.contextrestored: ((renderer: Renderer) => void);
    viewport.onchange: ((position: Vector2d) => void);
    viewport.onresize: ((width: number, height: number) => void);
}

Properties

canvas.onresize: ((width: number, height: number) => void)
dom_ready: (() => void)
gamepad.connected: ((gamepad: Gamepad) => void)
gamepad.disconnected: ((gamepad: Gamepad) => void)
gamepad.update: ((index: string, type: "buttons" | "axes", button: number, current: {
    pressed: boolean;
    value: number;
}) => void)
globalThis.onresize: ((event: Event) => void)
globalThis.onscroll: ((event: Event) => void)
globalThis.orientationchange: ((event: Event) => void)
me.blur: (() => void)
me.boot: (() => void)
me.event.pointerlockChange: ((locked: boolean) => void)
me.event.pointermove: ((pointer: Pointer) => void)
me.game.afterDraw: ((time: number) => void)
me.game.afterUpdate: ((time: number) => void)
me.game.beforeDraw: ((time: number) => void)
me.game.beforeUpdate: ((time: number) => void)
me.game.dragend: ((event: unknown, draggable: Draggable) => void)
me.game.dragstart: ((event: unknown, draggable: Draggable) => void)
me.game.onInit: (() => void)
me.game.onLevelLoaded: ((levelId: string) => void)
me.game.onReset: (() => void)
me.game.onUpdate: ((time: number) => void)
me.input.keydown: ((action: undefined | string, keyCode: number, edge: boolean) => void)
me.input.keyup: ((action: undefined | string, keyCode: number) => void)
me.loader.onError: ((resource: unknown) => void)
me.loader.onProgress: ((progress: number, resource: unknown) => void)
me.loader.onload: (() => void)
me.stage.onReset: ((stage: Stage) => void)
me.state.onChange: (() => void)
me.state.onPause: (() => void)
me.state.onRestart: ((time: number) => void)
me.state.onResume: ((time: number) => void)
me.state.onStop: (() => void)
me.tick: ((time: number) => void)
me.video.onInit: ((renderer: Renderer) => void)
me.world.step: ((dt: number) => void)
renderer.contextlost: ((renderer: Renderer) => void)
renderer.contextrestored: ((renderer: Renderer) => void)
viewport.onchange: ((position: Vector2d) => void)
viewport.onresize: ((width: number, height: number) => void)