Repository navigation
API Variable GamepadState
const GamepadState: DataComponentDef<Record<string,
| ScalarType<"i32">
| ScalarType<"u8">
| ScalarType<"f32">>>;Defined in: src/engine/input/deviceEntities.ts:50
A gamepad's state this frame: buttons b0…b22 (0..1) and axes a0…a3 (-1..1, +Y down) by
wire index (controls.ts), held/down/up bitmasks (bit i: button i), gyro (rad/s) and
accelerometer (m/s²) where the device has them. Touchpad fingers (DualSense, DualShock 4):
tpHeld/tpDown/tpUp bitmasks (bit 0 finger 0, bit 1 finger 1) and each finger's position
tp0X/tp0Y, tp1X/tp1Y in 0..1 of the touchpad (origin top-left, +Y down; the last one
after it lifts). battery 0..1, or -1 when unknown or wired without one; charging 1 while
plugged in.
This wiki is generated from docs/wiki/ and the myco module's source on every push to master. Change pages there in a pull request: edits made here are not kept.
Basics
Gameplay
Rendering
Audio
- Playing sound
- Why is there no sound?
- Playlists
- Interactive music
- Sound generators
- Spatial audio
- Audio mixer
- Live mixing
- Loudness
- Audio profiler
- Audio takes
Reference