@react-three/fiber 10.0.0-canary.1be335a → 10.0.0-canary.20de6b2
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.cjs +2413 -2359
- package/dist/index.d.cts +40 -11
- package/dist/index.d.mts +40 -11
- package/dist/index.d.ts +40 -11
- package/dist/index.mjs +2414 -2360
- package/dist/legacy.cjs +2408 -2359
- package/dist/legacy.d.cts +39 -14
- package/dist/legacy.d.mts +39 -14
- package/dist/legacy.d.ts +39 -14
- package/dist/legacy.mjs +2411 -2362
- package/dist/webgpu/index.cjs +2426 -2366
- package/dist/webgpu/index.d.cts +58 -61
- package/dist/webgpu/index.d.mts +58 -61
- package/dist/webgpu/index.d.ts +58 -61
- package/dist/webgpu/index.mjs +2430 -2370
- package/package.json +3 -3
- package/readme.md +1 -1
- package/react-reconciler/constants.d.ts +0 -7
- package/react-reconciler/constants.js +0 -1
- package/react-reconciler/index.d.ts +0 -1044
- package/react-reconciler/index.js +0 -208
package/dist/legacy.d.cts
CHANGED
|
@@ -10,7 +10,6 @@ import { FrameTimingState, FrameCallback as FrameCallback$1, SchedulerApi, UseFr
|
|
|
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,9 +38,9 @@ function _mergeNamespaces(n, m) {
|
|
|
39
38
|
declare const R3F_BUILD_LEGACY = true;
|
|
40
39
|
declare const R3F_BUILD_WEBGPU = false;
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
type Inspector = never;
|
|
42
|
+
/** Not available on the legacy (WebGL-only) entry. */
|
|
43
|
+
declare function loadInspector(): Promise<never>;
|
|
45
44
|
declare const WebGPURenderer: {
|
|
46
45
|
new (): {};
|
|
47
46
|
};
|
|
@@ -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 ==============================
|
|
@@ -497,6 +497,18 @@ interface InternalState {
|
|
|
497
497
|
* @see https://threejs.org/docs/#api/en/renderers/common/CanvasTarget
|
|
498
498
|
*/
|
|
499
499
|
canvasTarget?: CanvasTarget
|
|
500
|
+
/**
|
|
501
|
+
* Set when this root's canvas target has been resized and the backend's cached render pass
|
|
502
|
+
* descriptor (which holds a depth-stencil view built once per canvas) is therefore stale.
|
|
503
|
+
*
|
|
504
|
+
* Flushed by the canvas-target job in the `start` phase, which is the only place this root's
|
|
505
|
+
* target is guaranteed to be the renderer's active one — `backend.updateSize()` operates on
|
|
506
|
+
* whatever `getCanvasTarget()` returns, so calling it from the resize subscription would
|
|
507
|
+
* invalidate some other canvas's descriptor instead.
|
|
508
|
+
*
|
|
509
|
+
* @see https://github.com/pmndrs/react-three-fiber/issues/3847
|
|
510
|
+
*/
|
|
511
|
+
canvasTargetSizeDirty?: boolean
|
|
500
512
|
/**
|
|
501
513
|
* Whether multi-canvas rendering is active.
|
|
502
514
|
* True when any canvas uses `renderer={{ primaryCanvas: 'id' }}` to share a renderer.
|
|
@@ -1635,9 +1647,9 @@ type EnvironmentProps = {
|
|
|
1635
1647
|
blur?: number;
|
|
1636
1648
|
backgroundBlurriness?: number;
|
|
1637
1649
|
backgroundIntensity?: number;
|
|
1638
|
-
backgroundRotation?: Euler
|
|
1650
|
+
backgroundRotation?: Euler;
|
|
1639
1651
|
environmentIntensity?: number;
|
|
1640
|
-
environmentRotation?: Euler
|
|
1652
|
+
environmentRotation?: Euler;
|
|
1641
1653
|
map?: Texture$1;
|
|
1642
1654
|
preset?: PresetsType;
|
|
1643
1655
|
scene?: Scene | React$1.RefObject<Scene>;
|
|
@@ -1721,7 +1733,7 @@ declare function EnvironmentCube({ background, scene, blur, backgroundBlurriness
|
|
|
1721
1733
|
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
1734
|
declare module '@react-three/fiber' {
|
|
1723
1735
|
interface ThreeElements {
|
|
1724
|
-
groundProjectedEnvImpl: ThreeElement
|
|
1736
|
+
groundProjectedEnvImpl: ThreeElement<typeof GroundedSkybox>;
|
|
1725
1737
|
}
|
|
1726
1738
|
}
|
|
1727
1739
|
/**
|
|
@@ -1821,6 +1833,24 @@ declare module '@react-three/fiber' {
|
|
|
1821
1833
|
*/
|
|
1822
1834
|
declare function Environment(props: EnvironmentProps): react_jsx_runtime.JSX.Element;
|
|
1823
1835
|
|
|
1836
|
+
/**
|
|
1837
|
+
* Moves every trace of interactivity from one object to its replacement, for reconstruction.
|
|
1838
|
+
*
|
|
1839
|
+
* When `args` or a `primitive`'s `object` changes, R3F builds a new three object and keeps the same
|
|
1840
|
+
* instance. Removing the old object from the interaction state and registering the new one from
|
|
1841
|
+
* scratch makes events *work* again (#3778), but it forgets what was in flight: a pointer resting on
|
|
1842
|
+
* the object fires a second `onPointerEnter` without ever having left, and an active pointer capture
|
|
1843
|
+
* is dropped mid-drag. Rewriting the references instead keeps the interaction continuous across a
|
|
1844
|
+
* swap the user never asked to see (#3744).
|
|
1845
|
+
*
|
|
1846
|
+
* Captures are re-keyed rather than released, so the DOM-level capture on `captureData.target` is
|
|
1847
|
+
* left alone — releasing and re-acquiring it is precisely the glitch being avoided.
|
|
1848
|
+
*
|
|
1849
|
+
* Visibility handlers are deliberately not transferred: that registry is keyed by `object.uuid`, so
|
|
1850
|
+
* the replacement re-registers itself through `applyProps`. The old entry is dropped here so it
|
|
1851
|
+
* cannot outlive the object it described.
|
|
1852
|
+
*/
|
|
1853
|
+
declare function swapInteractivity(store: RootStore, object: Object3D, newObject: Object3D): void;
|
|
1824
1854
|
declare function removeInteractivity(store: RootStore, object: Object3D): void;
|
|
1825
1855
|
declare function createEvents(store: RootStore): {
|
|
1826
1856
|
handlePointer: (name: string) => (event: DomEvent) => void;
|
|
@@ -3246,11 +3276,6 @@ declare function flushSync<R>(fn: () => R): R;
|
|
|
3246
3276
|
declare const context: React$1.Context<RootStore>;
|
|
3247
3277
|
declare const createStore: (invalidate: (state?: RootState, frames?: number, stackFrames?: boolean) => void, advance: (timestamp: number, runGlobalEffects?: boolean, state?: RootState, frame?: XRFrame) => void) => RootStore;
|
|
3248
3278
|
|
|
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
3279
|
/**
|
|
3255
3280
|
* An SSR-friendly useLayoutEffect.
|
|
3256
3281
|
*
|
|
@@ -3734,5 +3759,5 @@ declare function isOnce(value: unknown): value is {
|
|
|
3734
3759
|
*/
|
|
3735
3760
|
declare function Canvas(props: CanvasProps): react_jsx_runtime.JSX.Element;
|
|
3736
3761
|
|
|
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,
|
|
3762
|
+
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 };
|
|
3738
3763
|
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 };
|
package/dist/legacy.d.mts
CHANGED
|
@@ -10,7 +10,6 @@ import { FrameTimingState, FrameCallback as FrameCallback$1, SchedulerApi, UseFr
|
|
|
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,9 +38,9 @@ function _mergeNamespaces(n, m) {
|
|
|
39
38
|
declare const R3F_BUILD_LEGACY = true;
|
|
40
39
|
declare const R3F_BUILD_WEBGPU = false;
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
type Inspector = never;
|
|
42
|
+
/** Not available on the legacy (WebGL-only) entry. */
|
|
43
|
+
declare function loadInspector(): Promise<never>;
|
|
45
44
|
declare const WebGPURenderer: {
|
|
46
45
|
new (): {};
|
|
47
46
|
};
|
|
@@ -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 ==============================
|
|
@@ -497,6 +497,18 @@ interface InternalState {
|
|
|
497
497
|
* @see https://threejs.org/docs/#api/en/renderers/common/CanvasTarget
|
|
498
498
|
*/
|
|
499
499
|
canvasTarget?: CanvasTarget
|
|
500
|
+
/**
|
|
501
|
+
* Set when this root's canvas target has been resized and the backend's cached render pass
|
|
502
|
+
* descriptor (which holds a depth-stencil view built once per canvas) is therefore stale.
|
|
503
|
+
*
|
|
504
|
+
* Flushed by the canvas-target job in the `start` phase, which is the only place this root's
|
|
505
|
+
* target is guaranteed to be the renderer's active one — `backend.updateSize()` operates on
|
|
506
|
+
* whatever `getCanvasTarget()` returns, so calling it from the resize subscription would
|
|
507
|
+
* invalidate some other canvas's descriptor instead.
|
|
508
|
+
*
|
|
509
|
+
* @see https://github.com/pmndrs/react-three-fiber/issues/3847
|
|
510
|
+
*/
|
|
511
|
+
canvasTargetSizeDirty?: boolean
|
|
500
512
|
/**
|
|
501
513
|
* Whether multi-canvas rendering is active.
|
|
502
514
|
* True when any canvas uses `renderer={{ primaryCanvas: 'id' }}` to share a renderer.
|
|
@@ -1635,9 +1647,9 @@ type EnvironmentProps = {
|
|
|
1635
1647
|
blur?: number;
|
|
1636
1648
|
backgroundBlurriness?: number;
|
|
1637
1649
|
backgroundIntensity?: number;
|
|
1638
|
-
backgroundRotation?: Euler
|
|
1650
|
+
backgroundRotation?: Euler;
|
|
1639
1651
|
environmentIntensity?: number;
|
|
1640
|
-
environmentRotation?: Euler
|
|
1652
|
+
environmentRotation?: Euler;
|
|
1641
1653
|
map?: Texture$1;
|
|
1642
1654
|
preset?: PresetsType;
|
|
1643
1655
|
scene?: Scene | React$1.RefObject<Scene>;
|
|
@@ -1721,7 +1733,7 @@ declare function EnvironmentCube({ background, scene, blur, backgroundBlurriness
|
|
|
1721
1733
|
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
1734
|
declare module '@react-three/fiber' {
|
|
1723
1735
|
interface ThreeElements {
|
|
1724
|
-
groundProjectedEnvImpl: ThreeElement
|
|
1736
|
+
groundProjectedEnvImpl: ThreeElement<typeof GroundedSkybox>;
|
|
1725
1737
|
}
|
|
1726
1738
|
}
|
|
1727
1739
|
/**
|
|
@@ -1821,6 +1833,24 @@ declare module '@react-three/fiber' {
|
|
|
1821
1833
|
*/
|
|
1822
1834
|
declare function Environment(props: EnvironmentProps): react_jsx_runtime.JSX.Element;
|
|
1823
1835
|
|
|
1836
|
+
/**
|
|
1837
|
+
* Moves every trace of interactivity from one object to its replacement, for reconstruction.
|
|
1838
|
+
*
|
|
1839
|
+
* When `args` or a `primitive`'s `object` changes, R3F builds a new three object and keeps the same
|
|
1840
|
+
* instance. Removing the old object from the interaction state and registering the new one from
|
|
1841
|
+
* scratch makes events *work* again (#3778), but it forgets what was in flight: a pointer resting on
|
|
1842
|
+
* the object fires a second `onPointerEnter` without ever having left, and an active pointer capture
|
|
1843
|
+
* is dropped mid-drag. Rewriting the references instead keeps the interaction continuous across a
|
|
1844
|
+
* swap the user never asked to see (#3744).
|
|
1845
|
+
*
|
|
1846
|
+
* Captures are re-keyed rather than released, so the DOM-level capture on `captureData.target` is
|
|
1847
|
+
* left alone — releasing and re-acquiring it is precisely the glitch being avoided.
|
|
1848
|
+
*
|
|
1849
|
+
* Visibility handlers are deliberately not transferred: that registry is keyed by `object.uuid`, so
|
|
1850
|
+
* the replacement re-registers itself through `applyProps`. The old entry is dropped here so it
|
|
1851
|
+
* cannot outlive the object it described.
|
|
1852
|
+
*/
|
|
1853
|
+
declare function swapInteractivity(store: RootStore, object: Object3D, newObject: Object3D): void;
|
|
1824
1854
|
declare function removeInteractivity(store: RootStore, object: Object3D): void;
|
|
1825
1855
|
declare function createEvents(store: RootStore): {
|
|
1826
1856
|
handlePointer: (name: string) => (event: DomEvent) => void;
|
|
@@ -3246,11 +3276,6 @@ declare function flushSync<R>(fn: () => R): R;
|
|
|
3246
3276
|
declare const context: React$1.Context<RootStore>;
|
|
3247
3277
|
declare const createStore: (invalidate: (state?: RootState, frames?: number, stackFrames?: boolean) => void, advance: (timestamp: number, runGlobalEffects?: boolean, state?: RootState, frame?: XRFrame) => void) => RootStore;
|
|
3248
3278
|
|
|
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
3279
|
/**
|
|
3255
3280
|
* An SSR-friendly useLayoutEffect.
|
|
3256
3281
|
*
|
|
@@ -3734,5 +3759,5 @@ declare function isOnce(value: unknown): value is {
|
|
|
3734
3759
|
*/
|
|
3735
3760
|
declare function Canvas(props: CanvasProps): react_jsx_runtime.JSX.Element;
|
|
3736
3761
|
|
|
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,
|
|
3762
|
+
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 };
|
|
3738
3763
|
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 };
|
package/dist/legacy.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ import { FrameTimingState, FrameCallback as FrameCallback$1, SchedulerApi, UseFr
|
|
|
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,9 +38,9 @@ function _mergeNamespaces(n, m) {
|
|
|
39
38
|
declare const R3F_BUILD_LEGACY = true;
|
|
40
39
|
declare const R3F_BUILD_WEBGPU = false;
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
type Inspector = never;
|
|
42
|
+
/** Not available on the legacy (WebGL-only) entry. */
|
|
43
|
+
declare function loadInspector(): Promise<never>;
|
|
45
44
|
declare const WebGPURenderer: {
|
|
46
45
|
new (): {};
|
|
47
46
|
};
|
|
@@ -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 ==============================
|
|
@@ -497,6 +497,18 @@ interface InternalState {
|
|
|
497
497
|
* @see https://threejs.org/docs/#api/en/renderers/common/CanvasTarget
|
|
498
498
|
*/
|
|
499
499
|
canvasTarget?: CanvasTarget
|
|
500
|
+
/**
|
|
501
|
+
* Set when this root's canvas target has been resized and the backend's cached render pass
|
|
502
|
+
* descriptor (which holds a depth-stencil view built once per canvas) is therefore stale.
|
|
503
|
+
*
|
|
504
|
+
* Flushed by the canvas-target job in the `start` phase, which is the only place this root's
|
|
505
|
+
* target is guaranteed to be the renderer's active one — `backend.updateSize()` operates on
|
|
506
|
+
* whatever `getCanvasTarget()` returns, so calling it from the resize subscription would
|
|
507
|
+
* invalidate some other canvas's descriptor instead.
|
|
508
|
+
*
|
|
509
|
+
* @see https://github.com/pmndrs/react-three-fiber/issues/3847
|
|
510
|
+
*/
|
|
511
|
+
canvasTargetSizeDirty?: boolean
|
|
500
512
|
/**
|
|
501
513
|
* Whether multi-canvas rendering is active.
|
|
502
514
|
* True when any canvas uses `renderer={{ primaryCanvas: 'id' }}` to share a renderer.
|
|
@@ -1635,9 +1647,9 @@ type EnvironmentProps = {
|
|
|
1635
1647
|
blur?: number;
|
|
1636
1648
|
backgroundBlurriness?: number;
|
|
1637
1649
|
backgroundIntensity?: number;
|
|
1638
|
-
backgroundRotation?: Euler
|
|
1650
|
+
backgroundRotation?: Euler;
|
|
1639
1651
|
environmentIntensity?: number;
|
|
1640
|
-
environmentRotation?: Euler
|
|
1652
|
+
environmentRotation?: Euler;
|
|
1641
1653
|
map?: Texture$1;
|
|
1642
1654
|
preset?: PresetsType;
|
|
1643
1655
|
scene?: Scene | React$1.RefObject<Scene>;
|
|
@@ -1721,7 +1733,7 @@ declare function EnvironmentCube({ background, scene, blur, backgroundBlurriness
|
|
|
1721
1733
|
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
1734
|
declare module '@react-three/fiber' {
|
|
1723
1735
|
interface ThreeElements {
|
|
1724
|
-
groundProjectedEnvImpl: ThreeElement
|
|
1736
|
+
groundProjectedEnvImpl: ThreeElement<typeof GroundedSkybox>;
|
|
1725
1737
|
}
|
|
1726
1738
|
}
|
|
1727
1739
|
/**
|
|
@@ -1821,6 +1833,24 @@ declare module '@react-three/fiber' {
|
|
|
1821
1833
|
*/
|
|
1822
1834
|
declare function Environment(props: EnvironmentProps): react_jsx_runtime.JSX.Element;
|
|
1823
1835
|
|
|
1836
|
+
/**
|
|
1837
|
+
* Moves every trace of interactivity from one object to its replacement, for reconstruction.
|
|
1838
|
+
*
|
|
1839
|
+
* When `args` or a `primitive`'s `object` changes, R3F builds a new three object and keeps the same
|
|
1840
|
+
* instance. Removing the old object from the interaction state and registering the new one from
|
|
1841
|
+
* scratch makes events *work* again (#3778), but it forgets what was in flight: a pointer resting on
|
|
1842
|
+
* the object fires a second `onPointerEnter` without ever having left, and an active pointer capture
|
|
1843
|
+
* is dropped mid-drag. Rewriting the references instead keeps the interaction continuous across a
|
|
1844
|
+
* swap the user never asked to see (#3744).
|
|
1845
|
+
*
|
|
1846
|
+
* Captures are re-keyed rather than released, so the DOM-level capture on `captureData.target` is
|
|
1847
|
+
* left alone — releasing and re-acquiring it is precisely the glitch being avoided.
|
|
1848
|
+
*
|
|
1849
|
+
* Visibility handlers are deliberately not transferred: that registry is keyed by `object.uuid`, so
|
|
1850
|
+
* the replacement re-registers itself through `applyProps`. The old entry is dropped here so it
|
|
1851
|
+
* cannot outlive the object it described.
|
|
1852
|
+
*/
|
|
1853
|
+
declare function swapInteractivity(store: RootStore, object: Object3D, newObject: Object3D): void;
|
|
1824
1854
|
declare function removeInteractivity(store: RootStore, object: Object3D): void;
|
|
1825
1855
|
declare function createEvents(store: RootStore): {
|
|
1826
1856
|
handlePointer: (name: string) => (event: DomEvent) => void;
|
|
@@ -3246,11 +3276,6 @@ declare function flushSync<R>(fn: () => R): R;
|
|
|
3246
3276
|
declare const context: React$1.Context<RootStore>;
|
|
3247
3277
|
declare const createStore: (invalidate: (state?: RootState, frames?: number, stackFrames?: boolean) => void, advance: (timestamp: number, runGlobalEffects?: boolean, state?: RootState, frame?: XRFrame) => void) => RootStore;
|
|
3248
3278
|
|
|
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
3279
|
/**
|
|
3255
3280
|
* An SSR-friendly useLayoutEffect.
|
|
3256
3281
|
*
|
|
@@ -3734,5 +3759,5 @@ declare function isOnce(value: unknown): value is {
|
|
|
3734
3759
|
*/
|
|
3735
3760
|
declare function Canvas(props: CanvasProps): react_jsx_runtime.JSX.Element;
|
|
3736
3761
|
|
|
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,
|
|
3762
|
+
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 };
|
|
3738
3763
|
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 };
|