initApp(opt: canvas: HTMLCanvasElement
gamepads?: Record<string, GamepadDef>
): dt(): number
fixedDt(): number
restDt(): number
time(): number
run(fixedUpdate: ()=>void, update: (processInput: ()=>void, resetInput: ()=>void)=>void): void
canvas: HTMLCanvasElement
fps(): number
numFrames(): number
quit(): void
isHidden(): boolean
setFullscreen(f?: boolean): void
isFullscreen(): boolean
setCursor(c: Cursor): void
screenshot(): string
getGamepads(): KGamepad[]
getCursor(): Cursor
setCursorLocked(b: boolean): void
isCursorLocked(): boolean
isTouchscreen(): boolean
mousePos(): Vec2
mouseDeltaPos(): Vec2
isKeyDown(k?: Key | Key[]): boolean
isKeyPressed(k?: Key | Key[]): boolean
isKeyPressedRepeat(k?: Key | Key[]): boolean
isKeyReleased(k?: Key | Key[]): boolean
isMouseDown(m?: MouseButton): boolean
isMousePressed(m?: MouseButton): boolean
isMouseReleased(m?: MouseButton): boolean
isMouseMoved(): boolean
isGamepadButtonPressed(btn?: KGamepadButton | KGamepadButton[]): boolean
isGamepadButtonDown(btn?: KGamepadButton | KGamepadButton[]): boolean
isGamepadButtonReleased(btn?: KGamepadButton | KGamepadButton[]): boolean
getGamepadStick(stick: GamepadStick): Vec2
isButtonPressed(btn?: string | string[]): boolean
isButtonDown(btn?: string | string[]): boolean
isButtonReleased(btn?: string | string[]): boolean
setButton(btn: string, binding: ButtonBinding): void
getButton(btn: string): ButtonBinding
pressButton(btn: string): void
releaseButton(btn: string): void
charInputted(): string[]
onResize(action: ()=>void): KEventController
onKeyDown: (action: (key: Key)=>void)=>KEventController & (key: Key | Key[], action: (key: Key)=>void)=>KEventController
onKeyPress: (action: (key: Key)=>void)=>KEventController & (key: Key | Key[], action: (key: Key)=>void)=>KEventController
onKeyPressRepeat: (action: (key: Key)=>void)=>KEventController & (key: Key | Key[], action: (key: Key)=>void)=>KEventController
onKeyRelease: (action: (key: Key)=>void)=>KEventController & (key: Key | Key[], action: (key: Key)=>void)=>KEventController
onMouseDown: (action: (m: MouseButton)=>void)=>KEventController & (mouse: MouseButton | MouseButton[], action: (m: MouseButton)=>void)=>KEventController
onMousePress: (action: (m: MouseButton)=>void)=>KEventController & (mouse: MouseButton | MouseButton[], action: (m: MouseButton)=>void)=>KEventController
onMouseRelease: (action: (m: MouseButton)=>void)=>KEventController & (mouse: MouseButton | MouseButton[], action: (m: MouseButton)=>void)=>KEventController
onMouseMove(f: (pos: Vec2, dpos: Vec2)=>void): KEventController
onCharInput(action: (ch: string)=>void): KEventController
onTouchStart(f: (pos: Vec2, t: Touch)=>void): KEventController
onTouchMove(f: (pos: Vec2, t: Touch)=>void): KEventController
onTouchEnd(f: (pos: Vec2, t: Touch)=>void): KEventController
onScroll(action: (delta: Vec2)=>void): KEventController
onHide(action: ()=>void): KEventController
onShow(action: ()=>void): KEventController
onGamepadButtonDown: (action: (btn: KGamepadButton, gamepad: KGamepad)=>void)=>KEventController & (btn: KGamepadButton, action: (btn: KGamepadButton, gamepad: KGamepad)=>void)=>KEventController
onGamepadButtonPress: (action: (btn: KGamepadButton, gamepad: KGamepad)=>void)=>KEventController & (btn: KGamepadButton | KGamepadButton[], action: (btn: KGamepadButton, gamepad: KGamepad)=>void)=>KEventController
onGamepadButtonRelease: (action: (btn: KGamepadButton, gamepad: KGamepad)=>void)=>KEventController & (btn: KGamepadButton | KGamepadButton[], action: (btn: KGamepadButton, gamepad: KGamepad)=>void)=>KEventController
onGamepadStick(stick: GamepadStick, action: (value: Vec2, gp: KGamepad)=>void): KEventController
onGamepadConnect(action: (gamepad: KGamepad)=>void): void
onGamepadDisconnect(action: (gamepad: KGamepad)=>void): void
onButtonPress: (action: (btn: string)=>void)=>KEventController & (btn: string | string, action: (btn: string)=>void)=>KEventController
onButtonDown: (action: (btn: string)=>void)=>KEventController & (btn: string | string, action: (btn: string)=>void)=>KEventController
onButtonRelease: (action: (btn: string)=>void)=>KEventController & (btn: string | string, action: (btn: string)=>void)=>KEventController
getLastInputDeviceType(): ButtonBindingDevice | null
events: KEventHandler<mouseMove: []
mouseDown: [MouseButton]
mousePress: [MouseButton]
mouseRelease: [MouseButton]
charInput: [string]
keyPress: [Key]
keyDown: [Key]
keyPressRepeat: [Key]
keyRelease: [Key]
touchStart: [Vec2, Touch]
touchMove: [Vec2, Touch]
touchEnd: [Vec2, Touch]
gamepadButtonDown: [KGamepadButton, KGamepad]
gamepadButtonPress: [KGamepadButton, KGamepad]
gamepadButtonRelease: [KGamepadButton, KGamepad]
gamepadStick: [string, Vec2, KGamepad]
gamepadConnect: [KGamepad]
gamepadDisconnect: [KGamepad]
buttonDown: [string]
buttonPress: [string]
buttonRelease: [string]
scroll: [Vec2]
hide: []
show: []
resize: []
input: []
>