use-cannon

👋💣 physics based hooks for @react-three/fiber

Downloads
64.4K
Stars
2.7K
Committers
46

Bot releases are hidden (Show)

use-cannon - v0.6.0

Published by stockhuman over 3 years ago

  • This release drops support for passing THREE.Geometry (deprecated as of r125) for convenience to useTrimesh and useConvexPolyhedron, examples updated accordingly. (#159)
  • Allows userData attribute use (#158)
use-cannon - v0.5.5

Published by stockhuman over 3 years ago

  • Make the stepping frame rate independent (#160)
  • implements RaycastVehicle (#156)
use-cannon - v0.5.4

Published by stockhuman over 3 years ago

  • Expose bodies' collisionResponse property (#146)
  • Combine frame & sync ops to avoid erratic renders (#155)
  • Convert worker to static import (#145)
  • Call body.updateMassProperties() when calling api.mass.set(x) (#144)
  • Fix example's init error, bring syntax up to date with r3f v5
  • Additional gl.xr checking
  • Minor dependency updates
use-cannon - v0.5.3

Published by codynova about 4 years ago

  • Fix bug with constraint cleanup (fix removeConstraint in worker) #116
use-cannon - v0.4.6

Published by codynova about 4 years ago

  • Update default value for Physics provider allowSleep to false
  • Updated dependencies
use-cannon - v0.4.7

Published by codynova about 4 years ago

  • Update useBox args to use extents instead of halfExtents
use-cannon - v0.4.8

Published by codynova about 4 years ago

  • Fix unresolved worker_threads with new version of worker-loader
use-cannon - v0.5.2

Published by codynova about 4 years ago

  • Export hook types #113
use-cannon - v0.5.1

Published by codynova about 4 years ago

  • Fix physics pausing in WebVR presentation mode #100
use-cannon - v0.5.0

Published by codynova over 4 years ago

  • Update Box args to use extents [x, y, z] instead of halfExtents [x/2, y/2, z/2]. This affects both useBox and useCompoundBody.
use-cannon - v0.4.9

Published by codynova over 4 years ago

  • Fix useBox args default values bug from v0.4.7
use-cannon - v0.4.5

Published by codynova over 4 years ago

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
use-cannon - v0.4.2

Published by codynova over 4 years ago

  • 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

use-cannon - v0.4.1

Published by codynova over 4 years ago

  • 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}>
    // ...
use-cannon - v0.3.0

Published by codynova over 4 years ago

Body properties can now be read from the worker asynchronously

use-cannon - v0.2.8

Published by codynova over 4 years ago

use-cannon - v0.2.6

Published by codynova over 4 years ago

  • Added material option in hooks args function
  • Added useCompoundBody hook for multi-shape bodies