Closed isaac-mason closed 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/Ev4hdUedpSPXZfunE2P2YP3FfrZg
✅ Preview: https://use-cannon-git-fork-isaac-mason-worker-api-pmndrs.vercel.app
I'm actually ok with everything and moving forward from here. Does it seem like a usable api for the worker?
Great! Thanks for taking a look.
I think the worker API as it is now is largely good for building out the non-react package. There are a couple of things we may want to add/change as we go. One thing that comes to mind is - if we're building the other package to mirror cannon-es syntax/usage as we discussed in the issue, we may add addShape
and removeShape
worker ops for bodies?
But it's probably best to look at making those changes in small chunks as we build out that package.
For now, wrapping the current worker as-is sounds good to me 🙂
I'll update the PR to address your comments & rebase shortly.
@bjornstar I've rebased now & addressed your comments!
CannonWorker
between hooks and cannon web workerOperation
type to support props that are undefinedtypescript-eslint/member-ordering
for better ordering for classes