@react-three/tsl 10.0.0-canary.777b94d → 10.0.0-canary.bf4b0be

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.d.cts CHANGED
@@ -112,8 +112,8 @@ interface TSLRootState {
112
112
  passes?: PassRecord
113
113
  }
114
114
 
115
- // Each fiber entry bundles its own copy of RootState, so every entry the hooks can run under is
116
- // augmented. The /legacy entry is not: it never has a WebGPU renderer.
115
+ // Every fiber entry shares one core, and so one RootState: augmenting it through the root entry
116
+ // reaches /legacy, /webgpu and /extension as well.
117
117
  declare module '@react-three/fiber' {
118
118
  interface RootState extends TSLRootState {}
119
119
  }
package/dist/index.d.mts CHANGED
@@ -112,8 +112,8 @@ interface TSLRootState {
112
112
  passes?: PassRecord
113
113
  }
114
114
 
115
- // Each fiber entry bundles its own copy of RootState, so every entry the hooks can run under is
116
- // augmented. The /legacy entry is not: it never has a WebGPU renderer.
115
+ // Every fiber entry shares one core, and so one RootState: augmenting it through the root entry
116
+ // reaches /legacy, /webgpu and /extension as well.
117
117
  declare module '@react-three/fiber' {
118
118
  interface RootState extends TSLRootState {}
119
119
  }
package/dist/index.d.ts CHANGED
@@ -112,8 +112,8 @@ interface TSLRootState {
112
112
  passes?: PassRecord
113
113
  }
114
114
 
115
- // Each fiber entry bundles its own copy of RootState, so every entry the hooks can run under is
116
- // augmented. The /legacy entry is not: it never has a WebGPU renderer.
115
+ // Every fiber entry shares one core, and so one RootState: augmenting it through the root entry
116
+ // reaches /legacy, /webgpu and /extension as well.
117
117
  declare module '@react-three/fiber' {
118
118
  interface RootState extends TSLRootState {}
119
119
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-three/tsl",
3
- "version": "10.0.0-canary.777b94d",
3
+ "version": "10.0.0-canary.bf4b0be",
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.777b94d"
59
+ "@react-three/fiber": "10.0.0-canary.bf4b0be"
60
60
  },
61
61
  "scripts": {
62
62
  "build": "unbuild",
package/readme.md CHANGED
@@ -7,7 +7,7 @@ npm install @react-three/tsl
7
7
  ```
8
8
 
9
9
  ```tsx
10
- import { Canvas, useFrame } from '@react-three/fiber/webgpu'
10
+ import { Canvas, useFrame } from '@react-three/fiber'
11
11
  import { useUniforms, useNodes } from '@react-three/tsl'
12
12
  import { positionLocal, normalLocal, sin, time } from 'three/tsl'
13
13
 
@@ -32,7 +32,7 @@ function Driver() {
32
32
  }
33
33
 
34
34
  export const App = () => (
35
- <Canvas>
35
+ <Canvas renderer>
36
36
  <Wobble />
37
37
  <Driver />
38
38
  </Canvas>
@@ -48,6 +48,6 @@ export const App = () => (
48
48
 
49
49
  Resources belong to the renderer: a primary canvas, its secondary canvases (`renderer={{ primaryCanvas }}`) 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
- Works with `@react-three/fiber/webgpu`, and with `@react-three/fiber` when the `<Canvas>` has the `renderer` prop. It reaches fiber only through the three-free `@react-three/fiber/extension` entry, so it never adds a second copy of fiber to your bundle.
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
 
53
53
  Full documentation: [WebGPU & TSL](https://github.com/pmndrs/react-three-fiber/tree/v10/docs/webgpu).