Skip to content

Releases: pmndrs/use-cannon

v4.6.0 - 2022-01-15

15 Jan 08:06
Compare
Choose a tag to compare

v4.5.0 - 2022-01-08

08 Jan 11:09
Compare
Choose a tag to compare
  • [constraintOptns] Add maxMultiplier (@Glavin001)

v4.4.1 - 2022-01-04

04 Jan 22:35
Compare
Choose a tag to compare
  • [Hooks] Destructure and set defaults intead of using ?? (@bjornstar)
  • [useRaycastVehicle] Use correct ordering for arguments (@bjornstar)
  • [examples/RaycastVehicle] Reset restores the vehicle to it's initial angularVelocity, position, & rotation (@bjornstar)

v4.4.0 - 2022-01-01

08 Jan 11:11
Compare
Choose a tag to compare

v4.3.1 - 2021-12-30

08 Jan 11:12
Compare
Choose a tag to compare

v4.3.0 - 2021-12-18

18 Dec 11:21
Compare
Choose a tag to compare
  • Add AtomicName & VectorName to the README (@bjornstar)
  • Update vite to v2.7.3, change vite.config.js to vite.config.ts (@bjornstar)
  • [examples] add missing peer dependency: react-is (@bjornstar)
  • Update all dependencies, fix example routes for react-router-dom v6 (@bjornstar)

v4.2.0 - 2021-12-01

18 Dec 11:15
Compare
Choose a tag to compare
  • [Types] Use PropsWithChildren from React instead of children: ReactNode (@bjornstar)
  • [README.md] Update default Physics prop values (@bjornstar)
  • export * from './setup' there are a lot of useful types in here (@bjornstar)
  • Build using jsx runtime instead of React runtime for a slightly smaller bundle (@bjornstar)
  • [CHANGELOG.md] Add details for v3.1.1 & v3.1.2 (@bjornstar)

v4.1.0 - 2021-11-21

21 Nov 09:21
Compare
Choose a tag to compare
  • Update default gravity value from -10 to -9.81 (@alexandernanberg)
  • [devDependencies] Update to latest versions (@bjornstar)
  • [CHANGELOG.md] Start writing a changelog (@bjornstar)
  • [README.md] Replace boxBufferGeometry with boxGeometry and planeBufferGeometry with planeGeometry (@drcmda)
  • [examples/devDependencies] Update to latest version (@bjornstar)

v4.0.1 - 2021-10-06

06 Oct 12:36
Compare
Choose a tag to compare
  • Fix an bug where multiple rotations shared an array (@bjornstar)

v4.0.0 - 2021-10-05

05 Oct 11:14
Compare
Choose a tag to compare

⚠️ There is a breaking change to the useSphere API ⚠️

Previously, the args property for useSphere was a single number, but this has caused a lot of confusion as many people expected it to be an array. We have standardized the format of the args property to be an array for all hooks.

Before v4:

useSphere((index) => ({ args: 10, mass: 10, position: [0, 0.5, 0] }))

From v4 onwards:

useSphere((index) => ({ args: [10], mass: 10, position: [0, 0.5, 0] }))

If you are calling useSphere you'll need to modify your code to use an array instead of a number. If you update to v4 and don't change, you will receive runtime errors saying: 'useSphere args must be an array`.

We have also included a bug fix for the rotation subscription API and added a quaternion API for direct access to the quaternions that Cannon is using behind the scenes.

What's Changed

  • Add quaternion API, convert from quaternion to rotation correctly by @bjornstar in #289
  • useSphere args must be an array by @bjornstar in #291
  • [Typescript] Add types for world messages (like setGravity) by @bjornstar in #282
  • Prefer CannonEvent over global Event type name by @bjornstar in #283
  • [TypeScript] Improve set and subscribe API by @bjornstar in #285

Full Changelog: v3.1.2...v4.0.0