Releases: pmndrs/use-cannon
v2.3.4
v2.3.0
This release contains improvements to types and documentation, notably using Triplet
instead of number[]
(#206)
Thanks, @bjornstar!
v2.2.1
Fixes undefined world
in event listeners added for granular collision events.
v2.2.0
Use-cannon 2.x is compatible with (and the cause of) react-three-fiber v7.
The integrated debugger has been improved and made optional and modular, integrate it into your scene and pass parameters as follows, where scale
visually scales the physics mesh representation to better see it against your geometry.
<Physics>
<Debug scale={1.1} color='black'>
{/* children */}
</Debug>
</Physics>
This release also includes more granular, detailed collision events! (#133)
See collideBegin
and collideEnd
events.
Thanks, @a-type
v1.4.0
This release contains the ability to display a built-in visualization of the physics colliders in your scene, using cannon-es-debugger! (#190)
Pass the debug
prop to your Physics component to view.
Thanks, @elisherer!
v1.3.0
This release contains the perhaps long-awaited ability to dynamically alter the world's physics, including setting gravity! Thanks, @hazem3500. See the ConvexPolyhedron demo.
v1.2.1
v1.2.0
This release adds triggers, allowing for easy-to-use implementations of common game mechanics within the physics world. (#193)
useBox(() => ({ isTrigger: true, ... })
Thanks, @age2pierre!
v1.1.0
useConstraint
now returns an API as follows: (#180)
type SpringApi = [
React.MutableRefObject<THREE.Object3D | undefined>,
React.MutableRefObject<THREE.Object3D | undefined>,
{
setStiffness: (value: number) => void
setRestLength: (value: number) => void
setDamping: (value: number) => void
}
]
Allowing more complex and expressive physics constraints. Thanks @brunnolou!