@react-three/fiber 10.0.0-canary.87166dc → 10.0.0-canary.88b1ca7

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.
Files changed (40) hide show
  1. package/dist/extension.cjs +1 -1
  2. package/dist/extension.d.cts +49 -5
  3. package/dist/extension.d.mts +49 -5
  4. package/dist/extension.d.ts +49 -5
  5. package/dist/extension.mjs +1 -1
  6. package/dist/index.cjs +7 -8
  7. package/dist/index.d.cts +9 -42
  8. package/dist/index.d.mts +9 -42
  9. package/dist/index.d.ts +9 -42
  10. package/dist/index.mjs +6 -6
  11. package/dist/legacy.cjs +2 -2
  12. package/dist/legacy.d.cts +4 -4
  13. package/dist/legacy.d.mts +4 -4
  14. package/dist/legacy.d.ts +4 -4
  15. package/dist/legacy.mjs +4 -4
  16. package/dist/shared/{fiber.3jeDXXYd.d.mts → fiber.34TOMPo3.d.cts} +10 -9
  17. package/dist/shared/fiber.BFuGd7gN.d.cts +90 -0
  18. package/dist/shared/{fiber.CsZ092z_.cjs → fiber.BO8-26r8.cjs} +124 -9
  19. package/dist/shared/fiber.BSXtODQl.cjs +14 -0
  20. package/dist/shared/fiber.Bll9fqKA.d.mts +90 -0
  21. package/dist/shared/{fiber.BC5FRLu-.mjs → fiber.BuWl08aJ.mjs} +91 -76
  22. package/dist/shared/{fiber.DlH05gco.mjs → fiber.C-3TIsF8.mjs} +119 -10
  23. package/dist/shared/{fiber.fR3DaJb1.d.cts → fiber.CjMAAsJy.d.ts} +10 -9
  24. package/dist/shared/fiber.DEWBFQJe.mjs +9 -0
  25. package/dist/shared/{fiber.C_MFx7We.d.ts → fiber.DQTSZ24m.d.cts} +11 -8
  26. package/dist/shared/{fiber.C_MFx7We.d.cts → fiber.DQTSZ24m.d.mts} +11 -8
  27. package/dist/shared/{fiber.C_MFx7We.d.mts → fiber.DQTSZ24m.d.ts} +11 -8
  28. package/dist/shared/fiber.DuA4F8L5.d.ts +90 -0
  29. package/dist/shared/{fiber.B_KQAb3I.d.ts → fiber.Dy7Uz273.d.mts} +10 -9
  30. package/dist/shared/{fiber.BybcfIwy.cjs → fiber.TRm3lZ7I.cjs} +91 -76
  31. package/dist/webgpu/index.cjs +7 -9
  32. package/dist/webgpu/index.d.cts +11 -78
  33. package/dist/webgpu/index.d.mts +11 -78
  34. package/dist/webgpu/index.d.ts +11 -78
  35. package/dist/webgpu/index.mjs +7 -9
  36. package/package.json +1 -1
  37. package/readme.md +10 -1
  38. package/dist/shared/fiber.C6hitYDY.d.cts +0 -48
  39. package/dist/shared/fiber.D4fD6H74.d.mts +0 -48
  40. package/dist/shared/fiber.YgTUGbja.d.ts +0 -48
@@ -1,5 +1,5 @@
1
1
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
- import { i as isDevelopment, n as notifyDepreciated, h as detachRootExtensions, j as attachRootExtensions, d as useIsomorphicLayoutEffect, c as context, a as useThree, u as useStore, k as unstageTextures, l as stageTextures, e as useMutableCallback, b as useFrame, f as useBridge, m as useGate, o as notifyAlpha, E as ErrorBoundary, B as Block, p as notifyRootExtensionsHmr } from './fiber.DlH05gco.mjs';
2
+ import { i as isDevelopment, n as notifyDepreciated, p as preserveAccessors, h as defineRendererAccessors, j as stateForScheduler, k as detachRootExtensions, l as attachRootExtensions, d as useIsomorphicLayoutEffect, c as context, a as useThree, u as useStore, m as unstageTextures, o as stageTextures, e as useMutableCallback, q as isAccessor, t as cloneState, v as keepAccessors, b as useFrame, f as useBridge, w as useGate, x as notifyAlpha, E as ErrorBoundary, B as Block, y as notifyRootExtensionsHmr } from './fiber.C-3TIsF8.mjs';
3
3
  import * as React from 'react';
4
4
  import React__default, { useRef, useMemo, useLayoutEffect, useEffect, useImperativeHandle, useCallback, useState } from 'react';
5
5
  import useMeasure from 'react-use-measure';
@@ -623,8 +623,9 @@ function applyProps(object, props) {
623
623
  for (const name in nextUniforms) {
624
624
  const uniform = nextUniforms[name];
625
625
  const targetUniform = uniforms[name];
626
- if (targetUniform) Object.assign(targetUniform, uniform);
627
- else {
626
+ if (targetUniform) {
627
+ Object.assign(targetUniform, uniform);
628
+ } else {
628
629
  const nextUniform = isUniform(uniform) ? uniform.clone() : new (getThree()).Uniform(uniform.value);
629
630
  uniforms[name] = nextUniform;
630
631
  }
@@ -680,13 +681,6 @@ function applyProps(object, props) {
680
681
  return object;
681
682
  }
682
683
 
683
- const INTERNAL_LIB_MARKERS = ["zustand", "setState", "Object.assign"];
684
- function isInternalRendererAccess(stack, callerDepth = 2) {
685
- if (!stack) return false;
686
- const caller = stack.split("\n")[callerDepth] ?? "";
687
- return INTERNAL_LIB_MARKERS.some((m) => caller.includes(m));
688
- }
689
-
690
684
  function updateSize(state, size, imperative) {
691
685
  state.set((current) => ({
692
686
  size,
@@ -701,7 +695,8 @@ function configureSize(store, size) {
701
695
  updateSize(state, size, false);
702
696
  }
703
697
  const createStore = (invalidate, advance) => {
704
- const rootStore = createWithEqualityFn((set, get) => {
698
+ const rootStore = createWithEqualityFn((rawSet, get, api) => {
699
+ const set = api.setState = preserveAccessors(rawSet, get);
705
700
  let position;
706
701
  let defaultTarget;
707
702
  let tempTarget;
@@ -794,7 +789,7 @@ const createStore = (invalidate, advance) => {
794
789
  factor: 0,
795
790
  getCurrentViewport
796
791
  },
797
- setEvents: (events) => set((state2) => ({ ...state2, events: { ...state2.events, ...events } })),
792
+ setEvents: (events) => set((state2) => ({ events: { ...state2.events, ...events } })),
798
793
  setSize: (width, height, top, left) => {
799
794
  const state2 = get();
800
795
  if (width === void 0) {
@@ -890,37 +885,7 @@ const createStore = (invalidate, advance) => {
890
885
  return rootState;
891
886
  });
892
887
  const state = rootStore.getState();
893
- Object.defineProperty(state, "gl", {
894
- get() {
895
- const currentState = rootStore.getState();
896
- if (!currentState.isLegacy && currentState.internal.actualRenderer) {
897
- const stack = new Error().stack || "";
898
- if (!isInternalRendererAccess(stack)) {
899
- const cleanedStack = stack.split("\n").slice(2).join("\n") || "Stack trace unavailable";
900
- notifyDepreciated({
901
- heading: "Accessing state.gl in WebGPU mode",
902
- body: "Please use state.renderer instead. state.gl is deprecated and will be removed in future versions.\n\nFor backwards compatibility, state.gl currently maps to state.renderer, but this may cause issues with libraries expecting WebGLRenderer.\n\nAccessed from:\n" + cleanedStack
903
- });
904
- }
905
- }
906
- return currentState.internal.actualRenderer;
907
- },
908
- set(value) {
909
- rootStore.getState().internal.actualRenderer = value;
910
- },
911
- enumerable: true,
912
- configurable: true
913
- });
914
- Object.defineProperty(state, "renderer", {
915
- get() {
916
- return rootStore.getState().internal.actualRenderer;
917
- },
918
- set(value) {
919
- rootStore.getState().internal.actualRenderer = value;
920
- },
921
- enumerable: true,
922
- configurable: true
923
- });
888
+ defineRendererAccessors(state);
924
889
  let oldScene = state.scene;
925
890
  rootStore.subscribe(() => {
926
891
  const currentState = rootStore.getState();
@@ -979,7 +944,8 @@ function configureScheduler(store, canvasId, schedulerConfig, previous) {
979
944
  if (!rootId) {
980
945
  const newRootId = state.internal.pendingRootId ?? canvasId ?? scheduler.generateRootId();
981
946
  const unregisterRoot = scheduler.registerRoot(newRootId, {
982
- getState: () => store.getState(),
947
+ // The scheduler spreads this into each frame state; see stateForScheduler
948
+ getState: () => stateForScheduler(store.getState()),
983
949
  onError: (err) => store.getState().setError(err),
984
950
  frameloop: store.getState().frameloop,
985
951
  before: rootBefore,
@@ -1370,7 +1336,6 @@ function initializeRenderer(canvas, provider, store, props) {
1370
1336
  state.set((prev) => ({
1371
1337
  webGPUSupported: primaryEntry.store.getState().webGPUSupported,
1372
1338
  renderer,
1373
- gl: renderer,
1374
1339
  primaryStore: primaryEntry.store,
1375
1340
  internal: {
1376
1341
  ...prev.internal,
@@ -1401,7 +1366,6 @@ function initializeRenderer(canvas, provider, store, props) {
1401
1366
  state.set((prev) => ({
1402
1367
  webGPUSupported: isWebGPUBackend,
1403
1368
  renderer,
1404
- gl: renderer,
1405
1369
  primaryStore: store,
1406
1370
  internal: {
1407
1371
  ...prev.internal,
@@ -1421,12 +1385,7 @@ function initializeRenderer(canvas, provider, store, props) {
1421
1385
  const isWebGPUBackend = backend && "isWebGPUBackend" in backend;
1422
1386
  state.internal.actualRenderer = renderer;
1423
1387
  state.internal.releaseRenderer = leaseRenderer(renderer, resolved.owned);
1424
- state.set({
1425
- webGPUSupported: isWebGPUBackend,
1426
- renderer,
1427
- gl: renderer,
1428
- primaryStore: store
1429
- });
1388
+ state.set({ webGPUSupported: isWebGPUBackend, renderer, primaryStore: store });
1430
1389
  if (primary) {
1431
1390
  const canvasTarget = renderer.getCanvasTarget?.();
1432
1391
  (_a = state.internal).pendingRootId ?? (_a.pendingRootId = canvasId || getScheduler().generateRootId());
@@ -1858,14 +1817,12 @@ function createRootConfiguration(store, canvas) {
1858
1817
  };
1859
1818
  const xr = {
1860
1819
  connect() {
1861
- const { gl, renderer: renderer2 } = store.getState();
1862
- const xrManager = (renderer2 || gl).xr;
1820
+ const xrManager = store.getState().renderer.xr;
1863
1821
  xrManager.addEventListener("sessionstart", handleSessionChange);
1864
1822
  xrManager.addEventListener("sessionend", handleSessionChange);
1865
1823
  },
1866
1824
  disconnect() {
1867
- const { gl, renderer: renderer2 } = store.getState();
1868
- const xrManager = (renderer2 || gl).xr;
1825
+ const xrManager = store.getState().renderer.xr;
1869
1826
  xrManager.removeEventListener("sessionstart", handleSessionChange);
1870
1827
  xrManager.removeEventListener("sessionend", handleSessionChange);
1871
1828
  }
@@ -1932,7 +1889,7 @@ function createRootConfiguration(store, canvas) {
1932
1889
  };
1933
1890
  }
1934
1891
 
1935
- const version = "10.0.0-alpha.5";
1892
+ const version = "10.0.0-alpha.6";
1936
1893
  const packageData = {
1937
1894
  version: version};
1938
1895
 
@@ -15803,11 +15760,63 @@ async function importLoader(format) {
15803
15760
  loader = (await import('three/examples/jsm/loaders/EXRLoader.js')).EXRLoader;
15804
15761
  break;
15805
15762
  case "jpg":
15806
- loader = (await import('three/examples/jsm/loaders/UltraHDRLoader.js')).UltraHDRLoader;
15763
+ loader = createJpegLoader((await import('three/examples/jsm/loaders/UltraHDRLoader.js')).UltraHDRLoader);
15764
+ break;
15765
+ case "ldr":
15766
+ loader = getThree().TextureLoader;
15807
15767
  break;
15808
15768
  }
15809
15769
  return loader;
15810
15770
  }
15771
+ function createJpegLoader(UltraHDR) {
15772
+ return class JpegEnvironmentLoader extends UltraHDR {
15773
+ // @ts-expect-error A plain JPEG resolves to a Texture, not the DataTexture UltraHDRLoader declares
15774
+ load(url, onLoad, onProgress, onError) {
15775
+ const three = getThree();
15776
+ const file = new three.FileLoader(this.manager);
15777
+ file.setResponseType("arraybuffer");
15778
+ file.setRequestHeader(this.requestHeader);
15779
+ file.setPath(this.path);
15780
+ file.setWithCredentials(this.withCredentials);
15781
+ file.load(
15782
+ url,
15783
+ (buffer) => {
15784
+ try {
15785
+ this.parse(buffer, (texData) => {
15786
+ const { data } = texData;
15787
+ const texture = new three.DataTexture(data, texData.width, texData.height, three.RGBAFormat, texData.type);
15788
+ texture.minFilter = three.LinearMipMapLinearFilter;
15789
+ texture.magFilter = three.LinearFilter;
15790
+ texture.generateMipmaps = true;
15791
+ texture.flipY = true;
15792
+ texture.needsUpdate = true;
15793
+ onLoad?.(texture);
15794
+ });
15795
+ } catch {
15796
+ const objectURL = URL.createObjectURL(new Blob([buffer], { type: "image/jpeg" }));
15797
+ const settle = () => URL.revokeObjectURL(objectURL);
15798
+ new three.ImageLoader().load(
15799
+ objectURL,
15800
+ (image) => {
15801
+ settle();
15802
+ const texture = new three.Texture(image);
15803
+ texture.needsUpdate = true;
15804
+ onLoad?.(texture);
15805
+ },
15806
+ void 0,
15807
+ (error) => {
15808
+ settle();
15809
+ onError?.(error);
15810
+ }
15811
+ );
15812
+ }
15813
+ },
15814
+ onProgress,
15815
+ onError
15816
+ );
15817
+ }
15818
+ };
15819
+ }
15811
15820
  const LOADER_KEY = Symbol("r3f-environment-loader");
15812
15821
  function useEnvironmentLoader(format) {
15813
15822
  return suspend(() => loadLoader(format), [LOADER_KEY, format]);
@@ -15842,7 +15851,8 @@ function useEnvironment({
15842
15851
  ) : loaderResult;
15843
15852
  const three = getThree();
15844
15853
  texture.mapping = isCubemap ? three.CubeReflectionMapping : three.EquirectangularReflectionMapping;
15845
- texture.colorSpace = colorSpace ?? (isCubemap && format !== "hdr-cube" ? "srgb" : "srgb-linear");
15854
+ const hdr = format === "hdr-cube" || texture.isDataTexture === true;
15855
+ texture.colorSpace = colorSpace ?? (hdr ? "srgb-linear" : "srgb");
15846
15856
  return texture;
15847
15857
  }
15848
15858
  const preloadDefaultOptions = {
@@ -15901,7 +15911,7 @@ function validatePreset(preset) {
15901
15911
  function getFormat(files) {
15902
15912
  const isCubemap = isArray(files) && files.length === 6;
15903
15913
  const firstEntry = isArray(files) ? files[0] : files;
15904
- const firstExtension = firstEntry.split(".").pop()?.split("?")?.shift()?.toLowerCase();
15914
+ const firstExtension = firstEntry.split(/[?#]/)[0].split(".").pop()?.toLowerCase();
15905
15915
  let format;
15906
15916
  if (isCubemap) format = firstExtension === "hdr" ? "hdr-cube" : "cube";
15907
15917
  else if (firstEntry.startsWith("data:application/exr")) format = "exr";
@@ -15909,6 +15919,8 @@ function getFormat(files) {
15909
15919
  else if (firstEntry.startsWith("data:image/jpeg")) format = "jpg";
15910
15920
  else if (firstExtension === "hdr" || firstExtension === "exr") format = firstExtension;
15911
15921
  else if (firstExtension === "jpg" || firstExtension === "jpeg") format = "jpg";
15922
+ else if (/^data:image\/(png|webp|avif|gif)[;,]/.test(firstEntry)) format = "ldr";
15923
+ else if (["png", "webp", "avif", "gif"].includes(firstExtension)) format = "ldr";
15912
15924
  return { format, isCubemap };
15913
15925
  }
15914
15926
 
@@ -15972,6 +15984,7 @@ function PortalInner({ state = {}, children, container }) {
15972
15984
  const lastRoot = lastRootState.current;
15973
15985
  if (lastRoot) {
15974
15986
  for (const key in rootState) {
15987
+ if (isAccessor(rootState, key)) continue;
15975
15988
  const field = key;
15976
15989
  const changed = rootState[field] !== lastRoot[field];
15977
15990
  const inherited = !(key in rest) && injectState[field] === lastRoot[field];
@@ -15988,11 +16001,7 @@ function PortalInner({ state = {}, children, container }) {
15988
16001
  if (camera !== rootState.camera) updateCamera(camera, resolvedSize);
15989
16002
  }
15990
16003
  const set = injectState.set;
15991
- return {
15992
- // The intersect consists of the previous root state
15993
- ...rootState,
15994
- ...injectState,
15995
- ...followed,
16004
+ return Object.assign(cloneState(rootState, injectState, followed), {
15996
16005
  // Portals have their own scene - always a real THREE.Scene (injected if needed)
15997
16006
  scene: portalScene,
15998
16007
  // rootScene always points to the actual THREE.Scene, even inside portals
@@ -16007,13 +16016,19 @@ function PortalInner({ state = {}, children, container }) {
16007
16016
  size: resolvedSize,
16008
16017
  viewport: { ...rootState.viewport, ...viewport },
16009
16018
  // Layers are allowed to override events
16010
- setEvents: (events2) => set((state2) => ({ ...state2, events: { ...state2.events, ...events2 } })),
16011
- // Container for child attachment - the portalScene (injected or container itself)
16012
- internal: { ...rootState.internal, ...injectState.internal, container: portalScene }
16013
- };
16019
+ setEvents: (events2) => set((state2) => ({ events: { ...state2.events, ...events2 } })),
16020
+ // Container for child attachment - the portalScene (injected or container itself). A portal
16021
+ // renders with its parent's renderer, which `renderer` / `gl` read from `actualRenderer`
16022
+ internal: {
16023
+ ...rootState.internal,
16024
+ ...injectState.internal,
16025
+ actualRenderer: rootState.internal.actualRenderer,
16026
+ container: portalScene
16027
+ }
16028
+ });
16014
16029
  });
16015
16030
  const usePortalStore = useMemo(() => {
16016
- const store = createWithEqualityFn((set, get) => ({ ...rest, set, get }));
16031
+ const store = createWithEqualityFn(keepAccessors((set, get) => ({ ...rest, set, get })));
16017
16032
  const onMutate = (prev) => store.setState((state2) => inject.current(prev, state2));
16018
16033
  onMutate(previousRoot.getState());
16019
16034
  return store;
@@ -16223,12 +16238,12 @@ function EnvironmentColor({ color, scene }) {
16223
16238
  function EnvironmentDualSource(props) {
16224
16239
  const { backgroundFiles, ...envProps } = props;
16225
16240
  return /* @__PURE__ */ jsxs(Fragment, { children: [
16226
- /* @__PURE__ */ jsx(EnvironmentCube, { ...envProps, background: false }),
16227
- /* @__PURE__ */ jsx(EnvironmentCube, { ...props, files: backgroundFiles, background: "only" })
16241
+ (envProps.files || envProps.preset) && /* @__PURE__ */ jsx(EnvironmentCube, { ...envProps, background: false }),
16242
+ /* @__PURE__ */ jsx(EnvironmentCube, { ...props, files: backgroundFiles, preset: void 0, background: "only" })
16228
16243
  ] });
16229
16244
  }
16230
16245
  function Environment(props) {
16231
- if (props.color && !props.files && !props.preset && !props.map) {
16246
+ if (props.color !== void 0 && !props.files && !props.preset && !props.map) {
16232
16247
  return /* @__PURE__ */ jsx(EnvironmentColor, { ...props });
16233
16248
  }
16234
16249
  if (props.backgroundFiles && props.backgroundFiles !== props.files) {
@@ -16238,7 +16253,7 @@ function Environment(props) {
16238
16253
  }
16239
16254
 
16240
16255
  function parseBackground(background) {
16241
- if (!background) return null;
16256
+ if (background === void 0 || background === null || background === "") return null;
16242
16257
  if (typeof background === "object" && !background.isColor) {
16243
16258
  const { backgroundMap, envMap, files, preset, ...rest } = background;
16244
16259
  return {
@@ -16256,7 +16271,7 @@ function parseBackground(background) {
16256
16271
  if (background in presetsObj) {
16257
16272
  return { preset: background, background: true };
16258
16273
  }
16259
- if (/^(https?:\/\/|\/|\.\/|\.\.\/)|\.(hdr|exr|jpg|jpeg|png|webp|gif)$/i.test(background)) {
16274
+ if (/^(https?:\/\/|\/|\.\/|\.\.\/|data:)|\.(hdr|exr|jpg|jpeg|png|webp|avif|gif)([?#].*)?$/i.test(background)) {
16260
16275
  return { files: background, background: true };
16261
16276
  }
16262
16277
  return { color: background, background: true };
@@ -16546,4 +16561,4 @@ function Canvas(props) {
16546
16561
  return /* @__PURE__ */ jsx(FiberProvider, { children: /* @__PURE__ */ jsx(CanvasImpl, { ...props }) });
16547
16562
  }
16548
16563
 
16549
- export { prepare as $, useGraph as A, useLoader as B, Canvas as C, useTexture as D, EnvironmentMap as E, useTextures as F, useRenderTarget as G, useEnvironment as H, IsObject as I, extend as J, reconciler as K, flushSync as L, unmountComponentAtNode as M, createPortal as N, calculateDpr as O, Portal as P, getUuidPrefix as Q, updateCamera as R, updateFrustum as S, Texture as T, REACT_INTERNAL_PROPS as U, findInitialRoot as V, getRootState as W, buildGraph as X, dispose as Y, getInstanceProps as Z, _roots as _, createPointerEvents as a, invalidateInstance as a0, RESERVED_PROPS as a1, resolve as a2, attach as a3, detach as a4, diffProps as a5, applyProps as a6, is as a7, isOrthographicCamera as a8, isRef$1 as a9, isColorRepresentation as aa, isObject3D as ab, isTexture as ac, isLayers as ad, isUniform as ae, isVectorLike as af, isCopyable as ag, hasConstructor as ah, FROM_REF as ai, fromRef as aj, isFromRef as ak, ONCE as al, once as am, isOnce as an, addEffect as b, createRoot as c, addAfterEffect as d, addTail as e, advance as f, isRenderer as g, getPrimary as h, invalidate as i, hasPrimary as j, getPrimaryIds as k, createStore as l, getThree as m, hasThree as n, whenThree as o, EnvironmentCube as p, EnvironmentPortal as q, registerPrimary as r, Environment as s, presetsObj as t, unregisterPrimary as u, swapInteractivity as v, waitForPrimary as w, removeInteractivity as x, createEvents as y, useInstanceHandle as z };
16564
+ export { invalidateInstance as $, useGraph as A, useLoader as B, Canvas as C, useTexture as D, EnvironmentMap as E, useTextures as F, useEnvironment as G, extend as H, IsObject as I, reconciler as J, flushSync as K, unmountComponentAtNode as L, createPortal as M, calculateDpr as N, getUuidPrefix as O, Portal as P, updateCamera as Q, updateFrustum as R, REACT_INTERNAL_PROPS as S, Texture as T, findInitialRoot as U, getRootState as V, buildGraph as W, dispose as X, getInstanceProps as Y, prepare as Z, _roots as _, createPointerEvents as a, RESERVED_PROPS as a0, resolve as a1, attach as a2, detach as a3, diffProps as a4, applyProps as a5, is as a6, isOrthographicCamera as a7, isRef$1 as a8, isColorRepresentation as a9, isObject3D as aa, isTexture as ab, isLayers as ac, isUniform as ad, isVectorLike as ae, isCopyable as af, hasConstructor as ag, FROM_REF as ah, fromRef as ai, isFromRef as aj, ONCE as ak, once as al, isOnce as am, useRenderTarget as an, addEffect as b, createRoot as c, addAfterEffect as d, addTail as e, advance as f, isRenderer as g, getPrimary as h, invalidate as i, hasPrimary as j, getPrimaryIds as k, createStore as l, getThree as m, hasThree as n, whenThree as o, EnvironmentCube as p, EnvironmentPortal as q, registerPrimary as r, Environment as s, presetsObj as t, unregisterPrimary as u, swapInteractivity as v, waitForPrimary as w, removeInteractivity as x, createEvents as y, useInstanceHandle as z };
@@ -131,6 +131,118 @@ function isDevelopment() {
131
131
  }
132
132
  }
133
133
 
134
+ const INTERNAL_LIB_MARKERS = [
135
+ "zustand",
136
+ "setState",
137
+ "Object.assign",
138
+ "@pmndrs/scheduler",
139
+ "Scheduler.tickRoot",
140
+ "Scheduler.stepJob"
141
+ ];
142
+ function isInternalRendererAccess(stack, callerDepth = 2) {
143
+ if (!stack) return false;
144
+ const caller = stack.split("\n")[callerDepth] ?? "";
145
+ return INTERNAL_LIB_MARKERS.some((m) => caller.includes(m));
146
+ }
147
+
148
+ const isAccessorDescriptor = (descriptor) => !!descriptor && (descriptor.get !== void 0 || descriptor.set !== void 0);
149
+ const isAccessor = (object, key) => isAccessorDescriptor(Object.getOwnPropertyDescriptor(object, key));
150
+ function cloneState(...sources) {
151
+ const target = {};
152
+ for (const source of sources) {
153
+ if (source) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
154
+ }
155
+ return target;
156
+ }
157
+ function preserveAccessors(rawSet, get) {
158
+ return ((partial, replace) => {
159
+ const previous = get();
160
+ const patch = typeof partial === "function" ? partial(previous) : partial;
161
+ if (replace || !previous || patch == null || Object.is(patch, previous)) {
162
+ return rawSet(patch, replace);
163
+ }
164
+ const next = cloneState(previous);
165
+ const viaSetter = [];
166
+ for (const key of Reflect.ownKeys(patch)) {
167
+ const descriptor = Object.getOwnPropertyDescriptor(patch, key);
168
+ if (!descriptor.enumerable) continue;
169
+ if (isAccessorDescriptor(descriptor)) {
170
+ Object.defineProperty(next, key, descriptor);
171
+ } else if (isAccessor(next, key)) {
172
+ viaSetter.push(key);
173
+ } else {
174
+ Object.defineProperty(next, key, {
175
+ value: descriptor.value,
176
+ writable: true,
177
+ enumerable: true,
178
+ configurable: true
179
+ });
180
+ }
181
+ }
182
+ for (const key of viaSetter) next[key] = patch[key];
183
+ rawSet(next, true);
184
+ });
185
+ }
186
+ const keepAccessors = (initializer) => (rawSet, get, api) => {
187
+ const set = preserveAccessors(rawSet, get);
188
+ api.setState = set;
189
+ return initializer(set, get, api);
190
+ };
191
+ let glNoticeShown = false;
192
+ const schedulerViews = /* @__PURE__ */ new WeakMap();
193
+ function stateForScheduler(state) {
194
+ let view = schedulerViews.get(state);
195
+ if (!view) {
196
+ view = cloneState(state);
197
+ Object.defineProperty(view, "gl", {
198
+ get() {
199
+ return this.internal?.actualRenderer;
200
+ },
201
+ set(value) {
202
+ this.internal.actualRenderer = value;
203
+ },
204
+ enumerable: true,
205
+ configurable: true
206
+ });
207
+ schedulerViews.set(state, view);
208
+ }
209
+ return view;
210
+ }
211
+ function defineRendererAccessors(state) {
212
+ Object.defineProperty(state, "gl", {
213
+ get() {
214
+ const renderer = this.internal?.actualRenderer;
215
+ if (!glNoticeShown && renderer && !this.isLegacy) {
216
+ const stack = new Error().stack || "";
217
+ if (!isInternalRendererAccess(stack)) {
218
+ glNoticeShown = true;
219
+ const cleanedStack = stack.split("\n").slice(2).join("\n") || "Stack trace unavailable";
220
+ notifyDepreciated({
221
+ heading: "Accessing state.gl in WebGPU mode",
222
+ body: "Please use state.renderer instead. state.gl is deprecated and will be removed in future versions.\n\nFor backwards compatibility, state.gl currently maps to state.renderer, but this may cause issues with libraries expecting WebGLRenderer.\n\nAccessed from:\n" + cleanedStack
223
+ });
224
+ }
225
+ }
226
+ return renderer;
227
+ },
228
+ set(value) {
229
+ this.internal.actualRenderer = value;
230
+ },
231
+ enumerable: true,
232
+ configurable: true
233
+ });
234
+ Object.defineProperty(state, "renderer", {
235
+ get() {
236
+ return this.internal?.actualRenderer;
237
+ },
238
+ set(value) {
239
+ this.internal.actualRenderer = value;
240
+ },
241
+ enumerable: true,
242
+ configurable: true
243
+ });
244
+ }
245
+
134
246
  const R3F_CONTEXT = Symbol.for("@react-three/fiber.context");
135
247
  const context = globalThis[R3F_CONTEXT] ?? (globalThis[R3F_CONTEXT] = React.createContext(null));
136
248
 
@@ -242,15 +354,12 @@ function useFrame(callback, priorityOrOptions) {
242
354
  });
243
355
  }
244
356
  const wrappedCallback = (frameState, delta) => {
245
- const localState = store.getState();
246
- const mergedState = {
247
- ...localState,
248
- time: frameState.time,
249
- delta: frameState.delta,
250
- elapsed: frameState.elapsed,
251
- frame: frameState.frame,
252
- overstep: frameState.overstep
253
- };
357
+ const mergedState = cloneState(store.getState());
358
+ mergedState.time = frameState.time;
359
+ mergedState.delta = frameState.delta;
360
+ mergedState.elapsed = frameState.elapsed;
361
+ mergedState.frame = frameState.frame;
362
+ mergedState.overstep = frameState.overstep;
254
363
  callbackRef.current?.(mergedState, delta);
255
364
  };
256
365
  const unregister = scheduler.register(wrappedCallback, {
@@ -388,4 +497,4 @@ function getTextureView(store) {
388
497
  return view;
389
498
  }
390
499
 
391
- export { Block as B, ErrorBoundary as E, useThree as a, useFrame as b, context as c, useIsomorphicLayoutEffect as d, useMutableCallback as e, useBridge as f, getTextureView as g, detachRootExtensions as h, isDevelopment as i, attachRootExtensions as j, unstageTextures as k, stageTextures as l, useGate as m, notifyDepreciated as n, notifyAlpha as o, notifyRootExtensionsHmr as p, registerRootExtension as r, setRenderOverride as s, useStore as u };
500
+ export { Block as B, ErrorBoundary as E, useThree as a, useFrame as b, context as c, useIsomorphicLayoutEffect as d, useMutableCallback as e, useBridge as f, getTextureView as g, defineRendererAccessors as h, isDevelopment as i, stateForScheduler as j, detachRootExtensions as k, attachRootExtensions as l, unstageTextures as m, notifyDepreciated as n, stageTextures as o, preserveAccessors as p, isAccessor as q, registerRootExtension as r, setRenderOverride as s, cloneState as t, useStore as u, keepAccessors as v, useGate as w, notifyAlpha as x, notifyRootExtensionsHmr as y };
@@ -1,7 +1,7 @@
1
1
  import * as React$1 from 'react';
2
2
  import { ReactNode, Component, RefObject, JSX } from 'react';
3
3
  import { Options } from 'react-use-measure';
4
- import { al as RenderProps, m as ConstructorRepresentation, aJ as ObjectMap, a8 as BaseRendererProps, a9 as RendererFactory, aA as Properties, I as InternalState, J as RootState, E as Euler$1, K as RootStore, a4 as EventManager, _ as DomEvent, aw as Instance, o as ThreeElement, as as Catalogue, ap as Root, am as InjectState, aR as ThreeCore, aG as Bridge, aI as UnblockProps, aL as Disposable, D as Dpr, aE as ThreeCamera, z as Size, aK as EquConfig } from './fiber.C_MFx7We.cjs';
4
+ import { ak as RenderProps, m as ConstructorRepresentation, aI as ObjectMap, a7 as BaseRendererProps, a8 as RendererFactory, az as Properties, I as InternalState, H as RootState, E as Euler$1, J as RootStore, a3 as EventManager, Z as DomEvent, av as Instance, o as ThreeElement, ar as Catalogue, ao as Root, al as InjectState, aQ as ThreeCore, aF as Bridge, aH as UnblockProps, aK as Disposable, D as Dpr, aD as ThreeCamera, y as Size, aJ as EquConfig } from './fiber.DQTSZ24m.js';
5
5
  import * as THREE from 'three';
6
6
  import { ColorRepresentation, Euler, Loader, RenderTargetOptions as RenderTargetOptions$1, ColorSpace, Texture as Texture$1, CubeTexture, Scene, Object3D } from 'three';
7
7
  import { WebGPURenderer } from 'three/webgpu';
@@ -35,7 +35,7 @@ type PresetsType = keyof typeof presetsObj;
35
35
  interface BackgroundConfig {
36
36
  /** HDRI preset name: 'apartment', 'city', 'dawn', 'forest', 'lobby', 'night', 'park', 'studio', 'sunset', 'warehouse' */
37
37
  preset?: PresetsType
38
- /** Files for cube texture (6 faces) or single HDR/EXR */
38
+ /** Files for cube texture (6 faces) or a single equirect (.hdr, .exr, .jpg, .png, .webp, .avif, .gif) */
39
39
  files?: string | string[]
40
40
  /** Separate files for scene.background (visual backdrop) */
41
41
  backgroundMap?: string | string[]
@@ -55,7 +55,7 @@ interface BackgroundConfig {
55
55
  *
56
56
  * String detection priority:
57
57
  * 1. Preset - exact match against known presets (apartment, city, dawn, forest, lobby, night, park, studio, sunset, warehouse)
58
- * 2. URL - starts with /, ./, ../, http://, https://, OR has image extension
58
+ * 2. URL - starts with /, ./, ../, http://, https://, data:, OR has an image extension (a query or hash may follow)
59
59
  * 3. Color - default fallback (CSS color names, hex values, rgb(), etc.)
60
60
  *
61
61
  * @example Color
@@ -270,7 +270,7 @@ type EnvironmentLoaderClearOptions = Pick<EnvironmentLoaderProps, 'files' | 'pre
270
270
  * - scale: Scale of backside projected sphere (default: 1000)
271
271
  *
272
272
  * Additional loader props:
273
- * @property files - File path(s) for environment. Supports .hdr, .exr, Ultra HDR .jpg, or array of 6 cube faces
273
+ * @property files - File path(s) for environment. Supports .hdr, .exr, .jpg (Ultra HDR or plain), an LDR .png/.webp/.avif/.gif, or array of 6 cube faces
274
274
  * @property path - Base path for file loading
275
275
  * @property extensions - Texture extensions override
276
276
  */
@@ -313,8 +313,9 @@ type EnvironmentProps = {
313
313
  declare function EnvironmentMap({ scene, background, map, ...config }: EnvironmentProps): null;
314
314
  /**
315
315
  * Internal component that loads environment textures from files or presets.
316
- * Uses HDRLoader for .hdr, EXRLoader for .exr, UltraHDRLoader for .jpg/.jpeg Ultra HDR,
317
- * or CubeTextureLoader for arrays of images.
316
+ * Uses HDRLoader for .hdr, EXRLoader for .exr, UltraHDRLoader for .jpg/.jpeg (a JPEG without a gain
317
+ * map loads as a plain image), TextureLoader for an LDR .png/.webp/.avif/.gif, or CubeTextureLoader
318
+ * for arrays of images.
318
319
  *
319
320
  * @example With preset
320
321
  * ```jsx
@@ -375,7 +376,7 @@ declare function EnvironmentPortal({ children, near, far, resolution, frames, ma
375
376
  *
376
377
  * Supports multiple input methods:
377
378
  * - **Presets**: Selection of HDRI Haven assets (apartment, city, dawn, forest, lobby, night, park, studio, sunset, warehouse)
378
- * - **Files**: HDR (.hdr), EXR (.exr), Ultra HDR JPEG (.jpg), or cube faces (array of 6 images)
379
+ * - **Files**: HDR (.hdr), EXR (.exr), JPEG (.jpg, Ultra HDR when it carries a gain map), LDR image (.png, .webp, .avif, .gif), or cube faces (array of 6 images)
379
380
  * - **Texture**: Pre-existing cube texture via `map` prop
380
381
  * - **Custom Scene**: Render children into environment using portal and cube camera
381
382
  * - **Ground Projection**: Project environment onto ground plane
@@ -2489,5 +2490,5 @@ declare function isOnce(value: unknown): value is {
2489
2490
  [ONCE]: any[] | true;
2490
2491
  };
2491
2492
 
2492
- export { useTexture as $, EnvironmentMap as H, EnvironmentCube as J, EnvironmentPortal as K, Environment as M, presetsObj as N, swapInteractivity as Q, removeInteractivity as S, createEvents as T, useInstanceHandle as U, useGraph as V, useLoader as X, IsObject as Y, addEffect as a, Texture as a0, useTextures as a5, useEnvironment as a7, extend as a8, reconciler as a9, diffProps as aA, applyProps as aB, is as aC, isOrthographicCamera as aD, isRef as aE, isColorRepresentation as aF, isObject3D as aG, isTexture as aH, isLayers as aI, isUniform as aJ, isVectorLike as aK, isCopyable as aL, hasConstructor as aM, FROM_REF as aN, fromRef as aP, isFromRef as aQ, ONCE as aR, once as aS, isOnce as aU, flushSync as aa, _roots as ab, unmountComponentAtNode as ac, createPortal as ad, Portal as ae, useIsomorphicLayoutEffect as af, useMutableCallback as ag, useBridge as ah, Block as ai, ErrorBoundary as aj, calculateDpr as ak, getUuidPrefix as al, updateCamera as am, updateFrustum as an, REACT_INTERNAL_PROPS as ao, findInitialRoot as ap, getRootState as aq, buildGraph as ar, dispose as as, getInstanceProps as at, prepare as au, invalidateInstance as av, RESERVED_PROPS as aw, resolve as ax, attach as ay, detach as az, addAfterEffect as b, createPointerEvents as c, addTail as d, advance as e, isRenderer as f, getPrimary as g, hasPrimary as h, invalidate as i, getPrimaryIds as j, createStore as k, getThree as l, hasThree as m, whenThree as n, registerPrimary as r, unregisterPrimary as u, waitForPrimary as w };
2493
- export type { LegacyInternalState as A, BackgroundConfig as B, CanvasProps as C, LegacyRootState as D, Extensions as E, EnvironmentProps as F, GlobalRenderCallback as G, InputLike as I, LoaderLike as L, PresetsType as O, PrimaryCanvasEntry as P, RenderTargetOptions as R, WebGLDefaultProps as W, MappedTextureType as Z, UseTextureOptions as _, TextureInput as a1, TextureResult as a2, DisposeOptions as a3, UseTexturesReturn as a4, EnvironmentLoaderProps as a6, FromRefMarker as aO, OnceValue as aT, GlobalEffectType as o, BackgroundProp as p, GLTFLike as q, LoaderInstance as s, InferLoadResult as t, LoaderResult as v, WebGLProps as x, WebGLShadowConfig as y, LegacyRenderer as z };
2493
+ export { Texture as $, EnvironmentMap as F, EnvironmentCube as H, EnvironmentPortal as J, Environment as K, presetsObj as M, swapInteractivity as O, removeInteractivity as Q, createEvents as S, useInstanceHandle as T, useGraph as U, useLoader as V, IsObject as X, useTexture as _, addEffect as a, useTextures as a4, useEnvironment as a6, extend as a7, reconciler as a8, flushSync as a9, applyProps as aA, is as aB, isOrthographicCamera as aC, isRef as aD, isColorRepresentation as aE, isObject3D as aF, isTexture as aG, isLayers as aH, isUniform as aI, isVectorLike as aJ, isCopyable as aK, hasConstructor as aL, FROM_REF as aM, fromRef as aO, isFromRef as aP, ONCE as aQ, once as aR, isOnce as aT, _roots as aa, unmountComponentAtNode as ab, createPortal as ac, Portal as ad, useIsomorphicLayoutEffect as ae, useMutableCallback as af, useBridge as ag, Block as ah, ErrorBoundary as ai, calculateDpr as aj, getUuidPrefix as ak, updateCamera as al, updateFrustum as am, REACT_INTERNAL_PROPS as an, findInitialRoot as ao, getRootState as ap, buildGraph as aq, dispose as ar, getInstanceProps as as, prepare as at, invalidateInstance as au, RESERVED_PROPS as av, resolve as aw, attach as ax, detach as ay, diffProps as az, addAfterEffect as b, createPointerEvents as c, addTail as d, advance as e, isRenderer as f, getPrimary as g, hasPrimary as h, invalidate as i, getPrimaryIds as j, createStore as k, getThree as l, hasThree as m, whenThree as n, registerPrimary as r, unregisterPrimary as u, waitForPrimary as w };
2494
+ export type { LegacyInternalState as A, BackgroundConfig as B, LegacyRootState as C, EnvironmentProps as D, Extensions as E, GlobalRenderCallback as G, InputLike as I, LoaderLike as L, PresetsType as N, PrimaryCanvasEntry as P, RenderTargetOptions as R, WebGLDefaultProps as W, MappedTextureType as Y, UseTextureOptions as Z, TextureInput as a0, TextureResult as a1, DisposeOptions as a2, UseTexturesReturn as a3, EnvironmentLoaderProps as a5, FromRefMarker as aN, OnceValue as aS, CanvasProps as aU, GlobalEffectType as o, BackgroundProp as p, GLTFLike as q, LoaderInstance as s, InferLoadResult as t, LoaderResult as v, WebGLProps as x, WebGLShadowConfig as y, LegacyRenderer as z };
@@ -0,0 +1,9 @@
1
+ import { an as useRenderTarget$1 } from './fiber.BuWl08aJ.mjs';
2
+ import { a as useThree$1, b as useFrame$1 } from './fiber.C-3TIsF8.mjs';
3
+
4
+ const useThree = useThree$1;
5
+ const useFrame = useFrame$1;
6
+ const useRenderTarget = useRenderTarget$1;
7
+ const asWebGPUCanvas = (Canvas) => Canvas;
8
+
9
+ export { asWebGPUCanvas as a, useFrame as b, useRenderTarget as c, useThree as u };
@@ -340,10 +340,14 @@ interface RendererProvider {
340
340
  }
341
341
 
342
342
  //* Register ==============================
343
- // The root entry can construct either renderer, so by default `state.renderer` is the union of
344
- // both and a WebGPU-only member (`renderer.compute`, `renderer.backend`) needs a narrow. An app that
345
- // has decided on one renderer says so once, and every renderer-typed field follows -- `useThree`,
346
- // `useFrame`, `onCreated`, `useRenderTarget`, `state.internal.support`:
343
+ // The base RootState is typed for both renderers, so by default `state.renderer` is the union and a
344
+ // WebGPU-only member (`renderer.compute`, `renderer.backend`) needs a narrow. That base is what
345
+ // `@react-three/fiber/extension` (the entry for libraries) and the `RootState` type expose, so a
346
+ // library compiles for apps on either renderer.
347
+ //
348
+ // Apps rarely need this: each entry's hooks are already typed for the renderer it renders with
349
+ // (`@react-three/fiber` WebGPU, `/legacy` WebGL). Registering narrows the base types too, for code
350
+ // that goes through them (`/extension` hooks in an app, `RootState` annotations):
347
351
  //
348
352
  // declare module '@react-three/fiber' {
349
353
  // interface Register {
@@ -352,8 +356,7 @@ interface RendererProvider {
352
356
  // }
353
357
  //
354
358
  // Same pattern as `Register` in @react-three/tsl (and TanStack Router). Nothing registered means
355
- // the union, unchanged. The `/legacy` and `/webgpu` entries are the same thing decided by import
356
- // path; this is for apps on `@react-three/fiber` that want the narrowed types without changing it.
359
+ // the union, unchanged.
357
360
 
358
361
  /**
359
362
  * Augment this to type `RootState` for the renderer your app uses. Recognised keys:
@@ -1233,5 +1236,5 @@ declare function useThree<T = RootState>(selector?: (state: RootState) => T, equ
1233
1236
  */
1234
1237
  declare const context: React$1.Context<RootStore>;
1235
1238
 
1236
- export { useStore as a$, useThree as b0, registerRootExtension as u, setRenderOverride as v, context as x };
1237
- export type { Events as $, Viewport as A, RenderCallback as B, Color as C, Dpr as D, Euler as E, Frameloop as F, GeometryTransformProps as G, Performance as H, InternalState as I, RootState as J, RootStore as K, Layers as L, MutableOrReadonlyParameters as M, NodeProps as N, Object3DMethod as O, PointerState as P, Quaternion as Q, RaycastableRepresentation as R, Subscription as S, TSLNodeInput as T, Intersection as U, VectorRepresentation as V, Camera as W, XRManager as X, IntersectionEvent as Y, ThreeEvent as Z, DomEvent as _, MathRepresentation as a, EventHandlers as a0, FilterFunction as a1, ComputeFunction as a2, XRPointerConfig as a3, EventManager as a4, PointerCaptureTarget as a5, VisibilityEntry as a6, OffscreenCanvas$1 as a7, BaseRendererProps as a8, RendererFactory as a9, Properties as aA, Mutable as aB, IsOptional as aC, IsAllOptional as aD, ThreeCamera as aE, Act as aF, Bridge as aG, SetBlock as aH, UnblockProps as aI, ObjectMap as aJ, EquConfig as aK, Disposable as aL, FrameNextState as aM, FrameState as aN, FrameNextCallback as aO, FrameCallback as aP, ThreeNamespace as aQ, ThreeCore as aR, OcclusionSupport as aS, WebGLSupport as aT, WebGPUSupport as aU, RendererSupport as aV, RendererProvider as aW, Register as aX, RegisteredRenderer as aY, ForRegisteredRenderer as aZ, R3FRendererSupport as a_, Renderer as aa, ColorManagementConfig as ab, ShadowsConfig as ac, RendererSettingsConfig as ad, DefaultGLProps as ae, GLProps as af, DefaultRendererProps as ag, CanvasSchedulerConfig as ah, RendererConfigExtended as ai, RendererProps as aj, CameraProps as ak, RenderProps as al, InjectState as am, FiberRoot as an, TrackedPromise as ao, Root as ap, AttachFnType as aq, AttachType as ar, Catalogue as as, Args as at, ArgsProp as au, InstanceProps as av, Instance as aw, HostConfig as ax, NonFunctionKeys as ay, Overwrite as az, MathTypes as b, MathType as c, MathProps as d, Vector2 as e, Vector3 as f, Vector4 as g, Matrix3 as h, Matrix4 as i, EventProps as j, GeometryProps as k, ReactProps as l, ConstructorRepresentation as m, ElementProps as n, ThreeElement as o, ThreeToJSXElements as p, ThreeElementsOf as q, ElementOf as r, R3FRenderTarget as s, ReconcilerRoot as t, RootExtension as w, R3FRenderer as y, Size as z };
1239
+ export { useStore as a$, useThree as b0, registerRootExtension as t, setRenderOverride as u, context as w };
1240
+ export type { EventHandlers as $, RenderCallback as A, Performance as B, Color as C, Dpr as D, Euler as E, Frameloop as F, GeometryTransformProps as G, RootState as H, InternalState as I, RootStore as J, Intersection as K, Layers as L, MutableOrReadonlyParameters as M, NodeProps as N, Object3DMethod as O, PointerState as P, Quaternion as Q, RaycastableRepresentation as R, Subscription as S, TSLNodeInput as T, Camera as U, VectorRepresentation as V, IntersectionEvent as W, XRManager as X, ThreeEvent as Y, DomEvent as Z, Events as _, MathRepresentation as a, FilterFunction as a0, ComputeFunction as a1, XRPointerConfig as a2, EventManager as a3, PointerCaptureTarget as a4, VisibilityEntry as a5, OffscreenCanvas$1 as a6, BaseRendererProps as a7, RendererFactory as a8, Renderer as a9, Mutable as aA, IsOptional as aB, IsAllOptional as aC, ThreeCamera as aD, Act as aE, Bridge as aF, SetBlock as aG, UnblockProps as aH, ObjectMap as aI, EquConfig as aJ, Disposable as aK, FrameNextState as aL, FrameState as aM, FrameNextCallback as aN, FrameCallback as aO, ThreeNamespace as aP, ThreeCore as aQ, OcclusionSupport as aR, WebGLSupport as aS, WebGPUSupport as aT, RendererSupport as aU, RendererProvider as aV, Register as aW, RegisteredRenderer as aX, ForRegisteredRenderer as aY, R3FRenderTarget as aZ, R3FRendererSupport as a_, ColorManagementConfig as aa, ShadowsConfig as ab, RendererSettingsConfig as ac, DefaultGLProps as ad, GLProps as ae, DefaultRendererProps as af, CanvasSchedulerConfig as ag, RendererConfigExtended as ah, RendererProps as ai, CameraProps as aj, RenderProps as ak, InjectState as al, FiberRoot as am, TrackedPromise as an, Root as ao, AttachFnType as ap, AttachType as aq, Catalogue as ar, Args as as, ArgsProp as at, InstanceProps as au, Instance as av, HostConfig as aw, NonFunctionKeys as ax, Overwrite as ay, Properties as az, MathTypes as b, MathType as c, MathProps as d, Vector2 as e, Vector3 as f, Vector4 as g, Matrix3 as h, Matrix4 as i, EventProps as j, GeometryProps as k, ReactProps as l, ConstructorRepresentation as m, ElementProps as n, ThreeElement as o, ThreeToJSXElements as p, ThreeElementsOf as q, ElementOf as r, ReconcilerRoot as s, RootExtension as v, R3FRenderer as x, Size as y, Viewport as z };