@react-three/fiber 10.0.0-canary.20de6b2 → 10.0.0-canary.27df622

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/legacy.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import * as THREE$1 from 'three';
2
- import { WebGLCubeRenderTarget, WebGLRenderTarget, Color as Color$1, ColorRepresentation, Euler as Euler$1, Loader, RenderTargetOptions as RenderTargetOptions$1, Layers as Layers$1, Raycaster, Intersection as Intersection$1, BufferGeometry, Matrix4 as Matrix4$1, Quaternion as Quaternion$1, Node as Node$1, Vector2 as Vector2$1, Vector3 as Vector3$1, Vector4 as Vector4$1, Matrix3 as Matrix3$1, ColorSpace, Texture as Texture$1, CubeTexture, Scene, Object3D, Frustum, OrthographicCamera } from 'three';
2
+ import { WebGLCubeRenderTarget, WebGLRenderTarget, Color as Color$1, ColorRepresentation, Euler as Euler$1, Loader, RenderTargetOptions as RenderTargetOptions$1, Layers as Layers$1, Raycaster, Intersection as Intersection$1, BufferGeometry, Matrix4 as Matrix4$1, Quaternion as Quaternion$1, Object3D, Vector2 as Vector2$1, Vector3 as Vector3$1, Vector4 as Vector4$1, Matrix3 as Matrix3$1, ColorSpace, Texture as Texture$1, CubeTexture, Scene, Frustum, OrthographicCamera } from 'three';
3
3
  import * as React$1 from 'react';
4
4
  import { ReactNode, Component, RefObject, JSX } from 'react';
5
5
  import * as three_webgpu from 'three/webgpu';
6
- import { WebGPURenderer as WebGPURenderer$1, Node, StorageTexture, Data3DTexture, CanvasTarget, ShaderNodeObject } from 'three/webgpu';
6
+ import { WebGPURenderer as WebGPURenderer$1, Node, StorageTexture, Storage3DTexture, StorageArrayTexture, Data3DTexture, CanvasTarget } from 'three/webgpu';
7
7
  import { StoreApi } from 'zustand';
8
8
  import { UseBoundStoreWithEqualityFn } from 'zustand/traditional';
9
9
  import { FrameTimingState, FrameCallback as FrameCallback$1, SchedulerApi, UseFrameNextOptions, FrameNextControls } from '@pmndrs/scheduler';
@@ -12,20 +12,6 @@ import { Options } from 'react-use-measure';
12
12
  import * as react_jsx_runtime from 'react/jsx-runtime';
13
13
  import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox.js';
14
14
 
15
- function _mergeNamespaces(n, m) {
16
- m.forEach(function (e) {
17
- e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
18
- if (k !== 'default' && !(k in n)) {
19
- var d = Object.getOwnPropertyDescriptor(e, k);
20
- Object.defineProperty(n, k, d.get ? d : {
21
- enumerable: true,
22
- get: function () { return e[k]; }
23
- });
24
- }
25
- });
26
- });
27
- return Object.freeze(n);
28
- }
29
15
 
30
16
  /**
31
17
  * @fileoverview Internal Three.js re-exports - LEGACY ENTRY
@@ -41,26 +27,14 @@ declare const R3F_BUILD_WEBGPU = false;
41
27
  type Inspector = never;
42
28
  /** Not available on the legacy (WebGL-only) entry. */
43
29
  declare function loadInspector(): Promise<never>;
44
- declare const WebGPURenderer: {
45
- new (): {};
46
- };
30
+ declare class WebGPURenderer {
31
+ constructor();
32
+ }
47
33
 
48
34
  declare const RenderTarget: any;
49
35
 
50
36
  declare const CubeRenderTarget: any;
51
37
 
52
- var THREE = /*#__PURE__*/_mergeNamespaces({
53
- __proto__: null,
54
- CubeRenderTarget: CubeRenderTarget,
55
- CubeRenderTargetCompat: WebGLCubeRenderTarget,
56
- Inspector: Inspector,
57
- R3F_BUILD_LEGACY: R3F_BUILD_LEGACY,
58
- R3F_BUILD_WEBGPU: R3F_BUILD_WEBGPU,
59
- RenderTarget: RenderTarget,
60
- RenderTargetCompat: WebGLRenderTarget,
61
- WebGPURenderer: WebGPURenderer,
62
- loadInspector: loadInspector
63
- }, [THREE$1]);
64
38
 
65
39
  //* Utility Types ==============================
66
40
 
@@ -348,6 +322,7 @@ type BufferLike =
348
322
  | Uint16Array
349
323
  | Int16Array
350
324
  | THREE$1.BufferAttribute // Base class for all buffer attributes
325
+ | THREE$1.InterleavedBufferAttribute
351
326
  | Node // TSL buffer nodes (instancedArray, storage)
352
327
 
353
328
  /** Flat record of buffer-like values (no nested scopes) */
@@ -359,6 +334,25 @@ type BufferRecord = Record<string, BufferLike>
359
334
  */
360
335
  type BufferStore = Record<string, BufferLike | BufferRecord>
361
336
 
337
+ //* Node Types (useNodes) ========================================
338
+
339
+ /**
340
+ * Every node representation `useNodes` accepts and `state.nodes` holds: three's real `Node`,
341
+ * the callable proxy `Fn()` returns, and the legacy structural shape (`uuid`/`nodeType`) older
342
+ * code passes through. Creators are constrained to this same type, so the shape a creator returns
343
+ * and the shape the store holds are one type by construction.
344
+ */
345
+ type NodeLike = TSLNodeType | LegacyTSLNodeLike
346
+
347
+ /** Flat record of TSL nodes (no nested scopes) */
348
+ type NodeRecord<T extends NodeLike = NodeLike> = Record<string, T>
349
+
350
+ /**
351
+ * Node store that can contain both root-level nodes and scoped node objects.
352
+ * Structure: { wobble: OperatorNode, fx: { blur: ShaderCallable } }
353
+ */
354
+ type NodeStore = Record<string, NodeLike | NodeRecord>
355
+
362
356
  //* Storage Types (useGPUStorage) ========================================
363
357
 
364
358
  /**
@@ -373,7 +367,9 @@ type BufferStore = Record<string, BufferLike | BufferRecord>
373
367
  * ```
374
368
  */
375
369
  type StorageLike =
376
- | StorageTexture // GPU storage texture
370
+ | StorageTexture // 2D GPU storage texture
371
+ | Storage3DTexture // 3D GPU storage texture (volumes, fluid grids)
372
+ | StorageArrayTexture // 2D-array GPU storage texture
377
373
  | Data3DTexture // 3D texture (can be used as storage)
378
374
  | Node // TSL storage texture nodes (storageTexture)
379
375
 
@@ -492,8 +488,13 @@ interface InternalState {
492
488
  /** Container for child attachment (scene for root, original container for portals) */
493
489
  container?: THREE$1.Object3D
494
490
  /**
495
- * CanvasTarget for multi-canvas WebGPU rendering.
496
- * Created for all WebGPU canvases to support renderer sharing.
491
+ * The CanvasTarget this root sizes and renders through.
492
+ *
493
+ * A primary (`<Canvas id>`) owns the renderer's default target -- the one three itself built
494
+ * around the canvas element -- so sizing it is sizing the renderer. A secondary owns a target
495
+ * R3F created for its own element. Either way there is exactly one target per canvas element,
496
+ * and the canvas-target job makes it the renderer's active one before this root renders.
497
+ * Absent on WebGL and on an id-less WebGPU canvas, where the renderer is sized directly.
497
498
  * @see https://threejs.org/docs/#api/en/renderers/common/CanvasTarget
498
499
  */
499
500
  canvasTarget?: CanvasTarget
@@ -618,7 +619,7 @@ interface RootState {
618
619
  /** Global TSL uniform nodes - root-level uniforms + scoped sub-objects. Use useUniforms() hook */
619
620
  uniforms: UniformStore
620
621
  /** Global TSL nodes - root-level nodes + scoped sub-objects. Use useNodes() hook */
621
- nodes: Record<string, any>
622
+ nodes: NodeStore
622
623
  /** Global TSL buffer nodes - root-level buffers + scoped sub-objects. Use useBuffers() hook */
623
624
  buffers: BufferStore
624
625
  /** Global GPU storage (textures, etc.) - root-level storage + scoped sub-objects. Use useGPUStorage() hook */
@@ -630,7 +631,7 @@ interface RootState {
630
631
  /** WebGPU RenderPipeline instance - use useRenderPipeline() hook */
631
632
  renderPipeline: ThreeRenderPipeline | null
632
633
  /** Global TSL pass nodes for render pipeline - use useRenderPipeline() hook */
633
- passes: Record<string, any>
634
+ passes: PassRecord
634
635
  /** Internal version counter for HMR - incremented by rebuildNodes/rebuildUniforms to bust memoization */
635
636
  _hmrVersion: number
636
637
  /** Internal: whether setSize() has taken ownership of canvas dimensions */
@@ -718,12 +719,19 @@ type DefaultRendererProps = {
718
719
  */
719
720
  interface CanvasSchedulerConfig {
720
721
  /**
721
- * Render this canvas after another canvas completes.
722
- * Pass the `id` of another canvas.
722
+ * Run this Canvas root before the referenced Canvas root id(s).
723
+ */
724
+ before?: string | string[]
725
+ /**
726
+ * Run this Canvas root after the referenced Canvas root id(s).
723
727
  */
724
- after?: string
728
+ after?: string | string[]
725
729
  /**
726
- * Limit this canvas's render rate (frames per second).
730
+ * Numeric root order. Lower values run first.
731
+ */
732
+ order?: number
733
+ /**
734
+ * Limit this Canvas's default render job (frames per second).
727
735
  */
728
736
  fps?: number
729
737
  }
@@ -810,14 +818,17 @@ interface RenderProps<TCanvas extends HTMLCanvasElement | OffscreenCanvas$1> {
810
818
  performance?: Partial<Omit<Performance, 'regress'>>
811
819
  /** Target pixel ratio. Can clamp between a range: `[min, max]` */
812
820
  dpr?: Dpr
813
- /** Props that go into the default raycaster */
814
- raycaster?: Partial<THREE$1.Raycaster>
821
+ /**
822
+ * Props that go into the default raycaster. `params` is merged into the raycaster's defaults,
823
+ * so a single threshold can be set: `raycaster={{ params: { Points: { threshold: 0.2 } } }}`.
824
+ */
825
+ raycaster?: Partial<Omit<THREE$1.Raycaster, 'params'>> & { params?: Partial<THREE$1.RaycasterParameters> }
815
826
  /** A `THREE.Scene` instance or props that go into the default scene */
816
827
  scene?: THREE$1.Scene | Partial<THREE$1.Scene>
817
828
  /** A `THREE.Camera` instance or props that go into the default camera */
818
829
  camera?: CameraProps
819
830
  /** An R3F event manager to manage elements' pointer events */
820
- events?: (store: RootStore) => EventManager<HTMLElement>
831
+ events?: (store: RootStore) => EventManager<Element>
821
832
  /** Callback after the canvas has rendered (but not yet committed) */
822
833
  onCreated?: (state: RootState) => void
823
834
  /** Response for pointer clicks that have missed any target */
@@ -1046,7 +1057,7 @@ interface CanvasProps
1046
1057
  */
1047
1058
  resize?: Options
1048
1059
  /** The target where events are being subscribed to, default: the div that wraps canvas */
1049
- eventSource?: HTMLElement | React$1.RefObject<HTMLElement | null>
1060
+ eventSource?: Element | React$1.RefObject<Element | null>
1050
1061
  /** The event prefix that is cast into canvas pointer x/y events, default: "offset" */
1051
1062
  eventPrefix?: 'offset' | 'client' | 'page' | 'layer' | 'screen'
1052
1063
  /** Enable/disable automatic HMR refresh for TSL nodes and uniforms, default: true in dev */
@@ -1154,81 +1165,86 @@ interface LegacyRootState extends Omit<RootState, 'renderer' | 'internal'> {
1154
1165
 
1155
1166
  type RenderTargetOptions = RenderTargetOptions$1
1156
1167
 
1157
- //* Global Types ==============================
1168
+ //* Global TSL Types ==============================
1158
1169
 
1159
1170
  declare global {
1160
1171
  /**
1161
- * Uniform node type.
1162
- *
1163
- * This is three's own `UniformNode`, not a re-declaration of it. It previously was a
1164
- * hand-rolled `interface UniformNode<T> extends Node { value: T }`, which shadowed the real
1165
- * exported type globally — so R3F's ~58 references resolved to an approximation that was
1166
- * missing members three actually ships (`setName` among them) and had drifted to the wrong
1167
- * arity when three made `UniformNode` two-parameter.
1168
- *
1169
- * three's signature is `UniformNode<TNodeType, TValue>`. R3F only ever varies the value type,
1170
- * so the node type is fixed to `unknown` and the single parameter is kept for call-site
1171
- * ergonomics. The result is three's structural type, so members stay in sync with the
1172
- * installed three instead of needing to be mirrored by hand.
1172
+ * Broad callable-node fallback for dynamic store readers.
1173
+ * Creator hooks preserve the exact function signatures inferred from Three's `Fn`.
1173
1174
  */
1174
- type UniformNode<T = unknown> = three_webgpu.UniformNode<unknown, T>
1175
+ type CallableTSLNode = ((...params: never[]) => unknown) & {
1176
+ readonly shaderNode: unknown
1177
+ readonly id: number
1178
+ }
1175
1179
 
1176
- /**
1177
- * ShaderCallable - the return type of Fn()
1178
- * A callable shader function node that can be invoked with parameters.
1179
- * The function returns a ShaderNodeObject when called.
1180
- *
1181
- * @example
1182
- * ```tsx
1183
- * // Define a shader function
1184
- * const blendColorFn = Fn(([color1, color2, factor]) => {
1185
- * return mix(color1, color2, factor)
1186
- * })
1187
- *
1188
- * // Type when retrieving from nodes store
1189
- * const { blendColorFn } = nodes as { blendColorFn: ShaderCallable }
1190
- *
1191
- * // Or with specific return type
1192
- * const { myFn } = nodes as { myFn: ShaderCallable<THREE.Node> }
1193
- * ```
1194
- */
1195
- type ShaderCallable<R extends Node = Node> = ((...params: unknown[]) => ShaderNodeObject<R>) & Node
1180
+ /** Legacy structural node accepted when at least one historical marker exists. */
1181
+ type LegacyTSLNodeLike = {
1182
+ label?: ((label: string) => unknown) | string
1183
+ setName?: (name: string) => unknown
1184
+ } & ({ uuid: string | undefined; nodeType?: string | null } | { uuid?: string; nodeType: string | null | undefined })
1196
1185
 
1197
- /**
1198
- * ShaderNodeRef - a ShaderNodeObject wrapper around a Node
1199
- * This is the common return type for TSL operations (add, mul, sin, etc.)
1200
- *
1201
- * @example
1202
- * ```tsx
1203
- * const { wobble } = nodes as { wobble: ShaderNodeRef }
1204
- * ```
1205
- */
1206
- type ShaderNodeRef<T extends Node = Node> = ShaderNodeObject<T>
1186
+ /** Node type accepted by broad dynamic node-store readers. */
1187
+ type TSLNodeType = three_webgpu.Node | CallableTSLNode
1207
1188
 
1208
1189
  /**
1209
- * TSLNodeType - Union of all common TSL node types
1210
- * Used by ScopedStore to properly type node access from the store.
1211
- *
1212
- * Includes:
1213
- * - Node: base Three.js node type
1214
- * - ShaderCallable: function nodes created with Fn()
1215
- * - ShaderNodeObject: wrapped nodes from TSL operations (sin, mul, mix, etc.)
1216
- *
1217
- * @example
1218
- * ```tsx
1219
- * // In useLocalNodes, nodes are typed as TSLNodeType
1220
- * const { positionNode, blendColorFn } = useLocalNodes(({ nodes }) => ({
1221
- * positionNode: nodes.myPosition, // Works - Node is in union
1222
- * blendColorFn: nodes.myFn, // Works - ShaderCallable is in union
1223
- * }))
1224
- *
1225
- * // Can narrow with type guard or assertion when needed
1226
- * if (typeof blendColorFn === 'function') {
1227
- * blendColorFn(someColor, 0.5)
1228
- * }
1229
- * ```
1190
+ * Derive Three's shader node type from an existing node or a supported raw input.
1191
+ * Existing InputNode generics take precedence over structural value normalization.
1192
+ * Both generics must be inferred because Three's UniformNode intersects an unknown-typed
1193
+ * InputNode base with its concrete InputNode specialization.
1230
1194
  */
1231
- type TSLNodeType = Node | ShaderCallable<Node> | ShaderNodeObject<Node>
1195
+ type UniformNodeType<T> = T extends three_webgpu.UniformNode<infer TNodeType, infer _TValue>
1196
+ ? TNodeType
1197
+ : T extends three_webgpu.InputNode<infer TNodeType, infer _TValue>
1198
+ ? TNodeType
1199
+ : T extends number
1200
+ ? 'float'
1201
+ : T extends boolean
1202
+ ? 'bool'
1203
+ : T extends string | three_webgpu.Color | { r: number; g: number; b: number }
1204
+ ? 'color'
1205
+ : T extends three_webgpu.Vector4 | { x: number; y: number; z: number; w: number }
1206
+ ? 'vec4'
1207
+ : T extends three_webgpu.Vector3 | { x: number; y: number; z: number }
1208
+ ? 'vec3'
1209
+ : T extends three_webgpu.Vector2 | { x: number; y: number }
1210
+ ? 'vec2'
1211
+ : T extends three_webgpu.Matrix4
1212
+ ? 'mat4'
1213
+ : T extends three_webgpu.Matrix3
1214
+ ? 'mat3'
1215
+ : T extends three_webgpu.Matrix2
1216
+ ? 'mat2'
1217
+ : unknown
1218
+
1219
+ /** Derive the normalized JavaScript value stored by a uniform node. */
1220
+ type UniformNodeValue<T> = T extends three_webgpu.UniformNode<infer _TNodeType, infer TValue>
1221
+ ? TValue
1222
+ : T extends three_webgpu.InputNode<infer _TNodeType, infer TValue>
1223
+ ? TValue
1224
+ : T extends string | { r: number; g: number; b: number }
1225
+ ? three_webgpu.Color
1226
+ : T extends { x: number; y: number; z: number; w: number }
1227
+ ? three_webgpu.Vector4
1228
+ : T extends { x: number; y: number; z: number }
1229
+ ? three_webgpu.Vector3
1230
+ : T extends { x: number; y: number }
1231
+ ? three_webgpu.Vector2
1232
+ : T extends number
1233
+ ? number
1234
+ : T extends boolean
1235
+ ? boolean
1236
+ : T
1237
+
1238
+ /** Three's exact UniformNode with shader and value generics derived from an input. */
1239
+ type UniformNodeFor<T> = three_webgpu.UniformNode<UniformNodeType<T>, UniformNodeValue<T>>
1240
+
1241
+ /** Preserve every input key while mapping values to exact Three uniform nodes. */
1242
+ type UniformNodesFor<T extends UniformInputRecord> = {
1243
+ [K in keyof T]: UniformNodeFor<T[K]>
1244
+ }
1245
+
1246
+ /** Backward-compatible single-parameter uniform alias. */
1247
+ type UniformNode<T = unknown> = UniformNodeFor<T>
1232
1248
 
1233
1249
  /** Flat record of uniform nodes (no nested scopes) */
1234
1250
  type UniformRecord<T extends UniformNode = UniformNode> = Record<string, T>
@@ -1253,7 +1269,7 @@ declare global {
1253
1269
  * Acceptable input values for useUniforms - raw values that get converted to UniformNodes
1254
1270
  * Supports:
1255
1271
  * - Primitives: number, string (color), boolean
1256
- * - Three.js types: Color, Vector2/3/4, Matrix3/4, Euler, Quaternion
1272
+ * - Three.js types: Color, Vector2/3/4, Matrix2/3/4
1257
1273
  * - Plain objects: { x, y, z, w } converted to vectors
1258
1274
  * - TSL nodes: color(), vec3(), float() for type casting
1259
1275
  * - UniformNode: existing uniforms (reused as-is)
@@ -1266,88 +1282,124 @@ declare global {
1266
1282
  | three_webgpu.Vector2
1267
1283
  | three_webgpu.Vector3
1268
1284
  | three_webgpu.Vector4
1285
+ | three_webgpu.Matrix2
1269
1286
  | three_webgpu.Matrix3
1270
1287
  | three_webgpu.Matrix4
1271
- | three_webgpu.Euler
1272
- | three_webgpu.Quaternion
1273
- | { x: number; y?: number; z?: number; w?: number } // Plain objects converted to vectors
1288
+ | { x: number; y: number }
1289
+ | { x: number; y: number; z: number }
1290
+ | { x: number; y: number; z: number; w: number }
1274
1291
  | { r: number; g: number; b: number; a?: number } // Plain objects converted to Color
1275
- | Node // TSL nodes like color(), vec3(), float() for type casting
1292
+ | three_webgpu.Node // TSL nodes like color(), vec3(), float() for type casting
1276
1293
  | UniformNode
1277
1294
 
1278
1295
  /** Input record for useUniforms - accepts raw values or UniformNodes */
1279
1296
  type UniformInputRecord = Record<string, UniformValue>
1280
1297
  }
1281
1298
 
1282
- //* Module Augmentation ==============================
1283
-
1284
- declare module 'three/tsl' {
1299
+ declare global {
1285
1300
  /**
1286
- * Fn with array parameter destructuring
1287
- * @example Fn(([uv, skew]) => { ... })
1301
+ * three's own render pipeline type. Named here so the rest of R3F refers to three's shape
1302
+ * rather than `any`. three r183 renamed `PostProcessing` to `RenderPipeline`; our peer floor
1303
+ * is r185, so the new name is the only one.
1288
1304
  */
1289
- export function Fn<R extends Node = Node>(
1290
- jsFunc: (inputs: ShaderNodeObject<Node>[]) => ShaderNodeObject<R>,
1291
- ): ShaderCallable<R>
1305
+ type ThreeRenderPipeline = three_webgpu.RenderPipeline
1292
1306
 
1293
1307
  /**
1294
- * Fn with object parameter destructuring
1295
- * @example Fn(({ color, intensity }) => { ... })
1308
+ * The pass `useRenderPipeline` creates for you: three's own `PassNode`, as returned by
1309
+ * `pass(scene, camera)` from `three/tsl`. Referenced from three so members like
1310
+ * `getTextureNode`, `setMRT` and `dispose` track the installed version.
1296
1311
  */
1297
- export function Fn<T extends Record<string, unknown>, R extends Node = Node>(
1298
- jsFunc: (inputs: T) => ShaderNodeObject<R>,
1299
- ): ShaderCallable<R>
1312
+ type ScenePassNode = three_webgpu.PassNode
1300
1313
 
1301
1314
  /**
1302
- * Fn with array params + layout
1303
- * @example Fn(([a, b]) => { ... }, { layout: [...] })
1315
+ * Pass record - stores TSL pass nodes for render pipeline.
1316
+ *
1317
+ * `scenePass` is the only key the library owns. It is optional here because this is also the
1318
+ * shape of `state.passes`, which is `{}` before the pipeline exists and again after `reset()`
1319
+ * or `clearPasses()`. Inside the callbacks it is always present; see
1320
+ * {@link RenderPipelineCallbackState}.
1321
+ *
1322
+ * Every other key is user-registered, via a callback's return value. Those are TSL nodes of
1323
+ * any kind, not only passes: texture reads of an MRT attachment, effect nodes, extra
1324
+ * `pass()` instances. `Node` is the common base, so that is the bound. Narrow at the call
1325
+ * site when you need a member, e.g. `passes.velocity as TextureNode`.
1326
+ *
1327
+ * The index signature admits `undefined` because a key may simply not be registered, and
1328
+ * because the optional `scenePass` must be assignable to it: under `skipLibCheck: false` an
1329
+ * optional property whose type excludes `undefined` from the index signature is an error
1330
+ * (TS2411) for every consumer compiling these declarations.
1304
1331
  */
1305
- export function Fn<R extends Node = Node>(
1306
- jsFunc: (inputs: ShaderNodeObject<Node>[]) => ShaderNodeObject<R>,
1307
- layout: { layout?: unknown },
1308
- ): ShaderCallable<R>
1332
+ interface PassRecord {
1333
+ scenePass?: ScenePassNode
1334
+ [key: string]: three_webgpu.Node | undefined
1335
+ }
1309
1336
 
1310
1337
  /**
1311
- * Fn with object params + layout
1338
+ * State passed to pipeline callbacks after the active pipeline has been created.
1339
+ *
1340
+ * `passes.scenePass` is required here: the hook installs the default scene pass before either
1341
+ * callback runs, so callbacks can use it without a guard or a cast.
1342
+ *
1343
+ * `renderer` is narrowed to `WebGPURenderer` and `isLegacy` to `false`: the hook throws under
1344
+ * the legacy renderer before either callback can run, so a callback never sees WebGL.
1312
1345
  */
1313
- export function Fn<T extends Record<string, unknown>, R extends Node = Node>(
1314
- jsFunc: (inputs: T) => ShaderNodeObject<R>,
1315
- layout: { layout?: unknown },
1316
- ): ShaderCallable<R>
1317
- }
1346
+ type RenderPipelineCallbackState = RootState & {
1347
+ renderPipeline: ThreeRenderPipeline
1348
+ passes: PassRecord & { scenePass: ScenePassNode }
1349
+ renderer: three_webgpu.WebGPURenderer
1350
+ isLegacy: false
1351
+ }
1318
1352
 
1319
- declare global {
1320
1353
  /**
1321
- * three's own render pipeline type. Named here so the rest of R3F refers to three's shape
1322
- * rather than `any`. three r183 renamed `PostProcessing` to `RenderPipeline`; our peer floor
1323
- * is r185, so the new name is the only one.
1354
+ * What a callback may return to register entries into `state.passes`.
1355
+ *
1356
+ * `scenePass` is reserved. The hook owns that entry and its lifecycle: it caches the pass it
1357
+ * created, and `rebuild()` / `reset()` dispose that cached pass. A callback overwriting the
1358
+ * store entry would leave the store pointing at a node the hook never disposes, and the hook
1359
+ * disposing a pass nothing references. So returning it is a type error.
1324
1360
  */
1325
- type ThreeRenderPipeline = three_webgpu.RenderPipeline
1326
-
1327
- /** Pass record - stores TSL pass nodes for render pipeline */
1328
- type PassRecord = Record<string, any>
1361
+ type RegisteredPasses = Record<string, three_webgpu.Node> & { scenePass?: never }
1329
1362
 
1330
1363
  /** Setup callback - runs first to configure MRT, create additional passes */
1331
- type RenderPipelineSetupCallback = (state: RootState) => PassRecord | void
1364
+ type RenderPipelineSetupCallback = (state: RenderPipelineCallbackState) => RegisteredPasses | void
1332
1365
 
1333
1366
  /** Main callback - runs second to configure outputNode, create effect passes */
1334
- type RenderPipelineMainCallback = (state: RootState) => PassRecord | void
1367
+ type RenderPipelineMainCallback = (state: RenderPipelineCallbackState) => RegisteredPasses | void
1335
1368
 
1336
- /** Return type for useRenderPipeline hook */
1337
- interface UseRenderPipelineReturn {
1369
+ /** The imperative half of useRenderPipeline's return value, present in every state */
1370
+ interface UseRenderPipelineActions {
1338
1371
  /** Current passes from state */
1339
1372
  passes: PassRecord
1340
- /** RenderPipeline instance (null if not initialized) */
1341
- renderPipeline: ThreeRenderPipeline | null
1342
1373
  /** Clear all passes from state */
1343
1374
  clearPasses: () => void
1344
1375
  /** Reset RenderPipeline entirely (clears PP + passes) */
1345
1376
  reset: () => void
1346
1377
  /** Re-run setup/main callbacks with current closure values */
1347
1378
  rebuild: () => void
1348
- /** True when RenderPipeline is configured and ready */
1349
- isReady: boolean
1350
1379
  }
1380
+
1381
+ /**
1382
+ * Return type for useRenderPipeline hook, discriminated on `isReady`.
1383
+ *
1384
+ * `if (isReady)` narrows `renderPipeline` to non-null, which is what the docs already tell
1385
+ * callers to check. `passes.scenePass` deliberately stays optional in the ready branch:
1386
+ * `clearPasses()` empties the record while leaving the pipeline in place.
1387
+ */
1388
+ type UseRenderPipelineReturn = UseRenderPipelineActions &
1389
+ (
1390
+ | {
1391
+ /** True when RenderPipeline is configured and ready */
1392
+ isReady: true
1393
+ /** RenderPipeline instance */
1394
+ renderPipeline: ThreeRenderPipeline
1395
+ }
1396
+ | {
1397
+ /** False until the pipeline has been created */
1398
+ isReady: false
1399
+ /** Not initialized yet, or torn down by reset() */
1400
+ renderPipeline: null
1401
+ }
1402
+ )
1351
1403
  }
1352
1404
 
1353
1405
  type MutableOrReadonlyParameters<T extends (...args: any) => any> = Parameters<T> | Readonly<Parameters<T>>
@@ -1426,10 +1478,11 @@ type TSLNodeInput = { nodeType?: string | null; uuid?: string } | null
1426
1478
 
1427
1479
  /**
1428
1480
  * For node material properties (colorNode, positionNode, etc.), accept broader types
1429
- * since @types/three has broken inheritance for TSL node subclasses.
1481
+ * since @types/three has broken inheritance for TSL node subclasses. NodeClass requires
1482
+ * `nodeType`, so this structural key test remains neutral to the selected Three entry.
1430
1483
  */
1431
1484
  type NodeProps<P> = {
1432
- [K in keyof P as P[K] extends Node$1 | null ? K : never]?: TSLNodeInput
1485
+ [K in keyof P as NonNullable<P[K]> extends { nodeType: string | null } ? K : never]?: TSLNodeInput
1433
1486
  }
1434
1487
 
1435
1488
  interface ReactProps<P> {
@@ -1450,11 +1503,30 @@ type ThreeToJSXElements<T extends Record<string, any>> = {
1450
1503
  [K in keyof T & string as Uncapitalize<K>]: T[K] extends ConstructorRepresentation ? ThreeElement<T[K]> : never
1451
1504
  }
1452
1505
 
1506
+ /** Method names of Object3D, excluded from the `primitive` element's typed props. */
1507
+ type Object3DMethod = NonNullable<
1508
+ {
1509
+ [K in keyof Object3D]-?: Object3D[K] extends (...args: any[]) => any ? K : never
1510
+ }[keyof Object3D]
1511
+ >
1512
+
1453
1513
  type ThreeExports = typeof import('three')
1454
1514
  type ThreeElementsImpl = ThreeToJSXElements<ThreeExports>
1455
1515
 
1456
1516
  interface ThreeElements extends Omit<ThreeElementsImpl, 'audio' | 'source' | 'line' | 'path'> {
1457
- primitive: Omit<ThreeElement<any>, 'args'> & { object: object }
1517
+ /**
1518
+ * `primitive` wraps a pre-existing object, so its props cannot be derived from one class.
1519
+ * Events are typed from `EventHandlers` (`onClick={(e) => ...}` infers `e`), the ref is
1520
+ * untyped, and any other prop is accepted and applied to the object by name. Object3D's own
1521
+ * methods are left out of the typed surface: they return `this`, so a subclass element's
1522
+ * props (`ThreeElements['group']`) could not be spread onto a primitive otherwise.
1523
+ */
1524
+ primitive: Omit<ThreeElement<typeof Object3D>, 'args' | 'object' | 'ref' | 'onUpdate' | Object3DMethod> & {
1525
+ object: object
1526
+ ref?: React.Ref<any>
1527
+ onUpdate?: (self: any) => void
1528
+ [prop: string]: unknown
1529
+ }
1458
1530
  // Conflicts with DOM types can be accessed through a three* prefix
1459
1531
  threeAudio: ThreeElementsImpl['audio']
1460
1532
  threeSource: ThreeElementsImpl['source']
@@ -1495,6 +1567,7 @@ type three_d_Matrix3 = Matrix3;
1495
1567
  type three_d_Matrix4 = Matrix4;
1496
1568
  type three_d_MutableOrReadonlyParameters<T extends (...args: any) => any> = MutableOrReadonlyParameters<T>;
1497
1569
  type three_d_NodeProps<P> = NodeProps<P>;
1570
+ type three_d_Object3DMethod = Object3DMethod;
1498
1571
  type three_d_Quaternion = Quaternion;
1499
1572
  type three_d_RaycastableRepresentation = RaycastableRepresentation;
1500
1573
  type three_d_ReactProps<P> = ReactProps<P>;
@@ -1509,7 +1582,7 @@ type three_d_Vector3 = Vector3;
1509
1582
  type three_d_Vector4 = Vector4;
1510
1583
  type three_d_VectorRepresentation = VectorRepresentation;
1511
1584
  declare namespace three_d {
1512
- export type { three_d_Color as Color, three_d_ElementProps as ElementProps, three_d_Euler as Euler, three_d_EventProps as EventProps, three_d_GeometryProps as GeometryProps, three_d_GeometryTransformProps as GeometryTransformProps, three_d_Layers as Layers, three_d_MathProps as MathProps, three_d_MathRepresentation as MathRepresentation, three_d_MathType as MathType, three_d_MathTypes as MathTypes, three_d_Matrix3 as Matrix3, three_d_Matrix4 as Matrix4, three_d_MutableOrReadonlyParameters as MutableOrReadonlyParameters, three_d_NodeProps as NodeProps, three_d_Quaternion as Quaternion, three_d_RaycastableRepresentation as RaycastableRepresentation, three_d_ReactProps as ReactProps, three_d_TSLNodeInput as TSLNodeInput, three_d_ThreeElement as ThreeElement, three_d_ThreeElements as ThreeElements, three_d_ThreeElementsImpl as ThreeElementsImpl, three_d_ThreeExports as ThreeExports, three_d_ThreeToJSXElements as ThreeToJSXElements, three_d_Vector2 as Vector2, three_d_Vector3 as Vector3, three_d_Vector4 as Vector4, three_d_VectorRepresentation as VectorRepresentation };
1585
+ export type { three_d_Color as Color, three_d_ElementProps as ElementProps, three_d_Euler as Euler, three_d_EventProps as EventProps, three_d_GeometryProps as GeometryProps, three_d_GeometryTransformProps as GeometryTransformProps, three_d_Layers as Layers, three_d_MathProps as MathProps, three_d_MathRepresentation as MathRepresentation, three_d_MathType as MathType, three_d_MathTypes as MathTypes, three_d_Matrix3 as Matrix3, three_d_Matrix4 as Matrix4, three_d_MutableOrReadonlyParameters as MutableOrReadonlyParameters, three_d_NodeProps as NodeProps, three_d_Object3DMethod as Object3DMethod, three_d_Quaternion as Quaternion, three_d_RaycastableRepresentation as RaycastableRepresentation, three_d_ReactProps as ReactProps, three_d_TSLNodeInput as TSLNodeInput, three_d_ThreeElement as ThreeElement, three_d_ThreeElements as ThreeElements, three_d_ThreeElementsImpl as ThreeElementsImpl, three_d_ThreeExports as ThreeExports, three_d_ThreeToJSXElements as ThreeToJSXElements, three_d_Vector2 as Vector2, three_d_Vector3 as Vector3, three_d_Vector4 as Vector4, three_d_VectorRepresentation as VectorRepresentation };
1513
1586
  }
1514
1587
 
1515
1588
  /**
@@ -1858,7 +1931,7 @@ declare function createEvents(store: RootStore): {
1858
1931
  processDeferredPointer: (event: DomEvent, pointerId: number) => void;
1859
1932
  };
1860
1933
  /** Default R3F event manager for web */
1861
- declare function createPointerEvents(store: RootStore): EventManager<HTMLElement>;
1934
+ declare function createPointerEvents(store: RootStore): EventManager<Element>;
1862
1935
 
1863
1936
  /**
1864
1937
  * Gets or creates a memoized loader instance from a loader constructor or returns the loader if it's already an instance.
@@ -1891,7 +1964,7 @@ declare namespace useLoader {
1891
1964
  *
1892
1965
  * @param callback - Function called each frame with (state, delta). Optional if you only need scheduler access.
1893
1966
  * @param priorityOrOptions - Either a priority number (backwards compat) or options object
1894
- * @returns Controls object with step(), stepAll(), pause(), resume(), isPaused, id, scheduler
1967
+ * @returns Controls object with step(), stepAll(), invalidate(), pause(), resume(), isPaused, id, rootId, scheduler
1895
1968
  *
1896
1969
  * @example
1897
1970
  * // Simple priority (backwards compat)
@@ -2187,7 +2260,10 @@ declare function addTail(callback: GlobalRenderCallback): () => void;
2187
2260
  * Invalidates the view, requesting a frame to be rendered.
2188
2261
  * In demand mode, this triggers the scheduler to run frames.
2189
2262
  *
2190
- * @param state - Optional root state (ignored in new scheduler, kept for backwards compat)
2263
+ * With a state argument, only that root's jobs run on the requested frames; other
2264
+ * roots on 'demand' stay idle. Without one, every registered root is invalidated.
2265
+ *
2266
+ * @param state - Optional root state; targets the invalidation at that root
2191
2267
  * @param frames - Number of frames to request (default: 1)
2192
2268
  * @param stackFrames - If false, sets pendingFrames to frames. If true, adds to existing pendingFrames (default: false)
2193
2269
  *
@@ -2198,14 +2274,16 @@ declare function invalidate(state?: RootState, frames?: number, stackFrames?: bo
2198
2274
  * Advances the frameloop and runs render effects.
2199
2275
  * Useful for when manually rendering via `frameloop="never"`.
2200
2276
  *
2277
+ * With a state argument, only that root is stepped. Without one, every
2278
+ * registered root is stepped for backwards compatibility.
2279
+ *
2201
2280
  * @param timestamp - The timestamp to use for this frame
2202
2281
  * @param runGlobalEffects - Ignored (kept for backwards compat, global effects always run)
2203
- * @param state - Ignored (kept for backwards compat)
2204
- * @param frame - Ignored (kept for backwards compat)
2282
+ * @param state - Optional root state; targets the manual step at that root
2205
2283
  *
2206
2284
  * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#advance
2207
2285
  */
2208
- declare function advance(timestamp: number): void;
2286
+ declare function advance(timestamp: number, runGlobalEffects?: boolean, state?: RootState): void;
2209
2287
 
2210
2288
  /* eslint-disable @definitelytyped/no-unnecessary-generics */
2211
2289
  declare function ReactReconciler<
@@ -3250,6 +3328,7 @@ declare namespace ReactReconciler {
3250
3328
 
3251
3329
  declare function extend<T extends ConstructorRepresentation>(objects: T): React$1.ExoticComponent<ThreeElement<T>>;
3252
3330
  declare function extend<T extends Catalogue>(objects: T): void;
3331
+ declare function extend(objects: Record<string, unknown>): void;
3253
3332
  declare const reconciler: ReactReconciler.Reconciler<RootStore, Instance<any>, void, Instance<any>, never, any>;
3254
3333
 
3255
3334
  declare const isRenderer: (def: any) => boolean;
@@ -3693,29 +3772,44 @@ declare const hasConstructor: (object: unknown) => object is {
3693
3772
  * Used to identify values that should be resolved from refs after mount.
3694
3773
  */
3695
3774
  declare const FROM_REF: unique symbol;
3775
+ /** The marker `fromRef()` returns; resolved by the reconciler in `commitMount`. */
3776
+ interface FromRefMarker<T = unknown, R = T> {
3777
+ [FROM_REF]: React$1.RefObject<T | null>;
3778
+ /** Optional transform applied to the resolved ref before assignment. */
3779
+ transform?: (value: T) => R;
3780
+ }
3696
3781
  /**
3697
3782
  * Defers prop application until the referenced object is available.
3698
3783
  * Useful for props like `target` that need sibling refs to be populated.
3699
3784
  *
3785
+ * Only top-level props on a three element are resolved: a marker nested inside another value
3786
+ * (an array, an options object) is never seen. When the prop needs the sibling *wrapped* rather
3787
+ * than assigned as-is, pass a `transform`; it runs once the ref is populated and its result is
3788
+ * what gets assigned.
3789
+ *
3700
3790
  * @param ref - React ref object to resolve at mount time
3701
- * @returns A marker value that applyProps will resolve after mount
3791
+ * @param transform - Optional mapping from the resolved object to the value the prop expects
3792
+ * @returns A marker value that the reconciler resolves after mount
3702
3793
  *
3703
3794
  * @example
3704
3795
  * const targetRef = useRef<THREE.Object3D>(null)
3705
3796
  *
3706
3797
  * <group ref={targetRef} position={[-3, -2, -15]} />
3707
3798
  * <spotLight target={fromRef(targetRef)} intensity={100} />
3799
+ *
3800
+ * @example
3801
+ * // Wrap the sibling: a node material's lightsNode needs a LightsNode, not the light itself
3802
+ * <meshPhongNodeMaterial lightsNode={fromRef(lightRef, (light) => lights([light]))} />
3708
3803
  */
3709
3804
  declare function fromRef<T>(ref: React$1.RefObject<T | null>): T;
3805
+ declare function fromRef<T, R>(ref: React$1.RefObject<T | null>, transform: (value: T) => R): R;
3710
3806
  /**
3711
3807
  * Type guard to check if a value is a fromRef marker.
3712
3808
  *
3713
3809
  * @param value - Value to check
3714
3810
  * @returns True if value is a fromRef marker
3715
3811
  */
3716
- declare function isFromRef(value: unknown): value is {
3717
- [FROM_REF]: React$1.RefObject<any>;
3718
- };
3812
+ declare function isFromRef(value: unknown): value is FromRefMarker<any, unknown>;
3719
3813
 
3720
3814
  /**
3721
3815
  * Symbol marker for mount-only method calls.
@@ -3742,7 +3836,15 @@ declare const ONCE: unique symbol;
3742
3836
  * // No arguments
3743
3837
  * <geometry center={once()} />
3744
3838
  */
3745
- declare function once<T>(...args: T[]): T;
3839
+ declare function once<A extends unknown[]>(...args: A): OnceValue<A>;
3840
+ /**
3841
+ * What `once(...args)` is typed as, so the marker is assignable to the prop it targets:
3842
+ * the single argument itself (`rotateX={once(angle)}`), the argument tuple for multi-argument
3843
+ * methods (`translate={once(x, y, z)}`), or `true` for a bare call (`center={once()}`).
3844
+ *
3845
+ * The runtime value is always the marker object; only the declared type follows the prop.
3846
+ */
3847
+ type OnceValue<A extends unknown[]> = A extends [] ? true : A extends [infer Single] ? Single : A;
3746
3848
  /**
3747
3849
  * Type guard to check if a value is a once marker.
3748
3850
  *
@@ -3760,4 +3862,4 @@ declare function isOnce(value: unknown): value is {
3760
3862
  declare function Canvas(props: CanvasProps): react_jsx_runtime.JSX.Element;
3761
3863
 
3762
3864
  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 };
3763
- 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 };
3865
+ 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, FromRefMarker, 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, Object3DMethod, ObjectMap, OffscreenCanvas$1 as OffscreenCanvas, OnceValue, 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 };