@react-three/fiber 10.0.0-canary.b0fafc8 → 10.0.0-canary.b86abaa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/webgl.cjs +27 -0
- package/dist/chunks/webgl.mjs +11 -0
- package/dist/chunks/webgpu.cjs +37 -0
- package/dist/chunks/webgpu.mjs +21 -0
- package/dist/extension.cjs +13 -0
- package/dist/extension.d.cts +19 -0
- package/dist/extension.d.mts +19 -0
- package/dist/extension.d.ts +19 -0
- package/dist/extension.mjs +1 -0
- package/dist/index.cjs +100 -15849
- package/dist/index.d.cts +124 -4234
- package/dist/index.d.mts +124 -4234
- package/dist/index.d.ts +124 -4234
- package/dist/index.mjs +11 -15747
- package/dist/legacy.cjs +100 -15814
- package/dist/legacy.d.cts +115 -4238
- package/dist/legacy.d.mts +115 -4238
- package/dist/legacy.d.ts +115 -4238
- package/dist/legacy.mjs +15 -15715
- package/dist/shared/fiber.B0oukOFO.mjs +364 -0
- package/dist/shared/fiber.BU0vBHc9.d.mts +48 -0
- package/dist/shared/fiber.BY6Yf1h-.d.cts +2791 -0
- package/dist/shared/fiber.Cu2hX1IM.d.mts +2791 -0
- package/dist/shared/fiber.Cx-UAmMb.d.ts +48 -0
- package/dist/shared/fiber.DAl4H27x.d.cts +48 -0
- package/dist/shared/fiber.DXw-SLsH.d.ts +2791 -0
- package/dist/shared/fiber.I5Q4dVvl.d.cts +778 -0
- package/dist/shared/fiber.I5Q4dVvl.d.mts +778 -0
- package/dist/shared/fiber.I5Q4dVvl.d.ts +778 -0
- package/dist/shared/fiber.khFlPHPf.cjs +397 -0
- package/dist/shared/fiber.oKEFddXj.cjs +16059 -0
- package/dist/shared/fiber.tsM9NKZ9.mjs +15961 -0
- package/dist/webgpu/index.cjs +104 -16524
- package/dist/webgpu/index.d.cts +144 -4511
- package/dist/webgpu/index.d.mts +144 -4511
- package/dist/webgpu/index.d.ts +144 -4511
- package/dist/webgpu/index.mjs +19 -16411
- package/package.json +16 -12
- package/readme.md +4 -5
- package/react-reconciler/constants.d.ts +0 -7
- package/react-reconciler/constants.js +0 -1
- package/react-reconciler/index.d.ts +0 -1044
- package/react-reconciler/index.js +0 -208
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-three/fiber",
|
|
3
|
-
"version": "10.0.0-canary.
|
|
3
|
+
"version": "10.0.0-canary.b86abaa",
|
|
4
4
|
"description": "A React renderer for Threejs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"sideEffects": false,
|
|
36
36
|
"files": [
|
|
37
37
|
"dist",
|
|
38
|
-
"react-reconciler",
|
|
39
38
|
"readme.md"
|
|
40
39
|
],
|
|
41
40
|
"exports": {
|
|
@@ -53,29 +52,35 @@
|
|
|
53
52
|
"types": "./dist/webgpu/index.d.ts",
|
|
54
53
|
"import": "./dist/webgpu/index.mjs",
|
|
55
54
|
"require": "./dist/webgpu/index.cjs"
|
|
56
|
-
}
|
|
55
|
+
},
|
|
56
|
+
"./extension": {
|
|
57
|
+
"types": "./dist/extension.d.ts",
|
|
58
|
+
"import": "./dist/extension.mjs",
|
|
59
|
+
"require": "./dist/extension.cjs"
|
|
60
|
+
},
|
|
61
|
+
"./package.json": "./package.json"
|
|
57
62
|
},
|
|
58
63
|
"dependencies": {
|
|
59
64
|
"@babel/runtime": "^7.28.6",
|
|
60
|
-
"@
|
|
65
|
+
"@pmndrs/scheduler": "^0.2.0",
|
|
61
66
|
"dequal": "^2.0.3",
|
|
62
67
|
"its-fine": "^2.0.0",
|
|
63
68
|
"react-use-measure": "^2.1.7",
|
|
64
|
-
"scheduler": "^0.
|
|
69
|
+
"scheduler": "^0.28.0",
|
|
65
70
|
"suspend-react": "^0.1.3",
|
|
66
71
|
"use-sync-external-store": "^1.6.0",
|
|
67
72
|
"zustand": "^5.0.10"
|
|
68
73
|
},
|
|
69
74
|
"devDependencies": {
|
|
70
|
-
"@types/react-reconciler": "^0.
|
|
71
|
-
"@types/three": "^0.
|
|
75
|
+
"@types/react-reconciler": "^0.33.0",
|
|
76
|
+
"@types/three": "^0.185.0",
|
|
72
77
|
"@types/webxr": "*",
|
|
73
|
-
"react-reconciler": "^0.
|
|
78
|
+
"react-reconciler": "^0.34.0"
|
|
74
79
|
},
|
|
75
80
|
"peerDependencies": {
|
|
76
|
-
"react": ">=19.0 <19.
|
|
77
|
-
"react-dom": ">=19.0 <19.
|
|
78
|
-
"three": ">=0.
|
|
81
|
+
"react": ">=19.0 <19.4",
|
|
82
|
+
"react-dom": ">=19.0 <19.4",
|
|
83
|
+
"three": ">=0.185.0"
|
|
79
84
|
},
|
|
80
85
|
"peerDependenciesMeta": {
|
|
81
86
|
"react-dom": {
|
|
@@ -85,7 +90,6 @@
|
|
|
85
90
|
"scripts": {
|
|
86
91
|
"prebuild": "node -e \"require('fs').copyFileSync('../../readme.md', 'readme.md')\"",
|
|
87
92
|
"build": "unbuild",
|
|
88
|
-
"postbuild": "node ../../scripts/fix-three-types.js",
|
|
89
93
|
"stub": "unbuild --stub"
|
|
90
94
|
}
|
|
91
95
|
}
|
package/readme.md
CHANGED
|
@@ -136,7 +136,6 @@ createRoot(document.getElementById('root') as HTMLElement).render(
|
|
|
136
136
|
)
|
|
137
137
|
```
|
|
138
138
|
|
|
139
|
-
TODO: Move this
|
|
140
139
|
Live demo: https://codesandbox.io/s/icy-tree-brnsm?file=/src/App.tsx
|
|
141
140
|
|
|
142
141
|
</details>
|
|
@@ -144,7 +143,7 @@ Live demo: https://codesandbox.io/s/icy-tree-brnsm?file=/src/App.tsx
|
|
|
144
143
|
<details>
|
|
145
144
|
<summary>Show React Native example</summary>
|
|
146
145
|
|
|
147
|
-
This example
|
|
146
|
+
This example uses `expo-cli`, but you can create a bare project with their template or with the `react-native` CLI.
|
|
148
147
|
|
|
149
148
|
```bash
|
|
150
149
|
# Install expo-cli, this will create our app
|
|
@@ -153,7 +152,7 @@ npm install expo-cli -g
|
|
|
153
152
|
expo init my-app
|
|
154
153
|
cd my-app
|
|
155
154
|
# Install dependencies
|
|
156
|
-
npm install three @react-three/
|
|
155
|
+
npm install three @react-three/native
|
|
157
156
|
# Start
|
|
158
157
|
expo start
|
|
159
158
|
```
|
|
@@ -172,7 +171,7 @@ module.exports = {
|
|
|
172
171
|
|
|
173
172
|
```tsx
|
|
174
173
|
import React, { useRef, useState } from 'react'
|
|
175
|
-
import { Canvas, useFrame } from '@react-three/
|
|
174
|
+
import { Canvas, useFrame } from '@react-three/native'
|
|
176
175
|
function Box(props) {
|
|
177
176
|
const mesh = useRef(null)
|
|
178
177
|
const [hovered, setHover] = useState(false)
|
|
@@ -216,7 +215,7 @@ Visit [docs.pmnd.rs](https://docs.pmnd.rs/react-three-fiber) | [Awesome React Th
|
|
|
216
215
|
|
|
217
216
|
You need to be versed in both React and Threejs before rushing into this. If you are unsure about React consult the official [React docs](https://react.dev/learn), especially [the section about hooks](https://react.dev/reference/react). As for Threejs, make sure you at least glance over the following links:
|
|
218
217
|
|
|
219
|
-
1. Make sure you have a [basic grasp of Threejs](https://threejs.org/
|
|
218
|
+
1. Make sure you have a [basic grasp of Threejs](https://threejs.org/manual/#en/creating-a-scene). Keep that site open.
|
|
220
219
|
2. When you know what a scene is, a camera, mesh, geometry, material, fork the [demo above](https://github.com/pmndrs/react-three-fiber#what-does-it-look-like).
|
|
221
220
|
3. [Look up](https://threejs.org/docs/index.html#api/en/objects/Mesh) the JSX elements that you see (mesh, ambientLight, etc), _all_ threejs exports are native to three-fiber.
|
|
222
221
|
4. Try changing some values, scroll through our [API](https://docs.pmnd.rs/react-three-fiber) to see what the various settings and hooks do.
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export const DiscreteEventPriority = 0b0000000000000000000000000000001;
|
|
2
|
-
export const ContinuousEventPriority = 0b0000000000000000000000000000100;
|
|
3
|
-
export const DefaultEventPriority = 0b0000000000000000000000000010000;
|
|
4
|
-
export const IdleEventPriority = 0b0100000000000000000000000000000;
|
|
5
|
-
export const LegacyRoot = 0;
|
|
6
|
-
export const ConcurrentRoot = 1;
|
|
7
|
-
export const NoEventPriority = 0;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const t=1,o=8,r=32,e=2,i=268435456,n=0,s=0;export{t as ConcurrentRoot,o as ContinuousEventPriority,r as DefaultEventPriority,e as DiscreteEventPriority,i as IdleEventPriority,n as LegacyRoot,s as NoEventPriority};
|