Releases: pmndrs/use-cannon
Releases Β· pmndrs/use-cannon
v4.6.0 - 2022-01-15
- [
hooks
] AdduseContactMaterial
(@Glavin001) - [
examples
] AddFriction
example (@Glavin001) - [
examples
] Add title to links (@Glavin001)
v4.5.0 - 2022-01-08
- [
constraintOptns
] AddmaxMultiplier
(@Glavin001)
v4.4.1 - 2022-01-04
- [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
- Upgrade cannon-es-debugger to 1.0.0 (@marcofugaro)
- [
Debug
] Improve implementation (@bjornstar) - [
examples/RaycastVehicle
] Press?
to debug (@bjornstar)
v4.3.1 - 2021-12-30
- Fix RaycastVehicle example (@marcofugaro)
v4.3.0 - 2021-12-18
- 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
- [Types] Use
PropsWithChildren
from React instead ofchildren: 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
- 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
withboxGeometry
andplaneBufferGeometry
withplaneGeometry
(@drcmda) - [examples/devDependencies] Update to latest version (@bjornstar)
v4.0.1 - 2021-10-06
- Fix an bug where multiple rotations shared an array (@bjornstar)
v4.0.0 - 2021-10-05
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