@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/webgpu/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, WebGPURendererParameters } from 'three/webgpu';
|
|
3
4
|
import { Inspector } from 'three/addons/inspector/Inspector.js';
|
|
@@ -11,7 +12,6 @@ import { FrameTimingState, FrameCallback as FrameCallback$1, SchedulerApi, UseFr
|
|
|
11
12
|
export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, Scheduler, SchedulerApi, UseFrameNextOptions, UseFrameOptions, getScheduler } from '@pmndrs/scheduler';
|
|
12
13
|
import { Options } from 'react-use-measure';
|
|
13
14
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
14
|
-
import { ThreeElement as ThreeElement$1, Euler as Euler$3 } from '@react-three/fiber';
|
|
15
15
|
import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox.js';
|
|
16
16
|
|
|
17
17
|
function _mergeNamespaces(n, m) {
|
|
@@ -41,6 +41,8 @@ function _mergeNamespaces(n, m) {
|
|
|
41
41
|
declare const R3F_BUILD_LEGACY = false;
|
|
42
42
|
declare const R3F_BUILD_WEBGPU = true;
|
|
43
43
|
|
|
44
|
+
/** Lazily load the three Inspector. Keeps it out of the eager module graph — see note above. */
|
|
45
|
+
declare function loadInspector(): Promise<typeof three_examples_jsm_inspector_Inspector_js.Inspector>;
|
|
44
46
|
declare const WebGLRenderer: {
|
|
45
47
|
new (): {};
|
|
46
48
|
};
|
|
@@ -62,7 +64,8 @@ var THREE = /*#__PURE__*/_mergeNamespaces({
|
|
|
62
64
|
WebGLRenderTarget: WebGLRenderTarget,
|
|
63
65
|
WebGLRenderer: WebGLRenderer,
|
|
64
66
|
WebGLRendererParameters: WebGLRendererParameters,
|
|
65
|
-
WebGLShadowMap: WebGLShadowMap
|
|
67
|
+
WebGLShadowMap: WebGLShadowMap,
|
|
68
|
+
loadInspector: loadInspector
|
|
66
69
|
}, [three_webgpu]);
|
|
67
70
|
|
|
68
71
|
//* Utility Types ==============================
|
|
@@ -1638,9 +1641,9 @@ type EnvironmentProps = {
|
|
|
1638
1641
|
blur?: number;
|
|
1639
1642
|
backgroundBlurriness?: number;
|
|
1640
1643
|
backgroundIntensity?: number;
|
|
1641
|
-
backgroundRotation?: Euler
|
|
1644
|
+
backgroundRotation?: Euler;
|
|
1642
1645
|
environmentIntensity?: number;
|
|
1643
|
-
environmentRotation?: Euler
|
|
1646
|
+
environmentRotation?: Euler;
|
|
1644
1647
|
map?: Texture$1;
|
|
1645
1648
|
preset?: PresetsType;
|
|
1646
1649
|
scene?: Scene | React$1.RefObject<Scene>;
|
|
@@ -1724,7 +1727,7 @@ declare function EnvironmentCube({ background, scene, blur, backgroundBlurriness
|
|
|
1724
1727
|
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;
|
|
1725
1728
|
declare module '@react-three/fiber' {
|
|
1726
1729
|
interface ThreeElements {
|
|
1727
|
-
groundProjectedEnvImpl: ThreeElement
|
|
1730
|
+
groundProjectedEnvImpl: ThreeElement<typeof GroundedSkybox>;
|
|
1728
1731
|
}
|
|
1729
1732
|
}
|
|
1730
1733
|
/**
|
|
@@ -1824,6 +1827,24 @@ declare module '@react-three/fiber' {
|
|
|
1824
1827
|
*/
|
|
1825
1828
|
declare function Environment(props: EnvironmentProps): react_jsx_runtime.JSX.Element;
|
|
1826
1829
|
|
|
1830
|
+
/**
|
|
1831
|
+
* Moves every trace of interactivity from one object to its replacement, for reconstruction.
|
|
1832
|
+
*
|
|
1833
|
+
* When `args` or a `primitive`'s `object` changes, R3F builds a new three object and keeps the same
|
|
1834
|
+
* instance. Removing the old object from the interaction state and registering the new one from
|
|
1835
|
+
* scratch makes events *work* again (#3778), but it forgets what was in flight: a pointer resting on
|
|
1836
|
+
* the object fires a second `onPointerEnter` without ever having left, and an active pointer capture
|
|
1837
|
+
* is dropped mid-drag. Rewriting the references instead keeps the interaction continuous across a
|
|
1838
|
+
* swap the user never asked to see (#3744).
|
|
1839
|
+
*
|
|
1840
|
+
* Captures are re-keyed rather than released, so the DOM-level capture on `captureData.target` is
|
|
1841
|
+
* left alone — releasing and re-acquiring it is precisely the glitch being avoided.
|
|
1842
|
+
*
|
|
1843
|
+
* Visibility handlers are deliberately not transferred: that registry is keyed by `object.uuid`, so
|
|
1844
|
+
* the replacement re-registers itself through `applyProps`. The old entry is dropped here so it
|
|
1845
|
+
* cannot outlive the object it described.
|
|
1846
|
+
*/
|
|
1847
|
+
declare function swapInteractivity(store: RootStore, object: Object3D, newObject: Object3D): void;
|
|
1827
1848
|
declare function removeInteractivity(store: RootStore, object: Object3D): void;
|
|
1828
1849
|
declare function createEvents(store: RootStore): {
|
|
1829
1850
|
handlePointer: (name: string) => (event: DomEvent) => void;
|
|
@@ -3249,11 +3270,6 @@ declare function flushSync<R>(fn: () => R): R;
|
|
|
3249
3270
|
declare const context: React$1.Context<RootStore>;
|
|
3250
3271
|
declare const createStore: (invalidate: (state?: RootState, frames?: number, stackFrames?: boolean) => void, advance: (timestamp: number, runGlobalEffects?: boolean, state?: RootState, frame?: XRFrame) => void) => RootStore;
|
|
3251
3272
|
|
|
3252
|
-
/**
|
|
3253
|
-
* Safely flush async effects when testing, simulating a legacy root.
|
|
3254
|
-
* @deprecated Import from React instead. import { act } from 'react'
|
|
3255
|
-
*/
|
|
3256
|
-
declare const act: typeof React$1.act;
|
|
3257
3273
|
/**
|
|
3258
3274
|
* An SSR-friendly useLayoutEffect.
|
|
3259
3275
|
*
|
|
@@ -4151,5 +4167,5 @@ interface WebGPURootState extends Omit<RootState, 'renderer' | 'gl' | 'internal'
|
|
|
4151
4167
|
internal: WebGPUInternalState
|
|
4152
4168
|
}
|
|
4153
4169
|
|
|
4154
|
-
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,
|
|
4170
|
+
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, clearNodeScope, clearRootNodes, clearRootUniforms, clearScope, context, createEvents, createPointerEvents, createPortal, createRoot, createScopedStore, createStore, createTextureOperations, 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, rebuildAllBuffers, rebuildAllNodes, rebuildAllStorage, rebuildAllUniforms, reconciler, registerPrimary, removeInteractivity, removeNodes, removeUniforms, resolve, swapInteractivity, unmountComponentAtNode, unregisterPrimary, updateCamera, updateFrustum, useBridge, useBuffers, useEnvironment, useFrame, useGPUStorage, useGraph, useInstanceHandle, useIsomorphicLayoutEffect, useLoader, useLocalNodes, useMutableCallback, useNodes, useRenderPipeline, useRenderTarget, useStore, useTexture, useTextures, useThree, useUniform, useUniforms, waitForPrimary };
|
|
4155
4171
|
export type { Act, Args, ArgsProp, AttachFnType, AttachType, BackgroundConfig, BackgroundProp, BaseRendererProps, Bridge, BufferCreator, BufferLike, BufferRecord, BufferStore, BuffersWithUtils, Camera, CameraProps, CanvasProps, CanvasSchedulerConfig, Catalogue, ClearBuffersFn, ClearNodesFn, ClearStorageFn, ClearUniformsFn, Color, ColorManagementConfig, ComputeFunction, ConstructorRepresentation, CreatorState, DefaultGLProps, DefaultRendererProps, Disposable, DisposeBuffersFn, DisposeOptions, DisposeStorageFn, 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, WebGPUInternalState as InternalState, Intersection, IntersectionEvent, IsAllOptional, IsOptional, Layers, LegacyInternalState, LegacyRenderer, LegacyRootState, LoaderInstance, LoaderLike, LoaderResult, LocalNodeCreator, MappedTextureType, MathProps, MathRepresentation, MathType, MathTypes, Matrix3, Matrix4, Mutable, MutableOrReadonlyParameters, NodeCreator, NodeProps, NodeRecord, NodesWithUtils, NonFunctionKeys, ObjectMap, OffscreenCanvas$1 as OffscreenCanvas, Overwrite, Performance, PointerCaptureTarget, PointerState, PresetsType, PrimaryCanvasEntry, Properties, Quaternion, WebGPUR3FRenderer as R3FRenderer, RaycastableRepresentation, ReactProps, RebuildBuffersFn, RebuildNodesFn, RebuildStorageFn, RebuildUniformsFn, ReconcilerRoot, RemoveBuffersFn, RemoveNodesFn, RemoveStorageFn, RemoveUniformsFn, RenderCallback, RenderProps, RenderTargetOptions, Renderer, RendererConfigExtended, RendererFactory, RendererProps, Root, WebGPURootState as RootState, RootStore, ScopedStoreType, SetBlock, Size, StorageCreator, StorageLike, StorageRecord, StorageStore, StorageWithUtils, Subscription, TSLNode, TSLNodeInput, TextureEntry, TextureInput, TextureNode, TextureOperations, TextureResult, ThreeCamera, ThreeElement, ThreeElements, ThreeElementsImpl, ThreeEvent, ThreeExports, ThreeToJSXElements, UnblockProps, UniformCreator, UniformValue, UniformsWithUtils, UseTextureOptions, UseTexturesReturn, Vector2, Vector3, Vector4, VectorRepresentation, Viewport, VisibilityEntry, WebGLDefaultProps, WebGLProps, WebGLShadowConfig, WebGPUDefaultProps, WebGPUProps, WebGPUShadowConfig, XRManager, XRPointerConfig };
|
package/dist/webgpu/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, WebGPURendererParameters } from 'three/webgpu';
|
|
3
4
|
import { Inspector } from 'three/addons/inspector/Inspector.js';
|
|
@@ -11,7 +12,6 @@ import { FrameTimingState, FrameCallback as FrameCallback$1, SchedulerApi, UseFr
|
|
|
11
12
|
export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, Scheduler, SchedulerApi, UseFrameNextOptions, UseFrameOptions, getScheduler } from '@pmndrs/scheduler';
|
|
12
13
|
import { Options } from 'react-use-measure';
|
|
13
14
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
14
|
-
import { ThreeElement as ThreeElement$1, Euler as Euler$3 } from '@react-three/fiber';
|
|
15
15
|
import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox.js';
|
|
16
16
|
|
|
17
17
|
function _mergeNamespaces(n, m) {
|
|
@@ -41,6 +41,8 @@ function _mergeNamespaces(n, m) {
|
|
|
41
41
|
declare const R3F_BUILD_LEGACY = false;
|
|
42
42
|
declare const R3F_BUILD_WEBGPU = true;
|
|
43
43
|
|
|
44
|
+
/** Lazily load the three Inspector. Keeps it out of the eager module graph — see note above. */
|
|
45
|
+
declare function loadInspector(): Promise<typeof three_examples_jsm_inspector_Inspector_js.Inspector>;
|
|
44
46
|
declare const WebGLRenderer: {
|
|
45
47
|
new (): {};
|
|
46
48
|
};
|
|
@@ -62,7 +64,8 @@ var THREE = /*#__PURE__*/_mergeNamespaces({
|
|
|
62
64
|
WebGLRenderTarget: WebGLRenderTarget,
|
|
63
65
|
WebGLRenderer: WebGLRenderer,
|
|
64
66
|
WebGLRendererParameters: WebGLRendererParameters,
|
|
65
|
-
WebGLShadowMap: WebGLShadowMap
|
|
67
|
+
WebGLShadowMap: WebGLShadowMap,
|
|
68
|
+
loadInspector: loadInspector
|
|
66
69
|
}, [three_webgpu]);
|
|
67
70
|
|
|
68
71
|
//* Utility Types ==============================
|
|
@@ -1638,9 +1641,9 @@ type EnvironmentProps = {
|
|
|
1638
1641
|
blur?: number;
|
|
1639
1642
|
backgroundBlurriness?: number;
|
|
1640
1643
|
backgroundIntensity?: number;
|
|
1641
|
-
backgroundRotation?: Euler
|
|
1644
|
+
backgroundRotation?: Euler;
|
|
1642
1645
|
environmentIntensity?: number;
|
|
1643
|
-
environmentRotation?: Euler
|
|
1646
|
+
environmentRotation?: Euler;
|
|
1644
1647
|
map?: Texture$1;
|
|
1645
1648
|
preset?: PresetsType;
|
|
1646
1649
|
scene?: Scene | React$1.RefObject<Scene>;
|
|
@@ -1724,7 +1727,7 @@ declare function EnvironmentCube({ background, scene, blur, backgroundBlurriness
|
|
|
1724
1727
|
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;
|
|
1725
1728
|
declare module '@react-three/fiber' {
|
|
1726
1729
|
interface ThreeElements {
|
|
1727
|
-
groundProjectedEnvImpl: ThreeElement
|
|
1730
|
+
groundProjectedEnvImpl: ThreeElement<typeof GroundedSkybox>;
|
|
1728
1731
|
}
|
|
1729
1732
|
}
|
|
1730
1733
|
/**
|
|
@@ -1824,6 +1827,24 @@ declare module '@react-three/fiber' {
|
|
|
1824
1827
|
*/
|
|
1825
1828
|
declare function Environment(props: EnvironmentProps): react_jsx_runtime.JSX.Element;
|
|
1826
1829
|
|
|
1830
|
+
/**
|
|
1831
|
+
* Moves every trace of interactivity from one object to its replacement, for reconstruction.
|
|
1832
|
+
*
|
|
1833
|
+
* When `args` or a `primitive`'s `object` changes, R3F builds a new three object and keeps the same
|
|
1834
|
+
* instance. Removing the old object from the interaction state and registering the new one from
|
|
1835
|
+
* scratch makes events *work* again (#3778), but it forgets what was in flight: a pointer resting on
|
|
1836
|
+
* the object fires a second `onPointerEnter` without ever having left, and an active pointer capture
|
|
1837
|
+
* is dropped mid-drag. Rewriting the references instead keeps the interaction continuous across a
|
|
1838
|
+
* swap the user never asked to see (#3744).
|
|
1839
|
+
*
|
|
1840
|
+
* Captures are re-keyed rather than released, so the DOM-level capture on `captureData.target` is
|
|
1841
|
+
* left alone — releasing and re-acquiring it is precisely the glitch being avoided.
|
|
1842
|
+
*
|
|
1843
|
+
* Visibility handlers are deliberately not transferred: that registry is keyed by `object.uuid`, so
|
|
1844
|
+
* the replacement re-registers itself through `applyProps`. The old entry is dropped here so it
|
|
1845
|
+
* cannot outlive the object it described.
|
|
1846
|
+
*/
|
|
1847
|
+
declare function swapInteractivity(store: RootStore, object: Object3D, newObject: Object3D): void;
|
|
1827
1848
|
declare function removeInteractivity(store: RootStore, object: Object3D): void;
|
|
1828
1849
|
declare function createEvents(store: RootStore): {
|
|
1829
1850
|
handlePointer: (name: string) => (event: DomEvent) => void;
|
|
@@ -3249,11 +3270,6 @@ declare function flushSync<R>(fn: () => R): R;
|
|
|
3249
3270
|
declare const context: React$1.Context<RootStore>;
|
|
3250
3271
|
declare const createStore: (invalidate: (state?: RootState, frames?: number, stackFrames?: boolean) => void, advance: (timestamp: number, runGlobalEffects?: boolean, state?: RootState, frame?: XRFrame) => void) => RootStore;
|
|
3251
3272
|
|
|
3252
|
-
/**
|
|
3253
|
-
* Safely flush async effects when testing, simulating a legacy root.
|
|
3254
|
-
* @deprecated Import from React instead. import { act } from 'react'
|
|
3255
|
-
*/
|
|
3256
|
-
declare const act: typeof React$1.act;
|
|
3257
3273
|
/**
|
|
3258
3274
|
* An SSR-friendly useLayoutEffect.
|
|
3259
3275
|
*
|
|
@@ -4151,5 +4167,5 @@ interface WebGPURootState extends Omit<RootState, 'renderer' | 'gl' | 'internal'
|
|
|
4151
4167
|
internal: WebGPUInternalState
|
|
4152
4168
|
}
|
|
4153
4169
|
|
|
4154
|
-
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,
|
|
4170
|
+
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, clearNodeScope, clearRootNodes, clearRootUniforms, clearScope, context, createEvents, createPointerEvents, createPortal, createRoot, createScopedStore, createStore, createTextureOperations, 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, rebuildAllBuffers, rebuildAllNodes, rebuildAllStorage, rebuildAllUniforms, reconciler, registerPrimary, removeInteractivity, removeNodes, removeUniforms, resolve, swapInteractivity, unmountComponentAtNode, unregisterPrimary, updateCamera, updateFrustum, useBridge, useBuffers, useEnvironment, useFrame, useGPUStorage, useGraph, useInstanceHandle, useIsomorphicLayoutEffect, useLoader, useLocalNodes, useMutableCallback, useNodes, useRenderPipeline, useRenderTarget, useStore, useTexture, useTextures, useThree, useUniform, useUniforms, waitForPrimary };
|
|
4155
4171
|
export type { Act, Args, ArgsProp, AttachFnType, AttachType, BackgroundConfig, BackgroundProp, BaseRendererProps, Bridge, BufferCreator, BufferLike, BufferRecord, BufferStore, BuffersWithUtils, Camera, CameraProps, CanvasProps, CanvasSchedulerConfig, Catalogue, ClearBuffersFn, ClearNodesFn, ClearStorageFn, ClearUniformsFn, Color, ColorManagementConfig, ComputeFunction, ConstructorRepresentation, CreatorState, DefaultGLProps, DefaultRendererProps, Disposable, DisposeBuffersFn, DisposeOptions, DisposeStorageFn, 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, WebGPUInternalState as InternalState, Intersection, IntersectionEvent, IsAllOptional, IsOptional, Layers, LegacyInternalState, LegacyRenderer, LegacyRootState, LoaderInstance, LoaderLike, LoaderResult, LocalNodeCreator, MappedTextureType, MathProps, MathRepresentation, MathType, MathTypes, Matrix3, Matrix4, Mutable, MutableOrReadonlyParameters, NodeCreator, NodeProps, NodeRecord, NodesWithUtils, NonFunctionKeys, ObjectMap, OffscreenCanvas$1 as OffscreenCanvas, Overwrite, Performance, PointerCaptureTarget, PointerState, PresetsType, PrimaryCanvasEntry, Properties, Quaternion, WebGPUR3FRenderer as R3FRenderer, RaycastableRepresentation, ReactProps, RebuildBuffersFn, RebuildNodesFn, RebuildStorageFn, RebuildUniformsFn, ReconcilerRoot, RemoveBuffersFn, RemoveNodesFn, RemoveStorageFn, RemoveUniformsFn, RenderCallback, RenderProps, RenderTargetOptions, Renderer, RendererConfigExtended, RendererFactory, RendererProps, Root, WebGPURootState as RootState, RootStore, ScopedStoreType, SetBlock, Size, StorageCreator, StorageLike, StorageRecord, StorageStore, StorageWithUtils, Subscription, TSLNode, TSLNodeInput, TextureEntry, TextureInput, TextureNode, TextureOperations, TextureResult, ThreeCamera, ThreeElement, ThreeElements, ThreeElementsImpl, ThreeEvent, ThreeExports, ThreeToJSXElements, UnblockProps, UniformCreator, UniformValue, UniformsWithUtils, UseTextureOptions, UseTexturesReturn, Vector2, Vector3, Vector4, VectorRepresentation, Viewport, VisibilityEntry, WebGLDefaultProps, WebGLProps, WebGLShadowConfig, WebGPUDefaultProps, WebGPUProps, WebGPUShadowConfig, XRManager, XRPointerConfig };
|
package/dist/webgpu/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, WebGPURendererParameters } from 'three/webgpu';
|
|
3
4
|
import { Inspector } from 'three/addons/inspector/Inspector.js';
|
|
@@ -11,7 +12,6 @@ import { FrameTimingState, FrameCallback as FrameCallback$1, SchedulerApi, UseFr
|
|
|
11
12
|
export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, Scheduler, SchedulerApi, UseFrameNextOptions, UseFrameOptions, getScheduler } from '@pmndrs/scheduler';
|
|
12
13
|
import { Options } from 'react-use-measure';
|
|
13
14
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
14
|
-
import { ThreeElement as ThreeElement$1, Euler as Euler$3 } from '@react-three/fiber';
|
|
15
15
|
import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox.js';
|
|
16
16
|
|
|
17
17
|
function _mergeNamespaces(n, m) {
|
|
@@ -41,6 +41,8 @@ function _mergeNamespaces(n, m) {
|
|
|
41
41
|
declare const R3F_BUILD_LEGACY = false;
|
|
42
42
|
declare const R3F_BUILD_WEBGPU = true;
|
|
43
43
|
|
|
44
|
+
/** Lazily load the three Inspector. Keeps it out of the eager module graph — see note above. */
|
|
45
|
+
declare function loadInspector(): Promise<typeof three_examples_jsm_inspector_Inspector_js.Inspector>;
|
|
44
46
|
declare const WebGLRenderer: {
|
|
45
47
|
new (): {};
|
|
46
48
|
};
|
|
@@ -62,7 +64,8 @@ var THREE = /*#__PURE__*/_mergeNamespaces({
|
|
|
62
64
|
WebGLRenderTarget: WebGLRenderTarget,
|
|
63
65
|
WebGLRenderer: WebGLRenderer,
|
|
64
66
|
WebGLRendererParameters: WebGLRendererParameters,
|
|
65
|
-
WebGLShadowMap: WebGLShadowMap
|
|
67
|
+
WebGLShadowMap: WebGLShadowMap,
|
|
68
|
+
loadInspector: loadInspector
|
|
66
69
|
}, [three_webgpu]);
|
|
67
70
|
|
|
68
71
|
//* Utility Types ==============================
|
|
@@ -1638,9 +1641,9 @@ type EnvironmentProps = {
|
|
|
1638
1641
|
blur?: number;
|
|
1639
1642
|
backgroundBlurriness?: number;
|
|
1640
1643
|
backgroundIntensity?: number;
|
|
1641
|
-
backgroundRotation?: Euler
|
|
1644
|
+
backgroundRotation?: Euler;
|
|
1642
1645
|
environmentIntensity?: number;
|
|
1643
|
-
environmentRotation?: Euler
|
|
1646
|
+
environmentRotation?: Euler;
|
|
1644
1647
|
map?: Texture$1;
|
|
1645
1648
|
preset?: PresetsType;
|
|
1646
1649
|
scene?: Scene | React$1.RefObject<Scene>;
|
|
@@ -1724,7 +1727,7 @@ declare function EnvironmentCube({ background, scene, blur, backgroundBlurriness
|
|
|
1724
1727
|
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;
|
|
1725
1728
|
declare module '@react-three/fiber' {
|
|
1726
1729
|
interface ThreeElements {
|
|
1727
|
-
groundProjectedEnvImpl: ThreeElement
|
|
1730
|
+
groundProjectedEnvImpl: ThreeElement<typeof GroundedSkybox>;
|
|
1728
1731
|
}
|
|
1729
1732
|
}
|
|
1730
1733
|
/**
|
|
@@ -1824,6 +1827,24 @@ declare module '@react-three/fiber' {
|
|
|
1824
1827
|
*/
|
|
1825
1828
|
declare function Environment(props: EnvironmentProps): react_jsx_runtime.JSX.Element;
|
|
1826
1829
|
|
|
1830
|
+
/**
|
|
1831
|
+
* Moves every trace of interactivity from one object to its replacement, for reconstruction.
|
|
1832
|
+
*
|
|
1833
|
+
* When `args` or a `primitive`'s `object` changes, R3F builds a new three object and keeps the same
|
|
1834
|
+
* instance. Removing the old object from the interaction state and registering the new one from
|
|
1835
|
+
* scratch makes events *work* again (#3778), but it forgets what was in flight: a pointer resting on
|
|
1836
|
+
* the object fires a second `onPointerEnter` without ever having left, and an active pointer capture
|
|
1837
|
+
* is dropped mid-drag. Rewriting the references instead keeps the interaction continuous across a
|
|
1838
|
+
* swap the user never asked to see (#3744).
|
|
1839
|
+
*
|
|
1840
|
+
* Captures are re-keyed rather than released, so the DOM-level capture on `captureData.target` is
|
|
1841
|
+
* left alone — releasing and re-acquiring it is precisely the glitch being avoided.
|
|
1842
|
+
*
|
|
1843
|
+
* Visibility handlers are deliberately not transferred: that registry is keyed by `object.uuid`, so
|
|
1844
|
+
* the replacement re-registers itself through `applyProps`. The old entry is dropped here so it
|
|
1845
|
+
* cannot outlive the object it described.
|
|
1846
|
+
*/
|
|
1847
|
+
declare function swapInteractivity(store: RootStore, object: Object3D, newObject: Object3D): void;
|
|
1827
1848
|
declare function removeInteractivity(store: RootStore, object: Object3D): void;
|
|
1828
1849
|
declare function createEvents(store: RootStore): {
|
|
1829
1850
|
handlePointer: (name: string) => (event: DomEvent) => void;
|
|
@@ -3249,11 +3270,6 @@ declare function flushSync<R>(fn: () => R): R;
|
|
|
3249
3270
|
declare const context: React$1.Context<RootStore>;
|
|
3250
3271
|
declare const createStore: (invalidate: (state?: RootState, frames?: number, stackFrames?: boolean) => void, advance: (timestamp: number, runGlobalEffects?: boolean, state?: RootState, frame?: XRFrame) => void) => RootStore;
|
|
3251
3272
|
|
|
3252
|
-
/**
|
|
3253
|
-
* Safely flush async effects when testing, simulating a legacy root.
|
|
3254
|
-
* @deprecated Import from React instead. import { act } from 'react'
|
|
3255
|
-
*/
|
|
3256
|
-
declare const act: typeof React$1.act;
|
|
3257
3273
|
/**
|
|
3258
3274
|
* An SSR-friendly useLayoutEffect.
|
|
3259
3275
|
*
|
|
@@ -4151,5 +4167,5 @@ interface WebGPURootState extends Omit<RootState, 'renderer' | 'gl' | 'internal'
|
|
|
4151
4167
|
internal: WebGPUInternalState
|
|
4152
4168
|
}
|
|
4153
4169
|
|
|
4154
|
-
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,
|
|
4170
|
+
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, clearNodeScope, clearRootNodes, clearRootUniforms, clearScope, context, createEvents, createPointerEvents, createPortal, createRoot, createScopedStore, createStore, createTextureOperations, 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, rebuildAllBuffers, rebuildAllNodes, rebuildAllStorage, rebuildAllUniforms, reconciler, registerPrimary, removeInteractivity, removeNodes, removeUniforms, resolve, swapInteractivity, unmountComponentAtNode, unregisterPrimary, updateCamera, updateFrustum, useBridge, useBuffers, useEnvironment, useFrame, useGPUStorage, useGraph, useInstanceHandle, useIsomorphicLayoutEffect, useLoader, useLocalNodes, useMutableCallback, useNodes, useRenderPipeline, useRenderTarget, useStore, useTexture, useTextures, useThree, useUniform, useUniforms, waitForPrimary };
|
|
4155
4171
|
export type { Act, Args, ArgsProp, AttachFnType, AttachType, BackgroundConfig, BackgroundProp, BaseRendererProps, Bridge, BufferCreator, BufferLike, BufferRecord, BufferStore, BuffersWithUtils, Camera, CameraProps, CanvasProps, CanvasSchedulerConfig, Catalogue, ClearBuffersFn, ClearNodesFn, ClearStorageFn, ClearUniformsFn, Color, ColorManagementConfig, ComputeFunction, ConstructorRepresentation, CreatorState, DefaultGLProps, DefaultRendererProps, Disposable, DisposeBuffersFn, DisposeOptions, DisposeStorageFn, 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, WebGPUInternalState as InternalState, Intersection, IntersectionEvent, IsAllOptional, IsOptional, Layers, LegacyInternalState, LegacyRenderer, LegacyRootState, LoaderInstance, LoaderLike, LoaderResult, LocalNodeCreator, MappedTextureType, MathProps, MathRepresentation, MathType, MathTypes, Matrix3, Matrix4, Mutable, MutableOrReadonlyParameters, NodeCreator, NodeProps, NodeRecord, NodesWithUtils, NonFunctionKeys, ObjectMap, OffscreenCanvas$1 as OffscreenCanvas, Overwrite, Performance, PointerCaptureTarget, PointerState, PresetsType, PrimaryCanvasEntry, Properties, Quaternion, WebGPUR3FRenderer as R3FRenderer, RaycastableRepresentation, ReactProps, RebuildBuffersFn, RebuildNodesFn, RebuildStorageFn, RebuildUniformsFn, ReconcilerRoot, RemoveBuffersFn, RemoveNodesFn, RemoveStorageFn, RemoveUniformsFn, RenderCallback, RenderProps, RenderTargetOptions, Renderer, RendererConfigExtended, RendererFactory, RendererProps, Root, WebGPURootState as RootState, RootStore, ScopedStoreType, SetBlock, Size, StorageCreator, StorageLike, StorageRecord, StorageStore, StorageWithUtils, Subscription, TSLNode, TSLNodeInput, TextureEntry, TextureInput, TextureNode, TextureOperations, TextureResult, ThreeCamera, ThreeElement, ThreeElements, ThreeElementsImpl, ThreeEvent, ThreeExports, ThreeToJSXElements, UnblockProps, UniformCreator, UniformValue, UniformsWithUtils, UseTextureOptions, UseTexturesReturn, Vector2, Vector3, Vector4, VectorRepresentation, Viewport, VisibilityEntry, WebGLDefaultProps, WebGLProps, WebGLShadowConfig, WebGPUDefaultProps, WebGPUProps, WebGPUShadowConfig, XRManager, XRPointerConfig };
|