Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

JoystickProps

  • JoystickProps
Property Type Default value Description
className? string undefined Placement and visibility, such as showing it only on touch screens.
grabMargin? number 8 How far past the drawn ring a thumb still catches the stick, in the ring’s own units. The ring grows to fill it on the grab, which is what tells the player what they caught.
onSteer (direction) => void undefined Where the thumb is, on the unit disc: x right, y up the screen. (0, 0) while nothing holds it, and on release. A fresh vector each time, so the caller may keep one.
slot? Slot Slot.BottomLeft The slot it stands in.