forked from pmndrs/react-three-rapier
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update to @dimforge/rapier3d-compat 0.13.1 (pmndrs#677)
* feat: bump @dimforge/rapier3d-compat to 0.13.1, expose new functionality * chore: prettier format * chore: add contact skin demo * fix: add softCcdPrediction to cleanRigidBodyPropsForCollider * chore: update changeset * fix: prettier format * chore: change @react-three/rapier-addons to depend on @react-three/rapier ^1.3.1
- Loading branch information
1 parent
14dbc0e
commit a155277
Showing
14 changed files
with
123 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
"@react-three/rapier": minor | ||
--- | ||
|
||
feat: bump @dimforge/rapier3d-compat from 0.12.0 to 0.13.1 | ||
|
||
- Added World prop `lengthUnit` | ||
- Renamed World props `allowedLinearError` and `predictionDistance` to `normalizedAllowedLinearError` and `normalizedPredictionDistance`, matching upstream changes | ||
- Added `softCcdPrediction` RigidBody prop | ||
- Added `contactSkin` collider prop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { Box, Sphere } from "@react-three/drei"; | ||
import { RapierRigidBody, RigidBody } from "@react-three/rapier"; | ||
import { useRef } from "react"; | ||
|
||
const Ball = () => { | ||
const rb = useRef<RapierRigidBody>(null); | ||
|
||
return ( | ||
<RigidBody ref={rb} colliders="ball" position={[0, 1, 0]} contactSkin={0.5}> | ||
<Sphere castShadow> | ||
<meshStandardMaterial color="orange" /> | ||
</Sphere> | ||
</RigidBody> | ||
); | ||
}; | ||
|
||
const Floor = () => { | ||
return ( | ||
<RigidBody type="fixed" colliders="cuboid" position={[0, -2, 0]}> | ||
<Box args={[20, 1, 20]} receiveShadow> | ||
<meshStandardMaterial color="white" /> | ||
</Box> | ||
</RigidBody> | ||
); | ||
}; | ||
|
||
export const ContactSkinExample = () => { | ||
return ( | ||
<group> | ||
<Ball /> | ||
<Floor /> | ||
</group> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1595,10 +1595,10 @@ | |
dependencies: | ||
"@jridgewell/trace-mapping" "0.3.9" | ||
|
||
"@dimforge/rapier3d-compat@0.12.0": | ||
version "0.12.0" | ||
resolved "https://registry.yarnpkg.com/@dimforge/rapier3d-compat/-/rapier3d-compat-0.12.0.tgz#7b3365e1dfdc5cd957b45afe920b4ac06c7cd389" | ||
integrity sha512-uekIGetywIgopfD97oDL5PfeezkFpNhwlzlaEYNOA0N6ghdsOvh/HYjSMek5Q2O1PYvRSDFcqFVJl4r4ZBwOow== | ||
"@dimforge/rapier3d-compat@0.13.1": | ||
version "0.13.1" | ||
resolved "https://registry.yarnpkg.com/@dimforge/rapier3d-compat/-/rapier3d-compat-0.13.1.tgz#d9da32941de5fcfae55ffb6ac26c38539f57ddf4" | ||
integrity sha512-SsQ/MTH4Vvs8f62g31iVV1VOmzwNwsJl91rVzafi5B2mCrI2OsQ3VyjJOb4/tvS5VNc6OLjIDgfClcOAkW+O2A== | ||
|
||
"@esbuild/[email protected]": | ||
version "0.17.14" | ||
|