mylingo3d
Version:
Lingo3D is a React/Vue 3d game development framework that ships with a complete visual editor
16 lines (12 loc) • 307 B
text/typescript
import Dummy from "../display/Dummy"
import Joystick from "../ui/Joystick"
const dummy = new Dummy()
const joystick = new Joystick()
joystick.onMove = e => {
dummy.strideForward = -e.y
dummy.strideRight = e.x
}
joystick.onMoveEnd = () => {
dummy.strideForward = 0
dummy.strideRight = 0
}