@react-three/fiber 10.0.0-canary.e881a4a → 10.0.0-canary.fd3335d
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 +1974 -1835
- package/dist/index.d.cts +28 -11
- package/dist/index.d.mts +28 -11
- package/dist/index.d.ts +28 -11
- package/dist/index.mjs +1976 -1837
- package/dist/legacy.cjs +1970 -1836
- package/dist/legacy.d.cts +27 -14
- package/dist/legacy.d.mts +27 -14
- package/dist/legacy.d.ts +27 -14
- package/dist/legacy.mjs +1972 -1838
- package/dist/webgpu/index.cjs +1964 -1825
- package/dist/webgpu/index.d.cts +27 -11
- package/dist/webgpu/index.d.mts +27 -11
- package/dist/webgpu/index.d.ts +27 -11
- package/dist/webgpu/index.mjs +1966 -1827
- 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/index.d.cts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as three_examples_jsm_inspector_Inspector_js from 'three/examples/jsm/inspector/Inspector.js';
|
|
1
2
|
import * as three_webgpu from 'three/webgpu';
|
|
2
3
|
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
4
|
import * as THREE$1 from 'three';
|
|
@@ -12,7 +13,6 @@ import { FrameTimingState, FrameCallback as FrameCallback$1, SchedulerApi, UseFr
|
|
|
12
13
|
export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, Scheduler, SchedulerApi, UseFrameNextOptions, UseFrameOptions, getScheduler } from '@pmndrs/scheduler';
|
|
13
14
|
import { Options } from 'react-use-measure';
|
|
14
15
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
15
|
-
import { ThreeElement as ThreeElement$1, Euler as Euler$3 } from '@react-three/fiber';
|
|
16
16
|
import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox.js';
|
|
17
17
|
|
|
18
18
|
function _mergeNamespaces(n, m) {
|
|
@@ -48,6 +48,9 @@ function _mergeNamespaces(n, m) {
|
|
|
48
48
|
declare const R3F_BUILD_LEGACY = true;
|
|
49
49
|
declare const R3F_BUILD_WEBGPU = true;
|
|
50
50
|
|
|
51
|
+
/** Lazily load the three Inspector. Keeps it out of the eager module graph — see note above. */
|
|
52
|
+
declare function loadInspector(): Promise<typeof three_examples_jsm_inspector_Inspector_js.Inspector>;
|
|
53
|
+
|
|
51
54
|
var THREE = /*#__PURE__*/_mergeNamespaces({
|
|
52
55
|
__proto__: null,
|
|
53
56
|
CubeRenderTarget: CubeRenderTarget,
|
|
@@ -59,7 +62,8 @@ var THREE = /*#__PURE__*/_mergeNamespaces({
|
|
|
59
62
|
WebGLCubeRenderTarget: WebGLCubeRenderTarget,
|
|
60
63
|
WebGLRenderTarget: WebGLRenderTarget,
|
|
61
64
|
WebGLRenderer: WebGLRenderer,
|
|
62
|
-
WebGLRendererParameters: WebGLRendererParameters
|
|
65
|
+
WebGLRendererParameters: WebGLRendererParameters,
|
|
66
|
+
loadInspector: loadInspector
|
|
63
67
|
}, [three_webgpu]);
|
|
64
68
|
|
|
65
69
|
//* Utility Types ==============================
|
|
@@ -1635,9 +1639,9 @@ type EnvironmentProps = {
|
|
|
1635
1639
|
blur?: number;
|
|
1636
1640
|
backgroundBlurriness?: number;
|
|
1637
1641
|
backgroundIntensity?: number;
|
|
1638
|
-
backgroundRotation?: Euler
|
|
1642
|
+
backgroundRotation?: Euler;
|
|
1639
1643
|
environmentIntensity?: number;
|
|
1640
|
-
environmentRotation?: Euler
|
|
1644
|
+
environmentRotation?: Euler;
|
|
1641
1645
|
map?: Texture$1;
|
|
1642
1646
|
preset?: PresetsType;
|
|
1643
1647
|
scene?: Scene | React$1.RefObject<Scene>;
|
|
@@ -1721,7 +1725,7 @@ declare function EnvironmentCube({ background, scene, blur, backgroundBlurriness
|
|
|
1721
1725
|
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
1726
|
declare module '@react-three/fiber' {
|
|
1723
1727
|
interface ThreeElements {
|
|
1724
|
-
groundProjectedEnvImpl: ThreeElement
|
|
1728
|
+
groundProjectedEnvImpl: ThreeElement<typeof GroundedSkybox>;
|
|
1725
1729
|
}
|
|
1726
1730
|
}
|
|
1727
1731
|
/**
|
|
@@ -1821,6 +1825,24 @@ declare module '@react-three/fiber' {
|
|
|
1821
1825
|
*/
|
|
1822
1826
|
declare function Environment(props: EnvironmentProps): react_jsx_runtime.JSX.Element;
|
|
1823
1827
|
|
|
1828
|
+
/**
|
|
1829
|
+
* Moves every trace of interactivity from one object to its replacement, for reconstruction.
|
|
1830
|
+
*
|
|
1831
|
+
* When `args` or a `primitive`'s `object` changes, R3F builds a new three object and keeps the same
|
|
1832
|
+
* instance. Removing the old object from the interaction state and registering the new one from
|
|
1833
|
+
* scratch makes events *work* again (#3778), but it forgets what was in flight: a pointer resting on
|
|
1834
|
+
* the object fires a second `onPointerEnter` without ever having left, and an active pointer capture
|
|
1835
|
+
* is dropped mid-drag. Rewriting the references instead keeps the interaction continuous across a
|
|
1836
|
+
* swap the user never asked to see (#3744).
|
|
1837
|
+
*
|
|
1838
|
+
* Captures are re-keyed rather than released, so the DOM-level capture on `captureData.target` is
|
|
1839
|
+
* left alone — releasing and re-acquiring it is precisely the glitch being avoided.
|
|
1840
|
+
*
|
|
1841
|
+
* Visibility handlers are deliberately not transferred: that registry is keyed by `object.uuid`, so
|
|
1842
|
+
* the replacement re-registers itself through `applyProps`. The old entry is dropped here so it
|
|
1843
|
+
* cannot outlive the object it described.
|
|
1844
|
+
*/
|
|
1845
|
+
declare function swapInteractivity(store: RootStore, object: Object3D, newObject: Object3D): void;
|
|
1824
1846
|
declare function removeInteractivity(store: RootStore, object: Object3D): void;
|
|
1825
1847
|
declare function createEvents(store: RootStore): {
|
|
1826
1848
|
handlePointer: (name: string) => (event: DomEvent) => void;
|
|
@@ -3246,11 +3268,6 @@ declare function flushSync<R>(fn: () => R): R;
|
|
|
3246
3268
|
declare const context: React$1.Context<RootStore>;
|
|
3247
3269
|
declare const createStore: (invalidate: (state?: RootState, frames?: number, stackFrames?: boolean) => void, advance: (timestamp: number, runGlobalEffects?: boolean, state?: RootState, frame?: XRFrame) => void) => RootStore;
|
|
3248
3270
|
|
|
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
3271
|
/**
|
|
3255
3272
|
* An SSR-friendly useLayoutEffect.
|
|
3256
3273
|
*
|
|
@@ -3734,5 +3751,5 @@ declare function isOnce(value: unknown): value is {
|
|
|
3734
3751
|
*/
|
|
3735
3752
|
declare function Canvas(props: CanvasProps): react_jsx_runtime.JSX.Element;
|
|
3736
3753
|
|
|
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,
|
|
3754
|
+
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
3755
|
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,3 +1,4 @@
|
|
|
1
|
+
import * as three_examples_jsm_inspector_Inspector_js from 'three/examples/jsm/inspector/Inspector.js';
|
|
1
2
|
import * as three_webgpu from 'three/webgpu';
|
|
2
3
|
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
4
|
import * as THREE$1 from 'three';
|
|
@@ -12,7 +13,6 @@ import { FrameTimingState, FrameCallback as FrameCallback$1, SchedulerApi, UseFr
|
|
|
12
13
|
export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, Scheduler, SchedulerApi, UseFrameNextOptions, UseFrameOptions, getScheduler } from '@pmndrs/scheduler';
|
|
13
14
|
import { Options } from 'react-use-measure';
|
|
14
15
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
15
|
-
import { ThreeElement as ThreeElement$1, Euler as Euler$3 } from '@react-three/fiber';
|
|
16
16
|
import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox.js';
|
|
17
17
|
|
|
18
18
|
function _mergeNamespaces(n, m) {
|
|
@@ -48,6 +48,9 @@ function _mergeNamespaces(n, m) {
|
|
|
48
48
|
declare const R3F_BUILD_LEGACY = true;
|
|
49
49
|
declare const R3F_BUILD_WEBGPU = true;
|
|
50
50
|
|
|
51
|
+
/** Lazily load the three Inspector. Keeps it out of the eager module graph — see note above. */
|
|
52
|
+
declare function loadInspector(): Promise<typeof three_examples_jsm_inspector_Inspector_js.Inspector>;
|
|
53
|
+
|
|
51
54
|
var THREE = /*#__PURE__*/_mergeNamespaces({
|
|
52
55
|
__proto__: null,
|
|
53
56
|
CubeRenderTarget: CubeRenderTarget,
|
|
@@ -59,7 +62,8 @@ var THREE = /*#__PURE__*/_mergeNamespaces({
|
|
|
59
62
|
WebGLCubeRenderTarget: WebGLCubeRenderTarget,
|
|
60
63
|
WebGLRenderTarget: WebGLRenderTarget,
|
|
61
64
|
WebGLRenderer: WebGLRenderer,
|
|
62
|
-
WebGLRendererParameters: WebGLRendererParameters
|
|
65
|
+
WebGLRendererParameters: WebGLRendererParameters,
|
|
66
|
+
loadInspector: loadInspector
|
|
63
67
|
}, [three_webgpu]);
|
|
64
68
|
|
|
65
69
|
//* Utility Types ==============================
|
|
@@ -1635,9 +1639,9 @@ type EnvironmentProps = {
|
|
|
1635
1639
|
blur?: number;
|
|
1636
1640
|
backgroundBlurriness?: number;
|
|
1637
1641
|
backgroundIntensity?: number;
|
|
1638
|
-
backgroundRotation?: Euler
|
|
1642
|
+
backgroundRotation?: Euler;
|
|
1639
1643
|
environmentIntensity?: number;
|
|
1640
|
-
environmentRotation?: Euler
|
|
1644
|
+
environmentRotation?: Euler;
|
|
1641
1645
|
map?: Texture$1;
|
|
1642
1646
|
preset?: PresetsType;
|
|
1643
1647
|
scene?: Scene | React$1.RefObject<Scene>;
|
|
@@ -1721,7 +1725,7 @@ declare function EnvironmentCube({ background, scene, blur, backgroundBlurriness
|
|
|
1721
1725
|
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
1726
|
declare module '@react-three/fiber' {
|
|
1723
1727
|
interface ThreeElements {
|
|
1724
|
-
groundProjectedEnvImpl: ThreeElement
|
|
1728
|
+
groundProjectedEnvImpl: ThreeElement<typeof GroundedSkybox>;
|
|
1725
1729
|
}
|
|
1726
1730
|
}
|
|
1727
1731
|
/**
|
|
@@ -1821,6 +1825,24 @@ declare module '@react-three/fiber' {
|
|
|
1821
1825
|
*/
|
|
1822
1826
|
declare function Environment(props: EnvironmentProps): react_jsx_runtime.JSX.Element;
|
|
1823
1827
|
|
|
1828
|
+
/**
|
|
1829
|
+
* Moves every trace of interactivity from one object to its replacement, for reconstruction.
|
|
1830
|
+
*
|
|
1831
|
+
* When `args` or a `primitive`'s `object` changes, R3F builds a new three object and keeps the same
|
|
1832
|
+
* instance. Removing the old object from the interaction state and registering the new one from
|
|
1833
|
+
* scratch makes events *work* again (#3778), but it forgets what was in flight: a pointer resting on
|
|
1834
|
+
* the object fires a second `onPointerEnter` without ever having left, and an active pointer capture
|
|
1835
|
+
* is dropped mid-drag. Rewriting the references instead keeps the interaction continuous across a
|
|
1836
|
+
* swap the user never asked to see (#3744).
|
|
1837
|
+
*
|
|
1838
|
+
* Captures are re-keyed rather than released, so the DOM-level capture on `captureData.target` is
|
|
1839
|
+
* left alone — releasing and re-acquiring it is precisely the glitch being avoided.
|
|
1840
|
+
*
|
|
1841
|
+
* Visibility handlers are deliberately not transferred: that registry is keyed by `object.uuid`, so
|
|
1842
|
+
* the replacement re-registers itself through `applyProps`. The old entry is dropped here so it
|
|
1843
|
+
* cannot outlive the object it described.
|
|
1844
|
+
*/
|
|
1845
|
+
declare function swapInteractivity(store: RootStore, object: Object3D, newObject: Object3D): void;
|
|
1824
1846
|
declare function removeInteractivity(store: RootStore, object: Object3D): void;
|
|
1825
1847
|
declare function createEvents(store: RootStore): {
|
|
1826
1848
|
handlePointer: (name: string) => (event: DomEvent) => void;
|
|
@@ -3246,11 +3268,6 @@ declare function flushSync<R>(fn: () => R): R;
|
|
|
3246
3268
|
declare const context: React$1.Context<RootStore>;
|
|
3247
3269
|
declare const createStore: (invalidate: (state?: RootState, frames?: number, stackFrames?: boolean) => void, advance: (timestamp: number, runGlobalEffects?: boolean, state?: RootState, frame?: XRFrame) => void) => RootStore;
|
|
3248
3270
|
|
|
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
3271
|
/**
|
|
3255
3272
|
* An SSR-friendly useLayoutEffect.
|
|
3256
3273
|
*
|
|
@@ -3734,5 +3751,5 @@ declare function isOnce(value: unknown): value is {
|
|
|
3734
3751
|
*/
|
|
3735
3752
|
declare function Canvas(props: CanvasProps): react_jsx_runtime.JSX.Element;
|
|
3736
3753
|
|
|
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,
|
|
3754
|
+
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
3755
|
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,3 +1,4 @@
|
|
|
1
|
+
import * as three_examples_jsm_inspector_Inspector_js from 'three/examples/jsm/inspector/Inspector.js';
|
|
1
2
|
import * as three_webgpu from 'three/webgpu';
|
|
2
3
|
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
4
|
import * as THREE$1 from 'three';
|
|
@@ -12,7 +13,6 @@ import { FrameTimingState, FrameCallback as FrameCallback$1, SchedulerApi, UseFr
|
|
|
12
13
|
export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, Scheduler, SchedulerApi, UseFrameNextOptions, UseFrameOptions, getScheduler } from '@pmndrs/scheduler';
|
|
13
14
|
import { Options } from 'react-use-measure';
|
|
14
15
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
15
|
-
import { ThreeElement as ThreeElement$1, Euler as Euler$3 } from '@react-three/fiber';
|
|
16
16
|
import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox.js';
|
|
17
17
|
|
|
18
18
|
function _mergeNamespaces(n, m) {
|
|
@@ -48,6 +48,9 @@ function _mergeNamespaces(n, m) {
|
|
|
48
48
|
declare const R3F_BUILD_LEGACY = true;
|
|
49
49
|
declare const R3F_BUILD_WEBGPU = true;
|
|
50
50
|
|
|
51
|
+
/** Lazily load the three Inspector. Keeps it out of the eager module graph — see note above. */
|
|
52
|
+
declare function loadInspector(): Promise<typeof three_examples_jsm_inspector_Inspector_js.Inspector>;
|
|
53
|
+
|
|
51
54
|
var THREE = /*#__PURE__*/_mergeNamespaces({
|
|
52
55
|
__proto__: null,
|
|
53
56
|
CubeRenderTarget: CubeRenderTarget,
|
|
@@ -59,7 +62,8 @@ var THREE = /*#__PURE__*/_mergeNamespaces({
|
|
|
59
62
|
WebGLCubeRenderTarget: WebGLCubeRenderTarget,
|
|
60
63
|
WebGLRenderTarget: WebGLRenderTarget,
|
|
61
64
|
WebGLRenderer: WebGLRenderer,
|
|
62
|
-
WebGLRendererParameters: WebGLRendererParameters
|
|
65
|
+
WebGLRendererParameters: WebGLRendererParameters,
|
|
66
|
+
loadInspector: loadInspector
|
|
63
67
|
}, [three_webgpu]);
|
|
64
68
|
|
|
65
69
|
//* Utility Types ==============================
|
|
@@ -1635,9 +1639,9 @@ type EnvironmentProps = {
|
|
|
1635
1639
|
blur?: number;
|
|
1636
1640
|
backgroundBlurriness?: number;
|
|
1637
1641
|
backgroundIntensity?: number;
|
|
1638
|
-
backgroundRotation?: Euler
|
|
1642
|
+
backgroundRotation?: Euler;
|
|
1639
1643
|
environmentIntensity?: number;
|
|
1640
|
-
environmentRotation?: Euler
|
|
1644
|
+
environmentRotation?: Euler;
|
|
1641
1645
|
map?: Texture$1;
|
|
1642
1646
|
preset?: PresetsType;
|
|
1643
1647
|
scene?: Scene | React$1.RefObject<Scene>;
|
|
@@ -1721,7 +1725,7 @@ declare function EnvironmentCube({ background, scene, blur, backgroundBlurriness
|
|
|
1721
1725
|
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
1726
|
declare module '@react-three/fiber' {
|
|
1723
1727
|
interface ThreeElements {
|
|
1724
|
-
groundProjectedEnvImpl: ThreeElement
|
|
1728
|
+
groundProjectedEnvImpl: ThreeElement<typeof GroundedSkybox>;
|
|
1725
1729
|
}
|
|
1726
1730
|
}
|
|
1727
1731
|
/**
|
|
@@ -1821,6 +1825,24 @@ declare module '@react-three/fiber' {
|
|
|
1821
1825
|
*/
|
|
1822
1826
|
declare function Environment(props: EnvironmentProps): react_jsx_runtime.JSX.Element;
|
|
1823
1827
|
|
|
1828
|
+
/**
|
|
1829
|
+
* Moves every trace of interactivity from one object to its replacement, for reconstruction.
|
|
1830
|
+
*
|
|
1831
|
+
* When `args` or a `primitive`'s `object` changes, R3F builds a new three object and keeps the same
|
|
1832
|
+
* instance. Removing the old object from the interaction state and registering the new one from
|
|
1833
|
+
* scratch makes events *work* again (#3778), but it forgets what was in flight: a pointer resting on
|
|
1834
|
+
* the object fires a second `onPointerEnter` without ever having left, and an active pointer capture
|
|
1835
|
+
* is dropped mid-drag. Rewriting the references instead keeps the interaction continuous across a
|
|
1836
|
+
* swap the user never asked to see (#3744).
|
|
1837
|
+
*
|
|
1838
|
+
* Captures are re-keyed rather than released, so the DOM-level capture on `captureData.target` is
|
|
1839
|
+
* left alone — releasing and re-acquiring it is precisely the glitch being avoided.
|
|
1840
|
+
*
|
|
1841
|
+
* Visibility handlers are deliberately not transferred: that registry is keyed by `object.uuid`, so
|
|
1842
|
+
* the replacement re-registers itself through `applyProps`. The old entry is dropped here so it
|
|
1843
|
+
* cannot outlive the object it described.
|
|
1844
|
+
*/
|
|
1845
|
+
declare function swapInteractivity(store: RootStore, object: Object3D, newObject: Object3D): void;
|
|
1824
1846
|
declare function removeInteractivity(store: RootStore, object: Object3D): void;
|
|
1825
1847
|
declare function createEvents(store: RootStore): {
|
|
1826
1848
|
handlePointer: (name: string) => (event: DomEvent) => void;
|
|
@@ -3246,11 +3268,6 @@ declare function flushSync<R>(fn: () => R): R;
|
|
|
3246
3268
|
declare const context: React$1.Context<RootStore>;
|
|
3247
3269
|
declare const createStore: (invalidate: (state?: RootState, frames?: number, stackFrames?: boolean) => void, advance: (timestamp: number, runGlobalEffects?: boolean, state?: RootState, frame?: XRFrame) => void) => RootStore;
|
|
3248
3270
|
|
|
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
3271
|
/**
|
|
3255
3272
|
* An SSR-friendly useLayoutEffect.
|
|
3256
3273
|
*
|
|
@@ -3734,5 +3751,5 @@ declare function isOnce(value: unknown): value is {
|
|
|
3734
3751
|
*/
|
|
3735
3752
|
declare function Canvas(props: CanvasProps): react_jsx_runtime.JSX.Element;
|
|
3736
3753
|
|
|
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,
|
|
3754
|
+
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
3755
|
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 };
|