@react-three/fiber 10.0.0-canary.e881a4a → 10.0.0-canary.ea31ccd

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.mts CHANGED
@@ -1,16 +1,15 @@
1
1
  import * as THREE$1 from 'three';
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, Node as Node$1, Vector2 as Vector2$1, Vector3 as Vector3$1, Vector4 as Vector4$1, Matrix3 as Matrix3$1, ColorSpace, Texture as Texture$1, CubeTexture, Scene, Object3D, Frustum, OrthographicCamera } from 'three';
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
5
  import * as three_webgpu from 'three/webgpu';
6
- import { WebGPURenderer as WebGPURenderer$1, Node, StorageTexture, Data3DTexture, CanvasTarget, ShaderNodeObject } from 'three/webgpu';
6
+ import { WebGPURenderer as WebGPURenderer$1, Node, StorageTexture, Storage3DTexture, StorageArrayTexture, Data3DTexture, CanvasTarget } from 'three/webgpu';
7
7
  import { StoreApi } from 'zustand';
8
8
  import { UseBoundStoreWithEqualityFn } from 'zustand/traditional';
9
9
  import { FrameTimingState, FrameCallback as FrameCallback$1, SchedulerApi, UseFrameNextOptions, FrameNextControls } from '@pmndrs/scheduler';
10
10
  export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, Scheduler, SchedulerApi, UseFrameNextOptions, UseFrameOptions, getScheduler } from '@pmndrs/scheduler';
11
11
  import { Options } from 'react-use-measure';
12
12
  import * as react_jsx_runtime from 'react/jsx-runtime';
13
- import { ThreeElement as ThreeElement$1, Euler as Euler$2 } from '@react-three/fiber';
14
13
  import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox.js';
15
14
 
16
15
  function _mergeNamespaces(n, m) {
@@ -39,12 +38,12 @@ function _mergeNamespaces(n, m) {
39
38
  declare const R3F_BUILD_LEGACY = true;
40
39
  declare const R3F_BUILD_WEBGPU = false;
41
40
 
42
- declare const Inspector: {
43
- new (): {};
44
- };
45
- declare const WebGPURenderer: {
46
- new (): {};
47
- };
41
+ type Inspector = never;
42
+ /** Not available on the legacy (WebGL-only) entry. */
43
+ declare function loadInspector(): Promise<never>;
44
+ declare class WebGPURenderer {
45
+ constructor();
46
+ }
48
47
 
49
48
  declare const RenderTarget: any;
50
49
 
@@ -59,7 +58,8 @@ var THREE = /*#__PURE__*/_mergeNamespaces({
59
58
  R3F_BUILD_WEBGPU: R3F_BUILD_WEBGPU,
60
59
  RenderTarget: RenderTarget,
61
60
  RenderTargetCompat: WebGLRenderTarget,
62
- WebGPURenderer: WebGPURenderer
61
+ WebGPURenderer: WebGPURenderer,
62
+ loadInspector: loadInspector
63
63
  }, [THREE$1]);
64
64
 
65
65
  //* Utility Types ==============================
@@ -348,6 +348,7 @@ type BufferLike =
348
348
  | Uint16Array
349
349
  | Int16Array
350
350
  | THREE$1.BufferAttribute // Base class for all buffer attributes
351
+ | THREE$1.InterleavedBufferAttribute
351
352
  | Node // TSL buffer nodes (instancedArray, storage)
352
353
 
353
354
  /** Flat record of buffer-like values (no nested scopes) */
@@ -359,6 +360,25 @@ type BufferRecord = Record<string, BufferLike>
359
360
  */
360
361
  type BufferStore = Record<string, BufferLike | BufferRecord>
361
362
 
363
+ //* Node Types (useNodes) ========================================
364
+
365
+ /**
366
+ * Every node representation `useNodes` accepts and `state.nodes` holds: three's real `Node`,
367
+ * the callable proxy `Fn()` returns, and the legacy structural shape (`uuid`/`nodeType`) older
368
+ * code passes through. Creators are constrained to this same type, so the shape a creator returns
369
+ * and the shape the store holds are one type by construction.
370
+ */
371
+ type NodeLike = TSLNodeType | LegacyTSLNodeLike
372
+
373
+ /** Flat record of TSL nodes (no nested scopes) */
374
+ type NodeRecord<T extends NodeLike = NodeLike> = Record<string, T>
375
+
376
+ /**
377
+ * Node store that can contain both root-level nodes and scoped node objects.
378
+ * Structure: { wobble: OperatorNode, fx: { blur: ShaderCallable } }
379
+ */
380
+ type NodeStore = Record<string, NodeLike | NodeRecord>
381
+
362
382
  //* Storage Types (useGPUStorage) ========================================
363
383
 
364
384
  /**
@@ -373,7 +393,9 @@ type BufferStore = Record<string, BufferLike | BufferRecord>
373
393
  * ```
374
394
  */
375
395
  type StorageLike =
376
- | StorageTexture // GPU storage texture
396
+ | StorageTexture // 2D GPU storage texture
397
+ | Storage3DTexture // 3D GPU storage texture (volumes, fluid grids)
398
+ | StorageArrayTexture // 2D-array GPU storage texture
377
399
  | Data3DTexture // 3D texture (can be used as storage)
378
400
  | Node // TSL storage texture nodes (storageTexture)
379
401
 
@@ -492,11 +514,28 @@ interface InternalState {
492
514
  /** Container for child attachment (scene for root, original container for portals) */
493
515
  container?: THREE$1.Object3D
494
516
  /**
495
- * CanvasTarget for multi-canvas WebGPU rendering.
496
- * Created for all WebGPU canvases to support renderer sharing.
517
+ * The CanvasTarget this root sizes and renders through.
518
+ *
519
+ * A primary (`<Canvas id>`) owns the renderer's default target -- the one three itself built
520
+ * around the canvas element -- so sizing it is sizing the renderer. A secondary owns a target
521
+ * R3F created for its own element. Either way there is exactly one target per canvas element,
522
+ * and the canvas-target job makes it the renderer's active one before this root renders.
523
+ * Absent on WebGL and on an id-less WebGPU canvas, where the renderer is sized directly.
497
524
  * @see https://threejs.org/docs/#api/en/renderers/common/CanvasTarget
498
525
  */
499
526
  canvasTarget?: CanvasTarget
527
+ /**
528
+ * Set when this root's canvas target has been resized and the backend's cached render pass
529
+ * descriptor (which holds a depth-stencil view built once per canvas) is therefore stale.
530
+ *
531
+ * Flushed by the canvas-target job in the `start` phase, which is the only place this root's
532
+ * target is guaranteed to be the renderer's active one — `backend.updateSize()` operates on
533
+ * whatever `getCanvasTarget()` returns, so calling it from the resize subscription would
534
+ * invalidate some other canvas's descriptor instead.
535
+ *
536
+ * @see https://github.com/pmndrs/react-three-fiber/issues/3847
537
+ */
538
+ canvasTargetSizeDirty?: boolean
500
539
  /**
501
540
  * Whether multi-canvas rendering is active.
502
541
  * True when any canvas uses `renderer={{ primaryCanvas: 'id' }}` to share a renderer.
@@ -606,7 +645,7 @@ interface RootState {
606
645
  /** Global TSL uniform nodes - root-level uniforms + scoped sub-objects. Use useUniforms() hook */
607
646
  uniforms: UniformStore
608
647
  /** Global TSL nodes - root-level nodes + scoped sub-objects. Use useNodes() hook */
609
- nodes: Record<string, any>
648
+ nodes: NodeStore
610
649
  /** Global TSL buffer nodes - root-level buffers + scoped sub-objects. Use useBuffers() hook */
611
650
  buffers: BufferStore
612
651
  /** Global GPU storage (textures, etc.) - root-level storage + scoped sub-objects. Use useGPUStorage() hook */
@@ -618,7 +657,7 @@ interface RootState {
618
657
  /** WebGPU RenderPipeline instance - use useRenderPipeline() hook */
619
658
  renderPipeline: ThreeRenderPipeline | null
620
659
  /** Global TSL pass nodes for render pipeline - use useRenderPipeline() hook */
621
- passes: Record<string, any>
660
+ passes: PassRecord
622
661
  /** Internal version counter for HMR - incremented by rebuildNodes/rebuildUniforms to bust memoization */
623
662
  _hmrVersion: number
624
663
  /** Internal: whether setSize() has taken ownership of canvas dimensions */
@@ -706,12 +745,19 @@ type DefaultRendererProps = {
706
745
  */
707
746
  interface CanvasSchedulerConfig {
708
747
  /**
709
- * Render this canvas after another canvas completes.
710
- * Pass the `id` of another canvas.
748
+ * Run this Canvas root before the referenced Canvas root id(s).
711
749
  */
712
- after?: string
750
+ before?: string | string[]
713
751
  /**
714
- * Limit this canvas's render rate (frames per second).
752
+ * Run this Canvas root after the referenced Canvas root id(s).
753
+ */
754
+ after?: string | string[]
755
+ /**
756
+ * Numeric root order. Lower values run first.
757
+ */
758
+ order?: number
759
+ /**
760
+ * Limit this Canvas's default render job (frames per second).
715
761
  */
716
762
  fps?: number
717
763
  }
@@ -798,14 +844,17 @@ interface RenderProps<TCanvas extends HTMLCanvasElement | OffscreenCanvas$1> {
798
844
  performance?: Partial<Omit<Performance, 'regress'>>
799
845
  /** Target pixel ratio. Can clamp between a range: `[min, max]` */
800
846
  dpr?: Dpr
801
- /** Props that go into the default raycaster */
802
- raycaster?: Partial<THREE$1.Raycaster>
847
+ /**
848
+ * Props that go into the default raycaster. `params` is merged into the raycaster's defaults,
849
+ * so a single threshold can be set: `raycaster={{ params: { Points: { threshold: 0.2 } } }}`.
850
+ */
851
+ raycaster?: Partial<Omit<THREE$1.Raycaster, 'params'>> & { params?: Partial<THREE$1.RaycasterParameters> }
803
852
  /** A `THREE.Scene` instance or props that go into the default scene */
804
853
  scene?: THREE$1.Scene | Partial<THREE$1.Scene>
805
854
  /** A `THREE.Camera` instance or props that go into the default camera */
806
855
  camera?: CameraProps
807
856
  /** An R3F event manager to manage elements' pointer events */
808
- events?: (store: RootStore) => EventManager<HTMLElement>
857
+ events?: (store: RootStore) => EventManager<Element>
809
858
  /** Callback after the canvas has rendered (but not yet committed) */
810
859
  onCreated?: (state: RootState) => void
811
860
  /** Response for pointer clicks that have missed any target */
@@ -894,7 +943,6 @@ type InstanceProps<T = any, P = any> = ArgsProp<P> & {
894
943
  object?: T
895
944
  dispose?: null
896
945
  attach?: AttachType<T>
897
- onUpdate?: (self: T) => void
898
946
  }
899
947
 
900
948
  interface Instance<O = any> {
@@ -1034,7 +1082,7 @@ interface CanvasProps
1034
1082
  */
1035
1083
  resize?: Options
1036
1084
  /** The target where events are being subscribed to, default: the div that wraps canvas */
1037
- eventSource?: HTMLElement | React$1.RefObject<HTMLElement | null>
1085
+ eventSource?: Element | React$1.RefObject<Element | null>
1038
1086
  /** The event prefix that is cast into canvas pointer x/y events, default: "offset" */
1039
1087
  eventPrefix?: 'offset' | 'client' | 'page' | 'layer' | 'screen'
1040
1088
  /** Enable/disable automatic HMR refresh for TSL nodes and uniforms, default: true in dev */
@@ -1142,81 +1190,86 @@ interface LegacyRootState extends Omit<RootState, 'renderer' | 'internal'> {
1142
1190
 
1143
1191
  type RenderTargetOptions = RenderTargetOptions$1
1144
1192
 
1145
- //* Global Types ==============================
1193
+ //* Global TSL Types ==============================
1146
1194
 
1147
1195
  declare global {
1148
1196
  /**
1149
- * Uniform node type.
1150
- *
1151
- * This is three's own `UniformNode`, not a re-declaration of it. It previously was a
1152
- * hand-rolled `interface UniformNode<T> extends Node { value: T }`, which shadowed the real
1153
- * exported type globally — so R3F's ~58 references resolved to an approximation that was
1154
- * missing members three actually ships (`setName` among them) and had drifted to the wrong
1155
- * arity when three made `UniformNode` two-parameter.
1156
- *
1157
- * three's signature is `UniformNode<TNodeType, TValue>`. R3F only ever varies the value type,
1158
- * so the node type is fixed to `unknown` and the single parameter is kept for call-site
1159
- * ergonomics. The result is three's structural type, so members stay in sync with the
1160
- * installed three instead of needing to be mirrored by hand.
1197
+ * Broad callable-node fallback for dynamic store readers.
1198
+ * Creator hooks preserve the exact function signatures inferred from Three's `Fn`.
1161
1199
  */
1162
- type UniformNode<T = unknown> = three_webgpu.UniformNode<unknown, T>
1200
+ type CallableTSLNode = ((...params: never[]) => unknown) & {
1201
+ readonly shaderNode: unknown
1202
+ readonly id: number
1203
+ }
1163
1204
 
1164
- /**
1165
- * ShaderCallable - the return type of Fn()
1166
- * A callable shader function node that can be invoked with parameters.
1167
- * The function returns a ShaderNodeObject when called.
1168
- *
1169
- * @example
1170
- * ```tsx
1171
- * // Define a shader function
1172
- * const blendColorFn = Fn(([color1, color2, factor]) => {
1173
- * return mix(color1, color2, factor)
1174
- * })
1175
- *
1176
- * // Type when retrieving from nodes store
1177
- * const { blendColorFn } = nodes as { blendColorFn: ShaderCallable }
1178
- *
1179
- * // Or with specific return type
1180
- * const { myFn } = nodes as { myFn: ShaderCallable<THREE.Node> }
1181
- * ```
1182
- */
1183
- type ShaderCallable<R extends Node = Node> = ((...params: unknown[]) => ShaderNodeObject<R>) & Node
1205
+ /** Legacy structural node accepted when at least one historical marker exists. */
1206
+ type LegacyTSLNodeLike = {
1207
+ label?: ((label: string) => unknown) | string
1208
+ setName?: (name: string) => unknown
1209
+ } & ({ uuid: string | undefined; nodeType?: string | null } | { uuid?: string; nodeType: string | null | undefined })
1184
1210
 
1185
- /**
1186
- * ShaderNodeRef - a ShaderNodeObject wrapper around a Node
1187
- * This is the common return type for TSL operations (add, mul, sin, etc.)
1188
- *
1189
- * @example
1190
- * ```tsx
1191
- * const { wobble } = nodes as { wobble: ShaderNodeRef }
1192
- * ```
1193
- */
1194
- type ShaderNodeRef<T extends Node = Node> = ShaderNodeObject<T>
1211
+ /** Node type accepted by broad dynamic node-store readers. */
1212
+ type TSLNodeType = three_webgpu.Node | CallableTSLNode
1195
1213
 
1196
1214
  /**
1197
- * TSLNodeType - Union of all common TSL node types
1198
- * Used by ScopedStore to properly type node access from the store.
1199
- *
1200
- * Includes:
1201
- * - Node: base Three.js node type
1202
- * - ShaderCallable: function nodes created with Fn()
1203
- * - ShaderNodeObject: wrapped nodes from TSL operations (sin, mul, mix, etc.)
1204
- *
1205
- * @example
1206
- * ```tsx
1207
- * // In useLocalNodes, nodes are typed as TSLNodeType
1208
- * const { positionNode, blendColorFn } = useLocalNodes(({ nodes }) => ({
1209
- * positionNode: nodes.myPosition, // Works - Node is in union
1210
- * blendColorFn: nodes.myFn, // Works - ShaderCallable is in union
1211
- * }))
1212
- *
1213
- * // Can narrow with type guard or assertion when needed
1214
- * if (typeof blendColorFn === 'function') {
1215
- * blendColorFn(someColor, 0.5)
1216
- * }
1217
- * ```
1215
+ * Derive Three's shader node type from an existing node or a supported raw input.
1216
+ * Existing InputNode generics take precedence over structural value normalization.
1217
+ * Both generics must be inferred because Three's UniformNode intersects an unknown-typed
1218
+ * InputNode base with its concrete InputNode specialization.
1218
1219
  */
1219
- type TSLNodeType = Node | ShaderCallable<Node> | ShaderNodeObject<Node>
1220
+ type UniformNodeType<T> = T extends three_webgpu.UniformNode<infer TNodeType, infer _TValue>
1221
+ ? TNodeType
1222
+ : T extends three_webgpu.InputNode<infer TNodeType, infer _TValue>
1223
+ ? TNodeType
1224
+ : T extends number
1225
+ ? 'float'
1226
+ : T extends boolean
1227
+ ? 'bool'
1228
+ : T extends string | three_webgpu.Color | { r: number; g: number; b: number }
1229
+ ? 'color'
1230
+ : T extends three_webgpu.Vector4 | { x: number; y: number; z: number; w: number }
1231
+ ? 'vec4'
1232
+ : T extends three_webgpu.Vector3 | { x: number; y: number; z: number }
1233
+ ? 'vec3'
1234
+ : T extends three_webgpu.Vector2 | { x: number; y: number }
1235
+ ? 'vec2'
1236
+ : T extends three_webgpu.Matrix4
1237
+ ? 'mat4'
1238
+ : T extends three_webgpu.Matrix3
1239
+ ? 'mat3'
1240
+ : T extends three_webgpu.Matrix2
1241
+ ? 'mat2'
1242
+ : unknown
1243
+
1244
+ /** Derive the normalized JavaScript value stored by a uniform node. */
1245
+ type UniformNodeValue<T> = T extends three_webgpu.UniformNode<infer _TNodeType, infer TValue>
1246
+ ? TValue
1247
+ : T extends three_webgpu.InputNode<infer _TNodeType, infer TValue>
1248
+ ? TValue
1249
+ : T extends string | { r: number; g: number; b: number }
1250
+ ? three_webgpu.Color
1251
+ : T extends { x: number; y: number; z: number; w: number }
1252
+ ? three_webgpu.Vector4
1253
+ : T extends { x: number; y: number; z: number }
1254
+ ? three_webgpu.Vector3
1255
+ : T extends { x: number; y: number }
1256
+ ? three_webgpu.Vector2
1257
+ : T extends number
1258
+ ? number
1259
+ : T extends boolean
1260
+ ? boolean
1261
+ : T
1262
+
1263
+ /** Three's exact UniformNode with shader and value generics derived from an input. */
1264
+ type UniformNodeFor<T> = three_webgpu.UniformNode<UniformNodeType<T>, UniformNodeValue<T>>
1265
+
1266
+ /** Preserve every input key while mapping values to exact Three uniform nodes. */
1267
+ type UniformNodesFor<T extends UniformInputRecord> = {
1268
+ [K in keyof T]: UniformNodeFor<T[K]>
1269
+ }
1270
+
1271
+ /** Backward-compatible single-parameter uniform alias. */
1272
+ type UniformNode<T = unknown> = UniformNodeFor<T>
1220
1273
 
1221
1274
  /** Flat record of uniform nodes (no nested scopes) */
1222
1275
  type UniformRecord<T extends UniformNode = UniformNode> = Record<string, T>
@@ -1241,7 +1294,7 @@ declare global {
1241
1294
  * Acceptable input values for useUniforms - raw values that get converted to UniformNodes
1242
1295
  * Supports:
1243
1296
  * - Primitives: number, string (color), boolean
1244
- * - Three.js types: Color, Vector2/3/4, Matrix3/4, Euler, Quaternion
1297
+ * - Three.js types: Color, Vector2/3/4, Matrix2/3/4
1245
1298
  * - Plain objects: { x, y, z, w } converted to vectors
1246
1299
  * - TSL nodes: color(), vec3(), float() for type casting
1247
1300
  * - UniformNode: existing uniforms (reused as-is)
@@ -1254,88 +1307,124 @@ declare global {
1254
1307
  | three_webgpu.Vector2
1255
1308
  | three_webgpu.Vector3
1256
1309
  | three_webgpu.Vector4
1310
+ | three_webgpu.Matrix2
1257
1311
  | three_webgpu.Matrix3
1258
1312
  | three_webgpu.Matrix4
1259
- | three_webgpu.Euler
1260
- | three_webgpu.Quaternion
1261
- | { x: number; y?: number; z?: number; w?: number } // Plain objects converted to vectors
1313
+ | { x: number; y: number }
1314
+ | { x: number; y: number; z: number }
1315
+ | { x: number; y: number; z: number; w: number }
1262
1316
  | { r: number; g: number; b: number; a?: number } // Plain objects converted to Color
1263
- | Node // TSL nodes like color(), vec3(), float() for type casting
1317
+ | three_webgpu.Node // TSL nodes like color(), vec3(), float() for type casting
1264
1318
  | UniformNode
1265
1319
 
1266
1320
  /** Input record for useUniforms - accepts raw values or UniformNodes */
1267
1321
  type UniformInputRecord = Record<string, UniformValue>
1268
1322
  }
1269
1323
 
1270
- //* Module Augmentation ==============================
1271
-
1272
- declare module 'three/tsl' {
1324
+ declare global {
1273
1325
  /**
1274
- * Fn with array parameter destructuring
1275
- * @example Fn(([uv, skew]) => { ... })
1326
+ * three's own render pipeline type. Named here so the rest of R3F refers to three's shape
1327
+ * rather than `any`. three r183 renamed `PostProcessing` to `RenderPipeline`; our peer floor
1328
+ * is r185, so the new name is the only one.
1276
1329
  */
1277
- export function Fn<R extends Node = Node>(
1278
- jsFunc: (inputs: ShaderNodeObject<Node>[]) => ShaderNodeObject<R>,
1279
- ): ShaderCallable<R>
1330
+ type ThreeRenderPipeline = three_webgpu.RenderPipeline
1280
1331
 
1281
1332
  /**
1282
- * Fn with object parameter destructuring
1283
- * @example Fn(({ color, intensity }) => { ... })
1333
+ * The pass `useRenderPipeline` creates for you: three's own `PassNode`, as returned by
1334
+ * `pass(scene, camera)` from `three/tsl`. Referenced from three so members like
1335
+ * `getTextureNode`, `setMRT` and `dispose` track the installed version.
1284
1336
  */
1285
- export function Fn<T extends Record<string, unknown>, R extends Node = Node>(
1286
- jsFunc: (inputs: T) => ShaderNodeObject<R>,
1287
- ): ShaderCallable<R>
1337
+ type ScenePassNode = three_webgpu.PassNode
1288
1338
 
1289
1339
  /**
1290
- * Fn with array params + layout
1291
- * @example Fn(([a, b]) => { ... }, { layout: [...] })
1340
+ * Pass record - stores TSL pass nodes for render pipeline.
1341
+ *
1342
+ * `scenePass` is the only key the library owns. It is optional here because this is also the
1343
+ * shape of `state.passes`, which is `{}` before the pipeline exists and again after `reset()`
1344
+ * or `clearPasses()`. Inside the callbacks it is always present; see
1345
+ * {@link RenderPipelineCallbackState}.
1346
+ *
1347
+ * Every other key is user-registered, via a callback's return value. Those are TSL nodes of
1348
+ * any kind, not only passes: texture reads of an MRT attachment, effect nodes, extra
1349
+ * `pass()` instances. `Node` is the common base, so that is the bound. Narrow at the call
1350
+ * site when you need a member, e.g. `passes.velocity as TextureNode`.
1351
+ *
1352
+ * The index signature admits `undefined` because a key may simply not be registered, and
1353
+ * because the optional `scenePass` must be assignable to it: under `skipLibCheck: false` an
1354
+ * optional property whose type excludes `undefined` from the index signature is an error
1355
+ * (TS2411) for every consumer compiling these declarations.
1292
1356
  */
1293
- export function Fn<R extends Node = Node>(
1294
- jsFunc: (inputs: ShaderNodeObject<Node>[]) => ShaderNodeObject<R>,
1295
- layout: { layout?: unknown },
1296
- ): ShaderCallable<R>
1357
+ interface PassRecord {
1358
+ scenePass?: ScenePassNode
1359
+ [key: string]: three_webgpu.Node | undefined
1360
+ }
1297
1361
 
1298
1362
  /**
1299
- * Fn with object params + layout
1363
+ * State passed to pipeline callbacks after the active pipeline has been created.
1364
+ *
1365
+ * `passes.scenePass` is required here: the hook installs the default scene pass before either
1366
+ * callback runs, so callbacks can use it without a guard or a cast.
1367
+ *
1368
+ * `renderer` is narrowed to `WebGPURenderer` and `isLegacy` to `false`: the hook throws under
1369
+ * the legacy renderer before either callback can run, so a callback never sees WebGL.
1300
1370
  */
1301
- export function Fn<T extends Record<string, unknown>, R extends Node = Node>(
1302
- jsFunc: (inputs: T) => ShaderNodeObject<R>,
1303
- layout: { layout?: unknown },
1304
- ): ShaderCallable<R>
1305
- }
1371
+ type RenderPipelineCallbackState = RootState & {
1372
+ renderPipeline: ThreeRenderPipeline
1373
+ passes: PassRecord & { scenePass: ScenePassNode }
1374
+ renderer: three_webgpu.WebGPURenderer
1375
+ isLegacy: false
1376
+ }
1306
1377
 
1307
- declare global {
1308
1378
  /**
1309
- * three's own render pipeline type. Named here so the rest of R3F refers to three's shape
1310
- * rather than `any`. three r183 renamed `PostProcessing` to `RenderPipeline`; our peer floor
1311
- * is r185, so the new name is the only one.
1379
+ * What a callback may return to register entries into `state.passes`.
1380
+ *
1381
+ * `scenePass` is reserved. The hook owns that entry and its lifecycle: it caches the pass it
1382
+ * created, and `rebuild()` / `reset()` dispose that cached pass. A callback overwriting the
1383
+ * store entry would leave the store pointing at a node the hook never disposes, and the hook
1384
+ * disposing a pass nothing references. So returning it is a type error.
1312
1385
  */
1313
- type ThreeRenderPipeline = three_webgpu.RenderPipeline
1314
-
1315
- /** Pass record - stores TSL pass nodes for render pipeline */
1316
- type PassRecord = Record<string, any>
1386
+ type RegisteredPasses = Record<string, three_webgpu.Node> & { scenePass?: never }
1317
1387
 
1318
1388
  /** Setup callback - runs first to configure MRT, create additional passes */
1319
- type RenderPipelineSetupCallback = (state: RootState) => PassRecord | void
1389
+ type RenderPipelineSetupCallback = (state: RenderPipelineCallbackState) => RegisteredPasses | void
1320
1390
 
1321
1391
  /** Main callback - runs second to configure outputNode, create effect passes */
1322
- type RenderPipelineMainCallback = (state: RootState) => PassRecord | void
1392
+ type RenderPipelineMainCallback = (state: RenderPipelineCallbackState) => RegisteredPasses | void
1323
1393
 
1324
- /** Return type for useRenderPipeline hook */
1325
- interface UseRenderPipelineReturn {
1394
+ /** The imperative half of useRenderPipeline's return value, present in every state */
1395
+ interface UseRenderPipelineActions {
1326
1396
  /** Current passes from state */
1327
1397
  passes: PassRecord
1328
- /** RenderPipeline instance (null if not initialized) */
1329
- renderPipeline: ThreeRenderPipeline | null
1330
1398
  /** Clear all passes from state */
1331
1399
  clearPasses: () => void
1332
1400
  /** Reset RenderPipeline entirely (clears PP + passes) */
1333
1401
  reset: () => void
1334
1402
  /** Re-run setup/main callbacks with current closure values */
1335
1403
  rebuild: () => void
1336
- /** True when RenderPipeline is configured and ready */
1337
- isReady: boolean
1338
1404
  }
1405
+
1406
+ /**
1407
+ * Return type for useRenderPipeline hook, discriminated on `isReady`.
1408
+ *
1409
+ * `if (isReady)` narrows `renderPipeline` to non-null, which is what the docs already tell
1410
+ * callers to check. `passes.scenePass` deliberately stays optional in the ready branch:
1411
+ * `clearPasses()` empties the record while leaving the pipeline in place.
1412
+ */
1413
+ type UseRenderPipelineReturn = UseRenderPipelineActions &
1414
+ (
1415
+ | {
1416
+ /** True when RenderPipeline is configured and ready */
1417
+ isReady: true
1418
+ /** RenderPipeline instance */
1419
+ renderPipeline: ThreeRenderPipeline
1420
+ }
1421
+ | {
1422
+ /** False until the pipeline has been created */
1423
+ isReady: false
1424
+ /** Not initialized yet, or torn down by reset() */
1425
+ renderPipeline: null
1426
+ }
1427
+ )
1339
1428
  }
1340
1429
 
1341
1430
  type MutableOrReadonlyParameters<T extends (...args: any) => any> = Parameters<T> | Readonly<Parameters<T>>
@@ -1414,10 +1503,11 @@ type TSLNodeInput = { nodeType?: string | null; uuid?: string } | null
1414
1503
 
1415
1504
  /**
1416
1505
  * For node material properties (colorNode, positionNode, etc.), accept broader types
1417
- * since @types/three has broken inheritance for TSL node subclasses.
1506
+ * since @types/three has broken inheritance for TSL node subclasses. NodeClass requires
1507
+ * `nodeType`, so this structural key test remains neutral to the selected Three entry.
1418
1508
  */
1419
1509
  type NodeProps<P> = {
1420
- [K in keyof P as P[K] extends Node$1 | null ? K : never]?: TSLNodeInput
1510
+ [K in keyof P as NonNullable<P[K]> extends { nodeType: string | null } ? K : never]?: TSLNodeInput
1421
1511
  }
1422
1512
 
1423
1513
  interface ReactProps<P> {
@@ -1438,11 +1528,29 @@ type ThreeToJSXElements<T extends Record<string, any>> = {
1438
1528
  [K in keyof T & string as Uncapitalize<K>]: T[K] extends ConstructorRepresentation ? ThreeElement<T[K]> : never
1439
1529
  }
1440
1530
 
1531
+ /** Method names of Object3D, excluded from the `primitive` element's typed props. */
1532
+ type Object3DMethod = NonNullable<
1533
+ {
1534
+ [K in keyof Object3D]-?: Object3D[K] extends (...args: any[]) => any ? K : never
1535
+ }[keyof Object3D]
1536
+ >
1537
+
1441
1538
  type ThreeExports = typeof THREE
1442
1539
  type ThreeElementsImpl = ThreeToJSXElements<ThreeExports>
1443
1540
 
1444
1541
  interface ThreeElements extends Omit<ThreeElementsImpl, 'audio' | 'source' | 'line' | 'path'> {
1445
- primitive: Omit<ThreeElement<any>, 'args'> & { object: object }
1542
+ /**
1543
+ * `primitive` wraps a pre-existing object, so its props cannot be derived from one class.
1544
+ * Events are typed from `EventHandlers` (`onClick={(e) => ...}` infers `e`), the ref is
1545
+ * untyped, and any other prop is accepted and applied to the object by name. Object3D's own
1546
+ * methods are left out of the typed surface: they return `this`, so a subclass element's
1547
+ * props (`ThreeElements['group']`) could not be spread onto a primitive otherwise.
1548
+ */
1549
+ primitive: Omit<ThreeElement<typeof Object3D>, 'args' | 'object' | 'ref' | Object3DMethod> & {
1550
+ object: object
1551
+ ref?: React.Ref<any>
1552
+ [prop: string]: unknown
1553
+ }
1446
1554
  // Conflicts with DOM types can be accessed through a three* prefix
1447
1555
  threeAudio: ThreeElementsImpl['audio']
1448
1556
  threeSource: ThreeElementsImpl['source']
@@ -1483,6 +1591,7 @@ type three_d_Matrix3 = Matrix3;
1483
1591
  type three_d_Matrix4 = Matrix4;
1484
1592
  type three_d_MutableOrReadonlyParameters<T extends (...args: any) => any> = MutableOrReadonlyParameters<T>;
1485
1593
  type three_d_NodeProps<P> = NodeProps<P>;
1594
+ type three_d_Object3DMethod = Object3DMethod;
1486
1595
  type three_d_Quaternion = Quaternion;
1487
1596
  type three_d_RaycastableRepresentation = RaycastableRepresentation;
1488
1597
  type three_d_ReactProps<P> = ReactProps<P>;
@@ -1497,7 +1606,7 @@ type three_d_Vector3 = Vector3;
1497
1606
  type three_d_Vector4 = Vector4;
1498
1607
  type three_d_VectorRepresentation = VectorRepresentation;
1499
1608
  declare namespace three_d {
1500
- export type { three_d_Color as Color, three_d_ElementProps as ElementProps, three_d_Euler as Euler, three_d_EventProps as EventProps, three_d_GeometryProps as GeometryProps, three_d_GeometryTransformProps as GeometryTransformProps, three_d_Layers as Layers, three_d_MathProps as MathProps, three_d_MathRepresentation as MathRepresentation, three_d_MathType as MathType, three_d_MathTypes as MathTypes, three_d_Matrix3 as Matrix3, three_d_Matrix4 as Matrix4, three_d_MutableOrReadonlyParameters as MutableOrReadonlyParameters, three_d_NodeProps as NodeProps, three_d_Quaternion as Quaternion, three_d_RaycastableRepresentation as RaycastableRepresentation, three_d_ReactProps as ReactProps, three_d_TSLNodeInput as TSLNodeInput, three_d_ThreeElement as ThreeElement, three_d_ThreeElements as ThreeElements, three_d_ThreeElementsImpl as ThreeElementsImpl, three_d_ThreeExports as ThreeExports, three_d_ThreeToJSXElements as ThreeToJSXElements, three_d_Vector2 as Vector2, three_d_Vector3 as Vector3, three_d_Vector4 as Vector4, three_d_VectorRepresentation as VectorRepresentation };
1609
+ export type { three_d_Color as Color, three_d_ElementProps as ElementProps, three_d_Euler as Euler, three_d_EventProps as EventProps, three_d_GeometryProps as GeometryProps, three_d_GeometryTransformProps as GeometryTransformProps, three_d_Layers as Layers, three_d_MathProps as MathProps, three_d_MathRepresentation as MathRepresentation, three_d_MathType as MathType, three_d_MathTypes as MathTypes, three_d_Matrix3 as Matrix3, three_d_Matrix4 as Matrix4, three_d_MutableOrReadonlyParameters as MutableOrReadonlyParameters, three_d_NodeProps as NodeProps, three_d_Object3DMethod as Object3DMethod, three_d_Quaternion as Quaternion, three_d_RaycastableRepresentation as RaycastableRepresentation, three_d_ReactProps as ReactProps, three_d_TSLNodeInput as TSLNodeInput, three_d_ThreeElement as ThreeElement, three_d_ThreeElements as ThreeElements, three_d_ThreeElementsImpl as ThreeElementsImpl, three_d_ThreeExports as ThreeExports, three_d_ThreeToJSXElements as ThreeToJSXElements, three_d_Vector2 as Vector2, three_d_Vector3 as Vector3, three_d_Vector4 as Vector4, three_d_VectorRepresentation as VectorRepresentation };
1501
1610
  }
1502
1611
 
1503
1612
  /**
@@ -1635,9 +1744,9 @@ type EnvironmentProps = {
1635
1744
  blur?: number;
1636
1745
  backgroundBlurriness?: number;
1637
1746
  backgroundIntensity?: number;
1638
- backgroundRotation?: Euler$2;
1747
+ backgroundRotation?: Euler;
1639
1748
  environmentIntensity?: number;
1640
- environmentRotation?: Euler$2;
1749
+ environmentRotation?: Euler;
1641
1750
  map?: Texture$1;
1642
1751
  preset?: PresetsType;
1643
1752
  scene?: Scene | React$1.RefObject<Scene>;
@@ -1721,7 +1830,7 @@ declare function EnvironmentCube({ background, scene, blur, backgroundBlurriness
1721
1830
  declare function EnvironmentPortal({ children, near, far, resolution, frames, map, background, blur, backgroundBlurriness, backgroundIntensity, backgroundRotation, environmentIntensity, environmentRotation, scene, files, path, preset, extensions, }: EnvironmentProps): react_jsx_runtime.JSX.Element;
1722
1831
  declare module '@react-three/fiber' {
1723
1832
  interface ThreeElements {
1724
- groundProjectedEnvImpl: ThreeElement$1<typeof GroundedSkybox>;
1833
+ groundProjectedEnvImpl: ThreeElement<typeof GroundedSkybox>;
1725
1834
  }
1726
1835
  }
1727
1836
  /**
@@ -1821,6 +1930,24 @@ declare module '@react-three/fiber' {
1821
1930
  */
1822
1931
  declare function Environment(props: EnvironmentProps): react_jsx_runtime.JSX.Element;
1823
1932
 
1933
+ /**
1934
+ * Moves every trace of interactivity from one object to its replacement, for reconstruction.
1935
+ *
1936
+ * When `args` or a `primitive`'s `object` changes, R3F builds a new three object and keeps the same
1937
+ * instance. Removing the old object from the interaction state and registering the new one from
1938
+ * scratch makes events *work* again (#3778), but it forgets what was in flight: a pointer resting on
1939
+ * the object fires a second `onPointerEnter` without ever having left, and an active pointer capture
1940
+ * is dropped mid-drag. Rewriting the references instead keeps the interaction continuous across a
1941
+ * swap the user never asked to see (#3744).
1942
+ *
1943
+ * Captures are re-keyed rather than released, so the DOM-level capture on `captureData.target` is
1944
+ * left alone — releasing and re-acquiring it is precisely the glitch being avoided.
1945
+ *
1946
+ * Visibility handlers are deliberately not transferred: that registry is keyed by `object.uuid`, so
1947
+ * the replacement re-registers itself through `applyProps`. The old entry is dropped here so it
1948
+ * cannot outlive the object it described.
1949
+ */
1950
+ declare function swapInteractivity(store: RootStore, object: Object3D, newObject: Object3D): void;
1824
1951
  declare function removeInteractivity(store: RootStore, object: Object3D): void;
1825
1952
  declare function createEvents(store: RootStore): {
1826
1953
  handlePointer: (name: string) => (event: DomEvent) => void;
@@ -1828,7 +1955,7 @@ declare function createEvents(store: RootStore): {
1828
1955
  processDeferredPointer: (event: DomEvent, pointerId: number) => void;
1829
1956
  };
1830
1957
  /** Default R3F event manager for web */
1831
- declare function createPointerEvents(store: RootStore): EventManager<HTMLElement>;
1958
+ declare function createPointerEvents(store: RootStore): EventManager<Element>;
1832
1959
 
1833
1960
  /**
1834
1961
  * Gets or creates a memoized loader instance from a loader constructor or returns the loader if it's already an instance.
@@ -1861,7 +1988,7 @@ declare namespace useLoader {
1861
1988
  *
1862
1989
  * @param callback - Function called each frame with (state, delta). Optional if you only need scheduler access.
1863
1990
  * @param priorityOrOptions - Either a priority number (backwards compat) or options object
1864
- * @returns Controls object with step(), stepAll(), pause(), resume(), isPaused, id, scheduler
1991
+ * @returns Controls object with step(), stepAll(), invalidate(), pause(), resume(), isPaused, id, rootId, scheduler
1865
1992
  *
1866
1993
  * @example
1867
1994
  * // Simple priority (backwards compat)
@@ -2157,7 +2284,10 @@ declare function addTail(callback: GlobalRenderCallback): () => void;
2157
2284
  * Invalidates the view, requesting a frame to be rendered.
2158
2285
  * In demand mode, this triggers the scheduler to run frames.
2159
2286
  *
2160
- * @param state - Optional root state (ignored in new scheduler, kept for backwards compat)
2287
+ * With a state argument, only that root's jobs run on the requested frames; other
2288
+ * roots on 'demand' stay idle. Without one, every registered root is invalidated.
2289
+ *
2290
+ * @param state - Optional root state; targets the invalidation at that root
2161
2291
  * @param frames - Number of frames to request (default: 1)
2162
2292
  * @param stackFrames - If false, sets pendingFrames to frames. If true, adds to existing pendingFrames (default: false)
2163
2293
  *
@@ -2168,14 +2298,16 @@ declare function invalidate(state?: RootState, frames?: number, stackFrames?: bo
2168
2298
  * Advances the frameloop and runs render effects.
2169
2299
  * Useful for when manually rendering via `frameloop="never"`.
2170
2300
  *
2301
+ * With a state argument, only that root is stepped. Without one, every
2302
+ * registered root is stepped for backwards compatibility.
2303
+ *
2171
2304
  * @param timestamp - The timestamp to use for this frame
2172
2305
  * @param runGlobalEffects - Ignored (kept for backwards compat, global effects always run)
2173
- * @param state - Ignored (kept for backwards compat)
2174
- * @param frame - Ignored (kept for backwards compat)
2306
+ * @param state - Optional root state; targets the manual step at that root
2175
2307
  *
2176
2308
  * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#advance
2177
2309
  */
2178
- declare function advance(timestamp: number): void;
2310
+ declare function advance(timestamp: number, runGlobalEffects?: boolean, state?: RootState): void;
2179
2311
 
2180
2312
  /* eslint-disable @definitelytyped/no-unnecessary-generics */
2181
2313
  declare function ReactReconciler<
@@ -3220,6 +3352,7 @@ declare namespace ReactReconciler {
3220
3352
 
3221
3353
  declare function extend<T extends ConstructorRepresentation>(objects: T): React$1.ExoticComponent<ThreeElement<T>>;
3222
3354
  declare function extend<T extends Catalogue>(objects: T): void;
3355
+ declare function extend(objects: Record<string, unknown>): void;
3223
3356
  declare const reconciler: ReactReconciler.Reconciler<RootStore, Instance<any>, void, Instance<any>, never, any>;
3224
3357
 
3225
3358
  declare const isRenderer: (def: any) => boolean;
@@ -3246,11 +3379,6 @@ declare function flushSync<R>(fn: () => R): R;
3246
3379
  declare const context: React$1.Context<RootStore>;
3247
3380
  declare const createStore: (invalidate: (state?: RootState, frames?: number, stackFrames?: boolean) => void, advance: (timestamp: number, runGlobalEffects?: boolean, state?: RootState, frame?: XRFrame) => void) => RootStore;
3248
3381
 
3249
- /**
3250
- * Safely flush async effects when testing, simulating a legacy root.
3251
- * @deprecated Import from React instead. import { act } from 'react'
3252
- */
3253
- declare const act: typeof React$1.act;
3254
3382
  /**
3255
3383
  * An SSR-friendly useLayoutEffect.
3256
3384
  *
@@ -3502,7 +3630,7 @@ declare function getInstanceProps<T = any>(pendingProps: Record<string, unknown>
3502
3630
  declare function prepare<T = any>(target: T, root: RootStore, type: string, props: Instance<T>['props']): Instance<T>;
3503
3631
  /**
3504
3632
  * Triggers an update for an instance.
3505
- * Calls onUpdate callback and invalidates the frame if necessary.
3633
+ * Invalidates the frame if the root is in demand mode.
3506
3634
  *
3507
3635
  * @param instance - Instance to invalidate
3508
3636
  */
@@ -3668,29 +3796,44 @@ declare const hasConstructor: (object: unknown) => object is {
3668
3796
  * Used to identify values that should be resolved from refs after mount.
3669
3797
  */
3670
3798
  declare const FROM_REF: unique symbol;
3799
+ /** The marker `fromRef()` returns; resolved by the reconciler in `commitMount`. */
3800
+ interface FromRefMarker<T = unknown, R = T> {
3801
+ [FROM_REF]: React$1.RefObject<T | null>;
3802
+ /** Optional transform applied to the resolved ref before assignment. */
3803
+ transform?: (value: T) => R;
3804
+ }
3671
3805
  /**
3672
3806
  * Defers prop application until the referenced object is available.
3673
3807
  * Useful for props like `target` that need sibling refs to be populated.
3674
3808
  *
3809
+ * Only top-level props on a three element are resolved: a marker nested inside another value
3810
+ * (an array, an options object) is never seen. When the prop needs the sibling *wrapped* rather
3811
+ * than assigned as-is, pass a `transform`; it runs once the ref is populated and its result is
3812
+ * what gets assigned.
3813
+ *
3675
3814
  * @param ref - React ref object to resolve at mount time
3676
- * @returns A marker value that applyProps will resolve after mount
3815
+ * @param transform - Optional mapping from the resolved object to the value the prop expects
3816
+ * @returns A marker value that the reconciler resolves after mount
3677
3817
  *
3678
3818
  * @example
3679
3819
  * const targetRef = useRef<THREE.Object3D>(null)
3680
3820
  *
3681
3821
  * <group ref={targetRef} position={[-3, -2, -15]} />
3682
3822
  * <spotLight target={fromRef(targetRef)} intensity={100} />
3823
+ *
3824
+ * @example
3825
+ * // Wrap the sibling: a node material's lightsNode needs a LightsNode, not the light itself
3826
+ * <meshPhongNodeMaterial lightsNode={fromRef(lightRef, (light) => lights([light]))} />
3683
3827
  */
3684
3828
  declare function fromRef<T>(ref: React$1.RefObject<T | null>): T;
3829
+ declare function fromRef<T, R>(ref: React$1.RefObject<T | null>, transform: (value: T) => R): R;
3685
3830
  /**
3686
3831
  * Type guard to check if a value is a fromRef marker.
3687
3832
  *
3688
3833
  * @param value - Value to check
3689
3834
  * @returns True if value is a fromRef marker
3690
3835
  */
3691
- declare function isFromRef(value: unknown): value is {
3692
- [FROM_REF]: React$1.RefObject<any>;
3693
- };
3836
+ declare function isFromRef(value: unknown): value is FromRefMarker<any, unknown>;
3694
3837
 
3695
3838
  /**
3696
3839
  * Symbol marker for mount-only method calls.
@@ -3717,7 +3860,15 @@ declare const ONCE: unique symbol;
3717
3860
  * // No arguments
3718
3861
  * <geometry center={once()} />
3719
3862
  */
3720
- declare function once<T>(...args: T[]): T;
3863
+ declare function once<A extends unknown[]>(...args: A): OnceValue<A>;
3864
+ /**
3865
+ * What `once(...args)` is typed as, so the marker is assignable to the prop it targets:
3866
+ * the single argument itself (`rotateX={once(angle)}`), the argument tuple for multi-argument
3867
+ * methods (`translate={once(x, y, z)}`), or `true` for a bare call (`center={once()}`).
3868
+ *
3869
+ * The runtime value is always the marker object; only the declared type follows the prop.
3870
+ */
3871
+ type OnceValue<A extends unknown[]> = A extends [] ? true : A extends [infer Single] ? Single : A;
3721
3872
  /**
3722
3873
  * Type guard to check if a value is a once marker.
3723
3874
  *
@@ -3734,5 +3885,5 @@ declare function isOnce(value: unknown): value is {
3734
3885
  */
3735
3886
  declare function Canvas(props: CanvasProps): react_jsx_runtime.JSX.Element;
3736
3887
 
3737
- 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, act, 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, removeInteractivity, resolve, unmountComponentAtNode, unregisterPrimary, updateCamera, updateFrustum, useBridge, useEnvironment, useFrame, useGraph, useInstanceHandle, useIsomorphicLayoutEffect, useLoader, useMutableCallback, useRenderTarget, useStore, useTexture, useTextures, useThree, waitForPrimary };
3738
- export type { Act, Args, ArgsProp, AttachFnType, AttachType, BackgroundConfig, BackgroundProp, BaseRendererProps, Bridge, BufferLike, BufferRecord, BufferStore, Camera, CameraProps, 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, GLProps, GLTFLike, GeometryProps, GeometryTransformProps, GlobalEffectType, GlobalRenderCallback, HostConfig, InferLoadResult, InjectState, InputLike, Instance, InstanceProps, LegacyInternalState as InternalState, Intersection, IntersectionEvent, IsAllOptional, IsOptional, Layers, LegacyInternalState, LegacyRenderer, LegacyRootState, LoaderInstance, LoaderLike, LoaderResult, MappedTextureType, MathProps, MathRepresentation, MathType, MathTypes, Matrix3, Matrix4, Mutable, MutableOrReadonlyParameters, NodeProps, NonFunctionKeys, ObjectMap, OffscreenCanvas$1 as OffscreenCanvas, Overwrite, Performance, PointerCaptureTarget, PointerState, PresetsType, PrimaryCanvasEntry, Properties, Quaternion, LegacyRenderer as R3FRenderer, RaycastableRepresentation, ReactProps, ReconcilerRoot, RenderCallback, RenderProps, RenderTargetOptions, Renderer, RendererConfigExtended, RendererFactory, RendererProps, Root, LegacyRootState as RootState, RootStore, SetBlock, Size, StorageLike, StorageRecord, StorageStore, Subscription, TSLNodeInput, TextureInput, TextureResult, ThreeCamera, ThreeElement, ThreeElements, ThreeElementsImpl, ThreeEvent, ThreeExports, ThreeToJSXElements, UnblockProps, UseTextureOptions, UseTexturesReturn, Vector2, Vector3, Vector4, VectorRepresentation, Viewport, VisibilityEntry, WebGLDefaultProps, WebGLProps, WebGLShadowConfig, XRManager, XRPointerConfig };
3888
+ 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, removeInteractivity, resolve, swapInteractivity, unmountComponentAtNode, unregisterPrimary, updateCamera, updateFrustum, useBridge, useEnvironment, useFrame, useGraph, useInstanceHandle, useIsomorphicLayoutEffect, useLoader, useMutableCallback, useRenderTarget, useStore, useTexture, useTextures, useThree, waitForPrimary };
3889
+ export type { Act, Args, ArgsProp, AttachFnType, AttachType, BackgroundConfig, BackgroundProp, BaseRendererProps, Bridge, BufferLike, BufferRecord, BufferStore, Camera, CameraProps, 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, 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, LegacyRootState as RootState, RootStore, SetBlock, Size, StorageLike, StorageRecord, StorageStore, Subscription, TSLNodeInput, TextureInput, TextureResult, ThreeCamera, ThreeElement, ThreeElements, ThreeElementsImpl, ThreeEvent, ThreeExports, ThreeToJSXElements, UnblockProps, UseTextureOptions, UseTexturesReturn, Vector2, Vector3, Vector4, VectorRepresentation, Viewport, VisibilityEntry, WebGLDefaultProps, WebGLProps, WebGLShadowConfig, XRManager, XRPointerConfig };