@react-three/fiber 10.0.0-canary.bc9af3b → 10.0.0-canary.c385e9f
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 +2603 -2415
- package/dist/index.d.cts +195 -34
- package/dist/index.d.mts +195 -34
- package/dist/index.d.ts +195 -34
- package/dist/index.mjs +2605 -2417
- package/dist/legacy.cjs +2599 -2416
- package/dist/legacy.d.cts +194 -37
- package/dist/legacy.d.mts +194 -37
- package/dist/legacy.d.ts +194 -37
- package/dist/legacy.mjs +2601 -2418
- package/dist/webgpu/index.cjs +2650 -2436
- package/dist/webgpu/index.d.cts +219 -98
- package/dist/webgpu/index.d.mts +219 -98
- package/dist/webgpu/index.d.ts +219 -98
- package/dist/webgpu/index.mjs +2653 -2439
- 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 ==============================
|
|
@@ -359,6 +359,33 @@ type BufferRecord = Record<string, BufferLike>
|
|
|
359
359
|
*/
|
|
360
360
|
type BufferStore = Record<string, BufferLike | BufferRecord>
|
|
361
361
|
|
|
362
|
+
//* Node Types (useNodes) ========================================
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Structural shape of a TSL node as stored on `state.nodes`.
|
|
366
|
+
*
|
|
367
|
+
* Deliberately minimal rather than three's nominal `Node`: in @types/three several node classes
|
|
368
|
+
* TSL hands back (OperatorNode, ConstNode, ...) do not extend `Node` cleanly, so a `Node` bound
|
|
369
|
+
* would reject values `useNodes` creators legitimately return. This is the same shape
|
|
370
|
+
* `useNodes` already constrains creators to (`TSLNodeLike`).
|
|
371
|
+
*/
|
|
372
|
+
interface NodeLike {
|
|
373
|
+
uuid?: string
|
|
374
|
+
nodeType?: string | null
|
|
375
|
+
/** label method for chaining - sets the node's label and returns self */
|
|
376
|
+
label?: ((label: string) => NodeLike) | string
|
|
377
|
+
setName?: (name: string) => this
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/** Flat record of TSL nodes (no nested scopes) */
|
|
381
|
+
type NodeRecord = Record<string, NodeLike>
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Node store that can contain both root-level nodes and scoped node objects.
|
|
385
|
+
* Structure: { wobble: OperatorNode, fx: { blur: ShaderCallable } }
|
|
386
|
+
*/
|
|
387
|
+
type NodeStore = Record<string, NodeLike | NodeRecord>
|
|
388
|
+
|
|
362
389
|
//* Storage Types (useGPUStorage) ========================================
|
|
363
390
|
|
|
364
391
|
/**
|
|
@@ -497,6 +524,18 @@ interface InternalState {
|
|
|
497
524
|
* @see https://threejs.org/docs/#api/en/renderers/common/CanvasTarget
|
|
498
525
|
*/
|
|
499
526
|
canvasTarget?: CanvasTarget
|
|
527
|
+
/**
|
|
528
|
+
* Set when this root's canvas target has been resized and the backend's cached render pass
|
|
529
|
+
* descriptor (which holds a depth-stencil view built once per canvas) is therefore stale.
|
|
530
|
+
*
|
|
531
|
+
* Flushed by the canvas-target job in the `start` phase, which is the only place this root's
|
|
532
|
+
* target is guaranteed to be the renderer's active one — `backend.updateSize()` operates on
|
|
533
|
+
* whatever `getCanvasTarget()` returns, so calling it from the resize subscription would
|
|
534
|
+
* invalidate some other canvas's descriptor instead.
|
|
535
|
+
*
|
|
536
|
+
* @see https://github.com/pmndrs/react-three-fiber/issues/3847
|
|
537
|
+
*/
|
|
538
|
+
canvasTargetSizeDirty?: boolean
|
|
500
539
|
/**
|
|
501
540
|
* Whether multi-canvas rendering is active.
|
|
502
541
|
* True when any canvas uses `renderer={{ primaryCanvas: 'id' }}` to share a renderer.
|
|
@@ -606,7 +645,7 @@ interface RootState {
|
|
|
606
645
|
/** Global TSL uniform nodes - root-level uniforms + scoped sub-objects. Use useUniforms() hook */
|
|
607
646
|
uniforms: UniformStore
|
|
608
647
|
/** Global TSL nodes - root-level nodes + scoped sub-objects. Use useNodes() hook */
|
|
609
|
-
nodes:
|
|
648
|
+
nodes: NodeStore
|
|
610
649
|
/** Global TSL buffer nodes - root-level buffers + scoped sub-objects. Use useBuffers() hook */
|
|
611
650
|
buffers: BufferStore
|
|
612
651
|
/** Global GPU storage (textures, etc.) - root-level storage + scoped sub-objects. Use useGPUStorage() hook */
|
|
@@ -618,7 +657,7 @@ interface RootState {
|
|
|
618
657
|
/** WebGPU RenderPipeline instance - use useRenderPipeline() hook */
|
|
619
658
|
renderPipeline: ThreeRenderPipeline | null
|
|
620
659
|
/** Global TSL pass nodes for render pipeline - use useRenderPipeline() hook */
|
|
621
|
-
passes:
|
|
660
|
+
passes: PassRecord
|
|
622
661
|
/** Internal version counter for HMR - incremented by rebuildNodes/rebuildUniforms to bust memoization */
|
|
623
662
|
_hmrVersion: number
|
|
624
663
|
/** Internal: whether setSize() has taken ownership of canvas dimensions */
|
|
@@ -706,12 +745,19 @@ type DefaultRendererProps = {
|
|
|
706
745
|
*/
|
|
707
746
|
interface CanvasSchedulerConfig {
|
|
708
747
|
/**
|
|
709
|
-
*
|
|
710
|
-
|
|
748
|
+
* Run this Canvas root before the referenced Canvas root id(s).
|
|
749
|
+
*/
|
|
750
|
+
before?: string | string[]
|
|
751
|
+
/**
|
|
752
|
+
* Run this Canvas root after the referenced Canvas root id(s).
|
|
711
753
|
*/
|
|
712
|
-
after?: string
|
|
754
|
+
after?: string | string[]
|
|
713
755
|
/**
|
|
714
|
-
*
|
|
756
|
+
* Numeric root order. Lower values run first.
|
|
757
|
+
*/
|
|
758
|
+
order?: number
|
|
759
|
+
/**
|
|
760
|
+
* Limit this Canvas's default render job (frames per second).
|
|
715
761
|
*/
|
|
716
762
|
fps?: number
|
|
717
763
|
}
|
|
@@ -1159,7 +1205,33 @@ declare global {
|
|
|
1159
1205
|
* ergonomics. The result is three's structural type, so members stay in sync with the
|
|
1160
1206
|
* installed three instead of needing to be mirrored by hand.
|
|
1161
1207
|
*/
|
|
1162
|
-
type UniformNode<T = unknown> = three_webgpu.UniformNode<
|
|
1208
|
+
type UniformNode<T = unknown> = three_webgpu.UniformNode<UniformNodeTypeFor<T>, T>
|
|
1209
|
+
|
|
1210
|
+
/**
|
|
1211
|
+
* three's node type name for a uniform value type, mirroring the `uniform()` overloads.
|
|
1212
|
+
* A `UniformNode<number>` is a `Node<'float'>`, so TSL math (`.mul`, `.add`, ...) accepts it.
|
|
1213
|
+
* Unknown or unlisted value types resolve to `unknown`, which TSL math rejects: narrow with
|
|
1214
|
+
* `as UniformNode<number>` (or the matching value type) at the call site.
|
|
1215
|
+
*/
|
|
1216
|
+
type UniformNodeTypeFor<T> = T extends number
|
|
1217
|
+
? 'float'
|
|
1218
|
+
: T extends boolean
|
|
1219
|
+
? 'bool'
|
|
1220
|
+
: T extends three_webgpu.Color
|
|
1221
|
+
? 'color'
|
|
1222
|
+
: T extends three_webgpu.Vector2
|
|
1223
|
+
? 'vec2'
|
|
1224
|
+
: T extends three_webgpu.Vector3
|
|
1225
|
+
? 'vec3'
|
|
1226
|
+
: T extends three_webgpu.Vector4
|
|
1227
|
+
? 'vec4'
|
|
1228
|
+
: T extends three_webgpu.Matrix2
|
|
1229
|
+
? 'mat2'
|
|
1230
|
+
: T extends three_webgpu.Matrix3
|
|
1231
|
+
? 'mat3'
|
|
1232
|
+
: T extends three_webgpu.Matrix4
|
|
1233
|
+
? 'mat4'
|
|
1234
|
+
: unknown
|
|
1163
1235
|
|
|
1164
1236
|
/**
|
|
1165
1237
|
* ShaderCallable - the return type of Fn()
|
|
@@ -1312,30 +1384,97 @@ declare global {
|
|
|
1312
1384
|
*/
|
|
1313
1385
|
type ThreeRenderPipeline = three_webgpu.RenderPipeline
|
|
1314
1386
|
|
|
1315
|
-
/**
|
|
1316
|
-
|
|
1387
|
+
/**
|
|
1388
|
+
* The pass `useRenderPipeline` creates for you: three's own `PassNode`, as returned by
|
|
1389
|
+
* `pass(scene, camera)` from `three/tsl`. Referenced from three so members like
|
|
1390
|
+
* `getTextureNode`, `setMRT` and `dispose` track the installed version.
|
|
1391
|
+
*/
|
|
1392
|
+
type ScenePassNode = three_webgpu.PassNode
|
|
1393
|
+
|
|
1394
|
+
/**
|
|
1395
|
+
* Pass record - stores TSL pass nodes for render pipeline.
|
|
1396
|
+
*
|
|
1397
|
+
* `scenePass` is the only key the library owns. It is optional here because this is also the
|
|
1398
|
+
* shape of `state.passes`, which is `{}` before the pipeline exists and again after `reset()`
|
|
1399
|
+
* or `clearPasses()`. Inside the callbacks it is always present; see
|
|
1400
|
+
* {@link RenderPipelineCallbackState}.
|
|
1401
|
+
*
|
|
1402
|
+
* Every other key is user-registered, via a callback's return value. Those are TSL nodes of
|
|
1403
|
+
* any kind, not only passes: texture reads of an MRT attachment, effect nodes, extra
|
|
1404
|
+
* `pass()` instances. `Node` is the common base, so that is the bound. Narrow at the call
|
|
1405
|
+
* site when you need a member, e.g. `passes.velocity as TextureNode`.
|
|
1406
|
+
*/
|
|
1407
|
+
interface PassRecord {
|
|
1408
|
+
scenePass?: ScenePassNode
|
|
1409
|
+
[key: string]: three_webgpu.Node
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
/**
|
|
1413
|
+
* State passed to pipeline callbacks after the active pipeline has been created.
|
|
1414
|
+
*
|
|
1415
|
+
* `passes.scenePass` is required here: the hook installs the default scene pass before either
|
|
1416
|
+
* callback runs, so callbacks can use it without a guard or a cast.
|
|
1417
|
+
*
|
|
1418
|
+
* `renderer` is narrowed to `WebGPURenderer` and `isLegacy` to `false`: the hook throws under
|
|
1419
|
+
* the legacy renderer before either callback can run, so a callback never sees WebGL.
|
|
1420
|
+
*/
|
|
1421
|
+
type RenderPipelineCallbackState = RootState & {
|
|
1422
|
+
renderPipeline: ThreeRenderPipeline
|
|
1423
|
+
passes: PassRecord & { scenePass: ScenePassNode }
|
|
1424
|
+
renderer: three_webgpu.WebGPURenderer
|
|
1425
|
+
isLegacy: false
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
/**
|
|
1429
|
+
* What a callback may return to register entries into `state.passes`.
|
|
1430
|
+
*
|
|
1431
|
+
* `scenePass` is reserved. The hook owns that entry and its lifecycle: it caches the pass it
|
|
1432
|
+
* created, and `rebuild()` / `reset()` dispose that cached pass. A callback overwriting the
|
|
1433
|
+
* store entry would leave the store pointing at a node the hook never disposes, and the hook
|
|
1434
|
+
* disposing a pass nothing references. So returning it is a type error.
|
|
1435
|
+
*/
|
|
1436
|
+
type RegisteredPasses = Record<string, three_webgpu.Node> & { scenePass?: never }
|
|
1317
1437
|
|
|
1318
1438
|
/** Setup callback - runs first to configure MRT, create additional passes */
|
|
1319
|
-
type RenderPipelineSetupCallback = (state:
|
|
1439
|
+
type RenderPipelineSetupCallback = (state: RenderPipelineCallbackState) => RegisteredPasses | void
|
|
1320
1440
|
|
|
1321
1441
|
/** Main callback - runs second to configure outputNode, create effect passes */
|
|
1322
|
-
type RenderPipelineMainCallback = (state:
|
|
1442
|
+
type RenderPipelineMainCallback = (state: RenderPipelineCallbackState) => RegisteredPasses | void
|
|
1323
1443
|
|
|
1324
|
-
/**
|
|
1325
|
-
interface
|
|
1444
|
+
/** The imperative half of useRenderPipeline's return value, present in every state */
|
|
1445
|
+
interface UseRenderPipelineActions {
|
|
1326
1446
|
/** Current passes from state */
|
|
1327
1447
|
passes: PassRecord
|
|
1328
|
-
/** RenderPipeline instance (null if not initialized) */
|
|
1329
|
-
renderPipeline: ThreeRenderPipeline | null
|
|
1330
1448
|
/** Clear all passes from state */
|
|
1331
1449
|
clearPasses: () => void
|
|
1332
1450
|
/** Reset RenderPipeline entirely (clears PP + passes) */
|
|
1333
1451
|
reset: () => void
|
|
1334
1452
|
/** Re-run setup/main callbacks with current closure values */
|
|
1335
1453
|
rebuild: () => void
|
|
1336
|
-
/** True when RenderPipeline is configured and ready */
|
|
1337
|
-
isReady: boolean
|
|
1338
1454
|
}
|
|
1455
|
+
|
|
1456
|
+
/**
|
|
1457
|
+
* Return type for useRenderPipeline hook, discriminated on `isReady`.
|
|
1458
|
+
*
|
|
1459
|
+
* `if (isReady)` narrows `renderPipeline` to non-null, which is what the docs already tell
|
|
1460
|
+
* callers to check. `passes.scenePass` deliberately stays optional in the ready branch:
|
|
1461
|
+
* `clearPasses()` empties the record while leaving the pipeline in place.
|
|
1462
|
+
*/
|
|
1463
|
+
type UseRenderPipelineReturn = UseRenderPipelineActions &
|
|
1464
|
+
(
|
|
1465
|
+
| {
|
|
1466
|
+
/** True when RenderPipeline is configured and ready */
|
|
1467
|
+
isReady: true
|
|
1468
|
+
/** RenderPipeline instance */
|
|
1469
|
+
renderPipeline: ThreeRenderPipeline
|
|
1470
|
+
}
|
|
1471
|
+
| {
|
|
1472
|
+
/** False until the pipeline has been created */
|
|
1473
|
+
isReady: false
|
|
1474
|
+
/** Not initialized yet, or torn down by reset() */
|
|
1475
|
+
renderPipeline: null
|
|
1476
|
+
}
|
|
1477
|
+
)
|
|
1339
1478
|
}
|
|
1340
1479
|
|
|
1341
1480
|
type MutableOrReadonlyParameters<T extends (...args: any) => any> = Parameters<T> | Readonly<Parameters<T>>
|
|
@@ -1635,9 +1774,9 @@ type EnvironmentProps = {
|
|
|
1635
1774
|
blur?: number;
|
|
1636
1775
|
backgroundBlurriness?: number;
|
|
1637
1776
|
backgroundIntensity?: number;
|
|
1638
|
-
backgroundRotation?: Euler
|
|
1777
|
+
backgroundRotation?: Euler;
|
|
1639
1778
|
environmentIntensity?: number;
|
|
1640
|
-
environmentRotation?: Euler
|
|
1779
|
+
environmentRotation?: Euler;
|
|
1641
1780
|
map?: Texture$1;
|
|
1642
1781
|
preset?: PresetsType;
|
|
1643
1782
|
scene?: Scene | React$1.RefObject<Scene>;
|
|
@@ -1721,7 +1860,7 @@ declare function EnvironmentCube({ background, scene, blur, backgroundBlurriness
|
|
|
1721
1860
|
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
1861
|
declare module '@react-three/fiber' {
|
|
1723
1862
|
interface ThreeElements {
|
|
1724
|
-
groundProjectedEnvImpl: ThreeElement
|
|
1863
|
+
groundProjectedEnvImpl: ThreeElement<typeof GroundedSkybox>;
|
|
1725
1864
|
}
|
|
1726
1865
|
}
|
|
1727
1866
|
/**
|
|
@@ -1821,6 +1960,24 @@ declare module '@react-three/fiber' {
|
|
|
1821
1960
|
*/
|
|
1822
1961
|
declare function Environment(props: EnvironmentProps): react_jsx_runtime.JSX.Element;
|
|
1823
1962
|
|
|
1963
|
+
/**
|
|
1964
|
+
* Moves every trace of interactivity from one object to its replacement, for reconstruction.
|
|
1965
|
+
*
|
|
1966
|
+
* When `args` or a `primitive`'s `object` changes, R3F builds a new three object and keeps the same
|
|
1967
|
+
* instance. Removing the old object from the interaction state and registering the new one from
|
|
1968
|
+
* scratch makes events *work* again (#3778), but it forgets what was in flight: a pointer resting on
|
|
1969
|
+
* the object fires a second `onPointerEnter` without ever having left, and an active pointer capture
|
|
1970
|
+
* is dropped mid-drag. Rewriting the references instead keeps the interaction continuous across a
|
|
1971
|
+
* swap the user never asked to see (#3744).
|
|
1972
|
+
*
|
|
1973
|
+
* Captures are re-keyed rather than released, so the DOM-level capture on `captureData.target` is
|
|
1974
|
+
* left alone — releasing and re-acquiring it is precisely the glitch being avoided.
|
|
1975
|
+
*
|
|
1976
|
+
* Visibility handlers are deliberately not transferred: that registry is keyed by `object.uuid`, so
|
|
1977
|
+
* the replacement re-registers itself through `applyProps`. The old entry is dropped here so it
|
|
1978
|
+
* cannot outlive the object it described.
|
|
1979
|
+
*/
|
|
1980
|
+
declare function swapInteractivity(store: RootStore, object: Object3D, newObject: Object3D): void;
|
|
1824
1981
|
declare function removeInteractivity(store: RootStore, object: Object3D): void;
|
|
1825
1982
|
declare function createEvents(store: RootStore): {
|
|
1826
1983
|
handlePointer: (name: string) => (event: DomEvent) => void;
|
|
@@ -1861,7 +2018,7 @@ declare namespace useLoader {
|
|
|
1861
2018
|
*
|
|
1862
2019
|
* @param callback - Function called each frame with (state, delta). Optional if you only need scheduler access.
|
|
1863
2020
|
* @param priorityOrOptions - Either a priority number (backwards compat) or options object
|
|
1864
|
-
* @returns Controls object with step(), stepAll(), pause(), resume(), isPaused, id, scheduler
|
|
2021
|
+
* @returns Controls object with step(), stepAll(), invalidate(), pause(), resume(), isPaused, id, rootId, scheduler
|
|
1865
2022
|
*
|
|
1866
2023
|
* @example
|
|
1867
2024
|
* // Simple priority (backwards compat)
|
|
@@ -2157,7 +2314,10 @@ declare function addTail(callback: GlobalRenderCallback): () => void;
|
|
|
2157
2314
|
* Invalidates the view, requesting a frame to be rendered.
|
|
2158
2315
|
* In demand mode, this triggers the scheduler to run frames.
|
|
2159
2316
|
*
|
|
2160
|
-
*
|
|
2317
|
+
* With a state argument, only that root's jobs run on the requested frames; other
|
|
2318
|
+
* roots on 'demand' stay idle. Without one, every registered root is invalidated.
|
|
2319
|
+
*
|
|
2320
|
+
* @param state - Optional root state; targets the invalidation at that root
|
|
2161
2321
|
* @param frames - Number of frames to request (default: 1)
|
|
2162
2322
|
* @param stackFrames - If false, sets pendingFrames to frames. If true, adds to existing pendingFrames (default: false)
|
|
2163
2323
|
*
|
|
@@ -2168,14 +2328,16 @@ declare function invalidate(state?: RootState, frames?: number, stackFrames?: bo
|
|
|
2168
2328
|
* Advances the frameloop and runs render effects.
|
|
2169
2329
|
* Useful for when manually rendering via `frameloop="never"`.
|
|
2170
2330
|
*
|
|
2331
|
+
* With a state argument, only that root is stepped. Without one, every
|
|
2332
|
+
* registered root is stepped for backwards compatibility.
|
|
2333
|
+
*
|
|
2171
2334
|
* @param timestamp - The timestamp to use for this frame
|
|
2172
2335
|
* @param runGlobalEffects - Ignored (kept for backwards compat, global effects always run)
|
|
2173
|
-
* @param state -
|
|
2174
|
-
* @param frame - Ignored (kept for backwards compat)
|
|
2336
|
+
* @param state - Optional root state; targets the manual step at that root
|
|
2175
2337
|
*
|
|
2176
2338
|
* @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#advance
|
|
2177
2339
|
*/
|
|
2178
|
-
declare function advance(timestamp: number): void;
|
|
2340
|
+
declare function advance(timestamp: number, runGlobalEffects?: boolean, state?: RootState): void;
|
|
2179
2341
|
|
|
2180
2342
|
/* eslint-disable @definitelytyped/no-unnecessary-generics */
|
|
2181
2343
|
declare function ReactReconciler<
|
|
@@ -3246,11 +3408,6 @@ declare function flushSync<R>(fn: () => R): R;
|
|
|
3246
3408
|
declare const context: React$1.Context<RootStore>;
|
|
3247
3409
|
declare const createStore: (invalidate: (state?: RootState, frames?: number, stackFrames?: boolean) => void, advance: (timestamp: number, runGlobalEffects?: boolean, state?: RootState, frame?: XRFrame) => void) => RootStore;
|
|
3248
3410
|
|
|
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
3411
|
/**
|
|
3255
3412
|
* An SSR-friendly useLayoutEffect.
|
|
3256
3413
|
*
|
|
@@ -3734,5 +3891,5 @@ declare function isOnce(value: unknown): value is {
|
|
|
3734
3891
|
*/
|
|
3735
3892
|
declare function Canvas(props: CanvasProps): react_jsx_runtime.JSX.Element;
|
|
3736
3893
|
|
|
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,
|
|
3738
|
-
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 };
|
|
3894
|
+
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 };
|
|
3895
|
+
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, NodeLike, NodeProps, NodeRecord, NodeStore, 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 };
|