@react-three/fiber 8.15.18 → 8.16.0

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 +950 -938
  2. package/dist/declarations/src/core/events.d.ts +93 -93
  3. package/dist/declarations/src/core/hooks.d.ts +57 -57
  4. package/dist/declarations/src/core/index.d.ts +87 -87
  5. package/dist/declarations/src/core/loop.d.ts +38 -33
  6. package/dist/declarations/src/core/renderer.d.ts +58 -58
  7. package/dist/declarations/src/core/store.d.ts +138 -137
  8. package/dist/declarations/src/core/utils.d.ts +131 -131
  9. package/dist/declarations/src/index.d.ts +12 -12
  10. package/dist/declarations/src/native/Canvas.d.ts +14 -14
  11. package/dist/declarations/src/native/events.d.ts +5 -5
  12. package/dist/declarations/src/native/polyfills.d.ts +1 -1
  13. package/dist/declarations/src/native.d.ts +12 -12
  14. package/dist/declarations/src/three-types.d.ts +393 -393
  15. package/dist/declarations/src/web/Canvas.d.ts +24 -24
  16. package/dist/declarations/src/web/events.d.ts +5 -5
  17. package/dist/{index-e23db861.esm.js → index-5712f892.esm.js} +75 -79
  18. package/dist/{index-c05f375c.cjs.prod.js → index-76e11619.cjs.prod.js} +75 -79
  19. package/dist/{index-a6803957.cjs.dev.js → index-a75b61c3.cjs.dev.js} +75 -79
  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 +7 -7
  24. package/native/dist/react-three-fiber-native.cjs.prod.js +7 -7
  25. package/native/dist/react-three-fiber-native.esm.js +8 -8
  26. package/native/package.json +5 -5
  27. package/package.json +1 -1
  28. package/readme.md +253 -253
@@ -122,6 +122,10 @@ function createRenderer(_roots, _getEventPriority) {
122
122
  child.dispatchEvent({
123
123
  type: 'added'
124
124
  });
125
+ parentInstance.dispatchEvent({
126
+ type: 'childadded',
127
+ child
128
+ });
125
129
  const restSiblings = parentInstance.children.filter(sibling => sibling !== child);
126
130
  const index = restSiblings.indexOf(beforeChild);
127
131
  parentInstance.children = [...restSiblings.slice(0, index), child, ...restSiblings.slice(index)];
@@ -382,12 +386,12 @@ function createRenderer(_roots, _getEventPriority) {
382
386
  }
383
387
 
384
388
  var _window$document, _window$navigator;
385
- /**
386
- * Returns `true` with correct TS type inference if an object has a configurable color space (since r152).
389
+ /**
390
+ * Returns `true` with correct TS type inference if an object has a configurable color space (since r152).
387
391
  */
388
392
  const hasColorSpace = object => 'colorSpace' in object || 'outputColorSpace' in object;
389
- /**
390
- * The current THREE.ColorManagement instance, if present.
393
+ /**
394
+ * The current THREE.ColorManagement instance, if present.
391
395
  */
392
396
  const getColorManagement = () => {
393
397
  var _ColorManagement;
@@ -396,14 +400,14 @@ const getColorManagement = () => {
396
400
  const isOrthographicCamera = def => def && def.isOrthographicCamera;
397
401
  const isRef = obj => obj && obj.hasOwnProperty('current');
398
402
 
399
- /**
400
- * An SSR-friendly useLayoutEffect.
401
- *
402
- * React currently throws a warning when using useLayoutEffect on the server.
403
- * To get around it, we can conditionally useEffect on the server (no-op) and
404
- * useLayoutEffect elsewhere.
405
- *
406
- * @see https://github.com/facebook/react/issues/14927
403
+ /**
404
+ * An SSR-friendly useLayoutEffect.
405
+ *
406
+ * React currently throws a warning when using useLayoutEffect on the server.
407
+ * To get around it, we can conditionally useEffect on the server (no-op) and
408
+ * useLayoutEffect elsewhere.
409
+ *
410
+ * @see https://github.com/facebook/react/issues/14927
407
411
  */
408
412
  const useIsomorphicLayoutEffect = typeof window !== 'undefined' && ((_window$document = window.document) != null && _window$document.createElement || ((_window$navigator = window.navigator) == null ? void 0 : _window$navigator.product) === 'ReactNative') ? React__namespace.useLayoutEffect : React__namespace.useEffect;
409
413
  function useMutableCallback(fn) {
@@ -448,16 +452,16 @@ function calculateDpr(dpr) {
448
452
  return Array.isArray(dpr) ? Math.min(Math.max(dpr[0], target), dpr[1]) : dpr;
449
453
  }
450
454
 
451
- /**
452
- * Returns instance root state
455
+ /**
456
+ * Returns instance root state
453
457
  */
454
458
  const getRootState = obj => {
455
459
  var _r3f;
456
460
  return (_r3f = obj.__r3f) == null ? void 0 : _r3f.root.getState();
457
461
  };
458
462
 
459
- /**
460
- * Returns the instances initial (outmost) root
463
+ /**
464
+ * Returns the instances initial (outmost) root
461
465
  */
462
466
  function findInitialRoot(child) {
463
467
  let root = child.__r3f.root;
@@ -514,8 +518,8 @@ const is = {
514
518
  }
515
519
  };
516
520
 
517
- /**
518
- * Collects nodes and materials from a THREE.Object3D.
521
+ /**
522
+ * Collects nodes and materials from a THREE.Object3D.
519
523
  */
520
524
  function buildGraph(object) {
521
525
  const data = {
@@ -857,9 +861,9 @@ function getEventPriority() {
857
861
  }
858
862
  }
859
863
 
860
- /**
861
- * Release pointer captures.
862
- * This is called by releasePointerCapture in the API, and when an object is removed.
864
+ /**
865
+ * Release pointer captures.
866
+ * This is called by releasePointerCapture in the API, and when an object is removed.
863
867
  */
864
868
  function releaseInternalPointerCapture(capturedMap, obj, captures, pointerId) {
865
869
  const captureData = captures.get(obj);
@@ -1194,19 +1198,19 @@ function createEvents(store) {
1194
1198
  // Check presence of handlers
1195
1199
  if (!(instance != null && instance.eventCount)) return;
1196
1200
 
1197
- /*
1198
- MAYBE TODO, DELETE IF NOT:
1199
- Check if the object is captured, captured events should not have intersects running in parallel
1200
- But wouldn't it be better to just replace capturedMap with a single entry?
1201
- Also, are we OK with straight up making picking up multiple objects impossible?
1202
-
1203
- const pointerId = (data as ThreeEvent<PointerEvent>).pointerId
1204
- if (pointerId !== undefined) {
1205
- const capturedMeshSet = internal.capturedMap.get(pointerId)
1206
- if (capturedMeshSet) {
1207
- const captured = capturedMeshSet.get(eventObject)
1208
- if (captured && captured.localState.stopped) return
1209
- }
1201
+ /*
1202
+ MAYBE TODO, DELETE IF NOT:
1203
+ Check if the object is captured, captured events should not have intersects running in parallel
1204
+ But wouldn't it be better to just replace capturedMap with a single entry?
1205
+ Also, are we OK with straight up making picking up multiple objects impossible?
1206
+
1207
+ const pointerId = (data as ThreeEvent<PointerEvent>).pointerId
1208
+ if (pointerId !== undefined) {
1209
+ const capturedMeshSet = internal.capturedMap.get(pointerId)
1210
+ if (capturedMeshSet) {
1211
+ const captured = capturedMeshSet.get(eventObject)
1212
+ if (captured && captured.localState.stopped) return
1213
+ }
1210
1214
  }*/
1211
1215
 
1212
1216
  if (isPointerMove) {
@@ -1512,21 +1516,21 @@ let globalEffects = new Set();
1512
1516
  let globalAfterEffects = new Set();
1513
1517
  let globalTailEffects = new Set();
1514
1518
 
1515
- /**
1516
- * Adds a global render callback which is called each frame.
1517
- * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#addEffect
1519
+ /**
1520
+ * Adds a global render callback which is called each frame.
1521
+ * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#addEffect
1518
1522
  */
1519
1523
  const addEffect = callback => createSubs(callback, globalEffects);
1520
1524
 
1521
- /**
1522
- * Adds a global after-render callback which is called each frame.
1523
- * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#addAfterEffect
1525
+ /**
1526
+ * Adds a global after-render callback which is called each frame.
1527
+ * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#addAfterEffect
1524
1528
  */
1525
1529
  const addAfterEffect = callback => createSubs(callback, globalAfterEffects);
1526
1530
 
1527
- /**
1528
- * Adds a global callback which is called when rendering stops.
1529
- * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#addTail
1531
+ /**
1532
+ * Adds a global callback which is called when rendering stops.
1533
+ * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#addTail
1530
1534
  */
1531
1535
  const addTail = callback => createSubs(callback, globalTailEffects);
1532
1536
  function run(effects, timestamp) {
@@ -1625,24 +1629,16 @@ function createLoop(roots) {
1625
1629
  }
1626
1630
  return {
1627
1631
  loop,
1628
- /**
1629
- * Invalidates the view, requesting a frame to be rendered. Will globally invalidate unless passed a root's state.
1630
- * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#invalidate
1631
- */
1632
1632
  invalidate,
1633
- /**
1634
- * Advances the frameloop and runs render effects, useful for when manually rendering via `frameloop="never"`.
1635
- * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#advance
1636
- */
1637
1633
  advance
1638
1634
  };
1639
1635
  }
1640
1636
 
1641
- /**
1642
- * Exposes an object's {@link LocalState}.
1643
- * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#useInstanceHandle
1644
- *
1645
- * **Note**: this is an escape hatch to react-internal fields. Expect this to change significantly between versions.
1637
+ /**
1638
+ * Exposes an object's {@link LocalState}.
1639
+ * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#useInstanceHandle
1640
+ *
1641
+ * **Note**: this is an escape hatch to react-internal fields. Expect this to change significantly between versions.
1646
1642
  */
1647
1643
  function useInstanceHandle(ref) {
1648
1644
  const instance = React__namespace.useRef(null);
@@ -1655,18 +1651,18 @@ function useStore() {
1655
1651
  return store;
1656
1652
  }
1657
1653
 
1658
- /**
1659
- * Accesses R3F's internal state, containing renderer, canvas, scene, etc.
1660
- * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#usethree
1654
+ /**
1655
+ * Accesses R3F's internal state, containing renderer, canvas, scene, etc.
1656
+ * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#usethree
1661
1657
  */
1662
1658
  function useThree(selector = state => state, equalityFn) {
1663
1659
  return useStore()(selector, equalityFn);
1664
1660
  }
1665
1661
 
1666
- /**
1667
- * Executes a callback before render in a shared frame loop.
1668
- * Can order effects with render priority or manually render with a positive priority.
1669
- * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#useframe
1662
+ /**
1663
+ * Executes a callback before render in a shared frame loop.
1664
+ * Can order effects with render priority or manually render with a positive priority.
1665
+ * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#useframe
1670
1666
  */
1671
1667
  function useFrame(callback, renderPriority = 0) {
1672
1668
  const store = useStore();
@@ -1678,9 +1674,9 @@ function useFrame(callback, renderPriority = 0) {
1678
1674
  return null;
1679
1675
  }
1680
1676
 
1681
- /**
1682
- * Returns a node graph of an object with named nodes & materials.
1683
- * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#usegraph
1677
+ /**
1678
+ * Returns a node graph of an object with named nodes & materials.
1679
+ * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#usegraph
1684
1680
  */
1685
1681
  function useGraph(object) {
1686
1682
  return React__namespace.useMemo(() => buildGraph(object), [object]);
@@ -1702,11 +1698,11 @@ function loadingFn(extensions, onProgress) {
1702
1698
  }, onProgress, error => reject(new Error(`Could not load ${input}: ${error == null ? void 0 : error.message}`)))))).finally(() => loader.dispose == null ? void 0 : loader.dispose());
1703
1699
  };
1704
1700
  }
1705
- /**
1706
- * Synchronously loads and caches assets with a three loader.
1707
- *
1708
- * Note: this hook's caller must be wrapped with `React.Suspense`
1709
- * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#useloader
1701
+ /**
1702
+ * Synchronously loads and caches assets with a three loader.
1703
+ *
1704
+ * Note: this hook's caller must be wrapped with `React.Suspense`
1705
+ * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#useloader
1710
1706
  */
1711
1707
  function useLoader(Proto, input, extensions, onProgress) {
1712
1708
  // Use suspense to load async assets
@@ -1718,16 +1714,16 @@ function useLoader(Proto, input, extensions, onProgress) {
1718
1714
  return Array.isArray(input) ? results : results[0];
1719
1715
  }
1720
1716
 
1721
- /**
1722
- * Preloads an asset into cache as a side-effect.
1717
+ /**
1718
+ * Preloads an asset into cache as a side-effect.
1723
1719
  */
1724
1720
  useLoader.preload = function (Proto, input, extensions) {
1725
1721
  const keys = Array.isArray(input) ? input : [input];
1726
1722
  return suspendReact.preload(loadingFn(extensions), [Proto, ...keys]);
1727
1723
  };
1728
1724
 
1729
- /**
1730
- * Removes a loaded asset from cache.
1725
+ /**
1726
+ * Removes a loaded asset from cache.
1731
1727
  */
1732
1728
  useLoader.clear = function (Proto, input) {
1733
1729
  const keys = Array.isArray(input) ? input : [input];
@@ -2124,10 +2120,10 @@ function Portal({
2124
2120
  children,
2125
2121
  container
2126
2122
  }) {
2127
- /** This has to be a component because it would not be able to call useThree/useStore otherwise since
2128
- * if this is our environment, then we are not in r3f's renderer but in react-dom, it would trigger
2129
- * the "R3F hooks can only be used within the Canvas component!" warning:
2130
- * <Canvas>
2123
+ /** This has to be a component because it would not be able to call useThree/useStore otherwise since
2124
+ * if this is our environment, then we are not in r3f's renderer but in react-dom, it would trigger
2125
+ * the "R3F hooks can only be used within the Canvas component!" warning:
2126
+ * <Canvas>
2131
2127
  * {createPortal(...)} */
2132
2128
  const {
2133
2129
  events,
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('./index-a6803957.cjs.dev.js');
5
+ var index = require('./index-a75b61c3.cjs.dev.js');
6
6
  var _extends = require('@babel/runtime/helpers/extends');
7
7
  var React = require('react');
8
8
  var THREE = require('three');
@@ -251,9 +251,9 @@ const CanvasImpl = /*#__PURE__*/React__namespace.forwardRef(function Canvas({
251
251
  }, fallback)));
252
252
  });
253
253
 
254
- /**
255
- * A DOM canvas which accepts threejs elements as children.
256
- * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
254
+ /**
255
+ * A DOM canvas which accepts threejs elements as children.
256
+ * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
257
257
  */
258
258
  const Canvas = /*#__PURE__*/React__namespace.forwardRef(function CanvasWrapper(props, ref) {
259
259
  return /*#__PURE__*/React__namespace.createElement(itsFine.FiberProvider, null, /*#__PURE__*/React__namespace.createElement(CanvasImpl, _extends({}, props, {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('./index-c05f375c.cjs.prod.js');
5
+ var index = require('./index-76e11619.cjs.prod.js');
6
6
  var _extends = require('@babel/runtime/helpers/extends');
7
7
  var React = require('react');
8
8
  var THREE = require('three');
@@ -251,9 +251,9 @@ const CanvasImpl = /*#__PURE__*/React__namespace.forwardRef(function Canvas({
251
251
  }, fallback)));
252
252
  });
253
253
 
254
- /**
255
- * A DOM canvas which accepts threejs elements as children.
256
- * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
254
+ /**
255
+ * A DOM canvas which accepts threejs elements as children.
256
+ * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
257
257
  */
258
258
  const Canvas = /*#__PURE__*/React__namespace.forwardRef(function CanvasWrapper(props, ref) {
259
259
  return /*#__PURE__*/React__namespace.createElement(itsFine.FiberProvider, null, /*#__PURE__*/React__namespace.createElement(CanvasImpl, _extends({}, props, {
@@ -1,5 +1,5 @@
1
- import { c as createEvents, e as extend, u as useMutableCallback, a as useIsomorphicLayoutEffect, b as createRoot, i as isRef, E as ErrorBoundary, B as Block, d as unmountComponentAtNode } from './index-e23db861.esm.js';
2
- export { t as ReactThreeFiber, x as _roots, v as act, o as addAfterEffect, n as addEffect, p as addTail, m as advance, j as applyProps, w as buildGraph, f as context, c as createEvents, g as createPortal, b as createRoot, k as dispose, e as extend, q as flushGlobalEffects, s as getRootState, l as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, C as useFrame, D as useGraph, y as useInstanceHandle, F as useLoader, z as useStore, A as useThree } from './index-e23db861.esm.js';
1
+ import { c as createEvents, e as extend, u as useMutableCallback, a as useIsomorphicLayoutEffect, b as createRoot, i as isRef, E as ErrorBoundary, B as Block, d as unmountComponentAtNode } from './index-5712f892.esm.js';
2
+ export { t as ReactThreeFiber, x as _roots, v as act, o as addAfterEffect, n as addEffect, p as addTail, m as advance, j as applyProps, w as buildGraph, f as context, c as createEvents, g as createPortal, b as createRoot, k as dispose, e as extend, q as flushGlobalEffects, s as getRootState, l as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, C as useFrame, D as useGraph, y as useInstanceHandle, F as useLoader, z as useStore, A as useThree } from './index-5712f892.esm.js';
3
3
  import _extends from '@babel/runtime/helpers/esm/extends';
4
4
  import * as React from 'react';
5
5
  import * as THREE from 'three';
@@ -224,9 +224,9 @@ const CanvasImpl = /*#__PURE__*/React.forwardRef(function Canvas({
224
224
  }, fallback)));
225
225
  });
226
226
 
227
- /**
228
- * A DOM canvas which accepts threejs elements as children.
229
- * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
227
+ /**
228
+ * A DOM canvas which accepts threejs elements as children.
229
+ * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
230
230
  */
231
231
  const Canvas = /*#__PURE__*/React.forwardRef(function CanvasWrapper(props, ref) {
232
232
  return /*#__PURE__*/React.createElement(FiberProvider, null, /*#__PURE__*/React.createElement(CanvasImpl, _extends({}, props, {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('../../dist/index-a6803957.cjs.dev.js');
5
+ var index = require('../../dist/index-a75b61c3.cjs.dev.js');
6
6
  var _extends = require('@babel/runtime/helpers/extends');
7
7
  var React = require('react');
8
8
  var THREE = require('three');
@@ -123,9 +123,9 @@ function createTouchEvents(store) {
123
123
  };
124
124
  }
125
125
 
126
- /**
127
- * A native canvas which accepts threejs elements as children.
128
- * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
126
+ /**
127
+ * A native canvas which accepts threejs elements as children.
128
+ * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
129
129
  */
130
130
  const CanvasImpl = /*#__PURE__*/React__namespace.forwardRef(({
131
131
  children,
@@ -278,9 +278,9 @@ const CanvasImpl = /*#__PURE__*/React__namespace.forwardRef(({
278
278
  }));
279
279
  });
280
280
 
281
- /**
282
- * A native canvas which accepts threejs elements as children.
283
- * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
281
+ /**
282
+ * A native canvas which accepts threejs elements as children.
283
+ * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
284
284
  */
285
285
  const Canvas = /*#__PURE__*/React__namespace.forwardRef(function CanvasWrapper(props, ref) {
286
286
  return /*#__PURE__*/React__namespace.createElement(itsFine.FiberProvider, null, /*#__PURE__*/React__namespace.createElement(CanvasImpl, _extends({}, props, {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('../../dist/index-c05f375c.cjs.prod.js');
5
+ var index = require('../../dist/index-76e11619.cjs.prod.js');
6
6
  var _extends = require('@babel/runtime/helpers/extends');
7
7
  var React = require('react');
8
8
  var THREE = require('three');
@@ -123,9 +123,9 @@ function createTouchEvents(store) {
123
123
  };
124
124
  }
125
125
 
126
- /**
127
- * A native canvas which accepts threejs elements as children.
128
- * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
126
+ /**
127
+ * A native canvas which accepts threejs elements as children.
128
+ * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
129
129
  */
130
130
  const CanvasImpl = /*#__PURE__*/React__namespace.forwardRef(({
131
131
  children,
@@ -278,9 +278,9 @@ const CanvasImpl = /*#__PURE__*/React__namespace.forwardRef(({
278
278
  }));
279
279
  });
280
280
 
281
- /**
282
- * A native canvas which accepts threejs elements as children.
283
- * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
281
+ /**
282
+ * A native canvas which accepts threejs elements as children.
283
+ * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
284
284
  */
285
285
  const Canvas = /*#__PURE__*/React__namespace.forwardRef(function CanvasWrapper(props, ref) {
286
286
  return /*#__PURE__*/React__namespace.createElement(itsFine.FiberProvider, null, /*#__PURE__*/React__namespace.createElement(CanvasImpl, _extends({}, props, {
@@ -1,5 +1,5 @@
1
- import { c as createEvents, e as extend, u as useMutableCallback, b as createRoot, E as ErrorBoundary, B as Block, d as unmountComponentAtNode } from '../../dist/index-e23db861.esm.js';
2
- export { t as ReactThreeFiber, x as _roots, v as act, o as addAfterEffect, n as addEffect, p as addTail, m as advance, j as applyProps, w as buildGraph, f as context, c as createEvents, g as createPortal, b as createRoot, k as dispose, e as extend, q as flushGlobalEffects, s as getRootState, l as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, C as useFrame, D as useGraph, y as useInstanceHandle, F as useLoader, z as useStore, A as useThree } from '../../dist/index-e23db861.esm.js';
1
+ import { c as createEvents, e as extend, u as useMutableCallback, b as createRoot, E as ErrorBoundary, B as Block, d as unmountComponentAtNode } from '../../dist/index-5712f892.esm.js';
2
+ export { t as ReactThreeFiber, x as _roots, v as act, o as addAfterEffect, n as addEffect, p as addTail, m as advance, j as applyProps, w as buildGraph, f as context, c as createEvents, g as createPortal, b as createRoot, k as dispose, e as extend, q as flushGlobalEffects, s as getRootState, l as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, C as useFrame, D as useGraph, y as useInstanceHandle, F as useLoader, z as useStore, A as useThree } from '../../dist/index-5712f892.esm.js';
3
3
  import _extends from '@babel/runtime/helpers/esm/extends';
4
4
  import * as React from 'react';
5
5
  import * as THREE from 'three';
@@ -98,9 +98,9 @@ function createTouchEvents(store) {
98
98
  };
99
99
  }
100
100
 
101
- /**
102
- * A native canvas which accepts threejs elements as children.
103
- * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
101
+ /**
102
+ * A native canvas which accepts threejs elements as children.
103
+ * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
104
104
  */
105
105
  const CanvasImpl = /*#__PURE__*/React.forwardRef(({
106
106
  children,
@@ -253,9 +253,9 @@ const CanvasImpl = /*#__PURE__*/React.forwardRef(({
253
253
  }));
254
254
  });
255
255
 
256
- /**
257
- * A native canvas which accepts threejs elements as children.
258
- * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
256
+ /**
257
+ * A native canvas which accepts threejs elements as children.
258
+ * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
259
259
  */
260
260
  const Canvas = /*#__PURE__*/React.forwardRef(function CanvasWrapper(props, ref) {
261
261
  return /*#__PURE__*/React.createElement(FiberProvider, null, /*#__PURE__*/React.createElement(CanvasImpl, _extends({}, props, {
@@ -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": "8.15.18",
3
+ "version": "8.16.0",
4
4
  "description": "A React renderer for Threejs",
5
5
  "keywords": [
6
6
  "react",