pmndrs / use-cannon

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

Is it possible to use cannon-worker-api with vanilla cannon-es? #413

Closed imokya closed 1 year ago

imokya commented 1 year ago

Is it possible to use cannon-worker-api with vanilla cannon-es, can we have an example of this?

isaac-mason commented 1 year ago

Hey @imokya, that's the eventual intent.

Worker logic used to live in the @react-three/cannon package, but was moved into a new cannon-worker-api package as part of https://github.com/pmndrs/use-cannon/issues/327.

You can use cannon-worker-api with vanilla cannon-es now, but you'd essentially be creating your own vanilla @react-three/cannon package to use it right now. It doesn't yet have a nice high-level API, and there's no examples right now.

Unfortunately I haven't had much time to push this along. If it's something you're keen for, and you're able to contribute, contribs are very welcome on this issue - https://github.com/pmndrs/use-cannon/issues/327

I'll close this issue for now, but feel free to discuss this further in the above issue.