@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.
package/dist/legacy.d.ts CHANGED
@@ -2,8 +2,7 @@ import * as THREE$1 from 'three';
2
2
  import { WebGLCubeRenderTarget, WebGLRenderTarget, Color as Color$1, ColorRepresentation, Euler as Euler$1, Loader, RenderTargetOptions as RenderTargetOptions$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, ColorSpace, Texture as Texture$1, CubeTexture, Scene, Frustum, OrthographicCamera } from 'three';
3
3
  import * as React$1 from 'react';
4
4
  import { ReactNode, Component, RefObject, JSX } from 'react';
5
- import * as three_webgpu from 'three/webgpu';
6
- import { WebGPURenderer as WebGPURenderer$1, Node, StorageTexture, Storage3DTexture, StorageArrayTexture, Data3DTexture, CanvasTarget } from 'three/webgpu';
5
+ import { WebGPURenderer as WebGPURenderer$1, CanvasTarget } from 'three/webgpu';
7
6
  import { StoreApi } from 'zustand';
8
7
  import { UseBoundStoreWithEqualityFn } from 'zustand/traditional';
9
8
  import { FrameTimingState, FrameCallback as FrameCallback$1, SchedulerApi, UseFrameNextOptions, FrameNextControls } from '@pmndrs/scheduler';
@@ -298,90 +297,6 @@ type FrameNextCallback = FrameCallback$1<RootState>
298
297
  /** Alias for FrameNextCallback */
299
298
  type FrameCallback = FrameNextCallback
300
299
 
301
- //* Buffer Types (useBuffers) ========================================
302
-
303
- /**
304
- * Buffer-like types for GPU compute and storage operations.
305
- * Includes raw CPU arrays, Three.js buffer attributes, and TSL buffer nodes.
306
- *
307
- * @example
308
- * ```tsx
309
- * const { positions, velocities } = useBuffers(() => ({
310
- * positions: instancedArray(count, 'vec3'), // StorageBufferNode
311
- * velocities: new Float32Array(count * 3), // TypedArray
312
- * }), 'particles')
313
- * ```
314
- */
315
- type BufferLike =
316
- | Float32Array
317
- | Uint32Array
318
- | Int32Array
319
- | Float64Array
320
- | Uint8Array
321
- | Int8Array
322
- | Uint16Array
323
- | Int16Array
324
- | THREE$1.BufferAttribute // Base class for all buffer attributes
325
- | THREE$1.InterleavedBufferAttribute
326
- | Node // TSL buffer nodes (instancedArray, storage)
327
-
328
- /** Flat record of buffer-like values (no nested scopes) */
329
- type BufferRecord = Record<string, BufferLike>
330
-
331
- /**
332
- * Buffer store that can contain both root-level buffers and scoped buffer objects.
333
- * Structure: { positions: Float32Array, particles: { vel: StorageBufferNode } }
334
- */
335
- type BufferStore = Record<string, BufferLike | BufferRecord>
336
-
337
- //* Node Types (useNodes) ========================================
338
-
339
- /**
340
- * Every node representation `useNodes` accepts and `state.nodes` holds: three's real `Node`,
341
- * the callable proxy `Fn()` returns, and the legacy structural shape (`uuid`/`nodeType`) older
342
- * code passes through. Creators are constrained to this same type, so the shape a creator returns
343
- * and the shape the store holds are one type by construction.
344
- */
345
- type NodeLike = TSLNodeType | LegacyTSLNodeLike
346
-
347
- /** Flat record of TSL nodes (no nested scopes) */
348
- type NodeRecord<T extends NodeLike = NodeLike> = Record<string, T>
349
-
350
- /**
351
- * Node store that can contain both root-level nodes and scoped node objects.
352
- * Structure: { wobble: OperatorNode, fx: { blur: ShaderCallable } }
353
- */
354
- type NodeStore = Record<string, NodeLike | NodeRecord>
355
-
356
- //* Storage Types (useGPUStorage) ========================================
357
-
358
- /**
359
- * GPU storage types for texture-based storage operations.
360
- * Includes Three.js storage textures and TSL storage texture nodes.
361
- *
362
- * @example
363
- * ```tsx
364
- * const { heightMap } = useGPUStorage(() => ({
365
- * heightMap: new StorageTexture(512, 512),
366
- * }), 'terrain')
367
- * ```
368
- */
369
- type StorageLike =
370
- | StorageTexture // 2D GPU storage texture
371
- | Storage3DTexture // 3D GPU storage texture (volumes, fluid grids)
372
- | StorageArrayTexture // 2D-array GPU storage texture
373
- | Data3DTexture // 3D texture (can be used as storage)
374
- | Node // TSL storage texture nodes (storageTexture)
375
-
376
- /** Flat record of storage-like values (no nested scopes) */
377
- type StorageRecord = Record<string, StorageLike>
378
-
379
- /**
380
- * Storage store that can contain both root-level storage and scoped storage objects.
381
- * Structure: { heightMap: StorageTexture, terrain: { normal: StorageTextureNode } }
382
- */
383
- type StorageStore = Record<string, StorageLike | StorageRecord>
384
-
385
300
  //* Renderer Types ========================================
386
301
 
387
302
  /** Default renderer type - union of WebGL and WebGPU renderers */
@@ -554,12 +469,13 @@ interface RootState {
554
469
  /** Get current state */
555
470
  get: StoreApi<RootState>['getState']
556
471
  /**
557
- * Reference to the authoritative store for shared TSL resources (uniforms, nodes, etc).
472
+ * The store of the canvas that owns this root's renderer.
558
473
  * - For primary/independent canvases: points to its own store (self-reference)
559
474
  * - For secondary canvases: points to the primary canvas's store
475
+ * - Portals copy it from their parent
560
476
  *
561
- * Hooks like useNodes/useUniforms should read from primaryStore to ensure
562
- * consistent shared state across all canvases sharing a renderer.
477
+ * Anything shared per renderer rather than per canvas (e.g. @react-three/tsl's resources)
478
+ * resolves through it.
563
479
  */
564
480
  primaryStore: RootStore
565
481
  /** @deprecated Use `renderer` instead. The instance of the renderer (typed as WebGLRenderer for backwards compat) */
@@ -622,24 +538,10 @@ interface RootState {
622
538
  setError: (error: Error | null) => void
623
539
  /** Current error state (null when no error) */
624
540
  error: Error | null
625
- /** Global TSL uniform nodes - root-level uniforms + scoped sub-objects. Use useUniforms() hook */
626
- uniforms: UniformStore
627
- /** Global TSL nodes - root-level nodes + scoped sub-objects. Use useNodes() hook */
628
- nodes: NodeStore
629
- /** Global TSL buffer nodes - root-level buffers + scoped sub-objects. Use useBuffers() hook */
630
- buffers: BufferStore
631
- /** Global GPU storage (textures, etc.) - root-level storage + scoped sub-objects. Use useGPUStorage() hook */
632
- gpuStorage: StorageStore
633
541
  /** Global Texture registry (key → Texture, usually keyed by URL) - use useTextures() hook for access + lifecycle */
634
542
  textures: Map<string, THREE$1.Texture>
635
543
  /** Internal: refcount per texture key, driven by mounted useTexture consumers (registry enrollment is on by default) */
636
544
  _textureRefs: Map<string, number>
637
- /** WebGPU RenderPipeline instance - use useRenderPipeline() hook */
638
- renderPipeline: ThreeRenderPipeline | null
639
- /** Global TSL pass nodes for render pipeline - use useRenderPipeline() hook */
640
- passes: PassRecord
641
- /** Internal version counter for HMR - incremented by rebuildNodes/rebuildUniforms to bust memoization */
642
- _hmrVersion: number
643
545
  /** Internal: whether setSize() has taken ownership of canvas dimensions */
644
546
  _sizeImperative: boolean
645
547
  /** Internal: stored size props from Canvas for reset functionality */
@@ -1170,243 +1072,6 @@ interface LegacyRootState extends Omit<RootState, 'renderer' | 'internal'> {
1170
1072
 
1171
1073
  type RenderTargetOptions = RenderTargetOptions$1
1172
1074
 
1173
- //* Global TSL Types ==============================
1174
-
1175
- declare global {
1176
- /**
1177
- * Broad callable-node fallback for dynamic store readers.
1178
- * Creator hooks preserve the exact function signatures inferred from Three's `Fn`.
1179
- */
1180
- type CallableTSLNode = ((...params: never[]) => unknown) & {
1181
- readonly shaderNode: unknown
1182
- readonly id: number
1183
- }
1184
-
1185
- /** Legacy structural node accepted when at least one historical marker exists. */
1186
- type LegacyTSLNodeLike = {
1187
- label?: ((label: string) => unknown) | string
1188
- setName?: (name: string) => unknown
1189
- } & ({ uuid: string | undefined; nodeType?: string | null } | { uuid?: string; nodeType: string | null | undefined })
1190
-
1191
- /** Node type accepted by broad dynamic node-store readers. */
1192
- type TSLNodeType = three_webgpu.Node | CallableTSLNode
1193
-
1194
- /**
1195
- * Derive Three's shader node type from an existing node or a supported raw input.
1196
- * Existing InputNode generics take precedence over structural value normalization.
1197
- * Both generics must be inferred because Three's UniformNode intersects an unknown-typed
1198
- * InputNode base with its concrete InputNode specialization.
1199
- */
1200
- type UniformNodeType<T> = T extends three_webgpu.UniformNode<infer TNodeType, infer _TValue>
1201
- ? TNodeType
1202
- : T extends three_webgpu.InputNode<infer TNodeType, infer _TValue>
1203
- ? TNodeType
1204
- : T extends number
1205
- ? 'float'
1206
- : T extends boolean
1207
- ? 'bool'
1208
- : T extends string | three_webgpu.Color | { r: number; g: number; b: number }
1209
- ? 'color'
1210
- : T extends three_webgpu.Vector4 | { x: number; y: number; z: number; w: number }
1211
- ? 'vec4'
1212
- : T extends three_webgpu.Vector3 | { x: number; y: number; z: number }
1213
- ? 'vec3'
1214
- : T extends three_webgpu.Vector2 | { x: number; y: number }
1215
- ? 'vec2'
1216
- : T extends three_webgpu.Matrix4
1217
- ? 'mat4'
1218
- : T extends three_webgpu.Matrix3
1219
- ? 'mat3'
1220
- : T extends three_webgpu.Matrix2
1221
- ? 'mat2'
1222
- : unknown
1223
-
1224
- /** Derive the normalized JavaScript value stored by a uniform node. */
1225
- type UniformNodeValue<T> = T extends three_webgpu.UniformNode<infer _TNodeType, infer TValue>
1226
- ? TValue
1227
- : T extends three_webgpu.InputNode<infer _TNodeType, infer TValue>
1228
- ? TValue
1229
- : T extends string | { r: number; g: number; b: number }
1230
- ? three_webgpu.Color
1231
- : T extends { x: number; y: number; z: number; w: number }
1232
- ? three_webgpu.Vector4
1233
- : T extends { x: number; y: number; z: number }
1234
- ? three_webgpu.Vector3
1235
- : T extends { x: number; y: number }
1236
- ? three_webgpu.Vector2
1237
- : T extends number
1238
- ? number
1239
- : T extends boolean
1240
- ? boolean
1241
- : T
1242
-
1243
- /** Three's exact UniformNode with shader and value generics derived from an input. */
1244
- type UniformNodeFor<T> = three_webgpu.UniformNode<UniformNodeType<T>, UniformNodeValue<T>>
1245
-
1246
- /** Preserve every input key while mapping values to exact Three uniform nodes. */
1247
- type UniformNodesFor<T extends UniformInputRecord> = {
1248
- [K in keyof T]: UniformNodeFor<T[K]>
1249
- }
1250
-
1251
- /** Backward-compatible single-parameter uniform alias. */
1252
- type UniformNode<T = unknown> = UniformNodeFor<T>
1253
-
1254
- /** Flat record of uniform nodes (no nested scopes) */
1255
- type UniformRecord<T extends UniformNode = UniformNode> = Record<string, T>
1256
-
1257
- /**
1258
- * Uniform store that can contain both root-level uniforms and scoped uniform objects
1259
- * Used by state.uniforms which has structure like:
1260
- * { uTime: UniformNode, player: { uHealth: UniformNode }, enemy: { uHealth: UniformNode } }
1261
- */
1262
- type UniformStore = Record<string, UniformNode | UniformRecord>
1263
-
1264
- /**
1265
- * Helper to safely access a uniform node from the store.
1266
- * Use this when accessing state.uniforms to get proper typing.
1267
- * @example
1268
- * const uTime = uniforms.uTime as UniformNode<number>
1269
- * const uColor = uniforms.uColor as UniformNode<import('three/webgpu').Color>
1270
- */
1271
- type GetUniform<T = unknown> = UniformNode<T>
1272
-
1273
- /**
1274
- * Acceptable input values for useUniforms - raw values that get converted to UniformNodes
1275
- * Supports:
1276
- * - Primitives: number, string (color), boolean
1277
- * - Three.js types: Color, Vector2/3/4, Matrix2/3/4
1278
- * - Plain objects: { x, y, z, w } converted to vectors
1279
- * - TSL nodes: color(), vec3(), float() for type casting
1280
- * - UniformNode: existing uniforms (reused as-is)
1281
- */
1282
- type UniformValue =
1283
- | number
1284
- | string
1285
- | boolean
1286
- | three_webgpu.Color
1287
- | three_webgpu.Vector2
1288
- | three_webgpu.Vector3
1289
- | three_webgpu.Vector4
1290
- | three_webgpu.Matrix2
1291
- | three_webgpu.Matrix3
1292
- | three_webgpu.Matrix4
1293
- | { x: number; y: number }
1294
- | { x: number; y: number; z: number }
1295
- | { x: number; y: number; z: number; w: number }
1296
- | { r: number; g: number; b: number; a?: number } // Plain objects converted to Color
1297
- | three_webgpu.Node // TSL nodes like color(), vec3(), float() for type casting
1298
- | UniformNode
1299
-
1300
- /** Input record for useUniforms - accepts raw values or UniformNodes */
1301
- type UniformInputRecord = Record<string, UniformValue>
1302
- }
1303
-
1304
- declare global {
1305
- /**
1306
- * three's own render pipeline type. Named here so the rest of R3F refers to three's shape
1307
- * rather than `any`. three r183 renamed `PostProcessing` to `RenderPipeline`; our peer floor
1308
- * is r185, so the new name is the only one.
1309
- */
1310
- type ThreeRenderPipeline = three_webgpu.RenderPipeline
1311
-
1312
- /**
1313
- * The pass `useRenderPipeline` creates for you: three's own `PassNode`, as returned by
1314
- * `pass(scene, camera)` from `three/tsl`. Referenced from three so members like
1315
- * `getTextureNode`, `setMRT` and `dispose` track the installed version.
1316
- */
1317
- type ScenePassNode = three_webgpu.PassNode
1318
-
1319
- /**
1320
- * Pass record - stores TSL pass nodes for render pipeline.
1321
- *
1322
- * `scenePass` is the only key the library owns. It is optional here because this is also the
1323
- * shape of `state.passes`, which is `{}` before the pipeline exists and again after `reset()`
1324
- * or `clearPasses()`. Inside the callbacks it is always present; see
1325
- * {@link RenderPipelineCallbackState}.
1326
- *
1327
- * Every other key is user-registered, via a callback's return value. Those are TSL nodes of
1328
- * any kind, not only passes: texture reads of an MRT attachment, effect nodes, extra
1329
- * `pass()` instances. `Node` is the common base, so that is the bound. Narrow at the call
1330
- * site when you need a member, e.g. `passes.velocity as TextureNode`.
1331
- *
1332
- * The index signature admits `undefined` because a key may simply not be registered, and
1333
- * because the optional `scenePass` must be assignable to it: under `skipLibCheck: false` an
1334
- * optional property whose type excludes `undefined` from the index signature is an error
1335
- * (TS2411) for every consumer compiling these declarations.
1336
- */
1337
- interface PassRecord {
1338
- scenePass?: ScenePassNode
1339
- [key: string]: three_webgpu.Node | undefined
1340
- }
1341
-
1342
- /**
1343
- * State passed to pipeline callbacks after the active pipeline has been created.
1344
- *
1345
- * `passes.scenePass` is required here: the hook installs the default scene pass before either
1346
- * callback runs, so callbacks can use it without a guard or a cast.
1347
- *
1348
- * `renderer` is narrowed to `WebGPURenderer` and `isLegacy` to `false`: the hook throws under
1349
- * the legacy renderer before either callback can run, so a callback never sees WebGL.
1350
- */
1351
- type RenderPipelineCallbackState = RootState & {
1352
- renderPipeline: ThreeRenderPipeline
1353
- passes: PassRecord & { scenePass: ScenePassNode }
1354
- renderer: three_webgpu.WebGPURenderer
1355
- isLegacy: false
1356
- }
1357
-
1358
- /**
1359
- * What a callback may return to register entries into `state.passes`.
1360
- *
1361
- * `scenePass` is reserved. The hook owns that entry and its lifecycle: it caches the pass it
1362
- * created, and `rebuild()` / `reset()` dispose that cached pass. A callback overwriting the
1363
- * store entry would leave the store pointing at a node the hook never disposes, and the hook
1364
- * disposing a pass nothing references. So returning it is a type error.
1365
- */
1366
- type RegisteredPasses = Record<string, three_webgpu.Node> & { scenePass?: never }
1367
-
1368
- /** Setup callback - runs first to configure MRT, create additional passes */
1369
- type RenderPipelineSetupCallback = (state: RenderPipelineCallbackState) => RegisteredPasses | void
1370
-
1371
- /** Main callback - runs second to configure outputNode, create effect passes */
1372
- type RenderPipelineMainCallback = (state: RenderPipelineCallbackState) => RegisteredPasses | void
1373
-
1374
- /** The imperative half of useRenderPipeline's return value, present in every state */
1375
- interface UseRenderPipelineActions {
1376
- /** Current passes from state */
1377
- passes: PassRecord
1378
- /** Clear all passes from state */
1379
- clearPasses: () => void
1380
- /** Reset RenderPipeline entirely (clears PP + passes) */
1381
- reset: () => void
1382
- /** Re-run setup/main callbacks with current closure values */
1383
- rebuild: () => void
1384
- }
1385
-
1386
- /**
1387
- * Return type for useRenderPipeline hook, discriminated on `isReady`.
1388
- *
1389
- * `if (isReady)` narrows `renderPipeline` to non-null, which is what the docs already tell
1390
- * callers to check. `passes.scenePass` deliberately stays optional in the ready branch:
1391
- * `clearPasses()` empties the record while leaving the pipeline in place.
1392
- */
1393
- type UseRenderPipelineReturn = UseRenderPipelineActions &
1394
- (
1395
- | {
1396
- /** True when RenderPipeline is configured and ready */
1397
- isReady: true
1398
- /** RenderPipeline instance */
1399
- renderPipeline: ThreeRenderPipeline
1400
- }
1401
- | {
1402
- /** False until the pipeline has been created */
1403
- isReady: false
1404
- /** Not initialized yet, or torn down by reset() */
1405
- renderPipeline: null
1406
- }
1407
- )
1408
- }
1409
-
1410
1075
  type MutableOrReadonlyParameters<T extends (...args: any) => any> = Parameters<T> | Readonly<Parameters<T>>
1411
1076
 
1412
1077
  interface MathRepresentation {
@@ -3870,4 +3535,4 @@ type LegacyCanvasProps = Omit<CanvasProps, 'onCreated'> & {
3870
3535
  declare const Canvas: (props: LegacyCanvasProps) => JSX.Element;
3871
3536
 
3872
3537
  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, 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 };
3873
- export type { Act, Args, ArgsProp, AttachFnType, AttachType, BackgroundConfig, BackgroundProp, BaseRendererProps, Bridge, BufferLike, BufferRecord, BufferStore, Camera, CameraProps, LegacyCanvasProps 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, LegacyInternalState as InternalState, Intersection, IntersectionEvent, IsAllOptional, IsOptional, Layers, LegacyCanvasProps, LegacyInternalState, LegacyRenderer, LegacyRootState, LoaderInstance, LoaderLike, LoaderResult, MappedTextureType, MathProps, MathRepresentation, MathType, MathTypes, Matrix3, Matrix4, Mutable, MutableOrReadonlyParameters, NodeLike, NodeProps, NodeRecord, NodeStore, NonFunctionKeys, Object3DMethod, ObjectMap, OffscreenCanvas$1 as OffscreenCanvas, OnceValue, Overwrite, Performance, PointerCaptureTarget, PointerState, PresetsType, PrimaryCanvasEntry, Properties, Quaternion, LegacyRenderer as R3FRenderer, RaycastableRepresentation, ReactProps, ReconcilerRoot, RenderCallback, RenderProps, RenderTargetOptions, Renderer, RendererConfigExtended, RendererFactory, RendererProps, Root, RootExtension, LegacyRootState as RootState, RootStore, SetBlock, Size, StorageLike, StorageRecord, StorageStore, Subscription, TSLNodeInput, TextureInput, TextureResult, ThreeCamera, ThreeElement, ThreeElements, ThreeElementsImpl, ThreeEvent, ThreeExports, ThreeToJSXElements, UnblockProps, UseFrameLegacy, UseTextureOptions, UseTexturesReturn, UseThreeLegacy, Vector2, Vector3, Vector4, VectorRepresentation, Viewport, VisibilityEntry, WebGLDefaultProps, WebGLProps, WebGLShadowConfig, XRManager, XRPointerConfig };
3538
+ export type { Act, Args, ArgsProp, AttachFnType, AttachType, BackgroundConfig, BackgroundProp, BaseRendererProps, Bridge, Camera, CameraProps, LegacyCanvasProps 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, LegacyInternalState as InternalState, Intersection, IntersectionEvent, IsAllOptional, IsOptional, Layers, LegacyCanvasProps, 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, LegacyRenderer as R3FRenderer, RaycastableRepresentation, ReactProps, ReconcilerRoot, RenderCallback, RenderProps, RenderTargetOptions, Renderer, RendererConfigExtended, RendererFactory, RendererProps, Root, RootExtension, LegacyRootState as RootState, RootStore, SetBlock, Size, Subscription, TSLNodeInput, TextureInput, TextureResult, ThreeCamera, ThreeElement, ThreeElements, ThreeElementsImpl, ThreeEvent, ThreeExports, ThreeToJSXElements, UnblockProps, UseFrameLegacy, UseTextureOptions, UseTexturesReturn, UseThreeLegacy, Vector2, Vector3, Vector4, VectorRepresentation, Viewport, VisibilityEntry, WebGLDefaultProps, WebGLProps, WebGLShadowConfig, XRManager, XRPointerConfig };
package/dist/legacy.mjs CHANGED
@@ -13955,16 +13955,10 @@ const createStore = (invalidate, advance) => {
13955
13955
  },
13956
13956
  setError: (error) => set(() => ({ error })),
13957
13957
  error: null,
13958
- //* TSL State (managed via hooks: useUniforms, useNodes, useBuffers, useGPUStorage, useTextures, useRenderPipeline) ==============================
13959
- uniforms: {},
13960
- nodes: {},
13961
- buffers: {},
13962
- gpuStorage: {},
13958
+ //* Texture registry (useTextures) ==============================
13959
+ // TSL fields (uniforms, nodes, ..., renderPipeline) are added by @react-three/tsl's root extension.
13963
13960
  textures: /* @__PURE__ */ new Map(),
13964
13961
  _textureRefs: /* @__PURE__ */ new Map(),
13965
- renderPipeline: null,
13966
- passes: {},
13967
- _hmrVersion: 0,
13968
13962
  _sizeImperative: false,
13969
13963
  _sizeProps: null,
13970
13964
  previousRoot: void 0,