@react-three/fiber 10.0.0-canary.d458ee7 → 10.0.0-canary.d46ab63
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/extension.cjs +8 -8
- package/dist/extension.d.cts +50 -6
- package/dist/extension.d.mts +50 -6
- package/dist/extension.d.ts +50 -6
- package/dist/extension.mjs +1 -1
- package/dist/index.cjs +17 -19
- package/dist/index.d.cts +15 -47
- package/dist/index.d.mts +15 -47
- package/dist/index.d.ts +15 -47
- package/dist/index.mjs +7 -8
- package/dist/legacy.cjs +37 -15
- package/dist/legacy.d.cts +10 -7
- package/dist/legacy.d.mts +10 -7
- package/dist/legacy.d.ts +10 -7
- package/dist/legacy.mjs +13 -5
- package/dist/shared/{fiber.DNehrxK5.d.ts → fiber.34TOMPo3.d.cts} +157 -463
- package/dist/shared/fiber.BFuGd7gN.d.cts +90 -0
- package/dist/shared/{fiber.BgxhptM_.mjs → fiber.BSYBnw8x.mjs} +2066 -1497
- package/dist/shared/{fiber.B0oukOFO.mjs → fiber.Biz9olEe.mjs} +181 -64
- package/dist/shared/fiber.Bll9fqKA.d.mts +90 -0
- package/dist/shared/{fiber.TWXdbcWP.d.mts → fiber.CjMAAsJy.d.ts} +157 -463
- package/dist/shared/{fiber.I5Q4dVvl.d.cts → fiber.DQTSZ24m.d.cts} +488 -26
- package/dist/shared/{fiber.I5Q4dVvl.d.mts → fiber.DQTSZ24m.d.mts} +488 -26
- package/dist/shared/{fiber.I5Q4dVvl.d.ts → fiber.DQTSZ24m.d.ts} +488 -26
- package/dist/shared/fiber.DUgKvaq-.mjs +9 -0
- package/dist/shared/{fiber.khFlPHPf.cjs → fiber.DfiCufha.cjs} +186 -62
- package/dist/shared/fiber.DuA4F8L5.d.ts +90 -0
- package/dist/shared/{fiber.11sXr8Eb.d.cts → fiber.Dy7Uz273.d.mts} +157 -463
- package/dist/shared/fiber.X4yI0DId.cjs +14 -0
- package/dist/shared/{fiber.EDf0d92E.cjs → fiber.nDnBf1np.cjs} +2092 -1523
- package/dist/webgpu/index.cjs +16 -18
- package/dist/webgpu/index.d.cts +17 -78
- package/dist/webgpu/index.d.mts +17 -78
- package/dist/webgpu/index.d.ts +17 -78
- package/dist/webgpu/index.mjs +7 -9
- package/package.json +3 -3
- package/dist/chunks/webgl.cjs +0 -27
- package/dist/chunks/webgl.mjs +0 -11
- package/dist/shared/fiber.BU0vBHc9.d.mts +0 -48
- package/dist/shared/fiber.Cx-UAmMb.d.ts +0 -48
- package/dist/shared/fiber.DAl4H27x.d.cts +0 -48
package/dist/extension.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const textureStaging = require('./shared/fiber.DfiCufha.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
exports.context =
|
|
8
|
-
exports.getTextureView =
|
|
9
|
-
exports.registerRootExtension =
|
|
10
|
-
exports.setRenderOverride =
|
|
11
|
-
exports.useFrame =
|
|
12
|
-
exports.useStore =
|
|
13
|
-
exports.useThree =
|
|
7
|
+
exports.context = textureStaging.context;
|
|
8
|
+
exports.getTextureView = textureStaging.getTextureView;
|
|
9
|
+
exports.registerRootExtension = textureStaging.registerRootExtension;
|
|
10
|
+
exports.setRenderOverride = textureStaging.setRenderOverride;
|
|
11
|
+
exports.useFrame = textureStaging.useFrame;
|
|
12
|
+
exports.useStore = textureStaging.useStore;
|
|
13
|
+
exports.useThree = textureStaging.useThree;
|
package/dist/extension.d.cts
CHANGED
|
@@ -1,14 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
import { Texture } from 'three';
|
|
1
|
+
import { aN as FrameNextCallback, J as RootStore } from './shared/fiber.DQTSZ24m.cjs';
|
|
2
|
+
export { aE as Act, aF as Bridge, U as Camera, a1 as ComputeFunction, aK as Disposable, Z as DomEvent, D as Dpr, aJ as EquConfig, $ as EventHandlers, a3 as EventManager, _ as Events, a0 as FilterFunction, aO as FrameCallback, aL as FrameNextState, aM as FrameState, F as Frameloop, I as InternalState, K as Intersection, W as IntersectionEvent, aC as IsAllOptional, aB as IsOptional, aA as Mutable, ax as NonFunctionKeys, aI as ObjectMap, ay as Overwrite, B as Performance, a4 as PointerCaptureTarget, P as PointerState, az as Properties, x as R3FRenderer, A as RenderCallback, v as RootExtension, H as RootState, aG as SetBlock, y as Size, S as Subscription, aD as ThreeCamera, Y as ThreeEvent, aH as UnblockProps, z as Viewport, a5 as VisibilityEntry, X as XRManager, a2 as XRPointerConfig, w as context, t as registerRootExtension, u as setRenderOverride, a$ as useStore, b0 as useThree } from './shared/fiber.DQTSZ24m.cjs';
|
|
3
|
+
import { UseFrameNextOptions, FrameNextControls } from '@pmndrs/scheduler';
|
|
5
4
|
export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, SchedulerApi, UseFrameNextOptions, UseFrameOptions } from '@pmndrs/scheduler';
|
|
6
|
-
import '
|
|
5
|
+
import { Texture } from 'three';
|
|
7
6
|
import 'three/webgpu';
|
|
7
|
+
import 'react';
|
|
8
8
|
import 'zustand';
|
|
9
9
|
import 'zustand/traditional';
|
|
10
10
|
import 'three/tsl';
|
|
11
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
|
+
|
|
12
56
|
/**
|
|
13
57
|
* The texture registry as a reader during render should see it: registered textures, plus those a
|
|
14
58
|
* `useTexture` earlier in this render loaded but has not registered yet. Returns the registry Map
|
|
@@ -16,4 +60,4 @@ import 'three/tsl';
|
|
|
16
60
|
*/
|
|
17
61
|
declare function getTextureView(store: RootStore): ReadonlyMap<string, Texture>;
|
|
18
62
|
|
|
19
|
-
export { RootStore, getTextureView };
|
|
63
|
+
export { FrameNextCallback, RootStore, getTextureView, useFrame };
|
package/dist/extension.d.mts
CHANGED
|
@@ -1,14 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
import { Texture } from 'three';
|
|
1
|
+
import { aN as FrameNextCallback, J as RootStore } from './shared/fiber.DQTSZ24m.mjs';
|
|
2
|
+
export { aE as Act, aF as Bridge, U as Camera, a1 as ComputeFunction, aK as Disposable, Z as DomEvent, D as Dpr, aJ as EquConfig, $ as EventHandlers, a3 as EventManager, _ as Events, a0 as FilterFunction, aO as FrameCallback, aL as FrameNextState, aM as FrameState, F as Frameloop, I as InternalState, K as Intersection, W as IntersectionEvent, aC as IsAllOptional, aB as IsOptional, aA as Mutable, ax as NonFunctionKeys, aI as ObjectMap, ay as Overwrite, B as Performance, a4 as PointerCaptureTarget, P as PointerState, az as Properties, x as R3FRenderer, A as RenderCallback, v as RootExtension, H as RootState, aG as SetBlock, y as Size, S as Subscription, aD as ThreeCamera, Y as ThreeEvent, aH as UnblockProps, z as Viewport, a5 as VisibilityEntry, X as XRManager, a2 as XRPointerConfig, w as context, t as registerRootExtension, u as setRenderOverride, a$ as useStore, b0 as useThree } from './shared/fiber.DQTSZ24m.mjs';
|
|
3
|
+
import { UseFrameNextOptions, FrameNextControls } from '@pmndrs/scheduler';
|
|
5
4
|
export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, SchedulerApi, UseFrameNextOptions, UseFrameOptions } from '@pmndrs/scheduler';
|
|
6
|
-
import '
|
|
5
|
+
import { Texture } from 'three';
|
|
7
6
|
import 'three/webgpu';
|
|
7
|
+
import 'react';
|
|
8
8
|
import 'zustand';
|
|
9
9
|
import 'zustand/traditional';
|
|
10
10
|
import 'three/tsl';
|
|
11
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
|
+
|
|
12
56
|
/**
|
|
13
57
|
* The texture registry as a reader during render should see it: registered textures, plus those a
|
|
14
58
|
* `useTexture` earlier in this render loaded but has not registered yet. Returns the registry Map
|
|
@@ -16,4 +60,4 @@ import 'three/tsl';
|
|
|
16
60
|
*/
|
|
17
61
|
declare function getTextureView(store: RootStore): ReadonlyMap<string, Texture>;
|
|
18
62
|
|
|
19
|
-
export { RootStore, getTextureView };
|
|
63
|
+
export { FrameNextCallback, RootStore, getTextureView, useFrame };
|
package/dist/extension.d.ts
CHANGED
|
@@ -1,14 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
import { Texture } from 'three';
|
|
1
|
+
import { aN as FrameNextCallback, J as RootStore } from './shared/fiber.DQTSZ24m.js';
|
|
2
|
+
export { aE as Act, aF as Bridge, U as Camera, a1 as ComputeFunction, aK as Disposable, Z as DomEvent, D as Dpr, aJ as EquConfig, $ as EventHandlers, a3 as EventManager, _ as Events, a0 as FilterFunction, aO as FrameCallback, aL as FrameNextState, aM as FrameState, F as Frameloop, I as InternalState, K as Intersection, W as IntersectionEvent, aC as IsAllOptional, aB as IsOptional, aA as Mutable, ax as NonFunctionKeys, aI as ObjectMap, ay as Overwrite, B as Performance, a4 as PointerCaptureTarget, P as PointerState, az as Properties, x as R3FRenderer, A as RenderCallback, v as RootExtension, H as RootState, aG as SetBlock, y as Size, S as Subscription, aD as ThreeCamera, Y as ThreeEvent, aH as UnblockProps, z as Viewport, a5 as VisibilityEntry, X as XRManager, a2 as XRPointerConfig, w as context, t as registerRootExtension, u as setRenderOverride, a$ as useStore, b0 as useThree } from './shared/fiber.DQTSZ24m.js';
|
|
3
|
+
import { UseFrameNextOptions, FrameNextControls } from '@pmndrs/scheduler';
|
|
5
4
|
export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, SchedulerApi, UseFrameNextOptions, UseFrameOptions } from '@pmndrs/scheduler';
|
|
6
|
-
import '
|
|
5
|
+
import { Texture } from 'three';
|
|
7
6
|
import 'three/webgpu';
|
|
7
|
+
import 'react';
|
|
8
8
|
import 'zustand';
|
|
9
9
|
import 'zustand/traditional';
|
|
10
10
|
import 'three/tsl';
|
|
11
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
|
+
|
|
12
56
|
/**
|
|
13
57
|
* The texture registry as a reader during render should see it: registered textures, plus those a
|
|
14
58
|
* `useTexture` earlier in this render loaded but has not registered yet. Returns the registry Map
|
|
@@ -16,4 +60,4 @@ import 'three/tsl';
|
|
|
16
60
|
*/
|
|
17
61
|
declare function getTextureView(store: RootStore): ReadonlyMap<string, Texture>;
|
|
18
62
|
|
|
19
|
-
export { RootStore, getTextureView };
|
|
63
|
+
export { FrameNextCallback, RootStore, getTextureView, useFrame };
|
package/dist/extension.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { c as context, g as getTextureView, r as registerRootExtension, s as setRenderOverride, b as useFrame, u as useStore, a as useThree } from './shared/fiber.
|
|
1
|
+
export { c as context, g as getTextureView, r as registerRootExtension, s as setRenderOverride, b as useFrame, u as useStore, a as useThree } from './shared/fiber.Biz9olEe.mjs';
|
package/dist/index.cjs
CHANGED
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
const Canvas$1 = require('./shared/fiber.
|
|
5
|
-
const
|
|
4
|
+
const Canvas$1 = require('./shared/fiber.nDnBf1np.cjs');
|
|
5
|
+
const narrowed = require('./shared/fiber.X4yI0DId.cjs');
|
|
6
|
+
const textureStaging = require('./shared/fiber.DfiCufha.cjs');
|
|
6
7
|
const scheduler = require('@pmndrs/scheduler');
|
|
7
8
|
|
|
8
|
-
const R3F_BUILD_LEGACY =
|
|
9
|
+
const R3F_BUILD_LEGACY = false;
|
|
9
10
|
const R3F_BUILD_WEBGPU = true;
|
|
10
11
|
const provider = {
|
|
11
|
-
webgl: () => import('./chunks/webgl.cjs').then((m) => m.webglSupport),
|
|
12
12
|
webgpu: () => import('./chunks/webgpu.cjs').then((m) => m.webgpuSupport)
|
|
13
13
|
};
|
|
14
14
|
function createRoot(canvas) {
|
|
15
15
|
return Canvas$1.createRoot(canvas, provider);
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Canvas$1.Canvas, { ...props, provider });
|
|
19
|
-
}
|
|
17
|
+
const Canvas = narrowed.asWebGPUCanvas((props) => /* @__PURE__ */ jsxRuntime.jsx(Canvas$1.Canvas, { ...props, provider }));
|
|
20
18
|
|
|
21
19
|
exports.Environment = Canvas$1.Environment;
|
|
22
20
|
exports.EnvironmentCube = Canvas$1.EnvironmentCube;
|
|
@@ -90,22 +88,22 @@ exports.useEnvironment = Canvas$1.useEnvironment;
|
|
|
90
88
|
exports.useGraph = Canvas$1.useGraph;
|
|
91
89
|
exports.useInstanceHandle = Canvas$1.useInstanceHandle;
|
|
92
90
|
exports.useLoader = Canvas$1.useLoader;
|
|
93
|
-
exports.useRenderTarget = Canvas$1.useRenderTarget;
|
|
94
91
|
exports.useTexture = Canvas$1.useTexture;
|
|
95
92
|
exports.useTextures = Canvas$1.useTextures;
|
|
96
93
|
exports.waitForPrimary = Canvas$1.waitForPrimary;
|
|
97
94
|
exports.whenThree = Canvas$1.whenThree;
|
|
98
|
-
exports.
|
|
99
|
-
exports.
|
|
100
|
-
exports.
|
|
101
|
-
exports.
|
|
102
|
-
exports.
|
|
103
|
-
exports.
|
|
104
|
-
exports.
|
|
105
|
-
exports.
|
|
106
|
-
exports.
|
|
107
|
-
exports.
|
|
108
|
-
exports.
|
|
95
|
+
exports.useFrame = narrowed.useFrame;
|
|
96
|
+
exports.useRenderTarget = narrowed.useRenderTarget;
|
|
97
|
+
exports.useThree = narrowed.useThree;
|
|
98
|
+
exports.Block = textureStaging.Block;
|
|
99
|
+
exports.ErrorBoundary = textureStaging.ErrorBoundary;
|
|
100
|
+
exports.context = textureStaging.context;
|
|
101
|
+
exports.registerRootExtension = textureStaging.registerRootExtension;
|
|
102
|
+
exports.setRenderOverride = textureStaging.setRenderOverride;
|
|
103
|
+
exports.useBridge = textureStaging.useBridge;
|
|
104
|
+
exports.useIsomorphicLayoutEffect = textureStaging.useIsomorphicLayoutEffect;
|
|
105
|
+
exports.useMutableCallback = textureStaging.useMutableCallback;
|
|
106
|
+
exports.useStore = textureStaging.useStore;
|
|
109
107
|
exports.Scheduler = scheduler.Scheduler;
|
|
110
108
|
exports.getScheduler = scheduler.getScheduler;
|
|
111
109
|
exports.Canvas = Canvas;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as ThreeWebGPU from 'three/webgpu';
|
|
2
|
-
import * as THREE from 'three';
|
|
3
2
|
import * as React from 'react';
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export {
|
|
3
|
+
import * as _react_three_fiber from '@react-three/fiber';
|
|
4
|
+
import { M as MutableOrReadonlyParameters$1, a as MathRepresentation$1, V as VectorRepresentation$1, b as MathTypes$1, c as MathType$1, d as MathProps$1, e as Vector2$1, f as Vector3$1, g as Vector4$1, C as Color$1, L as Layers$1, Q as Quaternion$1, E as Euler$1, h as Matrix3$1, i as Matrix4$1, R as RaycastableRepresentation$1, j as EventProps$1, G as GeometryTransformProps$1, k as GeometryProps$1, T as TSLNodeInput$1, N as NodeProps$1, l as ReactProps$1, m as ConstructorRepresentation, n as ElementProps$1, o as ThreeElement$1, p as ThreeToJSXElements$1, O as Object3DMethod$1, q as ThreeElementsOf$1, r as ElementOf$1, s as ReconcilerRoot } from './shared/fiber.DQTSZ24m.cjs';
|
|
5
|
+
export { aE as Act, as as Args, at as ArgsProp, ap as AttachFnType, aq as AttachType, a7 as BaseRendererProps, aF as Bridge, U as Camera, aj as CameraProps, ag as CanvasSchedulerConfig, ar as Catalogue, aa as ColorManagementConfig, a1 as ComputeFunction, ad as DefaultGLProps, af as DefaultRendererProps, aK as Disposable, Z as DomEvent, D as Dpr, aJ as EquConfig, $ as EventHandlers, a3 as EventManager, _ as Events, am as FiberRoot, a0 as FilterFunction, aY as ForRegisteredRenderer, aO as FrameCallback, aN as FrameNextCallback, aL as FrameNextState, aM as FrameState, F as Frameloop, ae as GLProps, aw as HostConfig, al as InjectState, av as Instance, au as InstanceProps, I as InternalState, K as Intersection, W as IntersectionEvent, aC as IsAllOptional, aB as IsOptional, aA as Mutable, ax as NonFunctionKeys, aI as ObjectMap, aR as OcclusionSupport, a6 as OffscreenCanvas, ay as Overwrite, B as Performance, a4 as PointerCaptureTarget, P as PointerState, az as Properties, aZ as R3FRenderTarget, x as R3FRenderer, a_ as R3FRendererSupport, aW as Register, aX as RegisteredRenderer, A as RenderCallback, ak as RenderProps, a9 as Renderer, ah as RendererConfigExtended, a8 as RendererFactory, ai as RendererProps, aV as RendererProvider, ac as RendererSettingsConfig, aU as RendererSupport, ao as Root, v as RootExtension, H as RootState, J as RootStore, aG as SetBlock, ab as ShadowsConfig, y as Size, S as Subscription, aD as ThreeCamera, aQ as ThreeCore, Y as ThreeEvent, aP as ThreeNamespace, an as TrackedPromise, aH as UnblockProps, z as Viewport, a5 as VisibilityEntry, aS as WebGLSupport, aT as WebGPUSupport, X as XRManager, a2 as XRPointerConfig, w as context, t as registerRootExtension, u as setRenderOverride, a$ as useStore } from './shared/fiber.DQTSZ24m.cjs';
|
|
6
|
+
export { B as BackgroundConfig, p as BackgroundProp, ah as Block, a2 as DisposeOptions, K as Environment, H as EnvironmentCube, a5 as EnvironmentLoaderProps, F as EnvironmentMap, J as EnvironmentPortal, D as EnvironmentProps, ai as ErrorBoundary, E as Extensions, aM as FROM_REF, aN as FromRefMarker, q as GLTFLike, o as GlobalEffectType, G as GlobalRenderCallback, t as InferLoadResult, I as InputLike, X as IsObject, A as LegacyInternalState, z as LegacyRenderer, C as LegacyRootState, s as LoaderInstance, L as LoaderLike, v as LoaderResult, Y as MappedTextureType, aQ as ONCE, aS as OnceValue, ad as Portal, N as PresetsType, P as PrimaryCanvasEntry, an as REACT_INTERNAL_PROPS, av as RESERVED_PROPS, R as RenderTargetOptions, $ as Texture, a0 as TextureInput, a1 as TextureResult, Z as UseTextureOptions, a3 as UseTexturesReturn, W as WebGLDefaultProps, x as WebGLProps, y as WebGLShadowConfig, aa as _roots, b as addAfterEffect, a as addEffect, d as addTail, e as advance, aA as applyProps, ax as attach, aq as buildGraph, aj as calculateDpr, S as createEvents, c as createPointerEvents, ac as createPortal, k as createStore, ay as detach, az as diffProps, ar as dispose, c as events, a7 as extend, ao as findInitialRoot, a9 as flushSync, aO as fromRef, as as getInstanceProps, g as getPrimary, j as getPrimaryIds, ap as getRootState, l as getThree, ak as getUuidPrefix, aL as hasConstructor, h as hasPrimary, m as hasThree, i as invalidate, au as invalidateInstance, aB as is, aE as isColorRepresentation, aK as isCopyable, aP as isFromRef, aH as isLayers, aF as isObject3D, aT as isOnce, aC as isOrthographicCamera, aD as isRef, f as isRenderer, aG as isTexture, aI as isUniform, aJ as isVectorLike, aR as once, at as prepare, M as presetsObj, a8 as reconciler, r as registerPrimary, Q as removeInteractivity, aw as resolve, O as swapInteractivity, ab as unmountComponentAtNode, u as unregisterPrimary, al as updateCamera, am as updateFrustum, ag as useBridge, a6 as useEnvironment, U as useGraph, T as useInstanceHandle, ae as useIsomorphicLayoutEffect, V as useLoader, af as useMutableCallback, _ as useTexture, a4 as useTextures, w as waitForPrimary, n as whenThree } from './shared/fiber.34TOMPo3.cjs';
|
|
7
|
+
export { W as CanvasProps, c as UseFrameWebGPU, U as UseThreeWebGPU, h as WebGPUDefaultProps, e as WebGPUInternalState, g as WebGPUProps, f as WebGPUR3FRenderer, d as WebGPURootState, i as WebGPUShadowConfig, a as useFrame, b as useRenderTarget, u as useThree } from './shared/fiber.BFuGd7gN.cjs';
|
|
8
8
|
export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, Scheduler, SchedulerApi, UseFrameNextOptions, UseFrameOptions, getScheduler } from '@pmndrs/scheduler';
|
|
9
|
-
|
|
10
|
-
import 'react-use-measure';
|
|
9
|
+
import 'three';
|
|
11
10
|
import 'zustand';
|
|
12
11
|
import 'zustand/traditional';
|
|
13
12
|
import 'three/tsl';
|
|
13
|
+
import 'react-use-measure';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* The `ReactThreeFiber` namespace of the default entry: the shared element types plus this entry's JSX map.
|
|
@@ -83,53 +83,21 @@ declare namespace default_d {
|
|
|
83
83
|
export type { default_d_Color as Color, default_d_ElementOf as ElementOf, default_d_ElementProps as ElementProps, default_d_Euler as Euler, default_d_EventProps as EventProps, default_d_GeometryProps as GeometryProps, default_d_GeometryTransformProps as GeometryTransformProps, default_d_Layers as Layers, default_d_MathProps as MathProps, default_d_MathRepresentation as MathRepresentation, default_d_MathType as MathType, default_d_MathTypes as MathTypes, default_d_Matrix3 as Matrix3, default_d_Matrix4 as Matrix4, default_d_MutableOrReadonlyParameters as MutableOrReadonlyParameters, default_d_NodeProps as NodeProps, default_d_Object3DMethod as Object3DMethod, default_d_Quaternion as Quaternion, default_d_RaycastableRepresentation as RaycastableRepresentation, default_d_ReactProps as ReactProps, default_d_TSLNodeInput as TSLNodeInput, default_d_ThreeElement as ThreeElement, default_d_ThreeElements as ThreeElements, default_d_ThreeElementsOf as ThreeElementsOf, default_d_ThreeExports as ThreeExports, default_d_ThreeToJSXElements as ThreeToJSXElements, default_d_Vector2 as Vector2, default_d_Vector3 as Vector3, default_d_Vector4 as Vector4, default_d_VectorRepresentation as VectorRepresentation };
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
* Creates a render target compatible with the current renderer.
|
|
88
|
-
*
|
|
89
|
-
* Both classes live in three's shared core; which one you get follows the renderer this root
|
|
90
|
-
* loaded: a `WebGLRenderTarget` on WebGL, a `RenderTarget` on WebGPU. The return type is the
|
|
91
|
-
* union unless the app registered a renderer (`Register`) or the entry decides it (`/legacy`,
|
|
92
|
-
* `/webgpu`).
|
|
93
|
-
*
|
|
94
|
-
* @example
|
|
95
|
-
* ```tsx
|
|
96
|
-
* // Use canvas size
|
|
97
|
-
* const fbo = useRenderTarget()
|
|
98
|
-
*
|
|
99
|
-
* // Use canvas size with options
|
|
100
|
-
* const fbo = useRenderTarget({ samples: 4 })
|
|
101
|
-
*
|
|
102
|
-
* // Square render target
|
|
103
|
-
* const fbo = useRenderTarget(512)
|
|
104
|
-
*
|
|
105
|
-
* // Square render target with options
|
|
106
|
-
* const fbo = useRenderTarget(512, { depthBuffer: true })
|
|
107
|
-
*
|
|
108
|
-
* // Explicit dimensions
|
|
109
|
-
* const fbo = useRenderTarget(512, 256)
|
|
110
|
-
*
|
|
111
|
-
* // Explicit dimensions with options
|
|
112
|
-
* const fbo = useRenderTarget(512, 256, { samples: 4 })
|
|
113
|
-
* ```
|
|
114
|
-
*/
|
|
115
|
-
declare function useRenderTarget(options?: RenderTargetOptions): R3FRenderTarget;
|
|
116
|
-
declare function useRenderTarget(size: number, options?: RenderTargetOptions): R3FRenderTarget;
|
|
117
|
-
declare function useRenderTarget(width: number, height: number, options?: RenderTargetOptions): R3FRenderTarget;
|
|
118
|
-
|
|
119
|
-
declare const R3F_BUILD_LEGACY = true;
|
|
86
|
+
declare const R3F_BUILD_LEGACY = false;
|
|
120
87
|
declare const R3F_BUILD_WEBGPU = true;
|
|
121
88
|
/**
|
|
122
|
-
* Create a root on a canvas. Renders with
|
|
89
|
+
* Create a root on a canvas. Renders with `WebGPURenderer`; for `WebGLRenderer`, import `createRoot`
|
|
90
|
+
* from `@react-three/fiber/legacy`.
|
|
123
91
|
*/
|
|
124
92
|
declare function createRoot<TCanvas extends HTMLCanvasElement | OffscreenCanvas>(canvas: TCanvas): ReconcilerRoot<TCanvas>;
|
|
125
93
|
/**
|
|
126
|
-
* A DOM canvas which accepts threejs elements as children. Renders with
|
|
127
|
-
*
|
|
94
|
+
* A DOM canvas which accepts threejs elements as children. Renders with `WebGPURenderer`; for
|
|
95
|
+
* `WebGLRenderer`, import `Canvas` from `@react-three/fiber/legacy`.
|
|
128
96
|
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
129
97
|
*/
|
|
130
|
-
declare
|
|
98
|
+
declare const Canvas: (props: _react_three_fiber.CanvasProps) => React.JSX.Element;
|
|
131
99
|
/** Three.js constructors available as JSX elements on this entry. */
|
|
132
|
-
type ThreeExports = typeof
|
|
100
|
+
type ThreeExports = typeof ThreeWebGPU;
|
|
133
101
|
interface ThreeElements extends ThreeElementsOf$1<ThreeExports> {
|
|
134
102
|
}
|
|
135
103
|
declare module 'react' {
|
|
@@ -139,5 +107,5 @@ declare module 'react' {
|
|
|
139
107
|
}
|
|
140
108
|
}
|
|
141
109
|
|
|
142
|
-
export { Canvas,
|
|
110
|
+
export { Canvas, Color$1 as Color, ConstructorRepresentation, ElementOf$1 as ElementOf, ElementProps$1 as ElementProps, Euler$1 as Euler, EventProps$1 as EventProps, GeometryProps$1 as GeometryProps, GeometryTransformProps$1 as GeometryTransformProps, Layers$1 as Layers, MathProps$1 as MathProps, MathRepresentation$1 as MathRepresentation, MathType$1 as MathType, MathTypes$1 as MathTypes, Matrix3$1 as Matrix3, Matrix4$1 as Matrix4, MutableOrReadonlyParameters$1 as MutableOrReadonlyParameters, NodeProps$1 as NodeProps, Object3DMethod$1 as Object3DMethod, Quaternion$1 as Quaternion, R3F_BUILD_LEGACY, R3F_BUILD_WEBGPU, RaycastableRepresentation$1 as RaycastableRepresentation, ReactProps$1 as ReactProps, default_d as ReactThreeFiber, ReconcilerRoot, TSLNodeInput$1 as TSLNodeInput, ThreeElement$1 as ThreeElement, ThreeElementsOf$1 as ThreeElementsOf, ThreeToJSXElements$1 as ThreeToJSXElements, Vector2$1 as Vector2, Vector3$1 as Vector3, Vector4$1 as Vector4, VectorRepresentation$1 as VectorRepresentation, createRoot };
|
|
143
111
|
export type { ThreeElements, ThreeExports };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as ThreeWebGPU from 'three/webgpu';
|
|
2
|
-
import * as THREE from 'three';
|
|
3
2
|
import * as React from 'react';
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export {
|
|
3
|
+
import * as _react_three_fiber from '@react-three/fiber';
|
|
4
|
+
import { M as MutableOrReadonlyParameters$1, a as MathRepresentation$1, V as VectorRepresentation$1, b as MathTypes$1, c as MathType$1, d as MathProps$1, e as Vector2$1, f as Vector3$1, g as Vector4$1, C as Color$1, L as Layers$1, Q as Quaternion$1, E as Euler$1, h as Matrix3$1, i as Matrix4$1, R as RaycastableRepresentation$1, j as EventProps$1, G as GeometryTransformProps$1, k as GeometryProps$1, T as TSLNodeInput$1, N as NodeProps$1, l as ReactProps$1, m as ConstructorRepresentation, n as ElementProps$1, o as ThreeElement$1, p as ThreeToJSXElements$1, O as Object3DMethod$1, q as ThreeElementsOf$1, r as ElementOf$1, s as ReconcilerRoot } from './shared/fiber.DQTSZ24m.mjs';
|
|
5
|
+
export { aE as Act, as as Args, at as ArgsProp, ap as AttachFnType, aq as AttachType, a7 as BaseRendererProps, aF as Bridge, U as Camera, aj as CameraProps, ag as CanvasSchedulerConfig, ar as Catalogue, aa as ColorManagementConfig, a1 as ComputeFunction, ad as DefaultGLProps, af as DefaultRendererProps, aK as Disposable, Z as DomEvent, D as Dpr, aJ as EquConfig, $ as EventHandlers, a3 as EventManager, _ as Events, am as FiberRoot, a0 as FilterFunction, aY as ForRegisteredRenderer, aO as FrameCallback, aN as FrameNextCallback, aL as FrameNextState, aM as FrameState, F as Frameloop, ae as GLProps, aw as HostConfig, al as InjectState, av as Instance, au as InstanceProps, I as InternalState, K as Intersection, W as IntersectionEvent, aC as IsAllOptional, aB as IsOptional, aA as Mutable, ax as NonFunctionKeys, aI as ObjectMap, aR as OcclusionSupport, a6 as OffscreenCanvas, ay as Overwrite, B as Performance, a4 as PointerCaptureTarget, P as PointerState, az as Properties, aZ as R3FRenderTarget, x as R3FRenderer, a_ as R3FRendererSupport, aW as Register, aX as RegisteredRenderer, A as RenderCallback, ak as RenderProps, a9 as Renderer, ah as RendererConfigExtended, a8 as RendererFactory, ai as RendererProps, aV as RendererProvider, ac as RendererSettingsConfig, aU as RendererSupport, ao as Root, v as RootExtension, H as RootState, J as RootStore, aG as SetBlock, ab as ShadowsConfig, y as Size, S as Subscription, aD as ThreeCamera, aQ as ThreeCore, Y as ThreeEvent, aP as ThreeNamespace, an as TrackedPromise, aH as UnblockProps, z as Viewport, a5 as VisibilityEntry, aS as WebGLSupport, aT as WebGPUSupport, X as XRManager, a2 as XRPointerConfig, w as context, t as registerRootExtension, u as setRenderOverride, a$ as useStore } from './shared/fiber.DQTSZ24m.mjs';
|
|
6
|
+
export { B as BackgroundConfig, p as BackgroundProp, ah as Block, a2 as DisposeOptions, K as Environment, H as EnvironmentCube, a5 as EnvironmentLoaderProps, F as EnvironmentMap, J as EnvironmentPortal, D as EnvironmentProps, ai as ErrorBoundary, E as Extensions, aM as FROM_REF, aN as FromRefMarker, q as GLTFLike, o as GlobalEffectType, G as GlobalRenderCallback, t as InferLoadResult, I as InputLike, X as IsObject, A as LegacyInternalState, z as LegacyRenderer, C as LegacyRootState, s as LoaderInstance, L as LoaderLike, v as LoaderResult, Y as MappedTextureType, aQ as ONCE, aS as OnceValue, ad as Portal, N as PresetsType, P as PrimaryCanvasEntry, an as REACT_INTERNAL_PROPS, av as RESERVED_PROPS, R as RenderTargetOptions, $ as Texture, a0 as TextureInput, a1 as TextureResult, Z as UseTextureOptions, a3 as UseTexturesReturn, W as WebGLDefaultProps, x as WebGLProps, y as WebGLShadowConfig, aa as _roots, b as addAfterEffect, a as addEffect, d as addTail, e as advance, aA as applyProps, ax as attach, aq as buildGraph, aj as calculateDpr, S as createEvents, c as createPointerEvents, ac as createPortal, k as createStore, ay as detach, az as diffProps, ar as dispose, c as events, a7 as extend, ao as findInitialRoot, a9 as flushSync, aO as fromRef, as as getInstanceProps, g as getPrimary, j as getPrimaryIds, ap as getRootState, l as getThree, ak as getUuidPrefix, aL as hasConstructor, h as hasPrimary, m as hasThree, i as invalidate, au as invalidateInstance, aB as is, aE as isColorRepresentation, aK as isCopyable, aP as isFromRef, aH as isLayers, aF as isObject3D, aT as isOnce, aC as isOrthographicCamera, aD as isRef, f as isRenderer, aG as isTexture, aI as isUniform, aJ as isVectorLike, aR as once, at as prepare, M as presetsObj, a8 as reconciler, r as registerPrimary, Q as removeInteractivity, aw as resolve, O as swapInteractivity, ab as unmountComponentAtNode, u as unregisterPrimary, al as updateCamera, am as updateFrustum, ag as useBridge, a6 as useEnvironment, U as useGraph, T as useInstanceHandle, ae as useIsomorphicLayoutEffect, V as useLoader, af as useMutableCallback, _ as useTexture, a4 as useTextures, w as waitForPrimary, n as whenThree } from './shared/fiber.Dy7Uz273.mjs';
|
|
7
|
+
export { W as CanvasProps, c as UseFrameWebGPU, U as UseThreeWebGPU, h as WebGPUDefaultProps, e as WebGPUInternalState, g as WebGPUProps, f as WebGPUR3FRenderer, d as WebGPURootState, i as WebGPUShadowConfig, a as useFrame, b as useRenderTarget, u as useThree } from './shared/fiber.Bll9fqKA.mjs';
|
|
8
8
|
export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, Scheduler, SchedulerApi, UseFrameNextOptions, UseFrameOptions, getScheduler } from '@pmndrs/scheduler';
|
|
9
|
-
|
|
10
|
-
import 'react-use-measure';
|
|
9
|
+
import 'three';
|
|
11
10
|
import 'zustand';
|
|
12
11
|
import 'zustand/traditional';
|
|
13
12
|
import 'three/tsl';
|
|
13
|
+
import 'react-use-measure';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* The `ReactThreeFiber` namespace of the default entry: the shared element types plus this entry's JSX map.
|
|
@@ -83,53 +83,21 @@ declare namespace default_d {
|
|
|
83
83
|
export type { default_d_Color as Color, default_d_ElementOf as ElementOf, default_d_ElementProps as ElementProps, default_d_Euler as Euler, default_d_EventProps as EventProps, default_d_GeometryProps as GeometryProps, default_d_GeometryTransformProps as GeometryTransformProps, default_d_Layers as Layers, default_d_MathProps as MathProps, default_d_MathRepresentation as MathRepresentation, default_d_MathType as MathType, default_d_MathTypes as MathTypes, default_d_Matrix3 as Matrix3, default_d_Matrix4 as Matrix4, default_d_MutableOrReadonlyParameters as MutableOrReadonlyParameters, default_d_NodeProps as NodeProps, default_d_Object3DMethod as Object3DMethod, default_d_Quaternion as Quaternion, default_d_RaycastableRepresentation as RaycastableRepresentation, default_d_ReactProps as ReactProps, default_d_TSLNodeInput as TSLNodeInput, default_d_ThreeElement as ThreeElement, default_d_ThreeElements as ThreeElements, default_d_ThreeElementsOf as ThreeElementsOf, default_d_ThreeExports as ThreeExports, default_d_ThreeToJSXElements as ThreeToJSXElements, default_d_Vector2 as Vector2, default_d_Vector3 as Vector3, default_d_Vector4 as Vector4, default_d_VectorRepresentation as VectorRepresentation };
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
* Creates a render target compatible with the current renderer.
|
|
88
|
-
*
|
|
89
|
-
* Both classes live in three's shared core; which one you get follows the renderer this root
|
|
90
|
-
* loaded: a `WebGLRenderTarget` on WebGL, a `RenderTarget` on WebGPU. The return type is the
|
|
91
|
-
* union unless the app registered a renderer (`Register`) or the entry decides it (`/legacy`,
|
|
92
|
-
* `/webgpu`).
|
|
93
|
-
*
|
|
94
|
-
* @example
|
|
95
|
-
* ```tsx
|
|
96
|
-
* // Use canvas size
|
|
97
|
-
* const fbo = useRenderTarget()
|
|
98
|
-
*
|
|
99
|
-
* // Use canvas size with options
|
|
100
|
-
* const fbo = useRenderTarget({ samples: 4 })
|
|
101
|
-
*
|
|
102
|
-
* // Square render target
|
|
103
|
-
* const fbo = useRenderTarget(512)
|
|
104
|
-
*
|
|
105
|
-
* // Square render target with options
|
|
106
|
-
* const fbo = useRenderTarget(512, { depthBuffer: true })
|
|
107
|
-
*
|
|
108
|
-
* // Explicit dimensions
|
|
109
|
-
* const fbo = useRenderTarget(512, 256)
|
|
110
|
-
*
|
|
111
|
-
* // Explicit dimensions with options
|
|
112
|
-
* const fbo = useRenderTarget(512, 256, { samples: 4 })
|
|
113
|
-
* ```
|
|
114
|
-
*/
|
|
115
|
-
declare function useRenderTarget(options?: RenderTargetOptions): R3FRenderTarget;
|
|
116
|
-
declare function useRenderTarget(size: number, options?: RenderTargetOptions): R3FRenderTarget;
|
|
117
|
-
declare function useRenderTarget(width: number, height: number, options?: RenderTargetOptions): R3FRenderTarget;
|
|
118
|
-
|
|
119
|
-
declare const R3F_BUILD_LEGACY = true;
|
|
86
|
+
declare const R3F_BUILD_LEGACY = false;
|
|
120
87
|
declare const R3F_BUILD_WEBGPU = true;
|
|
121
88
|
/**
|
|
122
|
-
* Create a root on a canvas. Renders with
|
|
89
|
+
* Create a root on a canvas. Renders with `WebGPURenderer`; for `WebGLRenderer`, import `createRoot`
|
|
90
|
+
* from `@react-three/fiber/legacy`.
|
|
123
91
|
*/
|
|
124
92
|
declare function createRoot<TCanvas extends HTMLCanvasElement | OffscreenCanvas>(canvas: TCanvas): ReconcilerRoot<TCanvas>;
|
|
125
93
|
/**
|
|
126
|
-
* A DOM canvas which accepts threejs elements as children. Renders with
|
|
127
|
-
*
|
|
94
|
+
* A DOM canvas which accepts threejs elements as children. Renders with `WebGPURenderer`; for
|
|
95
|
+
* `WebGLRenderer`, import `Canvas` from `@react-three/fiber/legacy`.
|
|
128
96
|
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
129
97
|
*/
|
|
130
|
-
declare
|
|
98
|
+
declare const Canvas: (props: _react_three_fiber.CanvasProps) => React.JSX.Element;
|
|
131
99
|
/** Three.js constructors available as JSX elements on this entry. */
|
|
132
|
-
type ThreeExports = typeof
|
|
100
|
+
type ThreeExports = typeof ThreeWebGPU;
|
|
133
101
|
interface ThreeElements extends ThreeElementsOf$1<ThreeExports> {
|
|
134
102
|
}
|
|
135
103
|
declare module 'react' {
|
|
@@ -139,5 +107,5 @@ declare module 'react' {
|
|
|
139
107
|
}
|
|
140
108
|
}
|
|
141
109
|
|
|
142
|
-
export { Canvas,
|
|
110
|
+
export { Canvas, Color$1 as Color, ConstructorRepresentation, ElementOf$1 as ElementOf, ElementProps$1 as ElementProps, Euler$1 as Euler, EventProps$1 as EventProps, GeometryProps$1 as GeometryProps, GeometryTransformProps$1 as GeometryTransformProps, Layers$1 as Layers, MathProps$1 as MathProps, MathRepresentation$1 as MathRepresentation, MathType$1 as MathType, MathTypes$1 as MathTypes, Matrix3$1 as Matrix3, Matrix4$1 as Matrix4, MutableOrReadonlyParameters$1 as MutableOrReadonlyParameters, NodeProps$1 as NodeProps, Object3DMethod$1 as Object3DMethod, Quaternion$1 as Quaternion, R3F_BUILD_LEGACY, R3F_BUILD_WEBGPU, RaycastableRepresentation$1 as RaycastableRepresentation, ReactProps$1 as ReactProps, default_d as ReactThreeFiber, ReconcilerRoot, TSLNodeInput$1 as TSLNodeInput, ThreeElement$1 as ThreeElement, ThreeElementsOf$1 as ThreeElementsOf, ThreeToJSXElements$1 as ThreeToJSXElements, Vector2$1 as Vector2, Vector3$1 as Vector3, Vector4$1 as Vector4, VectorRepresentation$1 as VectorRepresentation, createRoot };
|
|
143
111
|
export type { ThreeElements, ThreeExports };
|