Skip to content

Commit b8d3929

Browse files
drcmdabjornstar
andauthored
@react-three/cannon v6.0.0 - 2022-04-01
* v8 * Finish support for @react-three/fiber v8 * If it's in peerDependencies, it shouldn't be in devDependencies Co-authored-by: Bjorn Stromberg <bjorn@bjornstar.com>
1 parent e2b0cc2 commit b8d3929

File tree

13 files changed

+480
-481
lines changed

13 files changed

+480
-481
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @pmndrs/use-cannon Changelog
22

3+
## v2.0.0 - 2022-04-01
4+
5+
- [@pmndrs/cannon-worker-api] v2.0.0
6+
- [@react-three/cannon] v6.0.0
7+
- [@react-three/cannon-examples] v2.0.0
8+
39
## v1.1.0 - 2022-03-19
410

511
- [`package.json`] Add .json, .jsx, & .tsx to lint-staged files (@bjornstar)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pmndrs/use-cannon",
3-
"version": "1.1.0",
3+
"version": "2.0.0",
44
"description": "monorepo for @pmndrs/use-cannon",
55
"keywords": [
66
"cannon",

packages/cannon-worker-api/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# @pmndrs/cannon-worker-api Changelog
22

3+
## v2.0.0 - 2022-04-01
4+
5+
- `three.js` is now a `peerDependency` and requires r139 or higher
6+
- Updated many `devDependencies`
7+
38
## v1.1.0 - 2022-03-19
49

510
- [WorkerRayHitEvent] from & to are optional (@bjornstar)

packages/cannon-worker-api/package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pmndrs/cannon-worker-api",
3-
"version": "1.1.0",
3+
"version": "2.0.0",
44
"description": "An API to use cannon-es in a web worker",
55
"keywords": [
66
"cannon",
@@ -28,35 +28,35 @@
2828
"prettier": "prettier --list-different .",
2929
"prettier-fix": "prettier --write ."
3030
},
31-
"dependencies": {
32-
"three": "^0.137.0"
33-
},
3431
"devDependencies": {
35-
"@babel/core": "^7.16.5",
36-
"@babel/plugin-transform-runtime": "^7.16.5",
37-
"@babel/preset-env": "^7.16.5",
38-
"@babel/preset-typescript": "^7.16.5",
39-
"@rollup/plugin-babel": "^5.3.0",
40-
"@rollup/plugin-commonjs": "^21.0.2",
32+
"@babel/core": "^7.17.8",
33+
"@babel/plugin-transform-runtime": "^7.17.0",
34+
"@babel/preset-env": "^7.16.11",
35+
"@babel/preset-typescript": "^7.16.7",
36+
"@rollup/plugin-babel": "^5.3.1",
37+
"@rollup/plugin-commonjs": "^21.0.3",
4138
"@rollup/plugin-node-resolve": "^13.1.3",
4239
"@types/events": "^3.0.0",
43-
"@types/three": "^0.137.0",
44-
"@typescript-eslint/eslint-plugin": "^5.7.0",
45-
"@typescript-eslint/parser": "^5.7.0",
40+
"@types/three": "^0.139.0",
41+
"@typescript-eslint/eslint-plugin": "^5.17.0",
42+
"@typescript-eslint/parser": "^5.17.0",
4643
"cannon-es": "^0.19.0",
47-
"eslint": "^8.5.0",
48-
"eslint-config-prettier": "^8.3.0",
44+
"eslint": "^8.12.0",
45+
"eslint-config-prettier": "^8.5.0",
4946
"eslint-plugin-es": "^4.1.0",
5047
"eslint-plugin-simple-import-sort": "^7.0.0",
5148
"eslint-plugin-typescript-enum": "^2.1.0",
5249
"events": "^3.3.0",
53-
"prettier": "^2.5.1",
54-
"rollup": "^2.61.1",
50+
"prettier": "^2.6.1",
51+
"rollup": "^2.70.1",
5552
"rollup-plugin-web-worker-loader": "^1.6.1",
56-
"typescript": "^4.5.4"
53+
"typescript": "^4.6.3"
5754
},
5855
"lint-staged": {
5956
"*.{js,jsx,ts,tsx}": "eslint --cache --fix",
6057
"*.{js,jsx,ts,tsx,md}": "prettier --write"
58+
},
59+
"peerDependencies": {
60+
"three": ">=0.139"
6161
}
6262
}

packages/react-three-cannon-examples/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @react-three/cannon-examples Changelog
22

3+
## v2.0.0 - 2022-04-01
4+
5+
- Updated `react` to v18
6+
- Updated `three.js` to r139
7+
- Updated `@react-three/cannon` to v6
8+
39
## v1.1.0 - 2022-03-19
410

511
- [MondayMorning] Don't use non-null assertions (@bjornstar)

packages/react-three-cannon-examples/package.json

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-three/cannon-examples",
3-
"version": "1.1.0",
3+
"version": "2.0.0",
44
"description": "Examples for @react-three/cannon",
55
"private": true,
66
"scripts": {
@@ -20,39 +20,39 @@
2020
"not op_mini all"
2121
],
2222
"devDependencies": {
23-
"@react-three/cannon": "*",
24-
"@react-three/drei": "^8.11.1",
25-
"@react-three/fiber": "^7.0.26",
26-
"@types/lodash-es": "^4.17.5",
27-
"@types/react": "^17.0.37",
28-
"@types/react-dom": "^17.0.11",
29-
"@types/react-router-dom": "^5.3.2",
30-
"@types/styled-components": "^5.1.18",
31-
"@types/three": "^0.137.0",
32-
"@typescript-eslint/eslint-plugin": "^5.7.0",
33-
"@typescript-eslint/parser": "^5.7.0",
23+
"@react-three/cannon": "^6.0.0",
24+
"@react-three/drei": "^9.0.1",
25+
"@react-three/fiber": "^8.0.4",
26+
"@types/lodash-es": "^4.17.6",
27+
"@types/react": "^17.0.43",
28+
"@types/react-dom": "^17.0.14",
29+
"@types/react-router-dom": "^5.3.3",
30+
"@types/styled-components": "^5.1.24",
31+
"@types/three": "^0.139.0",
32+
"@typescript-eslint/eslint-plugin": "^5.17.0",
33+
"@typescript-eslint/parser": "^5.17.0",
3434
"@vitejs/plugin-react-refresh": "^1.3.6",
35-
"eslint": "^8.5.0",
36-
"eslint-config-prettier": "^8.3.0",
35+
"eslint": "^8.12.0",
36+
"eslint-config-prettier": "^8.5.0",
3737
"eslint-plugin-es": "^4.1.0",
38-
"eslint-plugin-react": "^7.27.1",
38+
"eslint-plugin-react": "^7.29.4",
3939
"eslint-plugin-simple-import-sort": "^7.0.0",
4040
"eslint-plugin-typescript-enum": "^2.1.0",
4141
"lerp": "^1.0.3",
4242
"lodash-es": "^4.17.21",
4343
"nice-color-palettes": "3.0.0",
44-
"prettier": "^2.5.1",
45-
"react": "^17.0.2",
46-
"react-dom": "^17.0.2",
47-
"react-is": "^17.0.2",
48-
"react-router-dom": "^6.2.1",
49-
"styled-components": "^5.3.0",
50-
"three": "^0.137.0",
51-
"three-stdlib": "^2.8.8",
52-
"typescript": "^4.5.4",
53-
"vite": "^2.7.3",
44+
"prettier": "^2.6.1",
45+
"react": "^18.0.0",
46+
"react-dom": "^18.0.0",
47+
"react-is": "^18.0.0",
48+
"react-router-dom": "^6.2.2",
49+
"styled-components": "^5.3.5",
50+
"three": "^0.139.1",
51+
"three-stdlib": "^2.8.12",
52+
"typescript": "^4.6.3",
53+
"vite": "^2.9.1",
5454
"vite-react-jsx": "^1.1.2",
55-
"zustand": "^3.6.7"
55+
"zustand": "^3.7.1"
5656
},
5757
"lint-staged": {
5858
"*.{js,ts}": "eslint --cache --fix",

packages/react-three-cannon-examples/src/demos/demo-CubeHeap.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const Spheres = ({ colors, number, size }: InstancedGeometryProps) => {
3131
return (
3232
<instancedMesh receiveShadow castShadow ref={ref} args={[undefined, undefined, number]}>
3333
<sphereBufferGeometry args={[size, 48]}>
34-
<instancedBufferAttribute attachObject={['attributes', 'color']} args={[colors, 3]} />
34+
<instancedBufferAttribute attach="attributes-color" args={[colors, 3]} />
3535
</sphereBufferGeometry>
3636
<meshLambertMaterial vertexColors />
3737
</instancedMesh>
@@ -49,7 +49,7 @@ const Boxes = ({ colors, number, size }: InstancedGeometryProps) => {
4949
return (
5050
<instancedMesh receiveShadow castShadow ref={ref} args={[undefined, undefined, number]}>
5151
<boxBufferGeometry args={args}>
52-
<instancedBufferAttribute attachObject={['attributes', 'color']} args={[colors, 3]} />
52+
<instancedBufferAttribute attach="attributes-color" args={[colors, 3]} />
5353
</boxBufferGeometry>
5454
<meshLambertMaterial vertexColors />
5555
</instancedMesh>
@@ -81,7 +81,6 @@ export default () => {
8181

8282
return (
8383
<Canvas
84-
mode="concurrent"
8584
shadows
8685
gl={{ alpha: false }}
8786
camera={{ fov: 50, position: [-1, 1, 2.5] }}

packages/react-three-cannon-examples/src/demos/demo-Heightfield.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ const Spheres: FC<{
153153
return (
154154
<instancedMesh ref={ref} castShadow receiveShadow args={[undefined, undefined, number]}>
155155
<sphereBufferGeometry args={[0.2, 16, 16]}>
156-
<instancedBufferAttribute attachObject={['attributes', 'color']} args={[colors, 3]} />
156+
<instancedBufferAttribute attach="attributes-color" args={[colors, 3]} />
157157
</sphereBufferGeometry>
158158
<meshPhongMaterial vertexColors />
159159
</instancedMesh>

packages/react-three-cannon-examples/src/demos/demo-KinematicCube.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ function InstancedSpheres({ number = 100 }) {
5454
return (
5555
<instancedMesh ref={ref} castShadow receiveShadow args={[undefined, undefined, number]}>
5656
<sphereBufferGeometry args={[1, 16, 16]}>
57-
<instancedBufferAttribute attachObject={['attributes', 'color']} args={[colors, 3]} />
57+
<instancedBufferAttribute attach="attributes-color" args={[colors, 3]} />
5858
</sphereBufferGeometry>
5959
<meshPhongMaterial vertexColors />
6060
</instancedMesh>
6161
)
6262
}
6363

6464
export default () => (
65-
<Canvas mode="concurrent" shadows gl={{ alpha: false }} camera={{ position: [0, -12, 16] }}>
65+
<Canvas shadows gl={{ alpha: false }} camera={{ position: [0, -12, 16] }}>
6666
<hemisphereLight intensity={0.35} />
6767
<spotLight
6868
position={[30, 0, 30]}
@@ -75,7 +75,7 @@ export default () => (
7575
/>
7676
<pointLight position={[-30, 0, -30]} intensity={0.5} />
7777
<Physics gravity={[0, 0, -30]}>
78-
<Plane color={niceColors[17][4]} />
78+
<Plane color={niceColors[17][4]} position={[0, 0, 0]} rotation={[0, 0, 0]} />
7979
<Plane color={niceColors[17][1]} position={[-6, 0, 0]} rotation={[0, 0.9, 0]} />
8080
<Plane color={niceColors[17][2]} position={[6, 0, 0]} rotation={[0, -0.9, 0]} />
8181
<Plane color={niceColors[17][3]} position={[0, 6, 0]} rotation={[0.9, 0, 0]} />

packages/react-three-cannon/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# @react-three/cannon Changelog
22

3+
## v6.0.0 - 2022-04-01
4+
5+
- Removed the Suspense wrapper around Physics, you will need to provide your own suspense boundary from now on
6+
- `react` is now a `peerDependency` and requires v18 or higher
7+
- `three.js` is now a `peerDependency` and requires r139 or higher
8+
- `@react-three/fiber` is now a `peerDependency` and requires v8 or higher
9+
- `@pmndrs/cannon-worker-api` is now a `dependency`
10+
- `cannon-es` is now a `dependency`
11+
- `cannon-es-debugger` is now a `dependency`
12+
- Updated many `devDependencies`
13+
314
## v5.1.0 - 2022-03-19
415

516
- Access the physics context with the `usePhysicsContext` hook, which immediately gives you a clear error message when trying to access physics components or hooks outside of a Physics provider (@bjornstar)

0 commit comments

Comments
 (0)