Bot releases are visible (Hide)
Published by github-actions[bot] 4 months ago
a155277: feat: bump @dimforge/rapier3d-compat from 0.12.0 to 0.13.1
lengthUnit
allowedLinearError
and predictionDistance
to normalizedAllowedLinearError
and normalizedPredictionDistance
, matching upstream changessoftCcdPrediction
RigidBody propcontactSkin
collider propactiveCollisionTypes
prop to RigidBody and Collider componentsPublished by github-actions[bot] 6 months ago
Published by github-actions[bot] 6 months ago
Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 8 months ago
1517acb: feat: update @dimforge/rapier3d-compat to 0.12.0 (@0xtito, @isaac-mason)
additionalSolverIterations
prop to RigidBodyOptions
.
useSpringJoint
useRopeJoint
Published by github-actions[bot] 8 months ago
1517acb: feat: update @dimforge/rapier3d-compat to 0.12.0 (@0xtito, @isaac-mason)
additionalSolverIterations
prop to RigidBodyOptions
.
useSpringJoint
useRopeJoint
Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 10 months ago
Published by github-actions[bot] 11 months ago
Published by github-actions[bot] 11 months ago
setWorld
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
usePhysics
used outside <Physics />
(@CodyJasonBennett)Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
6c764cc: Remove WorldApi, replace with singleton instance proxy (@wiledal)
BREAKING CHANGE: The WorldApi
has been removed. Instead, you can now get a proxied singleton instance of the world from @react-three/rapier
. This is a breaking change, but it should be easy to migrate to.
Before:
import { useRapier } from "@react-three/rapier";
const Component = () => {
const { world } = useRapier();
useEffect(() => {
// Access to the WorldApi (limited)
world.raw().bodies.forEach(() => {
// Do something
});
// Access the raw Rapier World instance
const rawWorldInstance = world.raw();
rawWorldInstance.raw().setGravity(new Vector3(0, -9.81, 0));
}, []);
};
Now:
import { useRapier } from "@react-three/rapier";
const Component = () => {
const { world } = useRapier();
useEffect(() => {
// Access the Rapier World instance directly
world.bodies.forEach(() => {
// Do something
});
world.setGravity(new Vector3(0, -9.81, 0));
}, []);
};
Note: it is best to avoid accessing properties and methods on the world outside of useEffect
in order for the world to be properly synchronized with the React component lifecycle.
// bad
const Component = () => {
const {world} = useRapier()
world.setGravity(...)
return null
}
// good
const Component = () => {
const {world} = useRapier()
useEffect(() => {
world.setGravity(...)
}, [])
return null
}