Releases: pmndrs/use-cannon
Releases · pmndrs/use-cannon
v0.4.7
- Update
useBox
args
to use extents
instead of halfExtents
v0.4.6
- Update default value for
Physics
provider allowSleep
to false
- Updated dependencies
v0.4.5
v0.4.5
- Updates from
cannon-es
- useCylinder
default axis alignment changed
- Fix
peerDependencies
for typescript>=3.8
v0.4.4
- Add
linearFactor
and angularFactor
to body API
v0.4.3
- Fix instantiating bodies with
velocity
and angularVelocity
v0.4.2
- Body "collide" event now properly returns collided bodies
Where target
is the body with the event listener attached, and body
is the other body that was collided with
v0.4.1
- Fixes a bug where
useCompoundBody
expected rotations in Quaternion (instead of Euler)
- Enables subscribing to body props through the api:
const velocity = useRef([0, 0, 0])
const [ref, api] = useSphere(() => ({ mass: 10 }))
useEffect(() => api.velocity.subscribe(v => velocity.current = v), [])
return (
<mesh ref={ref}>
// ...
v0.3.0
Body properties can now be read from the worker asynchronously
v0.2.6
- Added
material
option in hooks args function
- Added
useCompoundBody
hook for multi-shape bodies