@react-three/fiber 10.0.0-canary.e53bd54 → 10.0.0-canary.e78793c
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 -7
- package/dist/extension.d.cts +12 -5
- package/dist/extension.d.mts +12 -5
- package/dist/extension.d.ts +12 -5
- package/dist/extension.mjs +1 -1
- package/dist/index.cjs +17 -19
- package/dist/index.d.cts +16 -49
- package/dist/index.d.mts +16 -49
- package/dist/index.d.ts +16 -49
- 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.DAg-9ieU.d.ts → fiber.34TOMPo3.d.cts} +190 -548
- package/dist/shared/fiber.BFuGd7gN.d.cts +90 -0
- package/dist/shared/fiber.BSYBnw8x.mjs +16563 -0
- package/dist/shared/{fiber.C_v1rkNg.mjs → fiber.Biz9olEe.mjs} +214 -62
- package/dist/shared/fiber.Bll9fqKA.d.mts +90 -0
- package/dist/shared/{fiber.Ddgoyqql.d.mts → fiber.CjMAAsJy.d.ts} +190 -548
- package/dist/shared/{fiber.Bw8YnGg5.d.cts → fiber.DQTSZ24m.d.cts} +564 -25
- package/dist/shared/{fiber.Bw8YnGg5.d.mts → fiber.DQTSZ24m.d.mts} +564 -25
- package/dist/shared/{fiber.Bw8YnGg5.d.ts → fiber.DQTSZ24m.d.ts} +564 -25
- package/dist/shared/fiber.DUgKvaq-.mjs +9 -0
- package/dist/shared/{fiber.B6zNSmwj.cjs → fiber.DfiCufha.cjs} +222 -60
- package/dist/shared/fiber.DuA4F8L5.d.ts +90 -0
- package/dist/shared/{fiber.DiPB625B.d.cts → fiber.Dy7Uz273.d.mts} +190 -548
- package/dist/shared/fiber.X4yI0DId.cjs +14 -0
- package/dist/shared/fiber.nDnBf1np.cjs +16661 -0
- package/dist/webgpu/index.cjs +16 -18
- package/dist/webgpu/index.d.cts +17 -79
- package/dist/webgpu/index.d.mts +17 -79
- package/dist/webgpu/index.d.ts +17 -79
- package/dist/webgpu/index.mjs +7 -9
- package/package.json +8 -8
- package/readme.md +1 -1
- package/dist/chunks/webgl.cjs +0 -27
- package/dist/chunks/webgl.mjs +0 -11
- package/dist/shared/fiber.BGL2rpse.cjs +0 -15129
- package/dist/shared/fiber.Ch4JrXS2.mjs +0 -15031
package/dist/legacy.cjs
CHANGED
|
@@ -1,21 +1,43 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
const Canvas$1 = require('./shared/fiber.
|
|
5
|
-
const
|
|
6
|
-
const
|
|
4
|
+
const Canvas$1 = require('./shared/fiber.nDnBf1np.cjs');
|
|
5
|
+
const THREE = require('three');
|
|
6
|
+
const textureStaging = require('./shared/fiber.DfiCufha.cjs');
|
|
7
7
|
const scheduler = require('@pmndrs/scheduler');
|
|
8
8
|
|
|
9
|
+
function _interopNamespaceCompat(e) {
|
|
10
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
11
|
+
const n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
for (const k in e) {
|
|
14
|
+
n[k] = e[k];
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
n.default = e;
|
|
18
|
+
return n;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const THREE__namespace = /*#__PURE__*/_interopNamespaceCompat(THREE);
|
|
22
|
+
|
|
23
|
+
const webglSupport = {
|
|
24
|
+
kind: "webgl",
|
|
25
|
+
three: THREE__namespace,
|
|
26
|
+
Renderer: THREE__namespace.WebGLRenderer,
|
|
27
|
+
RenderTarget: THREE__namespace.WebGLRenderTarget,
|
|
28
|
+
CubeRenderTarget: THREE__namespace.WebGLCubeRenderTarget
|
|
29
|
+
};
|
|
30
|
+
|
|
9
31
|
const R3F_BUILD_LEGACY = true;
|
|
10
32
|
const R3F_BUILD_WEBGPU = false;
|
|
11
33
|
const provider = {
|
|
12
|
-
webgl: () =>
|
|
34
|
+
webgl: () => webglSupport
|
|
13
35
|
};
|
|
14
36
|
function createRoot(canvas) {
|
|
15
37
|
return Canvas$1.createRoot(canvas, provider);
|
|
16
38
|
}
|
|
17
|
-
const useThree =
|
|
18
|
-
const useFrame =
|
|
39
|
+
const useThree = textureStaging.useThree;
|
|
40
|
+
const useFrame = textureStaging.useFrame;
|
|
19
41
|
const useRenderTarget = Canvas$1.useRenderTarget;
|
|
20
42
|
const Canvas = ((props) => /* @__PURE__ */ jsxRuntime.jsx(Canvas$1.Canvas, { ...props, provider }));
|
|
21
43
|
|
|
@@ -95,15 +117,15 @@ exports.useTexture = Canvas$1.useTexture;
|
|
|
95
117
|
exports.useTextures = Canvas$1.useTextures;
|
|
96
118
|
exports.waitForPrimary = Canvas$1.waitForPrimary;
|
|
97
119
|
exports.whenThree = Canvas$1.whenThree;
|
|
98
|
-
exports.Block =
|
|
99
|
-
exports.ErrorBoundary =
|
|
100
|
-
exports.context =
|
|
101
|
-
exports.registerRootExtension =
|
|
102
|
-
exports.setRenderOverride =
|
|
103
|
-
exports.useBridge =
|
|
104
|
-
exports.useIsomorphicLayoutEffect =
|
|
105
|
-
exports.useMutableCallback =
|
|
106
|
-
exports.useStore =
|
|
120
|
+
exports.Block = textureStaging.Block;
|
|
121
|
+
exports.ErrorBoundary = textureStaging.ErrorBoundary;
|
|
122
|
+
exports.context = textureStaging.context;
|
|
123
|
+
exports.registerRootExtension = textureStaging.registerRootExtension;
|
|
124
|
+
exports.setRenderOverride = textureStaging.setRenderOverride;
|
|
125
|
+
exports.useBridge = textureStaging.useBridge;
|
|
126
|
+
exports.useIsomorphicLayoutEffect = textureStaging.useIsomorphicLayoutEffect;
|
|
127
|
+
exports.useMutableCallback = textureStaging.useMutableCallback;
|
|
128
|
+
exports.useStore = textureStaging.useStore;
|
|
107
129
|
exports.Scheduler = scheduler.Scheduler;
|
|
108
130
|
exports.getScheduler = scheduler.getScheduler;
|
|
109
131
|
exports.Canvas = Canvas;
|
package/dist/legacy.d.cts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
import { WebGLRenderTarget } from 'three';
|
|
3
|
-
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
|
|
4
|
-
export {
|
|
5
|
-
|
|
3
|
+
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';
|
|
4
|
+
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, 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, 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, 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';
|
|
5
|
+
import { aU as CanvasProps, C as LegacyRootState, R as RenderTargetOptions } from './shared/fiber.34TOMPo3.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, A as InternalState, X as IsObject, A as LegacyInternalState, z as LegacyRenderer, 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, z as R3FRenderer, an as REACT_INTERNAL_PROPS, av as RESERVED_PROPS, $ 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';
|
|
6
7
|
import { FrameCallback, UseFrameNextOptions, FrameNextControls } from '@pmndrs/scheduler';
|
|
7
8
|
export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, Scheduler, SchedulerApi, UseFrameNextOptions, UseFrameOptions, getScheduler } from '@pmndrs/scheduler';
|
|
8
9
|
import { JSX } from 'react';
|
|
9
|
-
import 'react-use-measure';
|
|
10
10
|
import 'three/webgpu';
|
|
11
|
-
import 'react/jsx-runtime';
|
|
12
11
|
import 'zustand';
|
|
13
12
|
import 'zustand/traditional';
|
|
14
13
|
import 'three/tsl';
|
|
14
|
+
import 'react-use-measure';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* The `ReactThreeFiber` namespace of the legacy entry: the shared element types plus this entry's JSX map.
|
|
@@ -102,8 +102,11 @@ declare const useRenderTarget: {
|
|
|
102
102
|
(width: number, height: number, options?: RenderTargetOptions): WebGLRenderTarget;
|
|
103
103
|
};
|
|
104
104
|
|
|
105
|
-
/**
|
|
106
|
-
|
|
105
|
+
/**
|
|
106
|
+
* Canvas props on the legacy entry: `onCreated` receives `LegacyRootState`. No `primary` / `share`:
|
|
107
|
+
* renderer sharing is WebGPU-only. `scheduler` works as on every entry.
|
|
108
|
+
*/
|
|
109
|
+
type LegacyCanvasProps = Omit<CanvasProps, 'onCreated' | 'primary' | 'share'> & {
|
|
107
110
|
/** Callback after the canvas has rendered (but not yet committed); `state.renderer` is a `WebGLRenderer` */
|
|
108
111
|
onCreated?: (state: LegacyRootState) => void;
|
|
109
112
|
};
|
package/dist/legacy.d.mts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
import { WebGLRenderTarget } from 'three';
|
|
3
|
-
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
|
|
4
|
-
export {
|
|
5
|
-
|
|
3
|
+
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';
|
|
4
|
+
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, 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, 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, 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';
|
|
5
|
+
import { aU as CanvasProps, C as LegacyRootState, R as RenderTargetOptions } from './shared/fiber.Dy7Uz273.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, A as InternalState, X as IsObject, A as LegacyInternalState, z as LegacyRenderer, 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, z as R3FRenderer, an as REACT_INTERNAL_PROPS, av as RESERVED_PROPS, $ 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';
|
|
6
7
|
import { FrameCallback, UseFrameNextOptions, FrameNextControls } from '@pmndrs/scheduler';
|
|
7
8
|
export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, Scheduler, SchedulerApi, UseFrameNextOptions, UseFrameOptions, getScheduler } from '@pmndrs/scheduler';
|
|
8
9
|
import { JSX } from 'react';
|
|
9
|
-
import 'react-use-measure';
|
|
10
10
|
import 'three/webgpu';
|
|
11
|
-
import 'react/jsx-runtime';
|
|
12
11
|
import 'zustand';
|
|
13
12
|
import 'zustand/traditional';
|
|
14
13
|
import 'three/tsl';
|
|
14
|
+
import 'react-use-measure';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* The `ReactThreeFiber` namespace of the legacy entry: the shared element types plus this entry's JSX map.
|
|
@@ -102,8 +102,11 @@ declare const useRenderTarget: {
|
|
|
102
102
|
(width: number, height: number, options?: RenderTargetOptions): WebGLRenderTarget;
|
|
103
103
|
};
|
|
104
104
|
|
|
105
|
-
/**
|
|
106
|
-
|
|
105
|
+
/**
|
|
106
|
+
* Canvas props on the legacy entry: `onCreated` receives `LegacyRootState`. No `primary` / `share`:
|
|
107
|
+
* renderer sharing is WebGPU-only. `scheduler` works as on every entry.
|
|
108
|
+
*/
|
|
109
|
+
type LegacyCanvasProps = Omit<CanvasProps, 'onCreated' | 'primary' | 'share'> & {
|
|
107
110
|
/** Callback after the canvas has rendered (but not yet committed); `state.renderer` is a `WebGLRenderer` */
|
|
108
111
|
onCreated?: (state: LegacyRootState) => void;
|
|
109
112
|
};
|
package/dist/legacy.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
import { WebGLRenderTarget } from 'three';
|
|
3
|
-
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
|
|
4
|
-
export {
|
|
5
|
-
|
|
3
|
+
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.js';
|
|
4
|
+
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, 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, 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, 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.js';
|
|
5
|
+
import { aU as CanvasProps, C as LegacyRootState, R as RenderTargetOptions } from './shared/fiber.CjMAAsJy.js';
|
|
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, A as InternalState, X as IsObject, A as LegacyInternalState, z as LegacyRenderer, 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, z as R3FRenderer, an as REACT_INTERNAL_PROPS, av as RESERVED_PROPS, $ 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.CjMAAsJy.js';
|
|
6
7
|
import { FrameCallback, UseFrameNextOptions, FrameNextControls } from '@pmndrs/scheduler';
|
|
7
8
|
export { AddPhaseOptions, FrameControls, FrameNextControls, FrameTimingState, RootOptions, Scheduler, SchedulerApi, UseFrameNextOptions, UseFrameOptions, getScheduler } from '@pmndrs/scheduler';
|
|
8
9
|
import { JSX } from 'react';
|
|
9
|
-
import 'react-use-measure';
|
|
10
10
|
import 'three/webgpu';
|
|
11
|
-
import 'react/jsx-runtime';
|
|
12
11
|
import 'zustand';
|
|
13
12
|
import 'zustand/traditional';
|
|
14
13
|
import 'three/tsl';
|
|
14
|
+
import 'react-use-measure';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* The `ReactThreeFiber` namespace of the legacy entry: the shared element types plus this entry's JSX map.
|
|
@@ -102,8 +102,11 @@ declare const useRenderTarget: {
|
|
|
102
102
|
(width: number, height: number, options?: RenderTargetOptions): WebGLRenderTarget;
|
|
103
103
|
};
|
|
104
104
|
|
|
105
|
-
/**
|
|
106
|
-
|
|
105
|
+
/**
|
|
106
|
+
* Canvas props on the legacy entry: `onCreated` receives `LegacyRootState`. No `primary` / `share`:
|
|
107
|
+
* renderer sharing is WebGPU-only. `scheduler` works as on every entry.
|
|
108
|
+
*/
|
|
109
|
+
type LegacyCanvasProps = Omit<CanvasProps, 'onCreated' | 'primary' | 'share'> & {
|
|
107
110
|
/** Callback after the canvas has rendered (but not yet committed); `state.renderer` is a `WebGLRenderer` */
|
|
108
111
|
onCreated?: (state: LegacyRootState) => void;
|
|
109
112
|
};
|
package/dist/legacy.mjs
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
4
|
-
import
|
|
5
|
-
import { a as useThree$1, b as useFrame$1 } from './shared/fiber.
|
|
6
|
-
export { B as Block, E as ErrorBoundary, c as context, r as registerRootExtension, s as setRenderOverride, f as useBridge, d as useIsomorphicLayoutEffect, e as useMutableCallback, u as useStore } from './shared/fiber.
|
|
2
|
+
import { an as useRenderTarget$1, c as createRoot$1, C as Canvas$1 } from './shared/fiber.BSYBnw8x.mjs';
|
|
3
|
+
export { s as Environment, p as EnvironmentCube, E as EnvironmentMap, q as EnvironmentPortal, ah as FROM_REF, I as IsObject, ak as ONCE, P as Portal, S as REACT_INTERNAL_PROPS, a0 as RESERVED_PROPS, T as Texture, _ as _roots, d as addAfterEffect, b as addEffect, e as addTail, f as advance, a5 as applyProps, a2 as attach, W as buildGraph, N as calculateDpr, y as createEvents, a as createPointerEvents, M as createPortal, l as createStore, a3 as detach, a4 as diffProps, X as dispose, a as events, H as extend, U as findInitialRoot, K as flushSync, ai as fromRef, Y as getInstanceProps, h as getPrimary, k as getPrimaryIds, V as getRootState, m as getThree, O as getUuidPrefix, ag as hasConstructor, j as hasPrimary, n as hasThree, i as invalidate, $ as invalidateInstance, a6 as is, a9 as isColorRepresentation, af as isCopyable, aj as isFromRef, ac as isLayers, aa as isObject3D, am as isOnce, a7 as isOrthographicCamera, a8 as isRef, g as isRenderer, ab as isTexture, ad as isUniform, ae as isVectorLike, al as once, Z as prepare, t as presetsObj, J as reconciler, r as registerPrimary, x as removeInteractivity, a1 as resolve, v as swapInteractivity, L as unmountComponentAtNode, u as unregisterPrimary, Q as updateCamera, R as updateFrustum, G as useEnvironment, A as useGraph, z as useInstanceHandle, B as useLoader, D as useTexture, F as useTextures, w as waitForPrimary, o as whenThree } from './shared/fiber.BSYBnw8x.mjs';
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
import { a as useThree$1, b as useFrame$1 } from './shared/fiber.Biz9olEe.mjs';
|
|
6
|
+
export { B as Block, E as ErrorBoundary, c as context, r as registerRootExtension, s as setRenderOverride, f as useBridge, d as useIsomorphicLayoutEffect, e as useMutableCallback, u as useStore } from './shared/fiber.Biz9olEe.mjs';
|
|
7
7
|
export { Scheduler, getScheduler } from '@pmndrs/scheduler';
|
|
8
8
|
|
|
9
|
+
const webglSupport = {
|
|
10
|
+
kind: "webgl",
|
|
11
|
+
three: THREE,
|
|
12
|
+
Renderer: THREE.WebGLRenderer,
|
|
13
|
+
RenderTarget: THREE.WebGLRenderTarget,
|
|
14
|
+
CubeRenderTarget: THREE.WebGLCubeRenderTarget
|
|
15
|
+
};
|
|
16
|
+
|
|
9
17
|
const R3F_BUILD_LEGACY = true;
|
|
10
18
|
const R3F_BUILD_WEBGPU = false;
|
|
11
19
|
const provider = {
|