pmndrs / use-cannon

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

Add types for worker #347

Closed bjornstar closed 2 years ago

bjornstar commented 2 years ago

Ended up being pretty straightforward with all the messages typed.

I split each of the larger operations into separate files:

I moved the CannonWorkerAPI out of the worker directory as the worker directory should be for only the items in the worker.

Found a few type mistakes in the messages.

Punted on a few sticky types and we should try to re-use the id property of the bodies, instead of bolting on uuid.

After this only propsToBody has not been converted.

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/6c6tAe2R38jst3DPgFutx1xYRUz4
✅ Preview: https://use-cannon-git-fork-bjornstar-more-types-pmndrs.vercel.app