@react-three/tsl 10.0.0-canary.f75fbf6 → 10.0.0-canary.fbc659b
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/index.cjs +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +2 -2
- package/readme.md +1 -1
package/dist/index.cjs
CHANGED
|
@@ -704,8 +704,9 @@ function useUniforms(creatorOrScope, scope) {
|
|
|
704
704
|
input: memoizedInput,
|
|
705
705
|
create: () => {
|
|
706
706
|
if (isReader) return {};
|
|
707
|
-
if (typeof processedInput.candidates !== "object" || processedInput.candidates === null)
|
|
707
|
+
if (typeof processedInput.candidates !== "object" || processedInput.candidates === null) {
|
|
708
708
|
throw new Error("Invalid uniform input");
|
|
709
|
+
}
|
|
709
710
|
return processedInput.candidates;
|
|
710
711
|
},
|
|
711
712
|
prepare: (name, candidate) => createUniform(name, candidate, scope),
|
package/dist/index.mjs
CHANGED
|
@@ -689,8 +689,9 @@ function useUniforms(creatorOrScope, scope) {
|
|
|
689
689
|
input: memoizedInput,
|
|
690
690
|
create: () => {
|
|
691
691
|
if (isReader) return {};
|
|
692
|
-
if (typeof processedInput.candidates !== "object" || processedInput.candidates === null)
|
|
692
|
+
if (typeof processedInput.candidates !== "object" || processedInput.candidates === null) {
|
|
693
693
|
throw new Error("Invalid uniform input");
|
|
694
|
+
}
|
|
694
695
|
return processedInput.candidates;
|
|
695
696
|
},
|
|
696
697
|
prepare: (name, candidate) => createUniform(name, candidate, scope),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-three/tsl",
|
|
3
|
-
"version": "10.0.0-canary.
|
|
3
|
+
"version": "10.0.0-canary.fbc659b",
|
|
4
4
|
"description": "TSL resource hooks for react-three-fiber: uniforms, nodes, buffers, GPU storage and render pipelines on WebGPU",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@types/three": "^0.185.0",
|
|
57
57
|
"@webgpu/types": "^0.1.64",
|
|
58
58
|
"three": ">=0.185.0",
|
|
59
|
-
"@react-three/fiber": "10.0.0-canary.
|
|
59
|
+
"@react-three/fiber": "10.0.0-canary.fbc659b"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"build": "unbuild",
|
package/readme.md
CHANGED
|
@@ -46,7 +46,7 @@ export const App = () => (
|
|
|
46
46
|
| `useBuffers`, `useGPUStorage` | Buffers and storage textures for compute |
|
|
47
47
|
| `useRenderPipeline` | Post-processing with three's `RenderPipeline` (scene pass, MRT, output node) |
|
|
48
48
|
|
|
49
|
-
Resources belong to the renderer: a primary
|
|
49
|
+
Resources belong to the renderer: a `<Canvas primary>`, the canvases sharing its renderer (every other WebGPU canvas, or `share="id"`) and every portal inside them share one set. They live on the primary canvas's `RootState` (`state.uniforms`, `state.nodes`, `state.buffers`, `state.gpuStorage`); secondaries hold the same objects and portals inherit them from their parent (a portal's scene and camera stay its own), so `state.uniforms` reads the same everywhere.
|
|
50
50
|
|
|
51
51
|
Works under any Canvas that runs the WebGPU renderer: `@react-three/fiber` with the `renderer` prop, or `@react-three/fiber/webgpu`. It reaches fiber only through the three-free `@react-three/fiber/extension` entry, so it adds no renderer and no second copy of fiber to your bundle.
|
|
52
52
|
|