Skip to content

@vaguevoid/fiasco / ecs/resources / ButtonState

Type Alias: ButtonState

ButtonState = object

Defined in: src/ecs/resources.ts:793

Metadata about button state. Available when using the Inputs resource and calling methods like inputs.key(...)

Properties

isHeld

isHeld: boolean

Defined in: src/ecs/resources.ts:812

If the button is being held down. Only true if previous frame and current frame were both pressed.


isPressed

isPressed: boolean

Defined in: src/ecs/resources.ts:797

If the button is currently pressed.


justPressed

justPressed: boolean

Defined in: src/ecs/resources.ts:802

If the button has just been pressed this frame. Only true for the frame it was pressed and not past or future frames.


justReleased

justReleased: boolean

Defined in: src/ecs/resources.ts:807

If the button has just been released this frame. Only true for the frame it was released and not past or future frames.