Inferring physics shape parameters from three.js objects? #182
Replies: 1 comment 5 replies
-
Hi @donmccurdy! Hoping I can re-spark some discussion around this! One difficulty I found using But this is a little wasteful in generating a shape, only to take its properties and send them to a web worker to reconstruct the shape there again. I'd be interested in hearing your opinions on whether |
Beta Was this translation helpful? Give feedback.
-
I'm currently maintaining a library (https://github.com/donmccurdy/three-to-cannon) that creates cannon.js shapes, given three.js objects and some user input on e.g. cylinder orientation. That library is aging (needs significant updates for Geometry -> BufferGeometry changes in recent three.js versions) and would probably benefit from a port to TypeScript. The library was originally written for A-Frame, which I'm much less involved with these days. So I'm trying to get a sense of what r3f users are doing here and whether there's overlap, rather than starting a major refactor based only on my earlier experiences with A-Frame.
Does
use-cannon
infer cannon.js shape parameters, or does the user configure this? If inferred, is that happening at runtime or somewhere offline like gltf2jsx? Basically wondering if there's something in this project I should try to reuse, or if you'd have any opinions on the direction of three-to-cannon.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions