@react-three/fiber 10.0.0-canary.0706a92 → 10.0.0-canary.0d86c23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as three_webgpu from 'three/webgpu';
2
- import { RenderTarget, WebGPURenderer, Node, StorageTexture, Data3DTexture, CanvasTarget, ShaderNodeObject, 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, 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, Object3D, Frustum, OrthographicCamera } from 'three/webgpu';
2
+ import { CubeRenderTarget, RenderTarget, WebGPURenderer, Node, StorageTexture, Data3DTexture, CanvasTarget, ShaderNodeObject, 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, 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, Object3D, Frustum, OrthographicCamera } from 'three/webgpu';
3
3
  import * as THREE$1 from 'three';
4
- import { WebGLRenderTarget, WebGLRenderer, Color as Color$1, ColorRepresentation, Euler as Euler$1, Loader, RenderTargetOptions as RenderTargetOptions$1 } from 'three';
4
+ import { WebGLCubeRenderTarget, WebGLRenderTarget, WebGLRenderer, Color as Color$1, ColorRepresentation, Euler as Euler$1, Loader, RenderTargetOptions as RenderTargetOptions$1 } from 'three';
5
5
  import { WebGLRendererParameters } from 'three/src/renderers/WebGLRenderer.js';
6
6
  import { Inspector } from 'three/addons/inspector/Inspector.js';
7
7
  import * as React$1 from 'react';
@@ -12,7 +12,6 @@ import { FrameTimingState, FrameCallback as FrameCallback$1, SchedulerApi, UseFr
12
12
  export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, Scheduler, SchedulerApi, UseFrameNextOptions, UseFrameOptions, getScheduler } from '@pmndrs/scheduler';
13
13
  import { Options } from 'react-use-measure';
14
14
  import * as react_jsx_runtime from 'react/jsx-runtime';
15
- import { ThreeElement as ThreeElement$1, Euler as Euler$3 } from '@react-three/fiber';
16
15
  import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox.js';
17
16
 
18
17
  function _mergeNamespaces(n, m) {
@@ -50,10 +49,13 @@ declare const R3F_BUILD_WEBGPU = true;
50
49
 
51
50
  var THREE = /*#__PURE__*/_mergeNamespaces({
52
51
  __proto__: null,
52
+ CubeRenderTarget: CubeRenderTarget,
53
+ CubeRenderTargetCompat: CubeRenderTarget,
53
54
  Inspector: Inspector,
54
55
  R3F_BUILD_LEGACY: R3F_BUILD_LEGACY,
55
56
  R3F_BUILD_WEBGPU: R3F_BUILD_WEBGPU,
56
57
  RenderTargetCompat: RenderTarget,
58
+ WebGLCubeRenderTarget: WebGLCubeRenderTarget,
57
59
  WebGLRenderTarget: WebGLRenderTarget,
58
60
  WebGLRenderer: WebGLRenderer,
59
61
  WebGLRendererParameters: WebGLRendererParameters
@@ -613,7 +615,7 @@ interface RootState {
613
615
  /** Internal: refcount per texture key, driven by mounted useTexture consumers (registry enrollment is on by default) */
614
616
  _textureRefs: Map<string, number>
615
617
  /** WebGPU RenderPipeline instance - use useRenderPipeline() hook */
616
- renderPipeline: any | null // THREE.PostProcessing (will be THREE.RenderPipeline in future Three.js release)
618
+ renderPipeline: ThreeRenderPipeline | null
617
619
  /** Global TSL pass nodes for render pipeline - use useRenderPipeline() hook */
618
620
  passes: Record<string, any>
619
621
  /** Internal version counter for HMR - incremented by rebuildNodes/rebuildUniforms to bust memoization */
@@ -1142,10 +1144,21 @@ type RenderTargetOptions = RenderTargetOptions$1
1142
1144
  //* Global Types ==============================
1143
1145
 
1144
1146
  declare global {
1145
- /** Uniform node type - a Node with a value property (matches Three.js UniformNode) */
1146
- interface UniformNode<T = unknown> extends Node {
1147
- value: T
1148
- }
1147
+ /**
1148
+ * Uniform node type.
1149
+ *
1150
+ * This is three's own `UniformNode`, not a re-declaration of it. It previously was a
1151
+ * hand-rolled `interface UniformNode<T> extends Node { value: T }`, which shadowed the real
1152
+ * exported type globally — so R3F's ~58 references resolved to an approximation that was
1153
+ * missing members three actually ships (`setName` among them) and had drifted to the wrong
1154
+ * arity when three made `UniformNode` two-parameter.
1155
+ *
1156
+ * three's signature is `UniformNode<TNodeType, TValue>`. R3F only ever varies the value type,
1157
+ * so the node type is fixed to `unknown` and the single parameter is kept for call-site
1158
+ * ergonomics. The result is three's structural type, so members stay in sync with the
1159
+ * installed three instead of needing to be mirrored by hand.
1160
+ */
1161
+ type UniformNode<T = unknown> = three_webgpu.UniformNode<unknown, T>
1149
1162
 
1150
1163
  /**
1151
1164
  * ShaderCallable - the return type of Fn()
@@ -1290,13 +1303,14 @@ declare module 'three/tsl' {
1290
1303
  ): ShaderCallable<R>
1291
1304
  }
1292
1305
 
1293
- /**
1294
- * RenderPipeline Types for useRenderPipeline hook (WebGPU only)
1295
- */
1296
-
1297
-
1298
-
1299
1306
  declare global {
1307
+ /**
1308
+ * three's own render pipeline type. Named here so the rest of R3F refers to three's shape
1309
+ * rather than `any`. three r183 renamed `PostProcessing` to `RenderPipeline`; our peer floor
1310
+ * is r185, so the new name is the only one.
1311
+ */
1312
+ type ThreeRenderPipeline = three_webgpu.RenderPipeline
1313
+
1300
1314
  /** Pass record - stores TSL pass nodes for render pipeline */
1301
1315
  type PassRecord = Record<string, any>
1302
1316
 
@@ -1311,7 +1325,7 @@ declare global {
1311
1325
  /** Current passes from state */
1312
1326
  passes: PassRecord
1313
1327
  /** RenderPipeline instance (null if not initialized) */
1314
- renderPipeline: any | null // THREE.PostProcessing (will be THREE.RenderPipeline in future Three.js release)
1328
+ renderPipeline: ThreeRenderPipeline | null
1315
1329
  /** Clear all passes from state */
1316
1330
  clearPasses: () => void
1317
1331
  /** Reset RenderPipeline entirely (clears PP + passes) */
@@ -1560,12 +1574,23 @@ type EnvironmentLoaderProps = {
1560
1574
  * const texture = useEnvironment({ preset: 'sunset' })
1561
1575
  * ```
1562
1576
  */
1563
- declare function useEnvironment({ files, path, preset, colorSpace, extensions, }?: Partial<EnvironmentLoaderProps>): Texture$1<unknown> | CubeTexture;
1577
+ declare function useEnvironment({ files, path, preset, colorSpace, extensions, }?: Partial<EnvironmentLoaderProps>): Texture$1<unknown, THREE$1.TextureEventMap> | CubeTexture<unknown>;
1564
1578
  declare namespace useEnvironment {
1565
1579
  var preload: (preloadOptions?: EnvironmentLoaderPreloadOptions) => void;
1566
1580
  var clear: (clearOptions?: EnvironmentLoaderClearOptions) => void;
1567
1581
  }
1568
- type EnvironmentLoaderPreloadOptions = Omit<EnvironmentLoaderProps, 'encoding'>;
1582
+ /**
1583
+ * Options accepted by `useEnvironment.preload`.
1584
+ *
1585
+ * `colorSpace` is deliberately omitted: preload only warms the loader cache, and colorSpace is
1586
+ * applied to the texture by `useEnvironment()` at use time, per consumer. Accepting it here would
1587
+ * advertise an option this function silently ignores.
1588
+ *
1589
+ * This previously read `Omit<…, 'encoding'>` — omitting a key that does not exist on
1590
+ * `EnvironmentLoaderProps`, a leftover from three's pre-`colorSpace` `encoding` API. That made the
1591
+ * type equivalent to the full props, so `colorSpace` was accepted and then dropped on the floor.
1592
+ */
1593
+ type EnvironmentLoaderPreloadOptions = Omit<EnvironmentLoaderProps, 'colorSpace'>;
1569
1594
  type EnvironmentLoaderClearOptions = Pick<EnvironmentLoaderProps, 'files' | 'preset'>;
1570
1595
 
1571
1596
  /**
@@ -1609,9 +1634,9 @@ type EnvironmentProps = {
1609
1634
  blur?: number;
1610
1635
  backgroundBlurriness?: number;
1611
1636
  backgroundIntensity?: number;
1612
- backgroundRotation?: Euler$3;
1637
+ backgroundRotation?: Euler;
1613
1638
  environmentIntensity?: number;
1614
- environmentRotation?: Euler$3;
1639
+ environmentRotation?: Euler;
1615
1640
  map?: Texture$1;
1616
1641
  preset?: PresetsType;
1617
1642
  scene?: Scene | React$1.RefObject<Scene>;
@@ -1695,7 +1720,7 @@ declare function EnvironmentCube({ background, scene, blur, backgroundBlurriness
1695
1720
  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;
1696
1721
  declare module '@react-three/fiber' {
1697
1722
  interface ThreeElements {
1698
- groundProjectedEnvImpl: ThreeElement$1<typeof GroundedSkybox>;
1723
+ groundProjectedEnvImpl: ThreeElement<typeof GroundedSkybox>;
1699
1724
  }
1700
1725
  }
1701
1726
  /**
@@ -1795,6 +1820,24 @@ declare module '@react-three/fiber' {
1795
1820
  */
1796
1821
  declare function Environment(props: EnvironmentProps): react_jsx_runtime.JSX.Element;
1797
1822
 
1823
+ /**
1824
+ * Moves every trace of interactivity from one object to its replacement, for reconstruction.
1825
+ *
1826
+ * When `args` or a `primitive`'s `object` changes, R3F builds a new three object and keeps the same
1827
+ * instance. Removing the old object from the interaction state and registering the new one from
1828
+ * scratch makes events *work* again (#3778), but it forgets what was in flight: a pointer resting on
1829
+ * the object fires a second `onPointerEnter` without ever having left, and an active pointer capture
1830
+ * is dropped mid-drag. Rewriting the references instead keeps the interaction continuous across a
1831
+ * swap the user never asked to see (#3744).
1832
+ *
1833
+ * Captures are re-keyed rather than released, so the DOM-level capture on `captureData.target` is
1834
+ * left alone — releasing and re-acquiring it is precisely the glitch being avoided.
1835
+ *
1836
+ * Visibility handlers are deliberately not transferred: that registry is keyed by `object.uuid`, so
1837
+ * the replacement re-registers itself through `applyProps`. The old entry is dropped here so it
1838
+ * cannot outlive the object it described.
1839
+ */
1840
+ declare function swapInteractivity(store: RootStore, object: Object3D, newObject: Object3D): void;
1798
1841
  declare function removeInteractivity(store: RootStore, object: Object3D): void;
1799
1842
  declare function createEvents(store: RootStore): {
1800
1843
  handlePointer: (name: string) => (event: DomEvent) => void;
@@ -3220,11 +3263,6 @@ declare function flushSync<R>(fn: () => R): R;
3220
3263
  declare const context: React$1.Context<RootStore>;
3221
3264
  declare const createStore: (invalidate: (state?: RootState, frames?: number, stackFrames?: boolean) => void, advance: (timestamp: number, runGlobalEffects?: boolean, state?: RootState, frame?: XRFrame) => void) => RootStore;
3222
3265
 
3223
- /**
3224
- * Safely flush async effects when testing, simulating a legacy root.
3225
- * @deprecated Import from React instead. import { act } from 'react'
3226
- */
3227
- declare const act: typeof React$1.act;
3228
3266
  /**
3229
3267
  * An SSR-friendly useLayoutEffect.
3230
3268
  *
@@ -3708,5 +3746,5 @@ declare function isOnce(value: unknown): value is {
3708
3746
  */
3709
3747
  declare function Canvas(props: CanvasProps): react_jsx_runtime.JSX.Element;
3710
3748
 
3711
- 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 };
3749
+ 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 };
3712
3750
  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, 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, R3FRenderer, RaycastableRepresentation, ReactProps, ReconcilerRoot, RenderCallback, RenderProps, RenderTargetOptions, Renderer, RendererConfigExtended, RendererFactory, RendererProps, Root, 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 };
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as three_webgpu from 'three/webgpu';
2
- import { RenderTarget, WebGPURenderer, Node, StorageTexture, Data3DTexture, CanvasTarget, ShaderNodeObject, 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, 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, Object3D, Frustum, OrthographicCamera } from 'three/webgpu';
2
+ import { CubeRenderTarget, RenderTarget, WebGPURenderer, Node, StorageTexture, Data3DTexture, CanvasTarget, ShaderNodeObject, 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, 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, Object3D, Frustum, OrthographicCamera } from 'three/webgpu';
3
3
  import * as THREE$1 from 'three';
4
- import { WebGLRenderTarget, WebGLRenderer, Color as Color$1, ColorRepresentation, Euler as Euler$1, Loader, RenderTargetOptions as RenderTargetOptions$1 } from 'three';
4
+ import { WebGLCubeRenderTarget, WebGLRenderTarget, WebGLRenderer, Color as Color$1, ColorRepresentation, Euler as Euler$1, Loader, RenderTargetOptions as RenderTargetOptions$1 } from 'three';
5
5
  import { WebGLRendererParameters } from 'three/src/renderers/WebGLRenderer.js';
6
6
  import { Inspector } from 'three/addons/inspector/Inspector.js';
7
7
  import * as React$1 from 'react';
@@ -12,7 +12,6 @@ import { FrameTimingState, FrameCallback as FrameCallback$1, SchedulerApi, UseFr
12
12
  export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, Scheduler, SchedulerApi, UseFrameNextOptions, UseFrameOptions, getScheduler } from '@pmndrs/scheduler';
13
13
  import { Options } from 'react-use-measure';
14
14
  import * as react_jsx_runtime from 'react/jsx-runtime';
15
- import { ThreeElement as ThreeElement$1, Euler as Euler$3 } from '@react-three/fiber';
16
15
  import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox.js';
17
16
 
18
17
  function _mergeNamespaces(n, m) {
@@ -50,10 +49,13 @@ declare const R3F_BUILD_WEBGPU = true;
50
49
 
51
50
  var THREE = /*#__PURE__*/_mergeNamespaces({
52
51
  __proto__: null,
52
+ CubeRenderTarget: CubeRenderTarget,
53
+ CubeRenderTargetCompat: CubeRenderTarget,
53
54
  Inspector: Inspector,
54
55
  R3F_BUILD_LEGACY: R3F_BUILD_LEGACY,
55
56
  R3F_BUILD_WEBGPU: R3F_BUILD_WEBGPU,
56
57
  RenderTargetCompat: RenderTarget,
58
+ WebGLCubeRenderTarget: WebGLCubeRenderTarget,
57
59
  WebGLRenderTarget: WebGLRenderTarget,
58
60
  WebGLRenderer: WebGLRenderer,
59
61
  WebGLRendererParameters: WebGLRendererParameters
@@ -613,7 +615,7 @@ interface RootState {
613
615
  /** Internal: refcount per texture key, driven by mounted useTexture consumers (registry enrollment is on by default) */
614
616
  _textureRefs: Map<string, number>
615
617
  /** WebGPU RenderPipeline instance - use useRenderPipeline() hook */
616
- renderPipeline: any | null // THREE.PostProcessing (will be THREE.RenderPipeline in future Three.js release)
618
+ renderPipeline: ThreeRenderPipeline | null
617
619
  /** Global TSL pass nodes for render pipeline - use useRenderPipeline() hook */
618
620
  passes: Record<string, any>
619
621
  /** Internal version counter for HMR - incremented by rebuildNodes/rebuildUniforms to bust memoization */
@@ -1142,10 +1144,21 @@ type RenderTargetOptions = RenderTargetOptions$1
1142
1144
  //* Global Types ==============================
1143
1145
 
1144
1146
  declare global {
1145
- /** Uniform node type - a Node with a value property (matches Three.js UniformNode) */
1146
- interface UniformNode<T = unknown> extends Node {
1147
- value: T
1148
- }
1147
+ /**
1148
+ * Uniform node type.
1149
+ *
1150
+ * This is three's own `UniformNode`, not a re-declaration of it. It previously was a
1151
+ * hand-rolled `interface UniformNode<T> extends Node { value: T }`, which shadowed the real
1152
+ * exported type globally — so R3F's ~58 references resolved to an approximation that was
1153
+ * missing members three actually ships (`setName` among them) and had drifted to the wrong
1154
+ * arity when three made `UniformNode` two-parameter.
1155
+ *
1156
+ * three's signature is `UniformNode<TNodeType, TValue>`. R3F only ever varies the value type,
1157
+ * so the node type is fixed to `unknown` and the single parameter is kept for call-site
1158
+ * ergonomics. The result is three's structural type, so members stay in sync with the
1159
+ * installed three instead of needing to be mirrored by hand.
1160
+ */
1161
+ type UniformNode<T = unknown> = three_webgpu.UniformNode<unknown, T>
1149
1162
 
1150
1163
  /**
1151
1164
  * ShaderCallable - the return type of Fn()
@@ -1290,13 +1303,14 @@ declare module 'three/tsl' {
1290
1303
  ): ShaderCallable<R>
1291
1304
  }
1292
1305
 
1293
- /**
1294
- * RenderPipeline Types for useRenderPipeline hook (WebGPU only)
1295
- */
1296
-
1297
-
1298
-
1299
1306
  declare global {
1307
+ /**
1308
+ * three's own render pipeline type. Named here so the rest of R3F refers to three's shape
1309
+ * rather than `any`. three r183 renamed `PostProcessing` to `RenderPipeline`; our peer floor
1310
+ * is r185, so the new name is the only one.
1311
+ */
1312
+ type ThreeRenderPipeline = three_webgpu.RenderPipeline
1313
+
1300
1314
  /** Pass record - stores TSL pass nodes for render pipeline */
1301
1315
  type PassRecord = Record<string, any>
1302
1316
 
@@ -1311,7 +1325,7 @@ declare global {
1311
1325
  /** Current passes from state */
1312
1326
  passes: PassRecord
1313
1327
  /** RenderPipeline instance (null if not initialized) */
1314
- renderPipeline: any | null // THREE.PostProcessing (will be THREE.RenderPipeline in future Three.js release)
1328
+ renderPipeline: ThreeRenderPipeline | null
1315
1329
  /** Clear all passes from state */
1316
1330
  clearPasses: () => void
1317
1331
  /** Reset RenderPipeline entirely (clears PP + passes) */
@@ -1560,12 +1574,23 @@ type EnvironmentLoaderProps = {
1560
1574
  * const texture = useEnvironment({ preset: 'sunset' })
1561
1575
  * ```
1562
1576
  */
1563
- declare function useEnvironment({ files, path, preset, colorSpace, extensions, }?: Partial<EnvironmentLoaderProps>): Texture$1<unknown> | CubeTexture;
1577
+ declare function useEnvironment({ files, path, preset, colorSpace, extensions, }?: Partial<EnvironmentLoaderProps>): Texture$1<unknown, THREE$1.TextureEventMap> | CubeTexture<unknown>;
1564
1578
  declare namespace useEnvironment {
1565
1579
  var preload: (preloadOptions?: EnvironmentLoaderPreloadOptions) => void;
1566
1580
  var clear: (clearOptions?: EnvironmentLoaderClearOptions) => void;
1567
1581
  }
1568
- type EnvironmentLoaderPreloadOptions = Omit<EnvironmentLoaderProps, 'encoding'>;
1582
+ /**
1583
+ * Options accepted by `useEnvironment.preload`.
1584
+ *
1585
+ * `colorSpace` is deliberately omitted: preload only warms the loader cache, and colorSpace is
1586
+ * applied to the texture by `useEnvironment()` at use time, per consumer. Accepting it here would
1587
+ * advertise an option this function silently ignores.
1588
+ *
1589
+ * This previously read `Omit<…, 'encoding'>` — omitting a key that does not exist on
1590
+ * `EnvironmentLoaderProps`, a leftover from three's pre-`colorSpace` `encoding` API. That made the
1591
+ * type equivalent to the full props, so `colorSpace` was accepted and then dropped on the floor.
1592
+ */
1593
+ type EnvironmentLoaderPreloadOptions = Omit<EnvironmentLoaderProps, 'colorSpace'>;
1569
1594
  type EnvironmentLoaderClearOptions = Pick<EnvironmentLoaderProps, 'files' | 'preset'>;
1570
1595
 
1571
1596
  /**
@@ -1609,9 +1634,9 @@ type EnvironmentProps = {
1609
1634
  blur?: number;
1610
1635
  backgroundBlurriness?: number;
1611
1636
  backgroundIntensity?: number;
1612
- backgroundRotation?: Euler$3;
1637
+ backgroundRotation?: Euler;
1613
1638
  environmentIntensity?: number;
1614
- environmentRotation?: Euler$3;
1639
+ environmentRotation?: Euler;
1615
1640
  map?: Texture$1;
1616
1641
  preset?: PresetsType;
1617
1642
  scene?: Scene | React$1.RefObject<Scene>;
@@ -1695,7 +1720,7 @@ declare function EnvironmentCube({ background, scene, blur, backgroundBlurriness
1695
1720
  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;
1696
1721
  declare module '@react-three/fiber' {
1697
1722
  interface ThreeElements {
1698
- groundProjectedEnvImpl: ThreeElement$1<typeof GroundedSkybox>;
1723
+ groundProjectedEnvImpl: ThreeElement<typeof GroundedSkybox>;
1699
1724
  }
1700
1725
  }
1701
1726
  /**
@@ -1795,6 +1820,24 @@ declare module '@react-three/fiber' {
1795
1820
  */
1796
1821
  declare function Environment(props: EnvironmentProps): react_jsx_runtime.JSX.Element;
1797
1822
 
1823
+ /**
1824
+ * Moves every trace of interactivity from one object to its replacement, for reconstruction.
1825
+ *
1826
+ * When `args` or a `primitive`'s `object` changes, R3F builds a new three object and keeps the same
1827
+ * instance. Removing the old object from the interaction state and registering the new one from
1828
+ * scratch makes events *work* again (#3778), but it forgets what was in flight: a pointer resting on
1829
+ * the object fires a second `onPointerEnter` without ever having left, and an active pointer capture
1830
+ * is dropped mid-drag. Rewriting the references instead keeps the interaction continuous across a
1831
+ * swap the user never asked to see (#3744).
1832
+ *
1833
+ * Captures are re-keyed rather than released, so the DOM-level capture on `captureData.target` is
1834
+ * left alone — releasing and re-acquiring it is precisely the glitch being avoided.
1835
+ *
1836
+ * Visibility handlers are deliberately not transferred: that registry is keyed by `object.uuid`, so
1837
+ * the replacement re-registers itself through `applyProps`. The old entry is dropped here so it
1838
+ * cannot outlive the object it described.
1839
+ */
1840
+ declare function swapInteractivity(store: RootStore, object: Object3D, newObject: Object3D): void;
1798
1841
  declare function removeInteractivity(store: RootStore, object: Object3D): void;
1799
1842
  declare function createEvents(store: RootStore): {
1800
1843
  handlePointer: (name: string) => (event: DomEvent) => void;
@@ -3220,11 +3263,6 @@ declare function flushSync<R>(fn: () => R): R;
3220
3263
  declare const context: React$1.Context<RootStore>;
3221
3264
  declare const createStore: (invalidate: (state?: RootState, frames?: number, stackFrames?: boolean) => void, advance: (timestamp: number, runGlobalEffects?: boolean, state?: RootState, frame?: XRFrame) => void) => RootStore;
3222
3265
 
3223
- /**
3224
- * Safely flush async effects when testing, simulating a legacy root.
3225
- * @deprecated Import from React instead. import { act } from 'react'
3226
- */
3227
- declare const act: typeof React$1.act;
3228
3266
  /**
3229
3267
  * An SSR-friendly useLayoutEffect.
3230
3268
  *
@@ -3708,5 +3746,5 @@ declare function isOnce(value: unknown): value is {
3708
3746
  */
3709
3747
  declare function Canvas(props: CanvasProps): react_jsx_runtime.JSX.Element;
3710
3748
 
3711
- 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 };
3749
+ 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 };
3712
3750
  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, 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, R3FRenderer, RaycastableRepresentation, ReactProps, ReconcilerRoot, RenderCallback, RenderProps, RenderTargetOptions, Renderer, RendererConfigExtended, RendererFactory, RendererProps, Root, 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 };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as three_webgpu from 'three/webgpu';
2
- import { RenderTarget, WebGPURenderer, Node, StorageTexture, Data3DTexture, CanvasTarget, ShaderNodeObject, 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, 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, Object3D, Frustum, OrthographicCamera } from 'three/webgpu';
2
+ import { CubeRenderTarget, RenderTarget, WebGPURenderer, Node, StorageTexture, Data3DTexture, CanvasTarget, ShaderNodeObject, 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, 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, Object3D, Frustum, OrthographicCamera } from 'three/webgpu';
3
3
  import * as THREE$1 from 'three';
4
- import { WebGLRenderTarget, WebGLRenderer, Color as Color$1, ColorRepresentation, Euler as Euler$1, Loader, RenderTargetOptions as RenderTargetOptions$1 } from 'three';
4
+ import { WebGLCubeRenderTarget, WebGLRenderTarget, WebGLRenderer, Color as Color$1, ColorRepresentation, Euler as Euler$1, Loader, RenderTargetOptions as RenderTargetOptions$1 } from 'three';
5
5
  import { WebGLRendererParameters } from 'three/src/renderers/WebGLRenderer.js';
6
6
  import { Inspector } from 'three/addons/inspector/Inspector.js';
7
7
  import * as React$1 from 'react';
@@ -12,7 +12,6 @@ import { FrameTimingState, FrameCallback as FrameCallback$1, SchedulerApi, UseFr
12
12
  export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, Scheduler, SchedulerApi, UseFrameNextOptions, UseFrameOptions, getScheduler } from '@pmndrs/scheduler';
13
13
  import { Options } from 'react-use-measure';
14
14
  import * as react_jsx_runtime from 'react/jsx-runtime';
15
- import { ThreeElement as ThreeElement$1, Euler as Euler$3 } from '@react-three/fiber';
16
15
  import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox.js';
17
16
 
18
17
  function _mergeNamespaces(n, m) {
@@ -50,10 +49,13 @@ declare const R3F_BUILD_WEBGPU = true;
50
49
 
51
50
  var THREE = /*#__PURE__*/_mergeNamespaces({
52
51
  __proto__: null,
52
+ CubeRenderTarget: CubeRenderTarget,
53
+ CubeRenderTargetCompat: CubeRenderTarget,
53
54
  Inspector: Inspector,
54
55
  R3F_BUILD_LEGACY: R3F_BUILD_LEGACY,
55
56
  R3F_BUILD_WEBGPU: R3F_BUILD_WEBGPU,
56
57
  RenderTargetCompat: RenderTarget,
58
+ WebGLCubeRenderTarget: WebGLCubeRenderTarget,
57
59
  WebGLRenderTarget: WebGLRenderTarget,
58
60
  WebGLRenderer: WebGLRenderer,
59
61
  WebGLRendererParameters: WebGLRendererParameters
@@ -613,7 +615,7 @@ interface RootState {
613
615
  /** Internal: refcount per texture key, driven by mounted useTexture consumers (registry enrollment is on by default) */
614
616
  _textureRefs: Map<string, number>
615
617
  /** WebGPU RenderPipeline instance - use useRenderPipeline() hook */
616
- renderPipeline: any | null // THREE.PostProcessing (will be THREE.RenderPipeline in future Three.js release)
618
+ renderPipeline: ThreeRenderPipeline | null
617
619
  /** Global TSL pass nodes for render pipeline - use useRenderPipeline() hook */
618
620
  passes: Record<string, any>
619
621
  /** Internal version counter for HMR - incremented by rebuildNodes/rebuildUniforms to bust memoization */
@@ -1142,10 +1144,21 @@ type RenderTargetOptions = RenderTargetOptions$1
1142
1144
  //* Global Types ==============================
1143
1145
 
1144
1146
  declare global {
1145
- /** Uniform node type - a Node with a value property (matches Three.js UniformNode) */
1146
- interface UniformNode<T = unknown> extends Node {
1147
- value: T
1148
- }
1147
+ /**
1148
+ * Uniform node type.
1149
+ *
1150
+ * This is three's own `UniformNode`, not a re-declaration of it. It previously was a
1151
+ * hand-rolled `interface UniformNode<T> extends Node { value: T }`, which shadowed the real
1152
+ * exported type globally — so R3F's ~58 references resolved to an approximation that was
1153
+ * missing members three actually ships (`setName` among them) and had drifted to the wrong
1154
+ * arity when three made `UniformNode` two-parameter.
1155
+ *
1156
+ * three's signature is `UniformNode<TNodeType, TValue>`. R3F only ever varies the value type,
1157
+ * so the node type is fixed to `unknown` and the single parameter is kept for call-site
1158
+ * ergonomics. The result is three's structural type, so members stay in sync with the
1159
+ * installed three instead of needing to be mirrored by hand.
1160
+ */
1161
+ type UniformNode<T = unknown> = three_webgpu.UniformNode<unknown, T>
1149
1162
 
1150
1163
  /**
1151
1164
  * ShaderCallable - the return type of Fn()
@@ -1290,13 +1303,14 @@ declare module 'three/tsl' {
1290
1303
  ): ShaderCallable<R>
1291
1304
  }
1292
1305
 
1293
- /**
1294
- * RenderPipeline Types for useRenderPipeline hook (WebGPU only)
1295
- */
1296
-
1297
-
1298
-
1299
1306
  declare global {
1307
+ /**
1308
+ * three's own render pipeline type. Named here so the rest of R3F refers to three's shape
1309
+ * rather than `any`. three r183 renamed `PostProcessing` to `RenderPipeline`; our peer floor
1310
+ * is r185, so the new name is the only one.
1311
+ */
1312
+ type ThreeRenderPipeline = three_webgpu.RenderPipeline
1313
+
1300
1314
  /** Pass record - stores TSL pass nodes for render pipeline */
1301
1315
  type PassRecord = Record<string, any>
1302
1316
 
@@ -1311,7 +1325,7 @@ declare global {
1311
1325
  /** Current passes from state */
1312
1326
  passes: PassRecord
1313
1327
  /** RenderPipeline instance (null if not initialized) */
1314
- renderPipeline: any | null // THREE.PostProcessing (will be THREE.RenderPipeline in future Three.js release)
1328
+ renderPipeline: ThreeRenderPipeline | null
1315
1329
  /** Clear all passes from state */
1316
1330
  clearPasses: () => void
1317
1331
  /** Reset RenderPipeline entirely (clears PP + passes) */
@@ -1560,12 +1574,23 @@ type EnvironmentLoaderProps = {
1560
1574
  * const texture = useEnvironment({ preset: 'sunset' })
1561
1575
  * ```
1562
1576
  */
1563
- declare function useEnvironment({ files, path, preset, colorSpace, extensions, }?: Partial<EnvironmentLoaderProps>): Texture$1<unknown> | CubeTexture;
1577
+ declare function useEnvironment({ files, path, preset, colorSpace, extensions, }?: Partial<EnvironmentLoaderProps>): Texture$1<unknown, THREE$1.TextureEventMap> | CubeTexture<unknown>;
1564
1578
  declare namespace useEnvironment {
1565
1579
  var preload: (preloadOptions?: EnvironmentLoaderPreloadOptions) => void;
1566
1580
  var clear: (clearOptions?: EnvironmentLoaderClearOptions) => void;
1567
1581
  }
1568
- type EnvironmentLoaderPreloadOptions = Omit<EnvironmentLoaderProps, 'encoding'>;
1582
+ /**
1583
+ * Options accepted by `useEnvironment.preload`.
1584
+ *
1585
+ * `colorSpace` is deliberately omitted: preload only warms the loader cache, and colorSpace is
1586
+ * applied to the texture by `useEnvironment()` at use time, per consumer. Accepting it here would
1587
+ * advertise an option this function silently ignores.
1588
+ *
1589
+ * This previously read `Omit<…, 'encoding'>` — omitting a key that does not exist on
1590
+ * `EnvironmentLoaderProps`, a leftover from three's pre-`colorSpace` `encoding` API. That made the
1591
+ * type equivalent to the full props, so `colorSpace` was accepted and then dropped on the floor.
1592
+ */
1593
+ type EnvironmentLoaderPreloadOptions = Omit<EnvironmentLoaderProps, 'colorSpace'>;
1569
1594
  type EnvironmentLoaderClearOptions = Pick<EnvironmentLoaderProps, 'files' | 'preset'>;
1570
1595
 
1571
1596
  /**
@@ -1609,9 +1634,9 @@ type EnvironmentProps = {
1609
1634
  blur?: number;
1610
1635
  backgroundBlurriness?: number;
1611
1636
  backgroundIntensity?: number;
1612
- backgroundRotation?: Euler$3;
1637
+ backgroundRotation?: Euler;
1613
1638
  environmentIntensity?: number;
1614
- environmentRotation?: Euler$3;
1639
+ environmentRotation?: Euler;
1615
1640
  map?: Texture$1;
1616
1641
  preset?: PresetsType;
1617
1642
  scene?: Scene | React$1.RefObject<Scene>;
@@ -1695,7 +1720,7 @@ declare function EnvironmentCube({ background, scene, blur, backgroundBlurriness
1695
1720
  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;
1696
1721
  declare module '@react-three/fiber' {
1697
1722
  interface ThreeElements {
1698
- groundProjectedEnvImpl: ThreeElement$1<typeof GroundedSkybox>;
1723
+ groundProjectedEnvImpl: ThreeElement<typeof GroundedSkybox>;
1699
1724
  }
1700
1725
  }
1701
1726
  /**
@@ -1795,6 +1820,24 @@ declare module '@react-three/fiber' {
1795
1820
  */
1796
1821
  declare function Environment(props: EnvironmentProps): react_jsx_runtime.JSX.Element;
1797
1822
 
1823
+ /**
1824
+ * Moves every trace of interactivity from one object to its replacement, for reconstruction.
1825
+ *
1826
+ * When `args` or a `primitive`'s `object` changes, R3F builds a new three object and keeps the same
1827
+ * instance. Removing the old object from the interaction state and registering the new one from
1828
+ * scratch makes events *work* again (#3778), but it forgets what was in flight: a pointer resting on
1829
+ * the object fires a second `onPointerEnter` without ever having left, and an active pointer capture
1830
+ * is dropped mid-drag. Rewriting the references instead keeps the interaction continuous across a
1831
+ * swap the user never asked to see (#3744).
1832
+ *
1833
+ * Captures are re-keyed rather than released, so the DOM-level capture on `captureData.target` is
1834
+ * left alone — releasing and re-acquiring it is precisely the glitch being avoided.
1835
+ *
1836
+ * Visibility handlers are deliberately not transferred: that registry is keyed by `object.uuid`, so
1837
+ * the replacement re-registers itself through `applyProps`. The old entry is dropped here so it
1838
+ * cannot outlive the object it described.
1839
+ */
1840
+ declare function swapInteractivity(store: RootStore, object: Object3D, newObject: Object3D): void;
1798
1841
  declare function removeInteractivity(store: RootStore, object: Object3D): void;
1799
1842
  declare function createEvents(store: RootStore): {
1800
1843
  handlePointer: (name: string) => (event: DomEvent) => void;
@@ -3220,11 +3263,6 @@ declare function flushSync<R>(fn: () => R): R;
3220
3263
  declare const context: React$1.Context<RootStore>;
3221
3264
  declare const createStore: (invalidate: (state?: RootState, frames?: number, stackFrames?: boolean) => void, advance: (timestamp: number, runGlobalEffects?: boolean, state?: RootState, frame?: XRFrame) => void) => RootStore;
3222
3265
 
3223
- /**
3224
- * Safely flush async effects when testing, simulating a legacy root.
3225
- * @deprecated Import from React instead. import { act } from 'react'
3226
- */
3227
- declare const act: typeof React$1.act;
3228
3266
  /**
3229
3267
  * An SSR-friendly useLayoutEffect.
3230
3268
  *
@@ -3708,5 +3746,5 @@ declare function isOnce(value: unknown): value is {
3708
3746
  */
3709
3747
  declare function Canvas(props: CanvasProps): react_jsx_runtime.JSX.Element;
3710
3748
 
3711
- 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 };
3749
+ 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 };
3712
3750
  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, 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, R3FRenderer, RaycastableRepresentation, ReactProps, ReconcilerRoot, RenderCallback, RenderProps, RenderTargetOptions, Renderer, RendererConfigExtended, RendererFactory, RendererProps, Root, 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 };