@react-three/fiber 10.0.0-canary.dc0ec15 → 10.0.0-canary.de17310

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.
@@ -1,6 +1,6 @@
1
1
  import * as three_examples_jsm_inspector_Inspector_js from 'three/examples/jsm/inspector/Inspector.js';
2
- import * as three_webgpu from 'three/webgpu';
3
- import { CubeRenderTarget, RenderTarget, WebGPURenderer, Node, StorageTexture, Storage3DTexture, StorageArrayTexture, Data3DTexture, CanvasTarget, Euler as Euler$2, Color as Color$2, ColorRepresentation as ColorRepresentation$1, Layers as Layers$1, Raycaster, Intersection as Intersection$1, BufferGeometry, Matrix4 as Matrix4$1, Quaternion as Quaternion$1, Object3D, Vector2 as Vector2$1, Vector3 as Vector3$1, Vector4 as Vector4$1, Matrix3 as Matrix3$1, Loader as Loader$1, ColorSpace, Texture as Texture$1, CubeTexture, Scene, Frustum, OrthographicCamera, Matrix2, WebGPURendererParameters } from 'three/webgpu';
2
+ import * as webgpu from 'three/webgpu';
3
+ import { CubeRenderTarget, RenderTarget, WebGPURenderer, CanvasTarget, Euler as Euler$2, Color as Color$2, ColorRepresentation as ColorRepresentation$1, Layers as Layers$1, Raycaster, Intersection as Intersection$1, BufferGeometry, Matrix4 as Matrix4$1, Quaternion as Quaternion$1, Object3D, Vector2 as Vector2$1, Vector3 as Vector3$1, Vector4 as Vector4$1, Matrix3 as Matrix3$1, Loader as Loader$1, ColorSpace, Texture as Texture$1, CubeTexture, Scene, Frustum, OrthographicCamera, WebGPURendererParameters } from 'three/webgpu';
4
4
  import { Inspector } from 'three/addons/inspector/Inspector.js';
5
5
  import * as THREE$1 from 'three';
6
6
  import { Color as Color$1, ColorRepresentation, Euler as Euler$1, Loader, RenderTargetOptions as RenderTargetOptions$1 } from 'three';
@@ -66,7 +66,7 @@ var THREE = /*#__PURE__*/_mergeNamespaces({
66
66
  WebGLRendererParameters: WebGLRendererParameters,
67
67
  WebGLShadowMap: WebGLShadowMap,
68
68
  loadInspector: loadInspector
69
- }, [three_webgpu]);
69
+ }, [webgpu]);
70
70
 
71
71
  //* Utility Types ==============================
72
72
 
@@ -330,90 +330,6 @@ type FrameNextCallback = FrameCallback$1<RootState>
330
330
  /** Alias for FrameNextCallback */
331
331
  type FrameCallback = FrameNextCallback
332
332
 
333
- //* Buffer Types (useBuffers) ========================================
334
-
335
- /**
336
- * Buffer-like types for GPU compute and storage operations.
337
- * Includes raw CPU arrays, Three.js buffer attributes, and TSL buffer nodes.
338
- *
339
- * @example
340
- * ```tsx
341
- * const { positions, velocities } = useBuffers(() => ({
342
- * positions: instancedArray(count, 'vec3'), // StorageBufferNode
343
- * velocities: new Float32Array(count * 3), // TypedArray
344
- * }), 'particles')
345
- * ```
346
- */
347
- type BufferLike =
348
- | Float32Array
349
- | Uint32Array
350
- | Int32Array
351
- | Float64Array
352
- | Uint8Array
353
- | Int8Array
354
- | Uint16Array
355
- | Int16Array
356
- | THREE$1.BufferAttribute // Base class for all buffer attributes
357
- | THREE$1.InterleavedBufferAttribute
358
- | Node // TSL buffer nodes (instancedArray, storage)
359
-
360
- /** Flat record of buffer-like values (no nested scopes) */
361
- type BufferRecord = Record<string, BufferLike>
362
-
363
- /**
364
- * Buffer store that can contain both root-level buffers and scoped buffer objects.
365
- * Structure: { positions: Float32Array, particles: { vel: StorageBufferNode } }
366
- */
367
- type BufferStore = Record<string, BufferLike | BufferRecord>
368
-
369
- //* Node Types (useNodes) ========================================
370
-
371
- /**
372
- * Every node representation `useNodes` accepts and `state.nodes` holds: three's real `Node`,
373
- * the callable proxy `Fn()` returns, and the legacy structural shape (`uuid`/`nodeType`) older
374
- * code passes through. Creators are constrained to this same type, so the shape a creator returns
375
- * and the shape the store holds are one type by construction.
376
- */
377
- type NodeLike = TSLNodeType | LegacyTSLNodeLike
378
-
379
- /** Flat record of TSL nodes (no nested scopes) */
380
- type NodeRecord<T extends NodeLike = NodeLike> = Record<string, T>
381
-
382
- /**
383
- * Node store that can contain both root-level nodes and scoped node objects.
384
- * Structure: { wobble: OperatorNode, fx: { blur: ShaderCallable } }
385
- */
386
- type NodeStore = Record<string, NodeLike | NodeRecord>
387
-
388
- //* Storage Types (useGPUStorage) ========================================
389
-
390
- /**
391
- * GPU storage types for texture-based storage operations.
392
- * Includes Three.js storage textures and TSL storage texture nodes.
393
- *
394
- * @example
395
- * ```tsx
396
- * const { heightMap } = useGPUStorage(() => ({
397
- * heightMap: new StorageTexture(512, 512),
398
- * }), 'terrain')
399
- * ```
400
- */
401
- type StorageLike =
402
- | StorageTexture // 2D GPU storage texture
403
- | Storage3DTexture // 3D GPU storage texture (volumes, fluid grids)
404
- | StorageArrayTexture // 2D-array GPU storage texture
405
- | Data3DTexture // 3D texture (can be used as storage)
406
- | Node // TSL storage texture nodes (storageTexture)
407
-
408
- /** Flat record of storage-like values (no nested scopes) */
409
- type StorageRecord = Record<string, StorageLike>
410
-
411
- /**
412
- * Storage store that can contain both root-level storage and scoped storage objects.
413
- * Structure: { heightMap: StorageTexture, terrain: { normal: StorageTextureNode } }
414
- */
415
- type StorageStore = Record<string, StorageLike | StorageRecord>
416
-
417
333
  //* Renderer Types ========================================
418
334
 
419
335
  /** Default renderer type - union of WebGL and WebGPU renderers */
@@ -586,12 +502,13 @@ interface RootState {
586
502
  /** Get current state */
587
503
  get: StoreApi<RootState>['getState']
588
504
  /**
589
- * Reference to the authoritative store for shared TSL resources (uniforms, nodes, etc).
505
+ * The store of the canvas that owns this root's renderer.
590
506
  * - For primary/independent canvases: points to its own store (self-reference)
591
507
  * - For secondary canvases: points to the primary canvas's store
508
+ * - Portals copy it from their parent
592
509
  *
593
- * Hooks like useNodes/useUniforms should read from primaryStore to ensure
594
- * consistent shared state across all canvases sharing a renderer.
510
+ * Anything shared per renderer rather than per canvas (e.g. @react-three/tsl's resources)
511
+ * resolves through it.
595
512
  */
596
513
  primaryStore: RootStore
597
514
  /** @deprecated Use `renderer` instead. The instance of the renderer (typed as WebGLRenderer for backwards compat) */
@@ -654,24 +571,10 @@ interface RootState {
654
571
  setError: (error: Error | null) => void
655
572
  /** Current error state (null when no error) */
656
573
  error: Error | null
657
- /** Global TSL uniform nodes - root-level uniforms + scoped sub-objects. Use useUniforms() hook */
658
- uniforms: UniformStore
659
- /** Global TSL nodes - root-level nodes + scoped sub-objects. Use useNodes() hook */
660
- nodes: NodeStore
661
- /** Global TSL buffer nodes - root-level buffers + scoped sub-objects. Use useBuffers() hook */
662
- buffers: BufferStore
663
- /** Global GPU storage (textures, etc.) - root-level storage + scoped sub-objects. Use useGPUStorage() hook */
664
- gpuStorage: StorageStore
665
574
  /** Global Texture registry (key → Texture, usually keyed by URL) - use useTextures() hook for access + lifecycle */
666
575
  textures: Map<string, THREE$1.Texture>
667
576
  /** Internal: refcount per texture key, driven by mounted useTexture consumers (registry enrollment is on by default) */
668
577
  _textureRefs: Map<string, number>
669
- /** WebGPU RenderPipeline instance - use useRenderPipeline() hook */
670
- renderPipeline: ThreeRenderPipeline | null
671
- /** Global TSL pass nodes for render pipeline - use useRenderPipeline() hook */
672
- passes: PassRecord
673
- /** Internal version counter for HMR - incremented by rebuildNodes/rebuildUniforms to bust memoization */
674
- _hmrVersion: number
675
578
  /** Internal: whether setSize() has taken ownership of canvas dimensions */
676
579
  _sizeImperative: boolean
677
580
  /** Internal: stored size props from Canvas for reset functionality */
@@ -1202,243 +1105,6 @@ interface LegacyRootState extends Omit<RootState, 'renderer' | 'internal'> {
1202
1105
 
1203
1106
  type RenderTargetOptions = RenderTargetOptions$1
1204
1107
 
1205
- //* Global TSL Types ==============================
1206
-
1207
- declare global {
1208
- /**
1209
- * Broad callable-node fallback for dynamic store readers.
1210
- * Creator hooks preserve the exact function signatures inferred from Three's `Fn`.
1211
- */
1212
- type CallableTSLNode = ((...params: never[]) => unknown) & {
1213
- readonly shaderNode: unknown
1214
- readonly id: number
1215
- }
1216
-
1217
- /** Legacy structural node accepted when at least one historical marker exists. */
1218
- type LegacyTSLNodeLike = {
1219
- label?: ((label: string) => unknown) | string
1220
- setName?: (name: string) => unknown
1221
- } & ({ uuid: string | undefined; nodeType?: string | null } | { uuid?: string; nodeType: string | null | undefined })
1222
-
1223
- /** Node type accepted by broad dynamic node-store readers. */
1224
- type TSLNodeType = three_webgpu.Node | CallableTSLNode
1225
-
1226
- /**
1227
- * Derive Three's shader node type from an existing node or a supported raw input.
1228
- * Existing InputNode generics take precedence over structural value normalization.
1229
- * Both generics must be inferred because Three's UniformNode intersects an unknown-typed
1230
- * InputNode base with its concrete InputNode specialization.
1231
- */
1232
- type UniformNodeType<T> = T extends three_webgpu.UniformNode<infer TNodeType, infer _TValue>
1233
- ? TNodeType
1234
- : T extends three_webgpu.InputNode<infer TNodeType, infer _TValue>
1235
- ? TNodeType
1236
- : T extends number
1237
- ? 'float'
1238
- : T extends boolean
1239
- ? 'bool'
1240
- : T extends string | three_webgpu.Color | { r: number; g: number; b: number }
1241
- ? 'color'
1242
- : T extends three_webgpu.Vector4 | { x: number; y: number; z: number; w: number }
1243
- ? 'vec4'
1244
- : T extends three_webgpu.Vector3 | { x: number; y: number; z: number }
1245
- ? 'vec3'
1246
- : T extends three_webgpu.Vector2 | { x: number; y: number }
1247
- ? 'vec2'
1248
- : T extends three_webgpu.Matrix4
1249
- ? 'mat4'
1250
- : T extends three_webgpu.Matrix3
1251
- ? 'mat3'
1252
- : T extends three_webgpu.Matrix2
1253
- ? 'mat2'
1254
- : unknown
1255
-
1256
- /** Derive the normalized JavaScript value stored by a uniform node. */
1257
- type UniformNodeValue<T> = T extends three_webgpu.UniformNode<infer _TNodeType, infer TValue>
1258
- ? TValue
1259
- : T extends three_webgpu.InputNode<infer _TNodeType, infer TValue>
1260
- ? TValue
1261
- : T extends string | { r: number; g: number; b: number }
1262
- ? three_webgpu.Color
1263
- : T extends { x: number; y: number; z: number; w: number }
1264
- ? three_webgpu.Vector4
1265
- : T extends { x: number; y: number; z: number }
1266
- ? three_webgpu.Vector3
1267
- : T extends { x: number; y: number }
1268
- ? three_webgpu.Vector2
1269
- : T extends number
1270
- ? number
1271
- : T extends boolean
1272
- ? boolean
1273
- : T
1274
-
1275
- /** Three's exact UniformNode with shader and value generics derived from an input. */
1276
- type UniformNodeFor<T> = three_webgpu.UniformNode<UniformNodeType<T>, UniformNodeValue<T>>
1277
-
1278
- /** Preserve every input key while mapping values to exact Three uniform nodes. */
1279
- type UniformNodesFor<T extends UniformInputRecord> = {
1280
- [K in keyof T]: UniformNodeFor<T[K]>
1281
- }
1282
-
1283
- /** Backward-compatible single-parameter uniform alias. */
1284
- type UniformNode<T = unknown> = UniformNodeFor<T>
1285
-
1286
- /** Flat record of uniform nodes (no nested scopes) */
1287
- type UniformRecord<T extends UniformNode = UniformNode> = Record<string, T>
1288
-
1289
- /**
1290
- * Uniform store that can contain both root-level uniforms and scoped uniform objects
1291
- * Used by state.uniforms which has structure like:
1292
- * { uTime: UniformNode, player: { uHealth: UniformNode }, enemy: { uHealth: UniformNode } }
1293
- */
1294
- type UniformStore = Record<string, UniformNode | UniformRecord>
1295
-
1296
- /**
1297
- * Helper to safely access a uniform node from the store.
1298
- * Use this when accessing state.uniforms to get proper typing.
1299
- * @example
1300
- * const uTime = uniforms.uTime as UniformNode<number>
1301
- * const uColor = uniforms.uColor as UniformNode<import('three/webgpu').Color>
1302
- */
1303
- type GetUniform<T = unknown> = UniformNode<T>
1304
-
1305
- /**
1306
- * Acceptable input values for useUniforms - raw values that get converted to UniformNodes
1307
- * Supports:
1308
- * - Primitives: number, string (color), boolean
1309
- * - Three.js types: Color, Vector2/3/4, Matrix2/3/4
1310
- * - Plain objects: { x, y, z, w } converted to vectors
1311
- * - TSL nodes: color(), vec3(), float() for type casting
1312
- * - UniformNode: existing uniforms (reused as-is)
1313
- */
1314
- type UniformValue =
1315
- | number
1316
- | string
1317
- | boolean
1318
- | three_webgpu.Color
1319
- | three_webgpu.Vector2
1320
- | three_webgpu.Vector3
1321
- | three_webgpu.Vector4
1322
- | three_webgpu.Matrix2
1323
- | three_webgpu.Matrix3
1324
- | three_webgpu.Matrix4
1325
- | { x: number; y: number }
1326
- | { x: number; y: number; z: number }
1327
- | { x: number; y: number; z: number; w: number }
1328
- | { r: number; g: number; b: number; a?: number } // Plain objects converted to Color
1329
- | three_webgpu.Node // TSL nodes like color(), vec3(), float() for type casting
1330
- | UniformNode
1331
-
1332
- /** Input record for useUniforms - accepts raw values or UniformNodes */
1333
- type UniformInputRecord = Record<string, UniformValue>
1334
- }
1335
-
1336
- declare global {
1337
- /**
1338
- * three's own render pipeline type. Named here so the rest of R3F refers to three's shape
1339
- * rather than `any`. three r183 renamed `PostProcessing` to `RenderPipeline`; our peer floor
1340
- * is r185, so the new name is the only one.
1341
- */
1342
- type ThreeRenderPipeline = three_webgpu.RenderPipeline
1343
-
1344
- /**
1345
- * The pass `useRenderPipeline` creates for you: three's own `PassNode`, as returned by
1346
- * `pass(scene, camera)` from `three/tsl`. Referenced from three so members like
1347
- * `getTextureNode`, `setMRT` and `dispose` track the installed version.
1348
- */
1349
- type ScenePassNode = three_webgpu.PassNode
1350
-
1351
- /**
1352
- * Pass record - stores TSL pass nodes for render pipeline.
1353
- *
1354
- * `scenePass` is the only key the library owns. It is optional here because this is also the
1355
- * shape of `state.passes`, which is `{}` before the pipeline exists and again after `reset()`
1356
- * or `clearPasses()`. Inside the callbacks it is always present; see
1357
- * {@link RenderPipelineCallbackState}.
1358
- *
1359
- * Every other key is user-registered, via a callback's return value. Those are TSL nodes of
1360
- * any kind, not only passes: texture reads of an MRT attachment, effect nodes, extra
1361
- * `pass()` instances. `Node` is the common base, so that is the bound. Narrow at the call
1362
- * site when you need a member, e.g. `passes.velocity as TextureNode`.
1363
- *
1364
- * The index signature admits `undefined` because a key may simply not be registered, and
1365
- * because the optional `scenePass` must be assignable to it: under `skipLibCheck: false` an
1366
- * optional property whose type excludes `undefined` from the index signature is an error
1367
- * (TS2411) for every consumer compiling these declarations.
1368
- */
1369
- interface PassRecord {
1370
- scenePass?: ScenePassNode
1371
- [key: string]: three_webgpu.Node | undefined
1372
- }
1373
-
1374
- /**
1375
- * State passed to pipeline callbacks after the active pipeline has been created.
1376
- *
1377
- * `passes.scenePass` is required here: the hook installs the default scene pass before either
1378
- * callback runs, so callbacks can use it without a guard or a cast.
1379
- *
1380
- * `renderer` is narrowed to `WebGPURenderer` and `isLegacy` to `false`: the hook throws under
1381
- * the legacy renderer before either callback can run, so a callback never sees WebGL.
1382
- */
1383
- type RenderPipelineCallbackState = RootState & {
1384
- renderPipeline: ThreeRenderPipeline
1385
- passes: PassRecord & { scenePass: ScenePassNode }
1386
- renderer: three_webgpu.WebGPURenderer
1387
- isLegacy: false
1388
- }
1389
-
1390
- /**
1391
- * What a callback may return to register entries into `state.passes`.
1392
- *
1393
- * `scenePass` is reserved. The hook owns that entry and its lifecycle: it caches the pass it
1394
- * created, and `rebuild()` / `reset()` dispose that cached pass. A callback overwriting the
1395
- * store entry would leave the store pointing at a node the hook never disposes, and the hook
1396
- * disposing a pass nothing references. So returning it is a type error.
1397
- */
1398
- type RegisteredPasses = Record<string, three_webgpu.Node> & { scenePass?: never }
1399
-
1400
- /** Setup callback - runs first to configure MRT, create additional passes */
1401
- type RenderPipelineSetupCallback = (state: RenderPipelineCallbackState) => RegisteredPasses | void
1402
-
1403
- /** Main callback - runs second to configure outputNode, create effect passes */
1404
- type RenderPipelineMainCallback = (state: RenderPipelineCallbackState) => RegisteredPasses | void
1405
-
1406
- /** The imperative half of useRenderPipeline's return value, present in every state */
1407
- interface UseRenderPipelineActions {
1408
- /** Current passes from state */
1409
- passes: PassRecord
1410
- /** Clear all passes from state */
1411
- clearPasses: () => void
1412
- /** Reset RenderPipeline entirely (clears PP + passes) */
1413
- reset: () => void
1414
- /** Re-run setup/main callbacks with current closure values */
1415
- rebuild: () => void
1416
- }
1417
-
1418
- /**
1419
- * Return type for useRenderPipeline hook, discriminated on `isReady`.
1420
- *
1421
- * `if (isReady)` narrows `renderPipeline` to non-null, which is what the docs already tell
1422
- * callers to check. `passes.scenePass` deliberately stays optional in the ready branch:
1423
- * `clearPasses()` empties the record while leaving the pipeline in place.
1424
- */
1425
- type UseRenderPipelineReturn = UseRenderPipelineActions &
1426
- (
1427
- | {
1428
- /** True when RenderPipeline is configured and ready */
1429
- isReady: true
1430
- /** RenderPipeline instance */
1431
- renderPipeline: ThreeRenderPipeline
1432
- }
1433
- | {
1434
- /** False until the pipeline has been created */
1435
- isReady: false
1436
- /** Not initialized yet, or torn down by reset() */
1437
- renderPipeline: null
1438
- }
1439
- )
1440
- }
1441
-
1442
1108
  type MutableOrReadonlyParameters<T extends (...args: any) => any> = Parameters<T> | Readonly<Parameters<T>>
1443
1109
 
1444
1110
  interface MathRepresentation {
@@ -3874,303 +3540,6 @@ declare function isOnce(value: unknown): value is {
3874
3540
  [ONCE]: any[] | true;
3875
3541
  };
3876
3542
 
3877
- /** Distinguishes a resource leaf from a nested resource scope. */
3878
- type ResourceLeafGuard<T> = (value: unknown) => value is T;
3879
-
3880
- /**
3881
- * ScopedStore - Type-safe wrapper for nested stores (uniforms, nodes)
3882
- *
3883
- * Provides TypeScript-friendly access to uniform/node stores where the runtime
3884
- * structure is `Record<string, T | Record<string, T>>` (leaf nodes or nested scopes).
3885
- *
3886
- * The wrapper uses a Proxy to:
3887
- * 1. Return `T` for property access (type assumption: assumes leaf node)
3888
- * 2. Provide `.scope(key)` method for explicit nested access
3889
- * 3. Support iteration methods: has(), keys(), Object.keys(), for...in
3890
- *
3891
- * @example
3892
- * ```tsx
3893
- * useLocalNodes(({ uniforms }) => ({
3894
- * wobble: sin(uniforms.uTime.mul(2)), // No cast needed!
3895
- * playerHealth: uniforms.scope('player').uHealth // Explicit scope access
3896
- * }))
3897
- * ```
3898
- */
3899
-
3900
- /**
3901
- * Type-safe wrapper interface for accessing nested store data.
3902
- * Property access returns `T` (assumes leaf node).
3903
- * Use `.scope(key)` for nested object access.
3904
- *
3905
- */
3906
- type ScopedStoreMethods<TLeaf> = {
3907
- /** Access a nested scope by key. Returns empty wrapper if scope doesn't exist. */
3908
- scope<TScope extends Record<string, TLeaf> = Record<string, TLeaf>>(key: string): ScopedStoreType<TLeaf, TScope>;
3909
- /** Check if a key exists in the store */
3910
- has(key: string): boolean;
3911
- /** Get all keys in the store */
3912
- keys(): string[];
3913
- };
3914
- type ScopedStoreType<TLeaf, TEntries extends Record<string, TLeaf> = Record<string, TLeaf>> = Readonly<TEntries> & ScopedStoreMethods<TLeaf>;
3915
- interface ScopedStoreData<TLeaf> {
3916
- [key: string]: TLeaf | ScopedStoreData<TLeaf>;
3917
- }
3918
- /**
3919
- * Create a type-safe ScopedStore wrapper around store data.
3920
- * @param data - The raw store data (uniforms or nodes from RootState)
3921
- * @returns A ScopedStoreType wrapper with type-safe access
3922
- */
3923
- declare function createScopedStore<TLeaf>(data: ScopedStoreData<TLeaf>, isLeaf: ResourceLeafGuard<TLeaf>): ScopedStoreType<TLeaf>;
3924
- /**
3925
- * State type passed to creator functions with ScopedStore wrappers.
3926
- * Provides type-safe access to uniforms, nodes, buffers, and gpuStorage without manual casting.
3927
- */
3928
- type CreatorState = Omit<RootState, 'uniforms' | 'nodes' | 'buffers' | 'gpuStorage'> & {
3929
- /** Type-safe uniform access - property access returns UniformNode */
3930
- uniforms: ScopedStoreType<UniformNode>;
3931
- /** Type-safe node access for real, callable, and legacy structural nodes */
3932
- nodes: ScopedStoreType<NodeLike>;
3933
- /** Type-safe buffer access - property access returns BufferLike (TypedArrays, BufferAttributes, TSL nodes) */
3934
- buffers: ScopedStoreType<BufferLike>;
3935
- /** Type-safe GPU storage access - property access returns StorageLike (StorageTexture, TSL nodes) */
3936
- gpuStorage: ScopedStoreType<StorageLike>;
3937
- };
3938
-
3939
- /** Creator function that returns uniform inputs (can be raw values or UniformNodes) */
3940
- type UniformCreator<T extends UniformInputRecord = UniformInputRecord> = (state: CreatorState) => T;
3941
- /** Function signature for removeUniforms util */
3942
- type RemoveUniformsFn = (names: string | string[], scope?: string) => void;
3943
- /** Function signature for clearUniforms util */
3944
- type ClearUniformsFn = (scope?: string) => void;
3945
- /** Function signature for rebuildUniforms util */
3946
- type RebuildUniformsFn = (scope?: string) => void;
3947
- /** Return type with utils included */
3948
- type UniformsWithUtils<T extends UniformRecord | UniformStore = UniformRecord> = T & {
3949
- removeUniforms: RemoveUniformsFn;
3950
- clearUniforms: ClearUniformsFn;
3951
- rebuildUniforms: RebuildUniformsFn;
3952
- };
3953
- declare function useUniforms<T extends UniformInputRecord>(creator: UniformCreator<T>): UniformsWithUtils<UniformNodesFor<T>>;
3954
- declare function useUniforms<T extends UniformInputRecord>(creator: UniformCreator<T>, scope: string): UniformsWithUtils<UniformNodesFor<T>>;
3955
- declare function useUniforms<T extends UniformInputRecord>(uniforms: T): UniformsWithUtils<UniformNodesFor<T>>;
3956
- declare function useUniforms<T extends UniformInputRecord>(uniforms: T, scope: string): UniformsWithUtils<UniformNodesFor<T>>;
3957
- declare function useUniforms(): UniformsWithUtils<UniformStore>;
3958
- declare function useUniforms(scope: string): UniformsWithUtils;
3959
- declare function useUniforms<T extends UniformInputRecord>(scope?: string): UniformsWithUtils<UniformNodesFor<T>>;
3960
- /**
3961
- * Global rebuildUniforms function for HMR integration.
3962
- * Invalidates cached uniforms and increments _hmrVersion to trigger re-creation.
3963
- * Call this when HMR is detected to refresh all uniform creators.
3964
- *
3965
- * Resolves to the primary store so shared TSL resources rebuild on the
3966
- * authoritative store.
3967
- *
3968
- * @param store - The R3F store (from useStore or context)
3969
- * @param scope - Optional scope to rebuild ('root' for root only, string for specific scope, undefined for all)
3970
- */
3971
- declare function rebuildAllUniforms(store: ReturnType<typeof useStore>, scope?: string): void;
3972
- /**
3973
- * Remove uniforms by name from root level or a scope
3974
- * @deprecated Use `const { removeUniforms } = useUniforms()` instead
3975
- */
3976
- declare function removeUniforms(set: ReturnType<typeof useStore>['setState'], names: string[], scope?: string): void;
3977
- /**
3978
- * Clear all uniforms from a scope (removes the entire scope object)
3979
- * @deprecated Use `const { clearUniforms } = useUniforms()` instead
3980
- */
3981
- declare function clearScope(set: ReturnType<typeof useStore>['setState'], scope: string): void;
3982
- /**
3983
- * Clear all root-level uniforms (preserves scopes)
3984
- * @deprecated Use `const { clearUniforms } = useUniforms()` with `clearUniforms('root')` instead
3985
- */
3986
- declare function clearRootUniforms(set: ReturnType<typeof useStore>['setState']): void;
3987
-
3988
- /**
3989
- * Supported uniform value types:
3990
- * - Raw values: number, boolean, Vector2, Vector3, Vector4, Color, Matrix2, Matrix3, Matrix4
3991
- * - String colors: '#ff0000', 'red', 'rgb(255,0,0)' (auto-converted to Color)
3992
- * - TSL nodes: color(), vec3(), float(), etc. (for type casting)
3993
- * - UniformNode: existing uniforms (reused as-is)
3994
- */
3995
- type UniformValue = number | boolean | string | Vector2$1 | Vector3$1 | Vector4$1 | Color$2 | Matrix2 | Matrix3$1 | Matrix4$1 | Node | UniformNode;
3996
- declare function useUniform<T extends UniformValue = UniformValue>(name: string): UniformNodeFor<T>;
3997
- declare function useUniform<T extends UniformValue>(name: string, value: T): UniformNodeFor<T>;
3998
-
3999
- /**
4000
- * Every node representation a creator may return. The definition lives with the store types as
4001
- * `NodeLike`, so the shape creators return and the shape `state.nodes` holds are one type by
4002
- * construction: three's real `Node`, the callable proxy `Fn()` returns, or the legacy structural
4003
- * `{ uuid, nodeType }` shape.
4004
- */
4005
- type TSLNodeLike = NodeLike;
4006
-
4007
- /** Backward-compatible alias covering every accepted node representation. */
4008
- type TSLNode = TSLNodeLike;
4009
- /**
4010
- * Creator function that returns a record of nodes.
4011
- * Exact creator return inference is preserved within the compatible node constraint.
4012
- */
4013
- type NodeCreator<T extends Record<string, TSLNodeLike>> = (state: CreatorState) => T;
4014
- /** Function signature for removeNodes util */
4015
- type RemoveNodesFn = (names: string | string[], scope?: string) => void;
4016
- /** Function signature for clearNodes util */
4017
- type ClearNodesFn = (scope?: string) => void;
4018
- /** Function signature for rebuildNodes util */
4019
- type RebuildNodesFn = (scope?: string) => void;
4020
- /** Return type with utils included */
4021
- type NodesWithUtils<T extends Record<string, unknown> = NodeRecord> = T & {
4022
- removeNodes: RemoveNodesFn;
4023
- clearNodes: ClearNodesFn;
4024
- rebuildNodes: RebuildNodesFn;
4025
- };
4026
- declare function useNodes(): NodesWithUtils<NodeStore>;
4027
- declare function useNodes(scope: string): NodesWithUtils<NodeRecord>;
4028
- declare function useNodes<T extends NodeRecord>(scope?: string): NodesWithUtils<T>;
4029
- declare function useNodes<T extends NodeRecord>(creator: NodeCreator<T>): NodesWithUtils<T>;
4030
- declare function useNodes<T extends NodeRecord>(creator: NodeCreator<T>, scope: string): NodesWithUtils<T>;
4031
- declare function useNodes(creatorOrScope?: NodeCreator<NodeRecord> | string, scope?: string): NodesWithUtils<Record<string, unknown>>;
4032
- /**
4033
- * Global rebuildNodes function for HMR integration.
4034
- * Invalidates cached nodes and increments _hmrVersion to trigger re-creation.
4035
- * Call this when HMR is detected to refresh all node creators.
4036
- *
4037
- * Resolves to the primary store so shared TSL resources rebuild on the
4038
- * authoritative store.
4039
- *
4040
- * @param store - The R3F store (from useStore or context)
4041
- * @param scope - Optional scope to rebuild ('root' for root only, string for specific scope, undefined for all)
4042
- */
4043
- declare function rebuildAllNodes(store: ReturnType<typeof useStore>, scope?: string): void;
4044
- /**
4045
- * Remove nodes by name from root level or a scope
4046
- * @deprecated Use `const { removeNodes } = useNodes()` instead
4047
- */
4048
- declare function removeNodes(set: ReturnType<typeof useStore>['setState'], names: string[], scope?: string): void;
4049
- /**
4050
- * Clear all nodes from a scope (removes the entire scope object)
4051
- * @deprecated Use `const { clearNodes } = useNodes()` instead
4052
- */
4053
- declare function clearNodeScope(set: ReturnType<typeof useStore>['setState'], scope: string): void;
4054
- /**
4055
- * Clear all root-level nodes (preserves scopes)
4056
- * @deprecated Use `const { clearNodes } = useNodes()` with `clearNodes('root')` instead
4057
- */
4058
- declare function clearRootNodes(set: ReturnType<typeof useStore>['setState']): void;
4059
-
4060
- /** Creator receives CreatorState with ScopedStore wrappers for type-safe access. Returns any record. */
4061
- type LocalNodeCreator<T extends Record<string, unknown>> = (state: CreatorState) => T;
4062
- /**
4063
- * Creates local values that rebuild when uniforms, nodes, or textures change.
4064
- *
4065
- * Unlike `useNodes`, this does NOT register to the global store.
4066
- * Use for component-specific nodes/values that depend on shared resources.
4067
- *
4068
- * @example
4069
- * ```tsx
4070
- * // Destructure what you need from state
4071
- * const { wobble, uTime } = useLocalNodes(({ uniforms, nodes }) => ({
4072
- * wobble: sin(uniforms.uTime.mul(2)),
4073
- * uTime: uniforms.uTime, // can return uniforms too
4074
- * }))
4075
- *
4076
- * // Or access anything else from RootState
4077
- * const { scaled } = useLocalNodes(({ camera, nodes }) => ({
4078
- * scaled: nodes.basePos.mul(camera.zoom),
4079
- * }))
4080
- *
4081
- * // Type-safe uniform access
4082
- * const { colorNode } = useLocalNodes(({ uniforms }) => {
4083
- * const uValue = uniforms.myUniform as UniformNode<number>
4084
- * return { colorNode: mix(colorA, colorB, uValue) }
4085
- * })
4086
- * ```
4087
- */
4088
- declare function useLocalNodes<T extends Record<string, unknown>>(creator: LocalNodeCreator<T>): T;
4089
-
4090
- /**
4091
- * A record of buffer-like values - allows mixed types (TypedArrays, BufferAttributes, TSL nodes)
4092
- */
4093
- type BufferRecordType<T extends BufferLike = BufferLike> = Record<string, T>;
4094
- /**
4095
- * Creator function that returns a record of buffers.
4096
- * Receives CreatorState with access to existing buffers, gpuStorage, uniforms, nodes, etc.
4097
- */
4098
- type BufferCreator<T extends Record<string, BufferLike>> = (state: CreatorState) => T;
4099
- /** Function signature for removeBuffers util */
4100
- type RemoveBuffersFn = (names: string | string[], scope?: string) => void;
4101
- /** Function signature for clearBuffers util */
4102
- type ClearBuffersFn = (scope?: string) => void;
4103
- /** Function signature for rebuildBuffers util */
4104
- type RebuildBuffersFn = (scope?: string) => void;
4105
- /** Function signature for disposeBuffers util - releases GPU resources */
4106
- type DisposeBuffersFn = (names: string | string[], scope?: string) => void;
4107
- /** Return type with utils included */
4108
- type BuffersWithUtils<T extends BufferRecordType | BufferStore = BufferRecordType> = T & {
4109
- removeBuffers: RemoveBuffersFn;
4110
- clearBuffers: ClearBuffersFn;
4111
- rebuildBuffers: RebuildBuffersFn;
4112
- disposeBuffers: DisposeBuffersFn;
4113
- };
4114
- declare function useBuffers(): BuffersWithUtils<BufferStore>;
4115
- declare function useBuffers(scope: string): BuffersWithUtils<Record<string, BufferLike>>;
4116
- declare function useBuffers<T extends Record<string, BufferLike>>(scope?: string): BuffersWithUtils<T>;
4117
- declare function useBuffers<T extends Record<string, BufferLike>>(creator: BufferCreator<T>): BuffersWithUtils<T>;
4118
- declare function useBuffers<T extends Record<string, BufferLike>>(creator: BufferCreator<T>, scope: string): BuffersWithUtils<T>;
4119
- /**
4120
- * Global rebuildBuffers function for HMR integration.
4121
- * Invalidates cached buffers and increments _hmrVersion to trigger re-creation.
4122
- * Call this when HMR is detected to refresh all buffer creators.
4123
- *
4124
- * Resolves to the primary store so shared TSL resources rebuild on the
4125
- * authoritative store.
4126
- *
4127
- * @param store - The R3F store (from useStore or context)
4128
- * @param scope - Optional scope to rebuild ('root' for root only, string for specific scope, undefined for all)
4129
- */
4130
- declare function rebuildAllBuffers(store: ReturnType<typeof useStore>, scope?: string): void;
4131
-
4132
- /**
4133
- * A record of storage-like values - allows mixed types (StorageTexture, Storage3DTexture, TSL nodes)
4134
- */
4135
- type StorageRecordType<T extends StorageLike = StorageLike> = Record<string, T>;
4136
- /**
4137
- * Creator function that returns a record of GPU storage objects.
4138
- * Receives CreatorState with access to existing buffers, gpuStorage, uniforms, nodes, etc.
4139
- */
4140
- type StorageCreator<T extends Record<string, StorageLike>> = (state: CreatorState) => T;
4141
- /** Function signature for removeStorage util */
4142
- type RemoveStorageFn = (names: string | string[], scope?: string) => void;
4143
- /** Function signature for clearStorage util */
4144
- type ClearStorageFn = (scope?: string) => void;
4145
- /** Function signature for rebuildStorage util */
4146
- type RebuildStorageFn = (scope?: string) => void;
4147
- /** Function signature for disposeStorage util - releases GPU resources */
4148
- type DisposeStorageFn = (names: string | string[], scope?: string) => void;
4149
- /** Return type with utils included */
4150
- type StorageWithUtils<T extends StorageRecordType | StorageStore = StorageRecordType> = T & {
4151
- removeStorage: RemoveStorageFn;
4152
- clearStorage: ClearStorageFn;
4153
- rebuildStorage: RebuildStorageFn;
4154
- disposeStorage: DisposeStorageFn;
4155
- };
4156
- declare function useGPUStorage(): StorageWithUtils<StorageStore>;
4157
- declare function useGPUStorage(scope: string): StorageWithUtils<Record<string, StorageLike>>;
4158
- declare function useGPUStorage<T extends Record<string, StorageLike>>(scope?: string): StorageWithUtils<T>;
4159
- declare function useGPUStorage<T extends Record<string, StorageLike>>(creator: StorageCreator<T>): StorageWithUtils<T>;
4160
- declare function useGPUStorage<T extends Record<string, StorageLike>>(creator: StorageCreator<T>, scope: string): StorageWithUtils<T>;
4161
- /**
4162
- * Global rebuildStorage function for HMR integration.
4163
- * Invalidates cached storage and increments _hmrVersion to trigger re-creation.
4164
- * Call this when HMR is detected to refresh all storage creators.
4165
- *
4166
- * Resolves to the primary store so shared TSL resources rebuild on the
4167
- * authoritative store.
4168
- *
4169
- * @param store - The R3F store (from useStore or context)
4170
- * @param scope - Optional scope to rebuild ('root' for root only, string for specific scope, undefined for all)
4171
- */
4172
- declare function rebuildAllStorage(store: ReturnType<typeof useStore>, scope?: string): void;
4173
-
4174
3543
  /**
4175
3544
  * Re-export from core - useTextures is now a core R3F hook (a reactive Texture registry).
4176
3545
  *
@@ -4196,49 +3565,6 @@ interface TextureOperations {
4196
3565
  }
4197
3566
  declare function createTextureOperations(set: StoreApi<RootState>['setState']): TextureOperations;
4198
3567
 
4199
- /**
4200
- * Hook for managing WebGPU RenderPipeline with automatic scenePass setup.
4201
- *
4202
- * Features:
4203
- * - Creates RenderPipeline instance if not exists
4204
- * - Creates default scenePass (no MRT) automatically
4205
- * - Callbacks receive full RootState for flexibility
4206
- * - No auto-cleanup on unmount - use reset() for explicit cleanup
4207
- * - Scene/camera changes trigger scenePass recreation
4208
- * - A replaced scenePass is disposed once the new graph is installed, so rebuild() does not
4209
- * strand its render target (and MRT attachments) on the GPU
4210
- * - Any run that changes the output node sets RenderPipeline.needsUpdate, so rebuild() actually
4211
- * recompiles instead of silently keeping the first compiled graph
4212
- *
4213
- * @param mainCB - Main callback to configure outputNode and create effect passes
4214
- * @param setupCB - Optional setup callback to configure MRT on scenePass
4215
- * @returns { passes, renderPipeline, clearPasses, reset, rebuild }
4216
- *
4217
- * @example
4218
- * ```tsx
4219
- * // Simple effect
4220
- * useRenderPipeline(({ renderPipeline, passes }) => {
4221
- * renderPipeline.outputNode = bloom(passes.scenePass.getTextureNode())
4222
- * })
4223
- *
4224
- * // With MRT setup
4225
- * useRenderPipeline(
4226
- * ({ renderPipeline, passes }) => {
4227
- * const beauty = passes.scenePass.getTextureNode().toInspector('Color')
4228
- * const vel = passes.scenePass.getTextureNode('velocity')
4229
- * renderPipeline.outputNode = motionBlur(beauty, vel)
4230
- * },
4231
- * ({ passes }) => {
4232
- * passes.scenePass.setMRT(mrt({ output, velocity }))
4233
- * }
4234
- * )
4235
- *
4236
- * // Read-only access
4237
- * const { renderPipeline, passes } = useRenderPipeline()
4238
- * ```
4239
- */
4240
- declare function useRenderPipeline(mainCB?: RenderPipelineMainCallback, setupCB?: RenderPipelineSetupCallback): UseRenderPipelineReturn;
4241
-
4242
3568
  //* Renderer Props ========================================
4243
3569
 
4244
3570
  type WebGPUDefaultProps = Omit<WebGPURendererParameters, 'canvas'> & BaseRendererProps
@@ -4290,11 +3616,12 @@ interface WebGPURootState extends Omit<RootState, 'renderer' | 'gl' | 'internal'
4290
3616
  * @fileoverview WebGPU entry point - WebGPU only, no legacy WebGL
4291
3617
  *
4292
3618
  * This entry point is for apps that want to use ONLY WebGPURenderer.
4293
- * Includes WebGPU-specific hooks (useUniforms, useNodes, useTextures).
4294
3619
  * Auto-extends THREE with WebGPU node materials (MeshBasicNodeMaterial, etc.)
3620
+ * The TSL resource hooks (useUniforms, useNodes, useRenderPipeline, ...) are in @react-three/tsl.
4295
3621
  *
4296
3622
  * Usage:
4297
- * import { Canvas, useFrame, useUniforms } from '@react-three/fiber/webgpu'
3623
+ * import { Canvas, useFrame } from '@react-three/fiber/webgpu'
3624
+ * import { useUniforms } from '@react-three/tsl'
4298
3625
  */
4299
3626
 
4300
3627
  /** `useThree` narrowed to WebGPU state — `state.renderer` is a `WebGPURenderer`. */
@@ -4313,5 +3640,5 @@ type WebGPUCanvasProps = Omit<CanvasProps, 'onCreated'> & {
4313
3640
  /** `Canvas` narrowed to WebGPU state — the same component, `onCreated` typed against `WebGPURootState`. */
4314
3641
  declare const Canvas: (props: WebGPUCanvasProps) => JSX.Element;
4315
3642
 
4316
- export { Block, Canvas, Environment, EnvironmentCube, EnvironmentMap, EnvironmentPortal, ErrorBoundary, FROM_REF, IsObject, ONCE, Portal, R3F_BUILD_LEGACY, R3F_BUILD_WEBGPU, REACT_INTERNAL_PROPS, RESERVED_PROPS, three_d as ReactThreeFiber, Texture, _roots, addAfterEffect, addEffect, addTail, advance, applyProps, attach, buildGraph, calculateDpr, clearNodeScope, clearRootNodes, clearRootUniforms, clearScope, context, createEvents, createPointerEvents, createPortal, createRoot, createScopedStore, createStore, createTextureOperations, detach, diffProps, dispose, createPointerEvents as events, extend, findInitialRoot, flushSync, fromRef, getInstanceProps, getPrimary, getPrimaryIds, getRootState, getUuidPrefix, hasConstructor, hasPrimary, invalidate, invalidateInstance, is, isColorRepresentation, isCopyable, isFromRef, isObject3D, isOnce, isOrthographicCamera, isRef, isRenderer, isTexture, isVectorLike, once, prepare, presetsObj, rebuildAllBuffers, rebuildAllNodes, rebuildAllStorage, rebuildAllUniforms, reconciler, registerPrimary, registerRootExtension, removeInteractivity, removeNodes, removeUniforms, resolve, setRenderOverride, swapInteractivity, unmountComponentAtNode, unregisterPrimary, updateCamera, updateFrustum, useBridge, useBuffers, useEnvironment, useFrame, useGPUStorage, useGraph, useInstanceHandle, useIsomorphicLayoutEffect, useLoader, useLocalNodes, useMutableCallback, useNodes, useRenderPipeline, useRenderTarget, useStore, useTexture, useTextures, useThree, useUniform, useUniforms, waitForPrimary };
4317
- export type { Act, Args, ArgsProp, AttachFnType, AttachType, BackgroundConfig, BackgroundProp, BaseRendererProps, Bridge, BufferCreator, BufferLike, BufferRecord, BufferStore, BuffersWithUtils, Camera, CameraProps, WebGPUCanvasProps as CanvasProps, CanvasSchedulerConfig, Catalogue, ClearBuffersFn, ClearNodesFn, ClearStorageFn, ClearUniformsFn, Color, ColorManagementConfig, ComputeFunction, ConstructorRepresentation, CreatorState, DefaultGLProps, DefaultRendererProps, Disposable, DisposeBuffersFn, DisposeOptions, DisposeStorageFn, DomEvent, Dpr, ElementProps, EnvironmentLoaderProps, EnvironmentProps, EquConfig, Euler, EventHandlers, EventManager, EventProps, Events, Extensions, FiberRoot, FilterFunction, FrameCallback, FrameNextCallback, FrameNextState, FrameState, Frameloop, FromRefMarker, GLProps, GLTFLike, GeometryProps, GeometryTransformProps, GlobalEffectType, GlobalRenderCallback, HostConfig, InferLoadResult, InjectState, InputLike, Instance, InstanceProps, WebGPUInternalState as InternalState, Intersection, IntersectionEvent, IsAllOptional, IsOptional, Layers, LegacyInternalState, LegacyRenderer, LegacyRootState, LoaderInstance, LoaderLike, LoaderResult, LocalNodeCreator, MappedTextureType, MathProps, MathRepresentation, MathType, MathTypes, Matrix3, Matrix4, Mutable, MutableOrReadonlyParameters, NodeCreator, NodeLike, NodeProps, NodeRecord, NodeStore, NodesWithUtils, NonFunctionKeys, Object3DMethod, ObjectMap, OffscreenCanvas$1 as OffscreenCanvas, OnceValue, Overwrite, Performance, PointerCaptureTarget, PointerState, PresetsType, PrimaryCanvasEntry, Properties, Quaternion, WebGPUR3FRenderer as R3FRenderer, RaycastableRepresentation, ReactProps, RebuildBuffersFn, RebuildNodesFn, RebuildStorageFn, RebuildUniformsFn, ReconcilerRoot, RemoveBuffersFn, RemoveNodesFn, RemoveStorageFn, RemoveUniformsFn, RenderCallback, RenderProps, RenderTargetOptions, Renderer, RendererConfigExtended, RendererFactory, RendererProps, Root, RootExtension, WebGPURootState as RootState, RootStore, ScopedStoreType, SetBlock, Size, StorageCreator, StorageLike, StorageRecord, StorageStore, StorageWithUtils, Subscription, TSLNode, TSLNodeInput, TSLNodeLike, TextureEntry, TextureInput, TextureNode, TextureOperations, TextureResult, ThreeCamera, ThreeElement, ThreeElements, ThreeElementsImpl, ThreeEvent, ThreeExports, ThreeToJSXElements, UnblockProps, UniformCreator, UniformValue, UniformsWithUtils, UseFrameWebGPU, UseTextureOptions, UseTexturesReturn, UseThreeWebGPU, Vector2, Vector3, Vector4, VectorRepresentation, Viewport, VisibilityEntry, WebGLDefaultProps, WebGLProps, WebGLShadowConfig, WebGPUCanvasProps, WebGPUDefaultProps, WebGPUProps, WebGPUShadowConfig, XRManager, XRPointerConfig };
3643
+ export { Block, Canvas, Environment, EnvironmentCube, EnvironmentMap, EnvironmentPortal, ErrorBoundary, FROM_REF, IsObject, ONCE, Portal, R3F_BUILD_LEGACY, R3F_BUILD_WEBGPU, REACT_INTERNAL_PROPS, RESERVED_PROPS, three_d as ReactThreeFiber, Texture, _roots, addAfterEffect, addEffect, addTail, advance, applyProps, attach, buildGraph, calculateDpr, context, createEvents, createPointerEvents, createPortal, createRoot, createStore, createTextureOperations, detach, diffProps, dispose, createPointerEvents as events, extend, findInitialRoot, flushSync, fromRef, getInstanceProps, getPrimary, getPrimaryIds, getRootState, getUuidPrefix, hasConstructor, hasPrimary, invalidate, invalidateInstance, is, isColorRepresentation, isCopyable, isFromRef, isObject3D, isOnce, isOrthographicCamera, isRef, isRenderer, isTexture, isVectorLike, once, prepare, presetsObj, reconciler, registerPrimary, registerRootExtension, removeInteractivity, resolve, setRenderOverride, swapInteractivity, unmountComponentAtNode, unregisterPrimary, updateCamera, updateFrustum, useBridge, useEnvironment, useFrame, useGraph, useInstanceHandle, useIsomorphicLayoutEffect, useLoader, useMutableCallback, useRenderTarget, useStore, useTexture, useTextures, useThree, waitForPrimary };
3644
+ export type { Act, Args, ArgsProp, AttachFnType, AttachType, BackgroundConfig, BackgroundProp, BaseRendererProps, RootState as BaseRootState, Bridge, Camera, CameraProps, WebGPUCanvasProps as CanvasProps, CanvasSchedulerConfig, Catalogue, Color, ColorManagementConfig, ComputeFunction, ConstructorRepresentation, DefaultGLProps, DefaultRendererProps, Disposable, DisposeOptions, DomEvent, Dpr, ElementProps, EnvironmentLoaderProps, EnvironmentProps, EquConfig, Euler, EventHandlers, EventManager, EventProps, Events, Extensions, FiberRoot, FilterFunction, FrameCallback, FrameNextCallback, FrameNextState, FrameState, Frameloop, FromRefMarker, GLProps, GLTFLike, GeometryProps, GeometryTransformProps, GlobalEffectType, GlobalRenderCallback, HostConfig, InferLoadResult, InjectState, InputLike, Instance, InstanceProps, WebGPUInternalState as InternalState, Intersection, IntersectionEvent, IsAllOptional, IsOptional, Layers, LegacyInternalState, LegacyRenderer, LegacyRootState, LoaderInstance, LoaderLike, LoaderResult, MappedTextureType, MathProps, MathRepresentation, MathType, MathTypes, Matrix3, Matrix4, Mutable, MutableOrReadonlyParameters, NodeProps, NonFunctionKeys, Object3DMethod, ObjectMap, OffscreenCanvas$1 as OffscreenCanvas, OnceValue, Overwrite, Performance, PointerCaptureTarget, PointerState, PresetsType, PrimaryCanvasEntry, Properties, Quaternion, WebGPUR3FRenderer as R3FRenderer, RaycastableRepresentation, ReactProps, ReconcilerRoot, RenderCallback, RenderProps, RenderTargetOptions, Renderer, RendererConfigExtended, RendererFactory, RendererProps, Root, RootExtension, WebGPURootState as RootState, RootStore, SetBlock, Size, Subscription, TSLNodeInput, TextureEntry, TextureInput, TextureNode, TextureOperations, TextureResult, ThreeCamera, ThreeElement, ThreeElements, ThreeElementsImpl, ThreeEvent, ThreeExports, ThreeToJSXElements, UnblockProps, UseFrameWebGPU, UseTextureOptions, UseTexturesReturn, UseThreeWebGPU, Vector2, Vector3, Vector4, VectorRepresentation, Viewport, VisibilityEntry, WebGLDefaultProps, WebGLProps, WebGLShadowConfig, WebGPUCanvasProps, WebGPUDefaultProps, WebGPUProps, WebGPUShadowConfig, XRManager, XRPointerConfig };