@react-three/fiber 10.0.0-canary.f49e56e → 10.0.0-canary.f81281f

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.
@@ -0,0 +1,27 @@
1
+ 'use strict';
2
+
3
+ const THREE = require('three');
4
+
5
+ function _interopNamespaceCompat(e) {
6
+ if (e && typeof e === 'object' && 'default' in e) return e;
7
+ const n = Object.create(null);
8
+ if (e) {
9
+ for (const k in e) {
10
+ n[k] = e[k];
11
+ }
12
+ }
13
+ n.default = e;
14
+ return n;
15
+ }
16
+
17
+ const THREE__namespace = /*#__PURE__*/_interopNamespaceCompat(THREE);
18
+
19
+ const webglSupport = {
20
+ kind: "webgl",
21
+ three: THREE__namespace,
22
+ Renderer: THREE__namespace.WebGLRenderer,
23
+ RenderTarget: THREE__namespace.WebGLRenderTarget,
24
+ CubeRenderTarget: THREE__namespace.WebGLCubeRenderTarget
25
+ };
26
+
27
+ exports.webglSupport = webglSupport;
@@ -0,0 +1,11 @@
1
+ import * as THREE from 'three';
2
+
3
+ const webglSupport = {
4
+ kind: "webgl",
5
+ three: THREE,
6
+ Renderer: THREE.WebGLRenderer,
7
+ RenderTarget: THREE.WebGLRenderTarget,
8
+ CubeRenderTarget: THREE.WebGLCubeRenderTarget
9
+ };
10
+
11
+ export { webglSupport };
@@ -0,0 +1,37 @@
1
+ 'use strict';
2
+
3
+ const THREE = require('three/webgpu');
4
+ const tsl = require('three/tsl');
5
+
6
+ function _interopNamespaceCompat(e) {
7
+ if (e && typeof e === 'object' && 'default' in e) return e;
8
+ const n = Object.create(null);
9
+ if (e) {
10
+ for (const k in e) {
11
+ n[k] = e[k];
12
+ }
13
+ }
14
+ n.default = e;
15
+ return n;
16
+ }
17
+
18
+ const THREE__namespace = /*#__PURE__*/_interopNamespaceCompat(THREE);
19
+
20
+ const webgpuSupport = {
21
+ kind: "webgpu",
22
+ three: THREE__namespace,
23
+ Renderer: THREE__namespace.WebGPURenderer,
24
+ RenderTarget: THREE__namespace.RenderTarget,
25
+ CubeRenderTarget: THREE__namespace.CubeRenderTarget,
26
+ CanvasTarget: THREE__namespace.CanvasTarget,
27
+ // What the occlusion observer (core/visibility.ts) is built from
28
+ occlusion: {
29
+ Node: THREE__namespace.Node,
30
+ NodeUpdateType: THREE__namespace.NodeUpdateType,
31
+ MeshBasicNodeMaterial: THREE__namespace.MeshBasicNodeMaterial,
32
+ uniform: tsl.uniform,
33
+ nodeObject: tsl.nodeObject
34
+ }
35
+ };
36
+
37
+ exports.webgpuSupport = webgpuSupport;
@@ -0,0 +1,21 @@
1
+ import * as THREE from 'three/webgpu';
2
+ import { nodeObject, uniform } from 'three/tsl';
3
+
4
+ const webgpuSupport = {
5
+ kind: "webgpu",
6
+ three: THREE,
7
+ Renderer: THREE.WebGPURenderer,
8
+ RenderTarget: THREE.RenderTarget,
9
+ CubeRenderTarget: THREE.CubeRenderTarget,
10
+ CanvasTarget: THREE.CanvasTarget,
11
+ // What the occlusion observer (core/visibility.ts) is built from
12
+ occlusion: {
13
+ Node: THREE.Node,
14
+ NodeUpdateType: THREE.NodeUpdateType,
15
+ MeshBasicNodeMaterial: THREE.MeshBasicNodeMaterial,
16
+ uniform,
17
+ nodeObject
18
+ }
19
+ };
20
+
21
+ export { webgpuSupport };
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ const extensions = require('./shared/fiber.B6zNSmwj.cjs');
4
+
5
+
6
+
7
+ exports.context = extensions.context;
8
+ exports.registerRootExtension = extensions.registerRootExtension;
9
+ exports.setRenderOverride = extensions.setRenderOverride;
10
+ exports.useFrame = extensions.useFrame;
11
+ exports.useStore = extensions.useStore;
12
+ exports.useThree = extensions.useThree;
@@ -0,0 +1,56 @@
1
+ import { z as FrameNextCallback } from './shared/fiber.Bw8YnGg5.cjs';
2
+ export { A as Act, B as Bridge, C as Camera, i as ComputeFunction, w as Disposable, f as DomEvent, D as Dpr, v as EquConfig, g as EventHandlers, k as EventManager, E as Events, h as FilterFunction, G as FrameCallback, x as FrameNextState, y as FrameState, F as Frameloop, a5 as InternalState, I as Intersection, e as IntersectionEvent, p as IsAllOptional, o as IsOptional, M as Mutable, N as NonFunctionKeys, u as ObjectMap, O as Overwrite, c as Performance, l as PointerCaptureTarget, P as PointerState, n as Properties, a4 as R3FRenderer, b as RenderCallback, R as RootExtension, a6 as RootState, d as RootStore, t as SetBlock, a as Size, S as Subscription, q as ThreeCamera, T as ThreeEvent, U as UnblockProps, V as Viewport, m as VisibilityEntry, X as XRManager, j as XRPointerConfig, a3 as context, r as registerRootExtension, s as setRenderOverride, a2 as useStore, a7 as useThree } from './shared/fiber.Bw8YnGg5.cjs';
3
+ import { UseFrameNextOptions, FrameNextControls } from '@pmndrs/scheduler';
4
+ export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, SchedulerApi, UseFrameNextOptions, UseFrameOptions } from '@pmndrs/scheduler';
5
+ import 'react';
6
+ import 'three';
7
+ import 'three/webgpu';
8
+ import 'zustand';
9
+ import 'zustand/traditional';
10
+ import 'three/tsl';
11
+
12
+ /**
13
+ * Frame hook with phase-based ordering, priority, and FPS throttling.
14
+ *
15
+ * Always delivers full RootState — works both inside and outside Canvas context:
16
+ * - Inside Canvas: Full RootState (renderer, scene, camera, etc.)
17
+ * - Outside Canvas: The job registers immediately but the callback is held until a
18
+ * Canvas adopts it, then runs with full RootState. For hostless / standalone
19
+ * frame loops with no Canvas, use `@pmndrs/scheduler` directly.
20
+ *
21
+ * Returns a controls object for manual stepping, pausing, and resuming.
22
+ *
23
+ * @param callback - Function called each frame with (state, delta). Optional if you only need scheduler access.
24
+ * @param priorityOrOptions - Either a priority number (backwards compat) or options object
25
+ * @returns Controls object with step(), stepAll(), invalidate(), pause(), resume(), isPaused, id, rootId, scheduler
26
+ *
27
+ * @example
28
+ * // Simple priority (backwards compat)
29
+ * useFrame((state, delta) => { ... }, 5)
30
+ *
31
+ * @example
32
+ * // With phase-based ordering
33
+ * useFrame((state, delta) => { ... }, { phase: 'physics' })
34
+ *
35
+ * @example
36
+ * // Outside Canvas - callback waits for a Canvas, then always has full state
37
+ * function UI() {
38
+ * useFrame((state, delta) => { syncUI(state.camera) });
39
+ * return <button>...</button>;
40
+ * }
41
+ *
42
+ * @example
43
+ * // Hostless / standalone loop (no Canvas) - use @pmndrs/scheduler directly
44
+ * import { getScheduler } from '@pmndrs/scheduler'
45
+ * getScheduler().register((state, delta) => { updateGame(delta) })
46
+ *
47
+ * @example
48
+ * // Scheduler-only access (no callback)
49
+ * const { scheduler } = useFrame()
50
+ * scheduler.pauseJob('some-job-id')
51
+ *
52
+ * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#useframe
53
+ */
54
+ declare function useFrame(callback?: FrameNextCallback, priorityOrOptions?: number | UseFrameNextOptions): FrameNextControls;
55
+
56
+ export { FrameNextCallback, useFrame };
@@ -0,0 +1,56 @@
1
+ import { z as FrameNextCallback } from './shared/fiber.Bw8YnGg5.mjs';
2
+ export { A as Act, B as Bridge, C as Camera, i as ComputeFunction, w as Disposable, f as DomEvent, D as Dpr, v as EquConfig, g as EventHandlers, k as EventManager, E as Events, h as FilterFunction, G as FrameCallback, x as FrameNextState, y as FrameState, F as Frameloop, a5 as InternalState, I as Intersection, e as IntersectionEvent, p as IsAllOptional, o as IsOptional, M as Mutable, N as NonFunctionKeys, u as ObjectMap, O as Overwrite, c as Performance, l as PointerCaptureTarget, P as PointerState, n as Properties, a4 as R3FRenderer, b as RenderCallback, R as RootExtension, a6 as RootState, d as RootStore, t as SetBlock, a as Size, S as Subscription, q as ThreeCamera, T as ThreeEvent, U as UnblockProps, V as Viewport, m as VisibilityEntry, X as XRManager, j as XRPointerConfig, a3 as context, r as registerRootExtension, s as setRenderOverride, a2 as useStore, a7 as useThree } from './shared/fiber.Bw8YnGg5.mjs';
3
+ import { UseFrameNextOptions, FrameNextControls } from '@pmndrs/scheduler';
4
+ export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, SchedulerApi, UseFrameNextOptions, UseFrameOptions } from '@pmndrs/scheduler';
5
+ import 'react';
6
+ import 'three';
7
+ import 'three/webgpu';
8
+ import 'zustand';
9
+ import 'zustand/traditional';
10
+ import 'three/tsl';
11
+
12
+ /**
13
+ * Frame hook with phase-based ordering, priority, and FPS throttling.
14
+ *
15
+ * Always delivers full RootState — works both inside and outside Canvas context:
16
+ * - Inside Canvas: Full RootState (renderer, scene, camera, etc.)
17
+ * - Outside Canvas: The job registers immediately but the callback is held until a
18
+ * Canvas adopts it, then runs with full RootState. For hostless / standalone
19
+ * frame loops with no Canvas, use `@pmndrs/scheduler` directly.
20
+ *
21
+ * Returns a controls object for manual stepping, pausing, and resuming.
22
+ *
23
+ * @param callback - Function called each frame with (state, delta). Optional if you only need scheduler access.
24
+ * @param priorityOrOptions - Either a priority number (backwards compat) or options object
25
+ * @returns Controls object with step(), stepAll(), invalidate(), pause(), resume(), isPaused, id, rootId, scheduler
26
+ *
27
+ * @example
28
+ * // Simple priority (backwards compat)
29
+ * useFrame((state, delta) => { ... }, 5)
30
+ *
31
+ * @example
32
+ * // With phase-based ordering
33
+ * useFrame((state, delta) => { ... }, { phase: 'physics' })
34
+ *
35
+ * @example
36
+ * // Outside Canvas - callback waits for a Canvas, then always has full state
37
+ * function UI() {
38
+ * useFrame((state, delta) => { syncUI(state.camera) });
39
+ * return <button>...</button>;
40
+ * }
41
+ *
42
+ * @example
43
+ * // Hostless / standalone loop (no Canvas) - use @pmndrs/scheduler directly
44
+ * import { getScheduler } from '@pmndrs/scheduler'
45
+ * getScheduler().register((state, delta) => { updateGame(delta) })
46
+ *
47
+ * @example
48
+ * // Scheduler-only access (no callback)
49
+ * const { scheduler } = useFrame()
50
+ * scheduler.pauseJob('some-job-id')
51
+ *
52
+ * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#useframe
53
+ */
54
+ declare function useFrame(callback?: FrameNextCallback, priorityOrOptions?: number | UseFrameNextOptions): FrameNextControls;
55
+
56
+ export { FrameNextCallback, useFrame };
@@ -0,0 +1,56 @@
1
+ import { z as FrameNextCallback } from './shared/fiber.Bw8YnGg5.js';
2
+ export { A as Act, B as Bridge, C as Camera, i as ComputeFunction, w as Disposable, f as DomEvent, D as Dpr, v as EquConfig, g as EventHandlers, k as EventManager, E as Events, h as FilterFunction, G as FrameCallback, x as FrameNextState, y as FrameState, F as Frameloop, a5 as InternalState, I as Intersection, e as IntersectionEvent, p as IsAllOptional, o as IsOptional, M as Mutable, N as NonFunctionKeys, u as ObjectMap, O as Overwrite, c as Performance, l as PointerCaptureTarget, P as PointerState, n as Properties, a4 as R3FRenderer, b as RenderCallback, R as RootExtension, a6 as RootState, d as RootStore, t as SetBlock, a as Size, S as Subscription, q as ThreeCamera, T as ThreeEvent, U as UnblockProps, V as Viewport, m as VisibilityEntry, X as XRManager, j as XRPointerConfig, a3 as context, r as registerRootExtension, s as setRenderOverride, a2 as useStore, a7 as useThree } from './shared/fiber.Bw8YnGg5.js';
3
+ import { UseFrameNextOptions, FrameNextControls } from '@pmndrs/scheduler';
4
+ export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, SchedulerApi, UseFrameNextOptions, UseFrameOptions } from '@pmndrs/scheduler';
5
+ import 'react';
6
+ import 'three';
7
+ import 'three/webgpu';
8
+ import 'zustand';
9
+ import 'zustand/traditional';
10
+ import 'three/tsl';
11
+
12
+ /**
13
+ * Frame hook with phase-based ordering, priority, and FPS throttling.
14
+ *
15
+ * Always delivers full RootState — works both inside and outside Canvas context:
16
+ * - Inside Canvas: Full RootState (renderer, scene, camera, etc.)
17
+ * - Outside Canvas: The job registers immediately but the callback is held until a
18
+ * Canvas adopts it, then runs with full RootState. For hostless / standalone
19
+ * frame loops with no Canvas, use `@pmndrs/scheduler` directly.
20
+ *
21
+ * Returns a controls object for manual stepping, pausing, and resuming.
22
+ *
23
+ * @param callback - Function called each frame with (state, delta). Optional if you only need scheduler access.
24
+ * @param priorityOrOptions - Either a priority number (backwards compat) or options object
25
+ * @returns Controls object with step(), stepAll(), invalidate(), pause(), resume(), isPaused, id, rootId, scheduler
26
+ *
27
+ * @example
28
+ * // Simple priority (backwards compat)
29
+ * useFrame((state, delta) => { ... }, 5)
30
+ *
31
+ * @example
32
+ * // With phase-based ordering
33
+ * useFrame((state, delta) => { ... }, { phase: 'physics' })
34
+ *
35
+ * @example
36
+ * // Outside Canvas - callback waits for a Canvas, then always has full state
37
+ * function UI() {
38
+ * useFrame((state, delta) => { syncUI(state.camera) });
39
+ * return <button>...</button>;
40
+ * }
41
+ *
42
+ * @example
43
+ * // Hostless / standalone loop (no Canvas) - use @pmndrs/scheduler directly
44
+ * import { getScheduler } from '@pmndrs/scheduler'
45
+ * getScheduler().register((state, delta) => { updateGame(delta) })
46
+ *
47
+ * @example
48
+ * // Scheduler-only access (no callback)
49
+ * const { scheduler } = useFrame()
50
+ * scheduler.pauseJob('some-job-id')
51
+ *
52
+ * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#useframe
53
+ */
54
+ declare function useFrame(callback?: FrameNextCallback, priorityOrOptions?: number | UseFrameNextOptions): FrameNextControls;
55
+
56
+ export { FrameNextCallback, useFrame };
@@ -0,0 +1 @@
1
+ export { c as context, r as registerRootExtension, s as setRenderOverride, b as useFrame, u as useStore, a as useThree } from './shared/fiber.C_v1rkNg.mjs';