- Android
- iOS
- Web
Joystick
Read directional touch input in a game loop.
Engine API Joysticknayan-ui/games
Read the mutable stick coordinates inside the game loop. Both axes range from −1 to 1.
Example.tsx
| Name | Type | Default | Details |
|---|---|---|---|
| size | number | Optional | |
| state | JoystickState | Required | |
| style | CSSProperties | Optional |