Skip to content

Releases: pmndrs/use-cannon

v0.4.7

15 Sep 02:18
Compare
Choose a tag to compare
  • Update useBox args to use extents instead of halfExtents

v0.4.6

15 Sep 02:18
Compare
Choose a tag to compare
  • Update default value for Physics provider allowSleep to false
  • Updated dependencies

v0.4.5

09 Jun 18:31
Compare
Choose a tag to compare

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

06 Apr 18:41
Compare
Choose a tag to compare
  • 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

03 Apr 15:55
Compare
Choose a tag to compare
  • 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

01 Apr 12:43
Compare
Choose a tag to compare

Body properties can now be read from the worker asynchronously

v0.2.8

28 Mar 00:06
Compare
Choose a tag to compare
0.2.8

v0.2.6

24 Mar 13:54
22983f8
Compare
Choose a tag to compare
  • Added material option in hooks args function
  • Added useCompoundBody hook for multi-shape bodies