@react-three/fiber 10.0.0-canary.ca63ccd → 10.0.0-canary.ce4bd5f
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 +2632 -2422
- package/dist/index.d.cts +68 -22
- package/dist/index.d.mts +68 -22
- package/dist/index.d.ts +68 -22
- package/dist/index.mjs +2634 -2424
- package/dist/legacy.cjs +2628 -2423
- package/dist/legacy.d.cts +67 -25
- package/dist/legacy.d.mts +67 -25
- package/dist/legacy.d.ts +67 -25
- package/dist/legacy.mjs +2630 -2425
- package/dist/webgpu/index.cjs +2949 -2956
- package/dist/webgpu/index.d.cts +105 -75
- package/dist/webgpu/index.d.mts +105 -75
- package/dist/webgpu/index.d.ts +105 -75
- package/dist/webgpu/index.mjs +2943 -2950
- package/package.json +4 -4
- package/readme.md +1 -1
- package/react-reconciler/constants.d.ts +0 -7
- package/react-reconciler/constants.js +0 -1
- package/react-reconciler/index.d.ts +0 -1044
- package/react-reconciler/index.js +0 -208
package/dist/legacy.d.cts
CHANGED
|
@@ -10,7 +10,6 @@ import { FrameTimingState, FrameCallback as FrameCallback$1, SchedulerApi, UseFr
|
|
|
10
10
|
export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, Scheduler, SchedulerApi, UseFrameNextOptions, UseFrameOptions, getScheduler } from '@pmndrs/scheduler';
|
|
11
11
|
import { Options } from 'react-use-measure';
|
|
12
12
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
13
|
-
import { ThreeElement as ThreeElement$1, Euler as Euler$2 } from '@react-three/fiber';
|
|
14
13
|
import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox.js';
|
|
15
14
|
|
|
16
15
|
function _mergeNamespaces(n, m) {
|
|
@@ -39,9 +38,9 @@ function _mergeNamespaces(n, m) {
|
|
|
39
38
|
declare const R3F_BUILD_LEGACY = true;
|
|
40
39
|
declare const R3F_BUILD_WEBGPU = false;
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
type Inspector = never;
|
|
42
|
+
/** Not available on the legacy (WebGL-only) entry. */
|
|
43
|
+
declare function loadInspector(): Promise<never>;
|
|
45
44
|
declare const WebGPURenderer: {
|
|
46
45
|
new (): {};
|
|
47
46
|
};
|
|
@@ -59,7 +58,8 @@ var THREE = /*#__PURE__*/_mergeNamespaces({
|
|
|
59
58
|
R3F_BUILD_WEBGPU: R3F_BUILD_WEBGPU,
|
|
60
59
|
RenderTarget: RenderTarget,
|
|
61
60
|
RenderTargetCompat: WebGLRenderTarget,
|
|
62
|
-
WebGPURenderer: WebGPURenderer
|
|
61
|
+
WebGPURenderer: WebGPURenderer,
|
|
62
|
+
loadInspector: loadInspector
|
|
63
63
|
}, [THREE$1]);
|
|
64
64
|
|
|
65
65
|
//* Utility Types ==============================
|
|
@@ -497,6 +497,18 @@ interface InternalState {
|
|
|
497
497
|
* @see https://threejs.org/docs/#api/en/renderers/common/CanvasTarget
|
|
498
498
|
*/
|
|
499
499
|
canvasTarget?: CanvasTarget
|
|
500
|
+
/**
|
|
501
|
+
* Set when this root's canvas target has been resized and the backend's cached render pass
|
|
502
|
+
* descriptor (which holds a depth-stencil view built once per canvas) is therefore stale.
|
|
503
|
+
*
|
|
504
|
+
* Flushed by the canvas-target job in the `start` phase, which is the only place this root's
|
|
505
|
+
* target is guaranteed to be the renderer's active one — `backend.updateSize()` operates on
|
|
506
|
+
* whatever `getCanvasTarget()` returns, so calling it from the resize subscription would
|
|
507
|
+
* invalidate some other canvas's descriptor instead.
|
|
508
|
+
*
|
|
509
|
+
* @see https://github.com/pmndrs/react-three-fiber/issues/3847
|
|
510
|
+
*/
|
|
511
|
+
canvasTargetSizeDirty?: boolean
|
|
500
512
|
/**
|
|
501
513
|
* Whether multi-canvas rendering is active.
|
|
502
514
|
* True when any canvas uses `renderer={{ primaryCanvas: 'id' }}` to share a renderer.
|
|
@@ -706,12 +718,19 @@ type DefaultRendererProps = {
|
|
|
706
718
|
*/
|
|
707
719
|
interface CanvasSchedulerConfig {
|
|
708
720
|
/**
|
|
709
|
-
*
|
|
710
|
-
* Pass the `id` of another canvas.
|
|
721
|
+
* Run this Canvas root before the referenced Canvas root id(s).
|
|
711
722
|
*/
|
|
712
|
-
|
|
723
|
+
before?: string | string[]
|
|
713
724
|
/**
|
|
714
|
-
*
|
|
725
|
+
* Run this Canvas root after the referenced Canvas root id(s).
|
|
726
|
+
*/
|
|
727
|
+
after?: string | string[]
|
|
728
|
+
/**
|
|
729
|
+
* Numeric root order. Lower values run first.
|
|
730
|
+
*/
|
|
731
|
+
order?: number
|
|
732
|
+
/**
|
|
733
|
+
* Limit this Canvas's default render job (frames per second).
|
|
715
734
|
*/
|
|
716
735
|
fps?: number
|
|
717
736
|
}
|
|
@@ -1315,11 +1334,16 @@ declare global {
|
|
|
1315
1334
|
/** Pass record - stores TSL pass nodes for render pipeline */
|
|
1316
1335
|
type PassRecord = Record<string, any>
|
|
1317
1336
|
|
|
1337
|
+
/** State passed to pipeline callbacks after the active pipeline has been created */
|
|
1338
|
+
type RenderPipelineCallbackState = RootState & {
|
|
1339
|
+
renderPipeline: ThreeRenderPipeline
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1318
1342
|
/** Setup callback - runs first to configure MRT, create additional passes */
|
|
1319
|
-
type RenderPipelineSetupCallback = (state:
|
|
1343
|
+
type RenderPipelineSetupCallback = (state: RenderPipelineCallbackState) => PassRecord | void
|
|
1320
1344
|
|
|
1321
1345
|
/** Main callback - runs second to configure outputNode, create effect passes */
|
|
1322
|
-
type RenderPipelineMainCallback = (state:
|
|
1346
|
+
type RenderPipelineMainCallback = (state: RenderPipelineCallbackState) => PassRecord | void
|
|
1323
1347
|
|
|
1324
1348
|
/** Return type for useRenderPipeline hook */
|
|
1325
1349
|
interface UseRenderPipelineReturn {
|
|
@@ -1635,9 +1659,9 @@ type EnvironmentProps = {
|
|
|
1635
1659
|
blur?: number;
|
|
1636
1660
|
backgroundBlurriness?: number;
|
|
1637
1661
|
backgroundIntensity?: number;
|
|
1638
|
-
backgroundRotation?: Euler
|
|
1662
|
+
backgroundRotation?: Euler;
|
|
1639
1663
|
environmentIntensity?: number;
|
|
1640
|
-
environmentRotation?: Euler
|
|
1664
|
+
environmentRotation?: Euler;
|
|
1641
1665
|
map?: Texture$1;
|
|
1642
1666
|
preset?: PresetsType;
|
|
1643
1667
|
scene?: Scene | React$1.RefObject<Scene>;
|
|
@@ -1721,7 +1745,7 @@ declare function EnvironmentCube({ background, scene, blur, backgroundBlurriness
|
|
|
1721
1745
|
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
1746
|
declare module '@react-three/fiber' {
|
|
1723
1747
|
interface ThreeElements {
|
|
1724
|
-
groundProjectedEnvImpl: ThreeElement
|
|
1748
|
+
groundProjectedEnvImpl: ThreeElement<typeof GroundedSkybox>;
|
|
1725
1749
|
}
|
|
1726
1750
|
}
|
|
1727
1751
|
/**
|
|
@@ -1821,6 +1845,24 @@ declare module '@react-three/fiber' {
|
|
|
1821
1845
|
*/
|
|
1822
1846
|
declare function Environment(props: EnvironmentProps): react_jsx_runtime.JSX.Element;
|
|
1823
1847
|
|
|
1848
|
+
/**
|
|
1849
|
+
* Moves every trace of interactivity from one object to its replacement, for reconstruction.
|
|
1850
|
+
*
|
|
1851
|
+
* When `args` or a `primitive`'s `object` changes, R3F builds a new three object and keeps the same
|
|
1852
|
+
* instance. Removing the old object from the interaction state and registering the new one from
|
|
1853
|
+
* scratch makes events *work* again (#3778), but it forgets what was in flight: a pointer resting on
|
|
1854
|
+
* the object fires a second `onPointerEnter` without ever having left, and an active pointer capture
|
|
1855
|
+
* is dropped mid-drag. Rewriting the references instead keeps the interaction continuous across a
|
|
1856
|
+
* swap the user never asked to see (#3744).
|
|
1857
|
+
*
|
|
1858
|
+
* Captures are re-keyed rather than released, so the DOM-level capture on `captureData.target` is
|
|
1859
|
+
* left alone — releasing and re-acquiring it is precisely the glitch being avoided.
|
|
1860
|
+
*
|
|
1861
|
+
* Visibility handlers are deliberately not transferred: that registry is keyed by `object.uuid`, so
|
|
1862
|
+
* the replacement re-registers itself through `applyProps`. The old entry is dropped here so it
|
|
1863
|
+
* cannot outlive the object it described.
|
|
1864
|
+
*/
|
|
1865
|
+
declare function swapInteractivity(store: RootStore, object: Object3D, newObject: Object3D): void;
|
|
1824
1866
|
declare function removeInteractivity(store: RootStore, object: Object3D): void;
|
|
1825
1867
|
declare function createEvents(store: RootStore): {
|
|
1826
1868
|
handlePointer: (name: string) => (event: DomEvent) => void;
|
|
@@ -1861,7 +1903,7 @@ declare namespace useLoader {
|
|
|
1861
1903
|
*
|
|
1862
1904
|
* @param callback - Function called each frame with (state, delta). Optional if you only need scheduler access.
|
|
1863
1905
|
* @param priorityOrOptions - Either a priority number (backwards compat) or options object
|
|
1864
|
-
* @returns Controls object with step(), stepAll(), pause(), resume(), isPaused, id, scheduler
|
|
1906
|
+
* @returns Controls object with step(), stepAll(), invalidate(), pause(), resume(), isPaused, id, rootId, scheduler
|
|
1865
1907
|
*
|
|
1866
1908
|
* @example
|
|
1867
1909
|
* // Simple priority (backwards compat)
|
|
@@ -2157,7 +2199,10 @@ declare function addTail(callback: GlobalRenderCallback): () => void;
|
|
|
2157
2199
|
* Invalidates the view, requesting a frame to be rendered.
|
|
2158
2200
|
* In demand mode, this triggers the scheduler to run frames.
|
|
2159
2201
|
*
|
|
2160
|
-
*
|
|
2202
|
+
* With a state argument, only that root's jobs run on the requested frames; other
|
|
2203
|
+
* roots on 'demand' stay idle. Without one, every registered root is invalidated.
|
|
2204
|
+
*
|
|
2205
|
+
* @param state - Optional root state; targets the invalidation at that root
|
|
2161
2206
|
* @param frames - Number of frames to request (default: 1)
|
|
2162
2207
|
* @param stackFrames - If false, sets pendingFrames to frames. If true, adds to existing pendingFrames (default: false)
|
|
2163
2208
|
*
|
|
@@ -2168,14 +2213,16 @@ declare function invalidate(state?: RootState, frames?: number, stackFrames?: bo
|
|
|
2168
2213
|
* Advances the frameloop and runs render effects.
|
|
2169
2214
|
* Useful for when manually rendering via `frameloop="never"`.
|
|
2170
2215
|
*
|
|
2216
|
+
* With a state argument, only that root is stepped. Without one, every
|
|
2217
|
+
* registered root is stepped for backwards compatibility.
|
|
2218
|
+
*
|
|
2171
2219
|
* @param timestamp - The timestamp to use for this frame
|
|
2172
2220
|
* @param runGlobalEffects - Ignored (kept for backwards compat, global effects always run)
|
|
2173
|
-
* @param state -
|
|
2174
|
-
* @param frame - Ignored (kept for backwards compat)
|
|
2221
|
+
* @param state - Optional root state; targets the manual step at that root
|
|
2175
2222
|
*
|
|
2176
2223
|
* @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#advance
|
|
2177
2224
|
*/
|
|
2178
|
-
declare function advance(timestamp: number): void;
|
|
2225
|
+
declare function advance(timestamp: number, runGlobalEffects?: boolean, state?: RootState): void;
|
|
2179
2226
|
|
|
2180
2227
|
/* eslint-disable @definitelytyped/no-unnecessary-generics */
|
|
2181
2228
|
declare function ReactReconciler<
|
|
@@ -3246,11 +3293,6 @@ declare function flushSync<R>(fn: () => R): R;
|
|
|
3246
3293
|
declare const context: React$1.Context<RootStore>;
|
|
3247
3294
|
declare const createStore: (invalidate: (state?: RootState, frames?: number, stackFrames?: boolean) => void, advance: (timestamp: number, runGlobalEffects?: boolean, state?: RootState, frame?: XRFrame) => void) => RootStore;
|
|
3248
3295
|
|
|
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
3296
|
/**
|
|
3255
3297
|
* An SSR-friendly useLayoutEffect.
|
|
3256
3298
|
*
|
|
@@ -3734,5 +3776,5 @@ declare function isOnce(value: unknown): value is {
|
|
|
3734
3776
|
*/
|
|
3735
3777
|
declare function Canvas(props: CanvasProps): react_jsx_runtime.JSX.Element;
|
|
3736
3778
|
|
|
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,
|
|
3779
|
+
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
3780
|
export type { Act, Args, ArgsProp, AttachFnType, AttachType, BackgroundConfig, BackgroundProp, BaseRendererProps, Bridge, BufferLike, BufferRecord, BufferStore, Camera, CameraProps, CanvasProps, CanvasSchedulerConfig, Catalogue, Color, ColorManagementConfig, ComputeFunction, ConstructorRepresentation, DefaultGLProps, DefaultRendererProps, Disposable, DisposeOptions, DomEvent, Dpr, ElementProps, EnvironmentLoaderProps, EnvironmentProps, EquConfig, Euler, EventHandlers, EventManager, EventProps, Events, Extensions, FiberRoot, FilterFunction, FrameCallback, FrameNextCallback, FrameNextState, FrameState, Frameloop, GLProps, GLTFLike, GeometryProps, GeometryTransformProps, GlobalEffectType, GlobalRenderCallback, HostConfig, InferLoadResult, InjectState, InputLike, Instance, InstanceProps, LegacyInternalState as InternalState, Intersection, IntersectionEvent, IsAllOptional, IsOptional, Layers, LegacyInternalState, LegacyRenderer, LegacyRootState, LoaderInstance, LoaderLike, LoaderResult, MappedTextureType, MathProps, MathRepresentation, MathType, MathTypes, Matrix3, Matrix4, Mutable, MutableOrReadonlyParameters, NodeProps, NonFunctionKeys, ObjectMap, OffscreenCanvas$1 as OffscreenCanvas, Overwrite, Performance, PointerCaptureTarget, PointerState, PresetsType, PrimaryCanvasEntry, Properties, Quaternion, LegacyRenderer as R3FRenderer, RaycastableRepresentation, ReactProps, ReconcilerRoot, RenderCallback, RenderProps, RenderTargetOptions, Renderer, RendererConfigExtended, RendererFactory, RendererProps, Root, LegacyRootState as RootState, RootStore, SetBlock, Size, StorageLike, StorageRecord, StorageStore, Subscription, TSLNodeInput, TextureInput, TextureResult, ThreeCamera, ThreeElement, ThreeElements, ThreeElementsImpl, ThreeEvent, ThreeExports, ThreeToJSXElements, UnblockProps, UseTextureOptions, UseTexturesReturn, Vector2, Vector3, Vector4, VectorRepresentation, Viewport, VisibilityEntry, WebGLDefaultProps, WebGLProps, WebGLShadowConfig, XRManager, XRPointerConfig };
|
package/dist/legacy.d.mts
CHANGED
|
@@ -10,7 +10,6 @@ import { FrameTimingState, FrameCallback as FrameCallback$1, SchedulerApi, UseFr
|
|
|
10
10
|
export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, Scheduler, SchedulerApi, UseFrameNextOptions, UseFrameOptions, getScheduler } from '@pmndrs/scheduler';
|
|
11
11
|
import { Options } from 'react-use-measure';
|
|
12
12
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
13
|
-
import { ThreeElement as ThreeElement$1, Euler as Euler$2 } from '@react-three/fiber';
|
|
14
13
|
import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox.js';
|
|
15
14
|
|
|
16
15
|
function _mergeNamespaces(n, m) {
|
|
@@ -39,9 +38,9 @@ function _mergeNamespaces(n, m) {
|
|
|
39
38
|
declare const R3F_BUILD_LEGACY = true;
|
|
40
39
|
declare const R3F_BUILD_WEBGPU = false;
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
type Inspector = never;
|
|
42
|
+
/** Not available on the legacy (WebGL-only) entry. */
|
|
43
|
+
declare function loadInspector(): Promise<never>;
|
|
45
44
|
declare const WebGPURenderer: {
|
|
46
45
|
new (): {};
|
|
47
46
|
};
|
|
@@ -59,7 +58,8 @@ var THREE = /*#__PURE__*/_mergeNamespaces({
|
|
|
59
58
|
R3F_BUILD_WEBGPU: R3F_BUILD_WEBGPU,
|
|
60
59
|
RenderTarget: RenderTarget,
|
|
61
60
|
RenderTargetCompat: WebGLRenderTarget,
|
|
62
|
-
WebGPURenderer: WebGPURenderer
|
|
61
|
+
WebGPURenderer: WebGPURenderer,
|
|
62
|
+
loadInspector: loadInspector
|
|
63
63
|
}, [THREE$1]);
|
|
64
64
|
|
|
65
65
|
//* Utility Types ==============================
|
|
@@ -497,6 +497,18 @@ interface InternalState {
|
|
|
497
497
|
* @see https://threejs.org/docs/#api/en/renderers/common/CanvasTarget
|
|
498
498
|
*/
|
|
499
499
|
canvasTarget?: CanvasTarget
|
|
500
|
+
/**
|
|
501
|
+
* Set when this root's canvas target has been resized and the backend's cached render pass
|
|
502
|
+
* descriptor (which holds a depth-stencil view built once per canvas) is therefore stale.
|
|
503
|
+
*
|
|
504
|
+
* Flushed by the canvas-target job in the `start` phase, which is the only place this root's
|
|
505
|
+
* target is guaranteed to be the renderer's active one — `backend.updateSize()` operates on
|
|
506
|
+
* whatever `getCanvasTarget()` returns, so calling it from the resize subscription would
|
|
507
|
+
* invalidate some other canvas's descriptor instead.
|
|
508
|
+
*
|
|
509
|
+
* @see https://github.com/pmndrs/react-three-fiber/issues/3847
|
|
510
|
+
*/
|
|
511
|
+
canvasTargetSizeDirty?: boolean
|
|
500
512
|
/**
|
|
501
513
|
* Whether multi-canvas rendering is active.
|
|
502
514
|
* True when any canvas uses `renderer={{ primaryCanvas: 'id' }}` to share a renderer.
|
|
@@ -706,12 +718,19 @@ type DefaultRendererProps = {
|
|
|
706
718
|
*/
|
|
707
719
|
interface CanvasSchedulerConfig {
|
|
708
720
|
/**
|
|
709
|
-
*
|
|
710
|
-
* Pass the `id` of another canvas.
|
|
721
|
+
* Run this Canvas root before the referenced Canvas root id(s).
|
|
711
722
|
*/
|
|
712
|
-
|
|
723
|
+
before?: string | string[]
|
|
713
724
|
/**
|
|
714
|
-
*
|
|
725
|
+
* Run this Canvas root after the referenced Canvas root id(s).
|
|
726
|
+
*/
|
|
727
|
+
after?: string | string[]
|
|
728
|
+
/**
|
|
729
|
+
* Numeric root order. Lower values run first.
|
|
730
|
+
*/
|
|
731
|
+
order?: number
|
|
732
|
+
/**
|
|
733
|
+
* Limit this Canvas's default render job (frames per second).
|
|
715
734
|
*/
|
|
716
735
|
fps?: number
|
|
717
736
|
}
|
|
@@ -1315,11 +1334,16 @@ declare global {
|
|
|
1315
1334
|
/** Pass record - stores TSL pass nodes for render pipeline */
|
|
1316
1335
|
type PassRecord = Record<string, any>
|
|
1317
1336
|
|
|
1337
|
+
/** State passed to pipeline callbacks after the active pipeline has been created */
|
|
1338
|
+
type RenderPipelineCallbackState = RootState & {
|
|
1339
|
+
renderPipeline: ThreeRenderPipeline
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1318
1342
|
/** Setup callback - runs first to configure MRT, create additional passes */
|
|
1319
|
-
type RenderPipelineSetupCallback = (state:
|
|
1343
|
+
type RenderPipelineSetupCallback = (state: RenderPipelineCallbackState) => PassRecord | void
|
|
1320
1344
|
|
|
1321
1345
|
/** Main callback - runs second to configure outputNode, create effect passes */
|
|
1322
|
-
type RenderPipelineMainCallback = (state:
|
|
1346
|
+
type RenderPipelineMainCallback = (state: RenderPipelineCallbackState) => PassRecord | void
|
|
1323
1347
|
|
|
1324
1348
|
/** Return type for useRenderPipeline hook */
|
|
1325
1349
|
interface UseRenderPipelineReturn {
|
|
@@ -1635,9 +1659,9 @@ type EnvironmentProps = {
|
|
|
1635
1659
|
blur?: number;
|
|
1636
1660
|
backgroundBlurriness?: number;
|
|
1637
1661
|
backgroundIntensity?: number;
|
|
1638
|
-
backgroundRotation?: Euler
|
|
1662
|
+
backgroundRotation?: Euler;
|
|
1639
1663
|
environmentIntensity?: number;
|
|
1640
|
-
environmentRotation?: Euler
|
|
1664
|
+
environmentRotation?: Euler;
|
|
1641
1665
|
map?: Texture$1;
|
|
1642
1666
|
preset?: PresetsType;
|
|
1643
1667
|
scene?: Scene | React$1.RefObject<Scene>;
|
|
@@ -1721,7 +1745,7 @@ declare function EnvironmentCube({ background, scene, blur, backgroundBlurriness
|
|
|
1721
1745
|
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
1746
|
declare module '@react-three/fiber' {
|
|
1723
1747
|
interface ThreeElements {
|
|
1724
|
-
groundProjectedEnvImpl: ThreeElement
|
|
1748
|
+
groundProjectedEnvImpl: ThreeElement<typeof GroundedSkybox>;
|
|
1725
1749
|
}
|
|
1726
1750
|
}
|
|
1727
1751
|
/**
|
|
@@ -1821,6 +1845,24 @@ declare module '@react-three/fiber' {
|
|
|
1821
1845
|
*/
|
|
1822
1846
|
declare function Environment(props: EnvironmentProps): react_jsx_runtime.JSX.Element;
|
|
1823
1847
|
|
|
1848
|
+
/**
|
|
1849
|
+
* Moves every trace of interactivity from one object to its replacement, for reconstruction.
|
|
1850
|
+
*
|
|
1851
|
+
* When `args` or a `primitive`'s `object` changes, R3F builds a new three object and keeps the same
|
|
1852
|
+
* instance. Removing the old object from the interaction state and registering the new one from
|
|
1853
|
+
* scratch makes events *work* again (#3778), but it forgets what was in flight: a pointer resting on
|
|
1854
|
+
* the object fires a second `onPointerEnter` without ever having left, and an active pointer capture
|
|
1855
|
+
* is dropped mid-drag. Rewriting the references instead keeps the interaction continuous across a
|
|
1856
|
+
* swap the user never asked to see (#3744).
|
|
1857
|
+
*
|
|
1858
|
+
* Captures are re-keyed rather than released, so the DOM-level capture on `captureData.target` is
|
|
1859
|
+
* left alone — releasing and re-acquiring it is precisely the glitch being avoided.
|
|
1860
|
+
*
|
|
1861
|
+
* Visibility handlers are deliberately not transferred: that registry is keyed by `object.uuid`, so
|
|
1862
|
+
* the replacement re-registers itself through `applyProps`. The old entry is dropped here so it
|
|
1863
|
+
* cannot outlive the object it described.
|
|
1864
|
+
*/
|
|
1865
|
+
declare function swapInteractivity(store: RootStore, object: Object3D, newObject: Object3D): void;
|
|
1824
1866
|
declare function removeInteractivity(store: RootStore, object: Object3D): void;
|
|
1825
1867
|
declare function createEvents(store: RootStore): {
|
|
1826
1868
|
handlePointer: (name: string) => (event: DomEvent) => void;
|
|
@@ -1861,7 +1903,7 @@ declare namespace useLoader {
|
|
|
1861
1903
|
*
|
|
1862
1904
|
* @param callback - Function called each frame with (state, delta). Optional if you only need scheduler access.
|
|
1863
1905
|
* @param priorityOrOptions - Either a priority number (backwards compat) or options object
|
|
1864
|
-
* @returns Controls object with step(), stepAll(), pause(), resume(), isPaused, id, scheduler
|
|
1906
|
+
* @returns Controls object with step(), stepAll(), invalidate(), pause(), resume(), isPaused, id, rootId, scheduler
|
|
1865
1907
|
*
|
|
1866
1908
|
* @example
|
|
1867
1909
|
* // Simple priority (backwards compat)
|
|
@@ -2157,7 +2199,10 @@ declare function addTail(callback: GlobalRenderCallback): () => void;
|
|
|
2157
2199
|
* Invalidates the view, requesting a frame to be rendered.
|
|
2158
2200
|
* In demand mode, this triggers the scheduler to run frames.
|
|
2159
2201
|
*
|
|
2160
|
-
*
|
|
2202
|
+
* With a state argument, only that root's jobs run on the requested frames; other
|
|
2203
|
+
* roots on 'demand' stay idle. Without one, every registered root is invalidated.
|
|
2204
|
+
*
|
|
2205
|
+
* @param state - Optional root state; targets the invalidation at that root
|
|
2161
2206
|
* @param frames - Number of frames to request (default: 1)
|
|
2162
2207
|
* @param stackFrames - If false, sets pendingFrames to frames. If true, adds to existing pendingFrames (default: false)
|
|
2163
2208
|
*
|
|
@@ -2168,14 +2213,16 @@ declare function invalidate(state?: RootState, frames?: number, stackFrames?: bo
|
|
|
2168
2213
|
* Advances the frameloop and runs render effects.
|
|
2169
2214
|
* Useful for when manually rendering via `frameloop="never"`.
|
|
2170
2215
|
*
|
|
2216
|
+
* With a state argument, only that root is stepped. Without one, every
|
|
2217
|
+
* registered root is stepped for backwards compatibility.
|
|
2218
|
+
*
|
|
2171
2219
|
* @param timestamp - The timestamp to use for this frame
|
|
2172
2220
|
* @param runGlobalEffects - Ignored (kept for backwards compat, global effects always run)
|
|
2173
|
-
* @param state -
|
|
2174
|
-
* @param frame - Ignored (kept for backwards compat)
|
|
2221
|
+
* @param state - Optional root state; targets the manual step at that root
|
|
2175
2222
|
*
|
|
2176
2223
|
* @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#advance
|
|
2177
2224
|
*/
|
|
2178
|
-
declare function advance(timestamp: number): void;
|
|
2225
|
+
declare function advance(timestamp: number, runGlobalEffects?: boolean, state?: RootState): void;
|
|
2179
2226
|
|
|
2180
2227
|
/* eslint-disable @definitelytyped/no-unnecessary-generics */
|
|
2181
2228
|
declare function ReactReconciler<
|
|
@@ -3246,11 +3293,6 @@ declare function flushSync<R>(fn: () => R): R;
|
|
|
3246
3293
|
declare const context: React$1.Context<RootStore>;
|
|
3247
3294
|
declare const createStore: (invalidate: (state?: RootState, frames?: number, stackFrames?: boolean) => void, advance: (timestamp: number, runGlobalEffects?: boolean, state?: RootState, frame?: XRFrame) => void) => RootStore;
|
|
3248
3295
|
|
|
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
3296
|
/**
|
|
3255
3297
|
* An SSR-friendly useLayoutEffect.
|
|
3256
3298
|
*
|
|
@@ -3734,5 +3776,5 @@ declare function isOnce(value: unknown): value is {
|
|
|
3734
3776
|
*/
|
|
3735
3777
|
declare function Canvas(props: CanvasProps): react_jsx_runtime.JSX.Element;
|
|
3736
3778
|
|
|
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,
|
|
3779
|
+
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
3780
|
export type { Act, Args, ArgsProp, AttachFnType, AttachType, BackgroundConfig, BackgroundProp, BaseRendererProps, Bridge, BufferLike, BufferRecord, BufferStore, Camera, CameraProps, CanvasProps, CanvasSchedulerConfig, Catalogue, Color, ColorManagementConfig, ComputeFunction, ConstructorRepresentation, DefaultGLProps, DefaultRendererProps, Disposable, DisposeOptions, DomEvent, Dpr, ElementProps, EnvironmentLoaderProps, EnvironmentProps, EquConfig, Euler, EventHandlers, EventManager, EventProps, Events, Extensions, FiberRoot, FilterFunction, FrameCallback, FrameNextCallback, FrameNextState, FrameState, Frameloop, GLProps, GLTFLike, GeometryProps, GeometryTransformProps, GlobalEffectType, GlobalRenderCallback, HostConfig, InferLoadResult, InjectState, InputLike, Instance, InstanceProps, LegacyInternalState as InternalState, Intersection, IntersectionEvent, IsAllOptional, IsOptional, Layers, LegacyInternalState, LegacyRenderer, LegacyRootState, LoaderInstance, LoaderLike, LoaderResult, MappedTextureType, MathProps, MathRepresentation, MathType, MathTypes, Matrix3, Matrix4, Mutable, MutableOrReadonlyParameters, NodeProps, NonFunctionKeys, ObjectMap, OffscreenCanvas$1 as OffscreenCanvas, Overwrite, Performance, PointerCaptureTarget, PointerState, PresetsType, PrimaryCanvasEntry, Properties, Quaternion, LegacyRenderer as R3FRenderer, RaycastableRepresentation, ReactProps, ReconcilerRoot, RenderCallback, RenderProps, RenderTargetOptions, Renderer, RendererConfigExtended, RendererFactory, RendererProps, Root, LegacyRootState as RootState, RootStore, SetBlock, Size, StorageLike, StorageRecord, StorageStore, Subscription, TSLNodeInput, TextureInput, TextureResult, ThreeCamera, ThreeElement, ThreeElements, ThreeElementsImpl, ThreeEvent, ThreeExports, ThreeToJSXElements, UnblockProps, UseTextureOptions, UseTexturesReturn, Vector2, Vector3, Vector4, VectorRepresentation, Viewport, VisibilityEntry, WebGLDefaultProps, WebGLProps, WebGLShadowConfig, XRManager, XRPointerConfig };
|
package/dist/legacy.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ import { FrameTimingState, FrameCallback as FrameCallback$1, SchedulerApi, UseFr
|
|
|
10
10
|
export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, Scheduler, SchedulerApi, UseFrameNextOptions, UseFrameOptions, getScheduler } from '@pmndrs/scheduler';
|
|
11
11
|
import { Options } from 'react-use-measure';
|
|
12
12
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
13
|
-
import { ThreeElement as ThreeElement$1, Euler as Euler$2 } from '@react-three/fiber';
|
|
14
13
|
import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox.js';
|
|
15
14
|
|
|
16
15
|
function _mergeNamespaces(n, m) {
|
|
@@ -39,9 +38,9 @@ function _mergeNamespaces(n, m) {
|
|
|
39
38
|
declare const R3F_BUILD_LEGACY = true;
|
|
40
39
|
declare const R3F_BUILD_WEBGPU = false;
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
type Inspector = never;
|
|
42
|
+
/** Not available on the legacy (WebGL-only) entry. */
|
|
43
|
+
declare function loadInspector(): Promise<never>;
|
|
45
44
|
declare const WebGPURenderer: {
|
|
46
45
|
new (): {};
|
|
47
46
|
};
|
|
@@ -59,7 +58,8 @@ var THREE = /*#__PURE__*/_mergeNamespaces({
|
|
|
59
58
|
R3F_BUILD_WEBGPU: R3F_BUILD_WEBGPU,
|
|
60
59
|
RenderTarget: RenderTarget,
|
|
61
60
|
RenderTargetCompat: WebGLRenderTarget,
|
|
62
|
-
WebGPURenderer: WebGPURenderer
|
|
61
|
+
WebGPURenderer: WebGPURenderer,
|
|
62
|
+
loadInspector: loadInspector
|
|
63
63
|
}, [THREE$1]);
|
|
64
64
|
|
|
65
65
|
//* Utility Types ==============================
|
|
@@ -497,6 +497,18 @@ interface InternalState {
|
|
|
497
497
|
* @see https://threejs.org/docs/#api/en/renderers/common/CanvasTarget
|
|
498
498
|
*/
|
|
499
499
|
canvasTarget?: CanvasTarget
|
|
500
|
+
/**
|
|
501
|
+
* Set when this root's canvas target has been resized and the backend's cached render pass
|
|
502
|
+
* descriptor (which holds a depth-stencil view built once per canvas) is therefore stale.
|
|
503
|
+
*
|
|
504
|
+
* Flushed by the canvas-target job in the `start` phase, which is the only place this root's
|
|
505
|
+
* target is guaranteed to be the renderer's active one — `backend.updateSize()` operates on
|
|
506
|
+
* whatever `getCanvasTarget()` returns, so calling it from the resize subscription would
|
|
507
|
+
* invalidate some other canvas's descriptor instead.
|
|
508
|
+
*
|
|
509
|
+
* @see https://github.com/pmndrs/react-three-fiber/issues/3847
|
|
510
|
+
*/
|
|
511
|
+
canvasTargetSizeDirty?: boolean
|
|
500
512
|
/**
|
|
501
513
|
* Whether multi-canvas rendering is active.
|
|
502
514
|
* True when any canvas uses `renderer={{ primaryCanvas: 'id' }}` to share a renderer.
|
|
@@ -706,12 +718,19 @@ type DefaultRendererProps = {
|
|
|
706
718
|
*/
|
|
707
719
|
interface CanvasSchedulerConfig {
|
|
708
720
|
/**
|
|
709
|
-
*
|
|
710
|
-
* Pass the `id` of another canvas.
|
|
721
|
+
* Run this Canvas root before the referenced Canvas root id(s).
|
|
711
722
|
*/
|
|
712
|
-
|
|
723
|
+
before?: string | string[]
|
|
713
724
|
/**
|
|
714
|
-
*
|
|
725
|
+
* Run this Canvas root after the referenced Canvas root id(s).
|
|
726
|
+
*/
|
|
727
|
+
after?: string | string[]
|
|
728
|
+
/**
|
|
729
|
+
* Numeric root order. Lower values run first.
|
|
730
|
+
*/
|
|
731
|
+
order?: number
|
|
732
|
+
/**
|
|
733
|
+
* Limit this Canvas's default render job (frames per second).
|
|
715
734
|
*/
|
|
716
735
|
fps?: number
|
|
717
736
|
}
|
|
@@ -1315,11 +1334,16 @@ declare global {
|
|
|
1315
1334
|
/** Pass record - stores TSL pass nodes for render pipeline */
|
|
1316
1335
|
type PassRecord = Record<string, any>
|
|
1317
1336
|
|
|
1337
|
+
/** State passed to pipeline callbacks after the active pipeline has been created */
|
|
1338
|
+
type RenderPipelineCallbackState = RootState & {
|
|
1339
|
+
renderPipeline: ThreeRenderPipeline
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1318
1342
|
/** Setup callback - runs first to configure MRT, create additional passes */
|
|
1319
|
-
type RenderPipelineSetupCallback = (state:
|
|
1343
|
+
type RenderPipelineSetupCallback = (state: RenderPipelineCallbackState) => PassRecord | void
|
|
1320
1344
|
|
|
1321
1345
|
/** Main callback - runs second to configure outputNode, create effect passes */
|
|
1322
|
-
type RenderPipelineMainCallback = (state:
|
|
1346
|
+
type RenderPipelineMainCallback = (state: RenderPipelineCallbackState) => PassRecord | void
|
|
1323
1347
|
|
|
1324
1348
|
/** Return type for useRenderPipeline hook */
|
|
1325
1349
|
interface UseRenderPipelineReturn {
|
|
@@ -1635,9 +1659,9 @@ type EnvironmentProps = {
|
|
|
1635
1659
|
blur?: number;
|
|
1636
1660
|
backgroundBlurriness?: number;
|
|
1637
1661
|
backgroundIntensity?: number;
|
|
1638
|
-
backgroundRotation?: Euler
|
|
1662
|
+
backgroundRotation?: Euler;
|
|
1639
1663
|
environmentIntensity?: number;
|
|
1640
|
-
environmentRotation?: Euler
|
|
1664
|
+
environmentRotation?: Euler;
|
|
1641
1665
|
map?: Texture$1;
|
|
1642
1666
|
preset?: PresetsType;
|
|
1643
1667
|
scene?: Scene | React$1.RefObject<Scene>;
|
|
@@ -1721,7 +1745,7 @@ declare function EnvironmentCube({ background, scene, blur, backgroundBlurriness
|
|
|
1721
1745
|
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
1746
|
declare module '@react-three/fiber' {
|
|
1723
1747
|
interface ThreeElements {
|
|
1724
|
-
groundProjectedEnvImpl: ThreeElement
|
|
1748
|
+
groundProjectedEnvImpl: ThreeElement<typeof GroundedSkybox>;
|
|
1725
1749
|
}
|
|
1726
1750
|
}
|
|
1727
1751
|
/**
|
|
@@ -1821,6 +1845,24 @@ declare module '@react-three/fiber' {
|
|
|
1821
1845
|
*/
|
|
1822
1846
|
declare function Environment(props: EnvironmentProps): react_jsx_runtime.JSX.Element;
|
|
1823
1847
|
|
|
1848
|
+
/**
|
|
1849
|
+
* Moves every trace of interactivity from one object to its replacement, for reconstruction.
|
|
1850
|
+
*
|
|
1851
|
+
* When `args` or a `primitive`'s `object` changes, R3F builds a new three object and keeps the same
|
|
1852
|
+
* instance. Removing the old object from the interaction state and registering the new one from
|
|
1853
|
+
* scratch makes events *work* again (#3778), but it forgets what was in flight: a pointer resting on
|
|
1854
|
+
* the object fires a second `onPointerEnter` without ever having left, and an active pointer capture
|
|
1855
|
+
* is dropped mid-drag. Rewriting the references instead keeps the interaction continuous across a
|
|
1856
|
+
* swap the user never asked to see (#3744).
|
|
1857
|
+
*
|
|
1858
|
+
* Captures are re-keyed rather than released, so the DOM-level capture on `captureData.target` is
|
|
1859
|
+
* left alone — releasing and re-acquiring it is precisely the glitch being avoided.
|
|
1860
|
+
*
|
|
1861
|
+
* Visibility handlers are deliberately not transferred: that registry is keyed by `object.uuid`, so
|
|
1862
|
+
* the replacement re-registers itself through `applyProps`. The old entry is dropped here so it
|
|
1863
|
+
* cannot outlive the object it described.
|
|
1864
|
+
*/
|
|
1865
|
+
declare function swapInteractivity(store: RootStore, object: Object3D, newObject: Object3D): void;
|
|
1824
1866
|
declare function removeInteractivity(store: RootStore, object: Object3D): void;
|
|
1825
1867
|
declare function createEvents(store: RootStore): {
|
|
1826
1868
|
handlePointer: (name: string) => (event: DomEvent) => void;
|
|
@@ -1861,7 +1903,7 @@ declare namespace useLoader {
|
|
|
1861
1903
|
*
|
|
1862
1904
|
* @param callback - Function called each frame with (state, delta). Optional if you only need scheduler access.
|
|
1863
1905
|
* @param priorityOrOptions - Either a priority number (backwards compat) or options object
|
|
1864
|
-
* @returns Controls object with step(), stepAll(), pause(), resume(), isPaused, id, scheduler
|
|
1906
|
+
* @returns Controls object with step(), stepAll(), invalidate(), pause(), resume(), isPaused, id, rootId, scheduler
|
|
1865
1907
|
*
|
|
1866
1908
|
* @example
|
|
1867
1909
|
* // Simple priority (backwards compat)
|
|
@@ -2157,7 +2199,10 @@ declare function addTail(callback: GlobalRenderCallback): () => void;
|
|
|
2157
2199
|
* Invalidates the view, requesting a frame to be rendered.
|
|
2158
2200
|
* In demand mode, this triggers the scheduler to run frames.
|
|
2159
2201
|
*
|
|
2160
|
-
*
|
|
2202
|
+
* With a state argument, only that root's jobs run on the requested frames; other
|
|
2203
|
+
* roots on 'demand' stay idle. Without one, every registered root is invalidated.
|
|
2204
|
+
*
|
|
2205
|
+
* @param state - Optional root state; targets the invalidation at that root
|
|
2161
2206
|
* @param frames - Number of frames to request (default: 1)
|
|
2162
2207
|
* @param stackFrames - If false, sets pendingFrames to frames. If true, adds to existing pendingFrames (default: false)
|
|
2163
2208
|
*
|
|
@@ -2168,14 +2213,16 @@ declare function invalidate(state?: RootState, frames?: number, stackFrames?: bo
|
|
|
2168
2213
|
* Advances the frameloop and runs render effects.
|
|
2169
2214
|
* Useful for when manually rendering via `frameloop="never"`.
|
|
2170
2215
|
*
|
|
2216
|
+
* With a state argument, only that root is stepped. Without one, every
|
|
2217
|
+
* registered root is stepped for backwards compatibility.
|
|
2218
|
+
*
|
|
2171
2219
|
* @param timestamp - The timestamp to use for this frame
|
|
2172
2220
|
* @param runGlobalEffects - Ignored (kept for backwards compat, global effects always run)
|
|
2173
|
-
* @param state -
|
|
2174
|
-
* @param frame - Ignored (kept for backwards compat)
|
|
2221
|
+
* @param state - Optional root state; targets the manual step at that root
|
|
2175
2222
|
*
|
|
2176
2223
|
* @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#advance
|
|
2177
2224
|
*/
|
|
2178
|
-
declare function advance(timestamp: number): void;
|
|
2225
|
+
declare function advance(timestamp: number, runGlobalEffects?: boolean, state?: RootState): void;
|
|
2179
2226
|
|
|
2180
2227
|
/* eslint-disable @definitelytyped/no-unnecessary-generics */
|
|
2181
2228
|
declare function ReactReconciler<
|
|
@@ -3246,11 +3293,6 @@ declare function flushSync<R>(fn: () => R): R;
|
|
|
3246
3293
|
declare const context: React$1.Context<RootStore>;
|
|
3247
3294
|
declare const createStore: (invalidate: (state?: RootState, frames?: number, stackFrames?: boolean) => void, advance: (timestamp: number, runGlobalEffects?: boolean, state?: RootState, frame?: XRFrame) => void) => RootStore;
|
|
3248
3295
|
|
|
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
3296
|
/**
|
|
3255
3297
|
* An SSR-friendly useLayoutEffect.
|
|
3256
3298
|
*
|
|
@@ -3734,5 +3776,5 @@ declare function isOnce(value: unknown): value is {
|
|
|
3734
3776
|
*/
|
|
3735
3777
|
declare function Canvas(props: CanvasProps): react_jsx_runtime.JSX.Element;
|
|
3736
3778
|
|
|
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,
|
|
3779
|
+
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
3780
|
export type { Act, Args, ArgsProp, AttachFnType, AttachType, BackgroundConfig, BackgroundProp, BaseRendererProps, Bridge, BufferLike, BufferRecord, BufferStore, Camera, CameraProps, CanvasProps, CanvasSchedulerConfig, Catalogue, Color, ColorManagementConfig, ComputeFunction, ConstructorRepresentation, DefaultGLProps, DefaultRendererProps, Disposable, DisposeOptions, DomEvent, Dpr, ElementProps, EnvironmentLoaderProps, EnvironmentProps, EquConfig, Euler, EventHandlers, EventManager, EventProps, Events, Extensions, FiberRoot, FilterFunction, FrameCallback, FrameNextCallback, FrameNextState, FrameState, Frameloop, GLProps, GLTFLike, GeometryProps, GeometryTransformProps, GlobalEffectType, GlobalRenderCallback, HostConfig, InferLoadResult, InjectState, InputLike, Instance, InstanceProps, LegacyInternalState as InternalState, Intersection, IntersectionEvent, IsAllOptional, IsOptional, Layers, LegacyInternalState, LegacyRenderer, LegacyRootState, LoaderInstance, LoaderLike, LoaderResult, MappedTextureType, MathProps, MathRepresentation, MathType, MathTypes, Matrix3, Matrix4, Mutable, MutableOrReadonlyParameters, NodeProps, NonFunctionKeys, ObjectMap, OffscreenCanvas$1 as OffscreenCanvas, Overwrite, Performance, PointerCaptureTarget, PointerState, PresetsType, PrimaryCanvasEntry, Properties, Quaternion, LegacyRenderer as R3FRenderer, RaycastableRepresentation, ReactProps, ReconcilerRoot, RenderCallback, RenderProps, RenderTargetOptions, Renderer, RendererConfigExtended, RendererFactory, RendererProps, Root, LegacyRootState as RootState, RootStore, SetBlock, Size, StorageLike, StorageRecord, StorageStore, Subscription, TSLNodeInput, TextureInput, TextureResult, ThreeCamera, ThreeElement, ThreeElements, ThreeElementsImpl, ThreeEvent, ThreeExports, ThreeToJSXElements, UnblockProps, UseTextureOptions, UseTexturesReturn, Vector2, Vector3, Vector4, VectorRepresentation, Viewport, VisibilityEntry, WebGLDefaultProps, WebGLProps, WebGLShadowConfig, XRManager, XRPointerConfig };
|