@react-three/fiber 10.0.0-canary.c49d4cb → 10.0.0-canary.c6846c3
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 +1734 -1576
- package/dist/index.d.cts +22 -10
- package/dist/index.d.mts +22 -10
- package/dist/index.d.ts +22 -10
- package/dist/index.mjs +1736 -1578
- package/dist/legacy.cjs +1732 -1574
- package/dist/legacy.d.cts +22 -10
- package/dist/legacy.d.mts +22 -10
- package/dist/legacy.d.ts +22 -10
- package/dist/legacy.mjs +1734 -1576
- package/dist/webgpu/index.cjs +2012 -2096
- package/dist/webgpu/index.d.cts +38 -14
- package/dist/webgpu/index.d.mts +38 -14
- package/dist/webgpu/index.d.ts +38 -14
- package/dist/webgpu/index.mjs +2014 -2098
- 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
|
@@ -11,7 +11,6 @@ import { FrameTimingState, FrameCallback as FrameCallback$1, SchedulerApi, UseFr
|
|
|
11
11
|
export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, Scheduler, SchedulerApi, UseFrameNextOptions, UseFrameOptions, getScheduler } from '@pmndrs/scheduler';
|
|
12
12
|
import { Options } from 'react-use-measure';
|
|
13
13
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
14
|
-
import { ThreeElement as ThreeElement$1, Euler as Euler$3 } from '@react-three/fiber';
|
|
15
14
|
import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox.js';
|
|
16
15
|
|
|
17
16
|
function _mergeNamespaces(n, m) {
|
|
@@ -1638,9 +1637,9 @@ type EnvironmentProps = {
|
|
|
1638
1637
|
blur?: number;
|
|
1639
1638
|
backgroundBlurriness?: number;
|
|
1640
1639
|
backgroundIntensity?: number;
|
|
1641
|
-
backgroundRotation?: Euler
|
|
1640
|
+
backgroundRotation?: Euler;
|
|
1642
1641
|
environmentIntensity?: number;
|
|
1643
|
-
environmentRotation?: Euler
|
|
1642
|
+
environmentRotation?: Euler;
|
|
1644
1643
|
map?: Texture$1;
|
|
1645
1644
|
preset?: PresetsType;
|
|
1646
1645
|
scene?: Scene | React$1.RefObject<Scene>;
|
|
@@ -1724,7 +1723,7 @@ declare function EnvironmentCube({ background, scene, blur, backgroundBlurriness
|
|
|
1724
1723
|
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
1724
|
declare module '@react-three/fiber' {
|
|
1726
1725
|
interface ThreeElements {
|
|
1727
|
-
groundProjectedEnvImpl: ThreeElement
|
|
1726
|
+
groundProjectedEnvImpl: ThreeElement<typeof GroundedSkybox>;
|
|
1728
1727
|
}
|
|
1729
1728
|
}
|
|
1730
1729
|
/**
|
|
@@ -1824,6 +1823,24 @@ declare module '@react-three/fiber' {
|
|
|
1824
1823
|
*/
|
|
1825
1824
|
declare function Environment(props: EnvironmentProps): react_jsx_runtime.JSX.Element;
|
|
1826
1825
|
|
|
1826
|
+
/**
|
|
1827
|
+
* Moves every trace of interactivity from one object to its replacement, for reconstruction.
|
|
1828
|
+
*
|
|
1829
|
+
* When `args` or a `primitive`'s `object` changes, R3F builds a new three object and keeps the same
|
|
1830
|
+
* instance. Removing the old object from the interaction state and registering the new one from
|
|
1831
|
+
* scratch makes events *work* again (#3778), but it forgets what was in flight: a pointer resting on
|
|
1832
|
+
* the object fires a second `onPointerEnter` without ever having left, and an active pointer capture
|
|
1833
|
+
* is dropped mid-drag. Rewriting the references instead keeps the interaction continuous across a
|
|
1834
|
+
* swap the user never asked to see (#3744).
|
|
1835
|
+
*
|
|
1836
|
+
* Captures are re-keyed rather than released, so the DOM-level capture on `captureData.target` is
|
|
1837
|
+
* left alone — releasing and re-acquiring it is precisely the glitch being avoided.
|
|
1838
|
+
*
|
|
1839
|
+
* Visibility handlers are deliberately not transferred: that registry is keyed by `object.uuid`, so
|
|
1840
|
+
* the replacement re-registers itself through `applyProps`. The old entry is dropped here so it
|
|
1841
|
+
* cannot outlive the object it described.
|
|
1842
|
+
*/
|
|
1843
|
+
declare function swapInteractivity(store: RootStore, object: Object3D, newObject: Object3D): void;
|
|
1827
1844
|
declare function removeInteractivity(store: RootStore, object: Object3D): void;
|
|
1828
1845
|
declare function createEvents(store: RootStore): {
|
|
1829
1846
|
handlePointer: (name: string) => (event: DomEvent) => void;
|
|
@@ -3249,11 +3266,6 @@ declare function flushSync<R>(fn: () => R): R;
|
|
|
3249
3266
|
declare const context: React$1.Context<RootStore>;
|
|
3250
3267
|
declare const createStore: (invalidate: (state?: RootState, frames?: number, stackFrames?: boolean) => void, advance: (timestamp: number, runGlobalEffects?: boolean, state?: RootState, frame?: XRFrame) => void) => RootStore;
|
|
3251
3268
|
|
|
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
3269
|
/**
|
|
3258
3270
|
* An SSR-friendly useLayoutEffect.
|
|
3259
3271
|
*
|
|
@@ -3821,9 +3833,12 @@ declare function useUniforms<T extends UniformInputRecord>(uniforms: T): Uniform
|
|
|
3821
3833
|
declare function useUniforms<T extends UniformInputRecord>(uniforms: T, scope: string): UniformsWithUtils<UniformRecord<UniformNode>>;
|
|
3822
3834
|
/**
|
|
3823
3835
|
* Global rebuildUniforms function for HMR integration.
|
|
3824
|
-
*
|
|
3836
|
+
* Invalidates cached uniforms and increments _hmrVersion to trigger re-creation.
|
|
3825
3837
|
* Call this when HMR is detected to refresh all uniform creators.
|
|
3826
3838
|
*
|
|
3839
|
+
* Resolves to the primary store so shared TSL resources rebuild on the
|
|
3840
|
+
* authoritative store.
|
|
3841
|
+
*
|
|
3827
3842
|
* @param store - The R3F store (from useStore or context)
|
|
3828
3843
|
* @param scope - Optional scope to rebuild ('root' for root only, string for specific scope, undefined for all)
|
|
3829
3844
|
*/
|
|
@@ -3907,9 +3922,12 @@ declare function useNodes<T extends Record<string, TSLNodeLike>>(creator: NodeCr
|
|
|
3907
3922
|
declare function useNodes<T extends Record<string, TSLNodeLike>>(creator: NodeCreator<T>, scope: string): NodesWithUtils<T>;
|
|
3908
3923
|
/**
|
|
3909
3924
|
* Global rebuildNodes function for HMR integration.
|
|
3910
|
-
*
|
|
3925
|
+
* Invalidates cached nodes and increments _hmrVersion to trigger re-creation.
|
|
3911
3926
|
* Call this when HMR is detected to refresh all node creators.
|
|
3912
3927
|
*
|
|
3928
|
+
* Resolves to the primary store so shared TSL resources rebuild on the
|
|
3929
|
+
* authoritative store.
|
|
3930
|
+
*
|
|
3913
3931
|
* @param store - The R3F store (from useStore or context)
|
|
3914
3932
|
* @param scope - Optional scope to rebuild ('root' for root only, string for specific scope, undefined for all)
|
|
3915
3933
|
*/
|
|
@@ -3986,9 +4004,12 @@ declare function useBuffers<T extends Record<string, BufferLike>>(creator: Buffe
|
|
|
3986
4004
|
declare function useBuffers<T extends Record<string, BufferLike>>(creator: BufferCreator<T>, scope: string): BuffersWithUtils<T>;
|
|
3987
4005
|
/**
|
|
3988
4006
|
* Global rebuildBuffers function for HMR integration.
|
|
3989
|
-
*
|
|
4007
|
+
* Invalidates cached buffers and increments _hmrVersion to trigger re-creation.
|
|
3990
4008
|
* Call this when HMR is detected to refresh all buffer creators.
|
|
3991
4009
|
*
|
|
4010
|
+
* Resolves to the primary store so shared TSL resources rebuild on the
|
|
4011
|
+
* authoritative store.
|
|
4012
|
+
*
|
|
3992
4013
|
* @param store - The R3F store (from useStore or context)
|
|
3993
4014
|
* @param scope - Optional scope to rebuild ('root' for root only, string for specific scope, undefined for all)
|
|
3994
4015
|
*/
|
|
@@ -4020,9 +4041,12 @@ declare function useGPUStorage<T extends Record<string, StorageLike>>(creator: S
|
|
|
4020
4041
|
declare function useGPUStorage<T extends Record<string, StorageLike>>(creator: StorageCreator<T>, scope: string): StorageWithUtils<T>;
|
|
4021
4042
|
/**
|
|
4022
4043
|
* Global rebuildStorage function for HMR integration.
|
|
4023
|
-
*
|
|
4044
|
+
* Invalidates cached storage and increments _hmrVersion to trigger re-creation.
|
|
4024
4045
|
* Call this when HMR is detected to refresh all storage creators.
|
|
4025
4046
|
*
|
|
4047
|
+
* Resolves to the primary store so shared TSL resources rebuild on the
|
|
4048
|
+
* authoritative store.
|
|
4049
|
+
*
|
|
4026
4050
|
* @param store - The R3F store (from useStore or context)
|
|
4027
4051
|
* @param scope - Optional scope to rebuild ('root' for root only, string for specific scope, undefined for all)
|
|
4028
4052
|
*/
|
|
@@ -4139,5 +4163,5 @@ interface WebGPURootState extends Omit<RootState, 'renderer' | 'gl' | 'internal'
|
|
|
4139
4163
|
internal: WebGPUInternalState
|
|
4140
4164
|
}
|
|
4141
4165
|
|
|
4142
|
-
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,
|
|
4166
|
+
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 };
|
|
4143
4167
|
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
|
@@ -11,7 +11,6 @@ import { FrameTimingState, FrameCallback as FrameCallback$1, SchedulerApi, UseFr
|
|
|
11
11
|
export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, Scheduler, SchedulerApi, UseFrameNextOptions, UseFrameOptions, getScheduler } from '@pmndrs/scheduler';
|
|
12
12
|
import { Options } from 'react-use-measure';
|
|
13
13
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
14
|
-
import { ThreeElement as ThreeElement$1, Euler as Euler$3 } from '@react-three/fiber';
|
|
15
14
|
import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox.js';
|
|
16
15
|
|
|
17
16
|
function _mergeNamespaces(n, m) {
|
|
@@ -1638,9 +1637,9 @@ type EnvironmentProps = {
|
|
|
1638
1637
|
blur?: number;
|
|
1639
1638
|
backgroundBlurriness?: number;
|
|
1640
1639
|
backgroundIntensity?: number;
|
|
1641
|
-
backgroundRotation?: Euler
|
|
1640
|
+
backgroundRotation?: Euler;
|
|
1642
1641
|
environmentIntensity?: number;
|
|
1643
|
-
environmentRotation?: Euler
|
|
1642
|
+
environmentRotation?: Euler;
|
|
1644
1643
|
map?: Texture$1;
|
|
1645
1644
|
preset?: PresetsType;
|
|
1646
1645
|
scene?: Scene | React$1.RefObject<Scene>;
|
|
@@ -1724,7 +1723,7 @@ declare function EnvironmentCube({ background, scene, blur, backgroundBlurriness
|
|
|
1724
1723
|
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
1724
|
declare module '@react-three/fiber' {
|
|
1726
1725
|
interface ThreeElements {
|
|
1727
|
-
groundProjectedEnvImpl: ThreeElement
|
|
1726
|
+
groundProjectedEnvImpl: ThreeElement<typeof GroundedSkybox>;
|
|
1728
1727
|
}
|
|
1729
1728
|
}
|
|
1730
1729
|
/**
|
|
@@ -1824,6 +1823,24 @@ declare module '@react-three/fiber' {
|
|
|
1824
1823
|
*/
|
|
1825
1824
|
declare function Environment(props: EnvironmentProps): react_jsx_runtime.JSX.Element;
|
|
1826
1825
|
|
|
1826
|
+
/**
|
|
1827
|
+
* Moves every trace of interactivity from one object to its replacement, for reconstruction.
|
|
1828
|
+
*
|
|
1829
|
+
* When `args` or a `primitive`'s `object` changes, R3F builds a new three object and keeps the same
|
|
1830
|
+
* instance. Removing the old object from the interaction state and registering the new one from
|
|
1831
|
+
* scratch makes events *work* again (#3778), but it forgets what was in flight: a pointer resting on
|
|
1832
|
+
* the object fires a second `onPointerEnter` without ever having left, and an active pointer capture
|
|
1833
|
+
* is dropped mid-drag. Rewriting the references instead keeps the interaction continuous across a
|
|
1834
|
+
* swap the user never asked to see (#3744).
|
|
1835
|
+
*
|
|
1836
|
+
* Captures are re-keyed rather than released, so the DOM-level capture on `captureData.target` is
|
|
1837
|
+
* left alone — releasing and re-acquiring it is precisely the glitch being avoided.
|
|
1838
|
+
*
|
|
1839
|
+
* Visibility handlers are deliberately not transferred: that registry is keyed by `object.uuid`, so
|
|
1840
|
+
* the replacement re-registers itself through `applyProps`. The old entry is dropped here so it
|
|
1841
|
+
* cannot outlive the object it described.
|
|
1842
|
+
*/
|
|
1843
|
+
declare function swapInteractivity(store: RootStore, object: Object3D, newObject: Object3D): void;
|
|
1827
1844
|
declare function removeInteractivity(store: RootStore, object: Object3D): void;
|
|
1828
1845
|
declare function createEvents(store: RootStore): {
|
|
1829
1846
|
handlePointer: (name: string) => (event: DomEvent) => void;
|
|
@@ -3249,11 +3266,6 @@ declare function flushSync<R>(fn: () => R): R;
|
|
|
3249
3266
|
declare const context: React$1.Context<RootStore>;
|
|
3250
3267
|
declare const createStore: (invalidate: (state?: RootState, frames?: number, stackFrames?: boolean) => void, advance: (timestamp: number, runGlobalEffects?: boolean, state?: RootState, frame?: XRFrame) => void) => RootStore;
|
|
3251
3268
|
|
|
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
3269
|
/**
|
|
3258
3270
|
* An SSR-friendly useLayoutEffect.
|
|
3259
3271
|
*
|
|
@@ -3821,9 +3833,12 @@ declare function useUniforms<T extends UniformInputRecord>(uniforms: T): Uniform
|
|
|
3821
3833
|
declare function useUniforms<T extends UniformInputRecord>(uniforms: T, scope: string): UniformsWithUtils<UniformRecord<UniformNode>>;
|
|
3822
3834
|
/**
|
|
3823
3835
|
* Global rebuildUniforms function for HMR integration.
|
|
3824
|
-
*
|
|
3836
|
+
* Invalidates cached uniforms and increments _hmrVersion to trigger re-creation.
|
|
3825
3837
|
* Call this when HMR is detected to refresh all uniform creators.
|
|
3826
3838
|
*
|
|
3839
|
+
* Resolves to the primary store so shared TSL resources rebuild on the
|
|
3840
|
+
* authoritative store.
|
|
3841
|
+
*
|
|
3827
3842
|
* @param store - The R3F store (from useStore or context)
|
|
3828
3843
|
* @param scope - Optional scope to rebuild ('root' for root only, string for specific scope, undefined for all)
|
|
3829
3844
|
*/
|
|
@@ -3907,9 +3922,12 @@ declare function useNodes<T extends Record<string, TSLNodeLike>>(creator: NodeCr
|
|
|
3907
3922
|
declare function useNodes<T extends Record<string, TSLNodeLike>>(creator: NodeCreator<T>, scope: string): NodesWithUtils<T>;
|
|
3908
3923
|
/**
|
|
3909
3924
|
* Global rebuildNodes function for HMR integration.
|
|
3910
|
-
*
|
|
3925
|
+
* Invalidates cached nodes and increments _hmrVersion to trigger re-creation.
|
|
3911
3926
|
* Call this when HMR is detected to refresh all node creators.
|
|
3912
3927
|
*
|
|
3928
|
+
* Resolves to the primary store so shared TSL resources rebuild on the
|
|
3929
|
+
* authoritative store.
|
|
3930
|
+
*
|
|
3913
3931
|
* @param store - The R3F store (from useStore or context)
|
|
3914
3932
|
* @param scope - Optional scope to rebuild ('root' for root only, string for specific scope, undefined for all)
|
|
3915
3933
|
*/
|
|
@@ -3986,9 +4004,12 @@ declare function useBuffers<T extends Record<string, BufferLike>>(creator: Buffe
|
|
|
3986
4004
|
declare function useBuffers<T extends Record<string, BufferLike>>(creator: BufferCreator<T>, scope: string): BuffersWithUtils<T>;
|
|
3987
4005
|
/**
|
|
3988
4006
|
* Global rebuildBuffers function for HMR integration.
|
|
3989
|
-
*
|
|
4007
|
+
* Invalidates cached buffers and increments _hmrVersion to trigger re-creation.
|
|
3990
4008
|
* Call this when HMR is detected to refresh all buffer creators.
|
|
3991
4009
|
*
|
|
4010
|
+
* Resolves to the primary store so shared TSL resources rebuild on the
|
|
4011
|
+
* authoritative store.
|
|
4012
|
+
*
|
|
3992
4013
|
* @param store - The R3F store (from useStore or context)
|
|
3993
4014
|
* @param scope - Optional scope to rebuild ('root' for root only, string for specific scope, undefined for all)
|
|
3994
4015
|
*/
|
|
@@ -4020,9 +4041,12 @@ declare function useGPUStorage<T extends Record<string, StorageLike>>(creator: S
|
|
|
4020
4041
|
declare function useGPUStorage<T extends Record<string, StorageLike>>(creator: StorageCreator<T>, scope: string): StorageWithUtils<T>;
|
|
4021
4042
|
/**
|
|
4022
4043
|
* Global rebuildStorage function for HMR integration.
|
|
4023
|
-
*
|
|
4044
|
+
* Invalidates cached storage and increments _hmrVersion to trigger re-creation.
|
|
4024
4045
|
* Call this when HMR is detected to refresh all storage creators.
|
|
4025
4046
|
*
|
|
4047
|
+
* Resolves to the primary store so shared TSL resources rebuild on the
|
|
4048
|
+
* authoritative store.
|
|
4049
|
+
*
|
|
4026
4050
|
* @param store - The R3F store (from useStore or context)
|
|
4027
4051
|
* @param scope - Optional scope to rebuild ('root' for root only, string for specific scope, undefined for all)
|
|
4028
4052
|
*/
|
|
@@ -4139,5 +4163,5 @@ interface WebGPURootState extends Omit<RootState, 'renderer' | 'gl' | 'internal'
|
|
|
4139
4163
|
internal: WebGPUInternalState
|
|
4140
4164
|
}
|
|
4141
4165
|
|
|
4142
|
-
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,
|
|
4166
|
+
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 };
|
|
4143
4167
|
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
|
@@ -11,7 +11,6 @@ import { FrameTimingState, FrameCallback as FrameCallback$1, SchedulerApi, UseFr
|
|
|
11
11
|
export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, Scheduler, SchedulerApi, UseFrameNextOptions, UseFrameOptions, getScheduler } from '@pmndrs/scheduler';
|
|
12
12
|
import { Options } from 'react-use-measure';
|
|
13
13
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
14
|
-
import { ThreeElement as ThreeElement$1, Euler as Euler$3 } from '@react-three/fiber';
|
|
15
14
|
import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox.js';
|
|
16
15
|
|
|
17
16
|
function _mergeNamespaces(n, m) {
|
|
@@ -1638,9 +1637,9 @@ type EnvironmentProps = {
|
|
|
1638
1637
|
blur?: number;
|
|
1639
1638
|
backgroundBlurriness?: number;
|
|
1640
1639
|
backgroundIntensity?: number;
|
|
1641
|
-
backgroundRotation?: Euler
|
|
1640
|
+
backgroundRotation?: Euler;
|
|
1642
1641
|
environmentIntensity?: number;
|
|
1643
|
-
environmentRotation?: Euler
|
|
1642
|
+
environmentRotation?: Euler;
|
|
1644
1643
|
map?: Texture$1;
|
|
1645
1644
|
preset?: PresetsType;
|
|
1646
1645
|
scene?: Scene | React$1.RefObject<Scene>;
|
|
@@ -1724,7 +1723,7 @@ declare function EnvironmentCube({ background, scene, blur, backgroundBlurriness
|
|
|
1724
1723
|
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
1724
|
declare module '@react-three/fiber' {
|
|
1726
1725
|
interface ThreeElements {
|
|
1727
|
-
groundProjectedEnvImpl: ThreeElement
|
|
1726
|
+
groundProjectedEnvImpl: ThreeElement<typeof GroundedSkybox>;
|
|
1728
1727
|
}
|
|
1729
1728
|
}
|
|
1730
1729
|
/**
|
|
@@ -1824,6 +1823,24 @@ declare module '@react-three/fiber' {
|
|
|
1824
1823
|
*/
|
|
1825
1824
|
declare function Environment(props: EnvironmentProps): react_jsx_runtime.JSX.Element;
|
|
1826
1825
|
|
|
1826
|
+
/**
|
|
1827
|
+
* Moves every trace of interactivity from one object to its replacement, for reconstruction.
|
|
1828
|
+
*
|
|
1829
|
+
* When `args` or a `primitive`'s `object` changes, R3F builds a new three object and keeps the same
|
|
1830
|
+
* instance. Removing the old object from the interaction state and registering the new one from
|
|
1831
|
+
* scratch makes events *work* again (#3778), but it forgets what was in flight: a pointer resting on
|
|
1832
|
+
* the object fires a second `onPointerEnter` without ever having left, and an active pointer capture
|
|
1833
|
+
* is dropped mid-drag. Rewriting the references instead keeps the interaction continuous across a
|
|
1834
|
+
* swap the user never asked to see (#3744).
|
|
1835
|
+
*
|
|
1836
|
+
* Captures are re-keyed rather than released, so the DOM-level capture on `captureData.target` is
|
|
1837
|
+
* left alone — releasing and re-acquiring it is precisely the glitch being avoided.
|
|
1838
|
+
*
|
|
1839
|
+
* Visibility handlers are deliberately not transferred: that registry is keyed by `object.uuid`, so
|
|
1840
|
+
* the replacement re-registers itself through `applyProps`. The old entry is dropped here so it
|
|
1841
|
+
* cannot outlive the object it described.
|
|
1842
|
+
*/
|
|
1843
|
+
declare function swapInteractivity(store: RootStore, object: Object3D, newObject: Object3D): void;
|
|
1827
1844
|
declare function removeInteractivity(store: RootStore, object: Object3D): void;
|
|
1828
1845
|
declare function createEvents(store: RootStore): {
|
|
1829
1846
|
handlePointer: (name: string) => (event: DomEvent) => void;
|
|
@@ -3249,11 +3266,6 @@ declare function flushSync<R>(fn: () => R): R;
|
|
|
3249
3266
|
declare const context: React$1.Context<RootStore>;
|
|
3250
3267
|
declare const createStore: (invalidate: (state?: RootState, frames?: number, stackFrames?: boolean) => void, advance: (timestamp: number, runGlobalEffects?: boolean, state?: RootState, frame?: XRFrame) => void) => RootStore;
|
|
3251
3268
|
|
|
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
3269
|
/**
|
|
3258
3270
|
* An SSR-friendly useLayoutEffect.
|
|
3259
3271
|
*
|
|
@@ -3821,9 +3833,12 @@ declare function useUniforms<T extends UniformInputRecord>(uniforms: T): Uniform
|
|
|
3821
3833
|
declare function useUniforms<T extends UniformInputRecord>(uniforms: T, scope: string): UniformsWithUtils<UniformRecord<UniformNode>>;
|
|
3822
3834
|
/**
|
|
3823
3835
|
* Global rebuildUniforms function for HMR integration.
|
|
3824
|
-
*
|
|
3836
|
+
* Invalidates cached uniforms and increments _hmrVersion to trigger re-creation.
|
|
3825
3837
|
* Call this when HMR is detected to refresh all uniform creators.
|
|
3826
3838
|
*
|
|
3839
|
+
* Resolves to the primary store so shared TSL resources rebuild on the
|
|
3840
|
+
* authoritative store.
|
|
3841
|
+
*
|
|
3827
3842
|
* @param store - The R3F store (from useStore or context)
|
|
3828
3843
|
* @param scope - Optional scope to rebuild ('root' for root only, string for specific scope, undefined for all)
|
|
3829
3844
|
*/
|
|
@@ -3907,9 +3922,12 @@ declare function useNodes<T extends Record<string, TSLNodeLike>>(creator: NodeCr
|
|
|
3907
3922
|
declare function useNodes<T extends Record<string, TSLNodeLike>>(creator: NodeCreator<T>, scope: string): NodesWithUtils<T>;
|
|
3908
3923
|
/**
|
|
3909
3924
|
* Global rebuildNodes function for HMR integration.
|
|
3910
|
-
*
|
|
3925
|
+
* Invalidates cached nodes and increments _hmrVersion to trigger re-creation.
|
|
3911
3926
|
* Call this when HMR is detected to refresh all node creators.
|
|
3912
3927
|
*
|
|
3928
|
+
* Resolves to the primary store so shared TSL resources rebuild on the
|
|
3929
|
+
* authoritative store.
|
|
3930
|
+
*
|
|
3913
3931
|
* @param store - The R3F store (from useStore or context)
|
|
3914
3932
|
* @param scope - Optional scope to rebuild ('root' for root only, string for specific scope, undefined for all)
|
|
3915
3933
|
*/
|
|
@@ -3986,9 +4004,12 @@ declare function useBuffers<T extends Record<string, BufferLike>>(creator: Buffe
|
|
|
3986
4004
|
declare function useBuffers<T extends Record<string, BufferLike>>(creator: BufferCreator<T>, scope: string): BuffersWithUtils<T>;
|
|
3987
4005
|
/**
|
|
3988
4006
|
* Global rebuildBuffers function for HMR integration.
|
|
3989
|
-
*
|
|
4007
|
+
* Invalidates cached buffers and increments _hmrVersion to trigger re-creation.
|
|
3990
4008
|
* Call this when HMR is detected to refresh all buffer creators.
|
|
3991
4009
|
*
|
|
4010
|
+
* Resolves to the primary store so shared TSL resources rebuild on the
|
|
4011
|
+
* authoritative store.
|
|
4012
|
+
*
|
|
3992
4013
|
* @param store - The R3F store (from useStore or context)
|
|
3993
4014
|
* @param scope - Optional scope to rebuild ('root' for root only, string for specific scope, undefined for all)
|
|
3994
4015
|
*/
|
|
@@ -4020,9 +4041,12 @@ declare function useGPUStorage<T extends Record<string, StorageLike>>(creator: S
|
|
|
4020
4041
|
declare function useGPUStorage<T extends Record<string, StorageLike>>(creator: StorageCreator<T>, scope: string): StorageWithUtils<T>;
|
|
4021
4042
|
/**
|
|
4022
4043
|
* Global rebuildStorage function for HMR integration.
|
|
4023
|
-
*
|
|
4044
|
+
* Invalidates cached storage and increments _hmrVersion to trigger re-creation.
|
|
4024
4045
|
* Call this when HMR is detected to refresh all storage creators.
|
|
4025
4046
|
*
|
|
4047
|
+
* Resolves to the primary store so shared TSL resources rebuild on the
|
|
4048
|
+
* authoritative store.
|
|
4049
|
+
*
|
|
4026
4050
|
* @param store - The R3F store (from useStore or context)
|
|
4027
4051
|
* @param scope - Optional scope to rebuild ('root' for root only, string for specific scope, undefined for all)
|
|
4028
4052
|
*/
|
|
@@ -4139,5 +4163,5 @@ interface WebGPURootState extends Omit<RootState, 'renderer' | 'gl' | 'internal'
|
|
|
4139
4163
|
internal: WebGPUInternalState
|
|
4140
4164
|
}
|
|
4141
4165
|
|
|
4142
|
-
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,
|
|
4166
|
+
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 };
|
|
4143
4167
|
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 };
|