Atlas Engine
API Referenceatlasatlas/input

Interactive

Callback interface for keyboard, mouse, scroll, and per-frame interaction.

Module: atlas/input

Callback interface for keyboard, mouse, scroll, and per-frame interaction.

Declaration

export abstract class Interactive { ... }

Methods

onKeyPress

Called when key press occurs.

abstract onKeyPress(key: Key, dt: number): void;

onKeyRelease

Called when key release occurs.

abstract onKeyRelease(key: Key, dt: number): void;

onMouseMove

Called when mouse move occurs.

abstract onMouseMove(packet: MousePacket, dt: number): void;

onMouseButtonPress

Called when mouse button press occurs.

abstract onMouseButtonPress(button: MouseButton, dt: number): void;

onMouseScroll

Called when mouse scroll occurs.

abstract onMouseScroll(packet: MouseScrollPacket, dt: number): void;

onEachFrame

Called when each frame occurs.

abstract onEachFrame(dt: number): void;

On this page