pmndrs / use-cannon

👋💣 physics based hooks for @react-three/fiber
https://cannon.pmnd.rs
2.74k stars 153 forks source link

[examples/RaycastVehicle] Use a single keydown/keyup event handler for controls #346

Closed bjornstar closed 2 years ago

bjornstar commented 2 years ago

The previous implementation creates 20 event listeners with 10 firing on each keydown and 10 on each keyup.

vercel[bot] commented 2 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pmndrs/use-cannon/EueRGmkDVU8w5TPs4qbAJnyFRmmf
✅ Preview: https://use-cannon-git-fork-bjornstar-fix-keybinds-pmndrs.vercel.app