@react-three/fiber 9.6.0 → 9.6.1

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 (28) hide show
  1. package/CHANGELOG.md +1204 -1198
  2. package/dist/declarations/src/core/events.d.ts +94 -92
  3. package/dist/declarations/src/core/hooks.d.ts +53 -53
  4. package/dist/declarations/src/core/index.d.ts +13 -13
  5. package/dist/declarations/src/core/loop.d.ts +31 -31
  6. package/dist/declarations/src/core/reconciler.d.ts +50 -50
  7. package/dist/declarations/src/core/renderer.d.ts +89 -89
  8. package/dist/declarations/src/core/store.d.ts +130 -130
  9. package/dist/declarations/src/core/utils.d.ts +262 -262
  10. package/dist/declarations/src/index.d.ts +6 -6
  11. package/dist/declarations/src/native/Canvas.d.ts +13 -13
  12. package/dist/declarations/src/native/events.d.ts +4 -4
  13. package/dist/declarations/src/native.d.ts +6 -6
  14. package/dist/declarations/src/three-types.d.ts +68 -68
  15. package/dist/declarations/src/web/Canvas.d.ts +23 -23
  16. package/dist/declarations/src/web/events.d.ts +4 -4
  17. package/dist/{events-11ca7a92.cjs.prod.js → events-583399dd.cjs.prod.js} +118 -87
  18. package/dist/{events-760a1017.esm.js → events-b389eeca.esm.js} +118 -87
  19. package/dist/{events-508aad4b.cjs.dev.js → events-f19bcc32.cjs.dev.js} +118 -87
  20. package/dist/react-three-fiber.cjs.dev.js +4 -4
  21. package/dist/react-three-fiber.cjs.prod.js +4 -4
  22. package/dist/react-three-fiber.esm.js +5 -5
  23. package/native/dist/react-three-fiber-native.cjs.dev.js +4 -4
  24. package/native/dist/react-three-fiber-native.cjs.prod.js +4 -4
  25. package/native/dist/react-three-fiber-native.esm.js +5 -5
  26. package/native/package.json +5 -5
  27. package/package.json +1 -1
  28. package/readme.md +253 -253
@@ -36,17 +36,17 @@ var threeTypes = /*#__PURE__*/Object.freeze({
36
36
  __proto__: null
37
37
  });
38
38
 
39
- /**
40
- * Returns the instance's initial (outmost) root.
39
+ /**
40
+ * Returns the instance's initial (outmost) root.
41
41
  */
42
42
  function findInitialRoot(instance) {
43
43
  let root = instance.root;
44
44
  while (root.getState().previousRoot) root = root.getState().previousRoot;
45
45
  return root;
46
46
  }
47
- /**
48
- * Safely flush async effects when testing, simulating a legacy root.
49
- * @deprecated Import from React instead. import { act } from 'react'
47
+ /**
48
+ * Safely flush async effects when testing, simulating a legacy root.
49
+ * @deprecated Import from React instead. import { act } from 'react'
50
50
  */
51
51
  // Reference with computed key to break Webpack static analysis
52
52
  // https://github.com/webpack/webpack/issues/14814
@@ -55,14 +55,14 @@ const isOrthographicCamera = def => def && def.isOrthographicCamera;
55
55
  const isRef = obj => obj && obj.hasOwnProperty('current');
56
56
  const isColorRepresentation = value => value != null && (typeof value === 'string' || typeof value === 'number' || value.isColor);
57
57
 
58
- /**
59
- * An SSR-friendly useLayoutEffect.
60
- *
61
- * React currently throws a warning when using useLayoutEffect on the server.
62
- * To get around it, we can conditionally useEffect on the server (no-op) and
63
- * useLayoutEffect elsewhere.
64
- *
65
- * @see https://github.com/facebook/react/issues/14927
58
+ /**
59
+ * An SSR-friendly useLayoutEffect.
60
+ *
61
+ * React currently throws a warning when using useLayoutEffect on the server.
62
+ * To get around it, we can conditionally useEffect on the server (no-op) and
63
+ * useLayoutEffect elsewhere.
64
+ *
65
+ * @see https://github.com/facebook/react/issues/14927
66
66
  */
67
67
  const useIsomorphicLayoutEffect = /* @__PURE__ */((_window$document, _window$navigator) => typeof window !== 'undefined' && (((_window$document = window.document) == null ? void 0 : _window$document.createElement) || ((_window$navigator = window.navigator) == null ? void 0 : _window$navigator.product) === 'ReactNative'))() ? React__namespace.useLayoutEffect : React__namespace.useEffect;
68
68
  function useMutableCallback(fn) {
@@ -70,8 +70,8 @@ function useMutableCallback(fn) {
70
70
  useIsomorphicLayoutEffect(() => void (ref.current = fn), [fn]);
71
71
  return ref;
72
72
  }
73
- /**
74
- * Bridges renderer Context and StrictMode from a primary renderer.
73
+ /**
74
+ * Bridges renderer Context and StrictMode from a primary renderer.
75
75
  */
76
76
  function useBridge() {
77
77
  const fiber = itsFine.useFiber();
@@ -123,8 +123,8 @@ function calculateDpr(dpr) {
123
123
  return Array.isArray(dpr) ? Math.min(Math.max(dpr[0], target), dpr[1]) : dpr;
124
124
  }
125
125
 
126
- /**
127
- * Returns instance root state
126
+ /**
127
+ * Returns instance root state
128
128
  */
129
129
  function getRootState(obj) {
130
130
  var _r3f;
@@ -527,9 +527,9 @@ function makeId(event) {
527
527
  return (event.eventObject || event.object).uuid + '/' + event.index + event.instanceId;
528
528
  }
529
529
 
530
- /**
531
- * Release pointer captures.
532
- * This is called by releasePointerCapture in the API, and when an object is removed.
530
+ /**
531
+ * Release pointer captures.
532
+ * This is called by releasePointerCapture in the API, and when an object is removed.
533
533
  */
534
534
  function releaseInternalPointerCapture(capturedMap, obj, captures, pointerId) {
535
535
  const captureData = captures.get(obj);
@@ -542,6 +542,37 @@ function releaseInternalPointerCapture(capturedMap, obj, captures, pointerId) {
542
542
  }
543
543
  }
544
544
  }
545
+
546
+ /** This function transfers all interactivity state from one object instance to another. Used when swapping instances due to reconstruction. */
547
+ function swapInteractivity(store, object, newObject) {
548
+ const {
549
+ internal
550
+ } = store.getState();
551
+ for (let i = 0; i < internal.interaction.length; i++) {
552
+ if (internal.interaction[i] === object) internal.interaction[i] = newObject;
553
+ }
554
+ for (let i = 0; i < internal.initialHits.length; i++) {
555
+ if (internal.initialHits[i] === object) internal.initialHits[i] = newObject;
556
+ }
557
+ internal.hovered.forEach((value, key) => {
558
+ if (value.eventObject === object || value.object === object) {
559
+ internal.hovered.delete(key);
560
+ const next = {
561
+ ...value,
562
+ eventObject: value.eventObject === object ? newObject : value.eventObject,
563
+ object: value.object === object ? newObject : value.object
564
+ };
565
+ internal.hovered.set(makeId(next), next);
566
+ }
567
+ });
568
+ internal.capturedMap.forEach(captures => {
569
+ const captureData = captures.get(object);
570
+ if (captureData) {
571
+ captures.delete(object);
572
+ captures.set(newObject, captureData);
573
+ }
574
+ });
575
+ }
545
576
  function removeInteractivity(store, object) {
546
577
  const {
547
578
  internal
@@ -876,19 +907,19 @@ function createEvents(store) {
876
907
  if (!(instance != null && instance.eventCount)) return;
877
908
  const handlers = instance.handlers;
878
909
 
879
- /*
880
- MAYBE TODO, DELETE IF NOT:
881
- Check if the object is captured, captured events should not have intersects running in parallel
882
- But wouldn't it be better to just replace capturedMap with a single entry?
883
- Also, are we OK with straight up making picking up multiple objects impossible?
884
-
885
- const pointerId = (data as ThreeEvent<PointerEvent>).pointerId
886
- if (pointerId !== undefined) {
887
- const capturedMeshSet = internal.capturedMap.get(pointerId)
888
- if (capturedMeshSet) {
889
- const captured = capturedMeshSet.get(eventObject)
890
- if (captured && captured.localState.stopped) return
891
- }
910
+ /*
911
+ MAYBE TODO, DELETE IF NOT:
912
+ Check if the object is captured, captured events should not have intersects running in parallel
913
+ But wouldn't it be better to just replace capturedMap with a single entry?
914
+ Also, are we OK with straight up making picking up multiple objects impossible?
915
+
916
+ const pointerId = (data as ThreeEvent<PointerEvent>).pointerId
917
+ if (pointerId !== undefined) {
918
+ const capturedMeshSet = internal.capturedMap.get(pointerId)
919
+ if (capturedMeshSet) {
920
+ const captured = capturedMeshSet.get(eventObject)
921
+ if (captured && captured.localState.stopped) return
922
+ }
892
923
  }*/
893
924
 
894
925
  if (isPointerMove) {
@@ -1179,11 +1210,11 @@ const createStore = (invalidate, advance) => {
1179
1210
  return rootStore;
1180
1211
  };
1181
1212
 
1182
- /**
1183
- * Exposes an object's {@link Instance}.
1184
- * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#useInstanceHandle
1185
- *
1186
- * **Note**: this is an escape hatch to react-internal fields. Expect this to change significantly between versions.
1213
+ /**
1214
+ * Exposes an object's {@link Instance}.
1215
+ * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#useInstanceHandle
1216
+ *
1217
+ * **Note**: this is an escape hatch to react-internal fields. Expect this to change significantly between versions.
1187
1218
  */
1188
1219
  function useInstanceHandle(ref) {
1189
1220
  const instance = React__namespace.useRef(null);
@@ -1191,9 +1222,9 @@ function useInstanceHandle(ref) {
1191
1222
  return instance;
1192
1223
  }
1193
1224
 
1194
- /**
1195
- * Returns the R3F Canvas' Zustand store. Useful for [transient updates](https://github.com/pmndrs/zustand#transient-updates-for-often-occurring-state-changes).
1196
- * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#usestore
1225
+ /**
1226
+ * Returns the R3F Canvas' Zustand store. Useful for [transient updates](https://github.com/pmndrs/zustand#transient-updates-for-often-occurring-state-changes).
1227
+ * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#usestore
1197
1228
  */
1198
1229
  function useStore() {
1199
1230
  const store = React__namespace.useContext(context);
@@ -1201,18 +1232,18 @@ function useStore() {
1201
1232
  return store;
1202
1233
  }
1203
1234
 
1204
- /**
1205
- * Accesses R3F's internal state, containing renderer, canvas, scene, etc.
1206
- * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#usethree
1235
+ /**
1236
+ * Accesses R3F's internal state, containing renderer, canvas, scene, etc.
1237
+ * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#usethree
1207
1238
  */
1208
1239
  function useThree(selector = state => state, equalityFn) {
1209
1240
  return useStore()(selector, equalityFn);
1210
1241
  }
1211
1242
 
1212
- /**
1213
- * Executes a callback before render in a shared frame loop.
1214
- * Can order effects with render priority or manually render with a positive priority.
1215
- * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#useframe
1243
+ /**
1244
+ * Executes a callback before render in a shared frame loop.
1245
+ * Can order effects with render priority or manually render with a positive priority.
1246
+ * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#useframe
1216
1247
  */
1217
1248
  function useFrame(callback, renderPriority = 0) {
1218
1249
  const store = useStore();
@@ -1224,9 +1255,9 @@ function useFrame(callback, renderPriority = 0) {
1224
1255
  return null;
1225
1256
  }
1226
1257
 
1227
- /**
1228
- * Returns a node graph of an object with named nodes & materials.
1229
- * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#usegraph
1258
+ /**
1259
+ * Returns a node graph of an object with named nodes & materials.
1260
+ * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#usegraph
1230
1261
  */
1231
1262
  function useGraph(object) {
1232
1263
  return React__namespace.useMemo(() => buildGraph(object), [object]);
@@ -1262,11 +1293,11 @@ function loadingFn(extensions, onProgress) {
1262
1293
  };
1263
1294
  }
1264
1295
 
1265
- /**
1266
- * Synchronously loads and caches assets with a three loader.
1267
- *
1268
- * Note: this hook's caller must be wrapped with `React.Suspense`
1269
- * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#useloader
1296
+ /**
1297
+ * Synchronously loads and caches assets with a three loader.
1298
+ *
1299
+ * Note: this hook's caller must be wrapped with `React.Suspense`
1300
+ * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#useloader
1270
1301
  */
1271
1302
  function useLoader(loader, input, extensions, onProgress) {
1272
1303
  // Use suspense to load async assets
@@ -1278,16 +1309,16 @@ function useLoader(loader, input, extensions, onProgress) {
1278
1309
  return Array.isArray(input) ? results : results[0];
1279
1310
  }
1280
1311
 
1281
- /**
1282
- * Preloads an asset into cache as a side-effect.
1312
+ /**
1313
+ * Preloads an asset into cache as a side-effect.
1283
1314
  */
1284
1315
  useLoader.preload = function (loader, input, extensions) {
1285
1316
  const keys = Array.isArray(input) ? input : [input];
1286
1317
  return suspendReact.preload(loadingFn(extensions), [loader, ...keys]);
1287
1318
  };
1288
1319
 
1289
- /**
1290
- * Removes a loaded asset from cache.
1320
+ /**
1321
+ * Removes a loaded asset from cache.
1291
1322
  */
1292
1323
  useLoader.clear = function (loader, input) {
1293
1324
  const keys = Array.isArray(input) ? input : [input];
@@ -1309,7 +1340,7 @@ useLoader.clear = function (loader, input) {
1309
1340
 
1310
1341
  var packageData = {
1311
1342
  name: "@react-three/fiber",
1312
- version: "9.6.0",
1343
+ version: "9.6.1",
1313
1344
  description: "A React renderer for Threejs",
1314
1345
  keywords: [
1315
1346
  "react",
@@ -15275,11 +15306,11 @@ function swapInstances() {
15275
15306
  const target = catalogue[toPascalCase(instance.type)];
15276
15307
 
15277
15308
  // Create object
15309
+ const prevObject = instance.object;
15278
15310
  instance.object = (_instance$props$objec = instance.props.object) != null ? _instance$props$objec : new target(...((_instance$props$args = instance.props.args) != null ? _instance$props$args : []));
15279
15311
  instance.object.__r3f = instance;
15280
15312
  setFiberRef(fiber, instance.object);
15281
-
15282
- // Set initial props
15313
+ swapInteractivity(findInitialRoot(instance), prevObject, instance.object);
15283
15314
  applyProps(instance.object, instance.props);
15284
15315
  if (instance.props.attach) {
15285
15316
  attach(parent, instance);
@@ -15889,10 +15920,10 @@ function Portal({
15889
15920
  children,
15890
15921
  container
15891
15922
  }) {
15892
- /** This has to be a component because it would not be able to call useThree/useStore otherwise since
15893
- * if this is our environment, then we are not in r3f's renderer but in react-dom, it would trigger
15894
- * the "R3F hooks can only be used within the Canvas component!" warning:
15895
- * <Canvas>
15923
+ /** This has to be a component because it would not be able to call useThree/useStore otherwise since
15924
+ * if this is our environment, then we are not in r3f's renderer but in react-dom, it would trigger
15925
+ * the "R3F hooks can only be used within the Canvas component!" warning:
15926
+ * <Canvas>
15896
15927
  * {createPortal(...)} */
15897
15928
  const {
15898
15929
  events,
@@ -15973,11 +16004,11 @@ function Portal({
15973
16004
  );
15974
16005
  }
15975
16006
 
15976
- /**
15977
- * Force React to flush any updates inside the provided callback synchronously and immediately.
15978
- * All the same caveats documented for react-dom's `flushSync` apply here (see https://react.dev/reference/react-dom/flushSync).
15979
- * Nevertheless, sometimes one needs to render synchronously, for example to keep DOM and 3D changes in lock-step without
15980
- * having to revert to a non-React solution. Note: this will only flush updates within the `Canvas` root.
16007
+ /**
16008
+ * Force React to flush any updates inside the provided callback synchronously and immediately.
16009
+ * All the same caveats documented for react-dom's `flushSync` apply here (see https://react.dev/reference/react-dom/flushSync).
16010
+ * Nevertheless, sometimes one needs to render synchronously, for example to keep DOM and 3D changes in lock-step without
16011
+ * having to revert to a non-React solution. Note: this will only flush updates within the `Canvas` root.
15981
16012
  */
15982
16013
  function flushSync(fn) {
15983
16014
  // @ts-ignore - reconciler types are not maintained
@@ -15995,21 +16026,21 @@ const globalEffects = new Set();
15995
16026
  const globalAfterEffects = new Set();
15996
16027
  const globalTailEffects = new Set();
15997
16028
 
15998
- /**
15999
- * Adds a global render callback which is called each frame.
16000
- * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#addEffect
16029
+ /**
16030
+ * Adds a global render callback which is called each frame.
16031
+ * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#addEffect
16001
16032
  */
16002
16033
  const addEffect = callback => createSubs(callback, globalEffects);
16003
16034
 
16004
- /**
16005
- * Adds a global after-render callback which is called each frame.
16006
- * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#addAfterEffect
16035
+ /**
16036
+ * Adds a global after-render callback which is called each frame.
16037
+ * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#addAfterEffect
16007
16038
  */
16008
16039
  const addAfterEffect = callback => createSubs(callback, globalAfterEffects);
16009
16040
 
16010
- /**
16011
- * Adds a global callback which is called when rendering stops.
16012
- * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#addTail
16041
+ /**
16042
+ * Adds a global callback which is called when rendering stops.
16043
+ * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#addTail
16013
16044
  */
16014
16045
  const addTail = callback => createSubs(callback, globalTailEffects);
16015
16046
  function run(effects, timestamp) {
@@ -16097,9 +16128,9 @@ function loop(timestamp) {
16097
16128
  }
16098
16129
  }
16099
16130
 
16100
- /**
16101
- * Invalidates the view, requesting a frame to be rendered. Will globally invalidate unless passed a root's state.
16102
- * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#invalidate
16131
+ /**
16132
+ * Invalidates the view, requesting a frame to be rendered. Will globally invalidate unless passed a root's state.
16133
+ * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#invalidate
16103
16134
  */
16104
16135
  function invalidate(state, frames = 1) {
16105
16136
  var _state$gl$xr2;
@@ -16126,9 +16157,9 @@ function invalidate(state, frames = 1) {
16126
16157
  }
16127
16158
  }
16128
16159
 
16129
- /**
16130
- * Advances the frameloop and runs render effects, useful for when manually rendering via `frameloop="never"`.
16131
- * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#advance
16160
+ /**
16161
+ * Advances the frameloop and runs render effects, useful for when manually rendering via `frameloop="never"`.
16162
+ * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#advance
16132
16163
  */
16133
16164
  function advance(timestamp, runGlobalEffects = true, state, frame) {
16134
16165
  if (runGlobalEffects) flushGlobalEffects('before', timestamp);
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var events = require('./events-508aad4b.cjs.dev.js');
5
+ var events = require('./events-f19bcc32.cjs.dev.js');
6
6
  var React = require('react');
7
7
  var THREE = require('three');
8
8
  var useMeasure = require('react-use-measure');
@@ -177,9 +177,9 @@ function CanvasImpl({
177
177
  });
178
178
  }
179
179
 
180
- /**
181
- * A DOM canvas which accepts threejs elements as children.
182
- * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
180
+ /**
181
+ * A DOM canvas which accepts threejs elements as children.
182
+ * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
183
183
  */
184
184
  function Canvas(props) {
185
185
  return /*#__PURE__*/jsxRuntime.jsx(itsFine.FiberProvider, {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var events = require('./events-11ca7a92.cjs.prod.js');
5
+ var events = require('./events-583399dd.cjs.prod.js');
6
6
  var React = require('react');
7
7
  var THREE = require('three');
8
8
  var useMeasure = require('react-use-measure');
@@ -177,9 +177,9 @@ function CanvasImpl({
177
177
  });
178
178
  }
179
179
 
180
- /**
181
- * A DOM canvas which accepts threejs elements as children.
182
- * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
180
+ /**
181
+ * A DOM canvas which accepts threejs elements as children.
182
+ * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
183
183
  */
184
184
  function Canvas(props) {
185
185
  return /*#__PURE__*/jsxRuntime.jsx(itsFine.FiberProvider, {
@@ -1,5 +1,5 @@
1
- import { e as extend, u as useBridge, a as useMutableCallback, b as useIsomorphicLayoutEffect, c as createRoot, i as isRef, E as ErrorBoundary, B as Block, d as unmountComponentAtNode, f as createPointerEvents } from './events-760a1017.esm.js';
2
- export { t as ReactThreeFiber, _ as _roots, x as act, k as addAfterEffect, j as addEffect, l as addTail, n as advance, s as applyProps, y as buildGraph, q as context, g as createEvents, o as createPortal, c as createRoot, w as dispose, f as events, e as extend, h as flushGlobalEffects, p as flushSync, v as getRootState, m as invalidate, r as reconciler, d as unmountComponentAtNode, D as useFrame, F as useGraph, z as useInstanceHandle, G as useLoader, A as useStore, C as useThree } from './events-760a1017.esm.js';
1
+ import { e as extend, u as useBridge, a as useMutableCallback, b as useIsomorphicLayoutEffect, c as createRoot, i as isRef, E as ErrorBoundary, B as Block, d as unmountComponentAtNode, f as createPointerEvents } from './events-b389eeca.esm.js';
2
+ export { t as ReactThreeFiber, _ as _roots, x as act, k as addAfterEffect, j as addEffect, l as addTail, n as advance, s as applyProps, y as buildGraph, q as context, g as createEvents, o as createPortal, c as createRoot, w as dispose, f as events, e as extend, h as flushGlobalEffects, p as flushSync, v as getRootState, m as invalidate, r as reconciler, d as unmountComponentAtNode, D as useFrame, F as useGraph, z as useInstanceHandle, G as useLoader, A as useStore, C as useThree } from './events-b389eeca.esm.js';
3
3
  import * as React from 'react';
4
4
  import * as THREE from 'three';
5
5
  import useMeasure from 'react-use-measure';
@@ -150,9 +150,9 @@ function CanvasImpl({
150
150
  });
151
151
  }
152
152
 
153
- /**
154
- * A DOM canvas which accepts threejs elements as children.
155
- * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
153
+ /**
154
+ * A DOM canvas which accepts threejs elements as children.
155
+ * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
156
156
  */
157
157
  function Canvas(props) {
158
158
  return /*#__PURE__*/jsx(FiberProvider, {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var events = require('../../dist/events-508aad4b.cjs.dev.js');
5
+ var events = require('../../dist/events-f19bcc32.cjs.dev.js');
6
6
  var React = require('react');
7
7
  var THREE = require('three');
8
8
  var reactNative = require('react-native');
@@ -269,9 +269,9 @@ function CanvasImpl({
269
269
  });
270
270
  }
271
271
 
272
- /**
273
- * A native canvas which accepts threejs elements as children.
274
- * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
272
+ /**
273
+ * A native canvas which accepts threejs elements as children.
274
+ * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
275
275
  */
276
276
  function Canvas(props) {
277
277
  return /*#__PURE__*/jsxRuntime.jsx(itsFine.FiberProvider, {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var events = require('../../dist/events-11ca7a92.cjs.prod.js');
5
+ var events = require('../../dist/events-583399dd.cjs.prod.js');
6
6
  var React = require('react');
7
7
  var THREE = require('three');
8
8
  var reactNative = require('react-native');
@@ -269,9 +269,9 @@ function CanvasImpl({
269
269
  });
270
270
  }
271
271
 
272
- /**
273
- * A native canvas which accepts threejs elements as children.
274
- * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
272
+ /**
273
+ * A native canvas which accepts threejs elements as children.
274
+ * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
275
275
  */
276
276
  function Canvas(props) {
277
277
  return /*#__PURE__*/jsxRuntime.jsx(itsFine.FiberProvider, {
@@ -1,5 +1,5 @@
1
- import { e as extend, u as useBridge, a as useMutableCallback, c as createRoot, b as useIsomorphicLayoutEffect, E as ErrorBoundary, B as Block, d as unmountComponentAtNode, f as createPointerEvents, g as createEvents } from '../../dist/events-760a1017.esm.js';
2
- export { t as ReactThreeFiber, _ as _roots, x as act, k as addAfterEffect, j as addEffect, l as addTail, n as advance, s as applyProps, y as buildGraph, q as context, g as createEvents, o as createPortal, c as createRoot, w as dispose, e as extend, h as flushGlobalEffects, p as flushSync, v as getRootState, m as invalidate, r as reconciler, d as unmountComponentAtNode, D as useFrame, F as useGraph, z as useInstanceHandle, G as useLoader, A as useStore, C as useThree } from '../../dist/events-760a1017.esm.js';
1
+ import { e as extend, u as useBridge, a as useMutableCallback, c as createRoot, b as useIsomorphicLayoutEffect, E as ErrorBoundary, B as Block, d as unmountComponentAtNode, f as createPointerEvents, g as createEvents } from '../../dist/events-b389eeca.esm.js';
2
+ export { t as ReactThreeFiber, _ as _roots, x as act, k as addAfterEffect, j as addEffect, l as addTail, n as advance, s as applyProps, y as buildGraph, q as context, g as createEvents, o as createPortal, c as createRoot, w as dispose, e as extend, h as flushGlobalEffects, p as flushSync, v as getRootState, m as invalidate, r as reconciler, d as unmountComponentAtNode, D as useFrame, F as useGraph, z as useInstanceHandle, G as useLoader, A as useStore, C as useThree } from '../../dist/events-b389eeca.esm.js';
3
3
  import * as React from 'react';
4
4
  import * as THREE from 'three';
5
5
  import { PanResponder, PixelRatio, StyleSheet, View, Platform, Image, NativeModules } from 'react-native';
@@ -245,9 +245,9 @@ function CanvasImpl({
245
245
  });
246
246
  }
247
247
 
248
- /**
249
- * A native canvas which accepts threejs elements as children.
250
- * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
248
+ /**
249
+ * A native canvas which accepts threejs elements as children.
250
+ * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
251
251
  */
252
252
  function Canvas(props) {
253
253
  return /*#__PURE__*/jsx(FiberProvider, {
@@ -1,5 +1,5 @@
1
- {
2
- "main": "dist/react-three-fiber-native.cjs.js",
3
- "module": "dist/react-three-fiber-native.esm.js",
4
- "types": "dist/react-three-fiber-native.cjs.d.ts"
5
- }
1
+ {
2
+ "main": "dist/react-three-fiber-native.cjs.js",
3
+ "module": "dist/react-three-fiber-native.esm.js",
4
+ "types": "dist/react-three-fiber-native.cjs.d.ts"
5
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-three/fiber",
3
- "version": "9.6.0",
3
+ "version": "9.6.1",
4
4
  "description": "A React renderer for Threejs",
5
5
  "keywords": [
6
6
  "react",