@react-three/fiber 9.0.4 → 9.1.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 +1136 -1124
  2. package/dist/declarations/src/core/events.d.ts +92 -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 +190 -187
  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 +67 -67
  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-2895749c.esm.js → events-9ea6854d.esm.js} +114 -95
  18. package/dist/{events-cee74b95.cjs.dev.js → events-b2f77bcf.cjs.dev.js} +114 -95
  19. package/dist/{events-ff8de4d2.cjs.prod.js → events-fed10990.cjs.prod.js} +114 -95
  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 +3 -2
  28. package/readme.md +253 -253
@@ -38,30 +38,35 @@ var threeTypes = /*#__PURE__*/Object.freeze({
38
38
  __proto__: null
39
39
  });
40
40
 
41
- /**
42
- * Returns the instance's initial (outmost) root.
41
+ /**
42
+ * Returns the instance's initial (outmost) root.
43
43
  */
44
44
  function findInitialRoot(instance) {
45
45
  let root = instance.root;
46
46
  while (root.getState().previousRoot) root = root.getState().previousRoot;
47
47
  return root;
48
48
  }
49
- /**
50
- * Safely flush async effects when testing, simulating a legacy root.
49
+ /**
50
+ * Safely flush async effects when testing, simulating a legacy root.
51
51
  */
52
- const act = React__namespace.act;
52
+ const act = cb => {
53
+ if ('act' in React__namespace) {
54
+ return React__namespace.act(cb);
55
+ }
56
+ throw new Error('act(...) is not supported in production builds of React');
57
+ };
53
58
  const isOrthographicCamera = def => def && def.isOrthographicCamera;
54
59
  const isRef = obj => obj && obj.hasOwnProperty('current');
55
60
  const isColorRepresentation = value => value != null && (typeof value === 'string' || typeof value === 'number' || value.isColor);
56
61
 
57
- /**
58
- * An SSR-friendly useLayoutEffect.
59
- *
60
- * React currently throws a warning when using useLayoutEffect on the server.
61
- * To get around it, we can conditionally useEffect on the server (no-op) and
62
- * useLayoutEffect elsewhere.
63
- *
64
- * @see https://github.com/facebook/react/issues/14927
62
+ /**
63
+ * An SSR-friendly useLayoutEffect.
64
+ *
65
+ * React currently throws a warning when using useLayoutEffect on the server.
66
+ * To get around it, we can conditionally useEffect on the server (no-op) and
67
+ * useLayoutEffect elsewhere.
68
+ *
69
+ * @see https://github.com/facebook/react/issues/14927
65
70
  */
66
71
  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;
67
72
  function useMutableCallback(fn) {
@@ -69,8 +74,8 @@ function useMutableCallback(fn) {
69
74
  useIsomorphicLayoutEffect(() => void (ref.current = fn), [fn]);
70
75
  return ref;
71
76
  }
72
- /**
73
- * Bridges renderer Context and StrictMode from a primary renderer.
77
+ /**
78
+ * Bridges renderer Context and StrictMode from a primary renderer.
74
79
  */
75
80
  function useBridge() {
76
81
  const fiber = itsFine.useFiber();
@@ -122,8 +127,8 @@ function calculateDpr(dpr) {
122
127
  return Array.isArray(dpr) ? Math.min(Math.max(dpr[0], target), dpr[1]) : dpr;
123
128
  }
124
129
 
125
- /**
126
- * Returns instance root state
130
+ /**
131
+ * Returns instance root state
127
132
  */
128
133
  function getRootState(obj) {
129
134
  var _r3f;
@@ -184,12 +189,14 @@ const is = {
184
189
  function buildGraph(object) {
185
190
  const data = {
186
191
  nodes: {},
187
- materials: {}
192
+ materials: {},
193
+ meshes: {}
188
194
  };
189
195
  if (object) {
190
196
  object.traverse(obj => {
191
197
  if (obj.name) data.nodes[obj.name] = obj;
192
198
  if (obj.material && !data.materials[obj.material.name]) data.materials[obj.material.name] = obj.material;
199
+ if (obj.isMesh && !data.meshes[obj.name]) data.meshes[obj.name] = obj;
193
200
  });
194
201
  }
195
202
  return data;
@@ -236,7 +243,6 @@ function prepare(target, root, type, props) {
236
243
  return instance;
237
244
  }
238
245
  function resolve(root, key) {
239
- var _target;
240
246
  let target = root[key];
241
247
  if (!key.includes('-')) return {
242
248
  root,
@@ -245,12 +251,16 @@ function resolve(root, key) {
245
251
  };
246
252
 
247
253
  // Resolve pierced target
248
- const chain = key.split('-');
249
- target = chain.reduce((acc, key) => acc[key], root);
250
- key = chain.pop();
254
+ target = root;
255
+ for (const part of key.split('-')) {
256
+ var _target;
257
+ key = part;
258
+ root = target;
259
+ target = (_target = target) == null ? void 0 : _target[key];
260
+ }
261
+
262
+ // TODO: change key to 'foo-bar' if target is undefined?
251
263
 
252
- // Switch root if atomic
253
- if (!((_target = target) != null && _target.set)) root = chain.reduce((acc, key) => acc[key], root);
254
264
  return {
255
265
  root,
256
266
  key,
@@ -481,9 +491,9 @@ function makeId(event) {
481
491
  return (event.eventObject || event.object).uuid + '/' + event.index + event.instanceId;
482
492
  }
483
493
 
484
- /**
485
- * Release pointer captures.
486
- * This is called by releasePointerCapture in the API, and when an object is removed.
494
+ /**
495
+ * Release pointer captures.
496
+ * This is called by releasePointerCapture in the API, and when an object is removed.
487
497
  */
488
498
  function releaseInternalPointerCapture(capturedMap, obj, captures, pointerId) {
489
499
  const captureData = captures.get(obj);
@@ -830,19 +840,19 @@ function createEvents(store) {
830
840
  if (!(instance != null && instance.eventCount)) return;
831
841
  const handlers = instance.handlers;
832
842
 
833
- /*
834
- MAYBE TODO, DELETE IF NOT:
835
- Check if the object is captured, captured events should not have intersects running in parallel
836
- But wouldn't it be better to just replace capturedMap with a single entry?
837
- Also, are we OK with straight up making picking up multiple objects impossible?
838
-
839
- const pointerId = (data as ThreeEvent<PointerEvent>).pointerId
840
- if (pointerId !== undefined) {
841
- const capturedMeshSet = internal.capturedMap.get(pointerId)
842
- if (capturedMeshSet) {
843
- const captured = capturedMeshSet.get(eventObject)
844
- if (captured && captured.localState.stopped) return
845
- }
843
+ /*
844
+ MAYBE TODO, DELETE IF NOT:
845
+ Check if the object is captured, captured events should not have intersects running in parallel
846
+ But wouldn't it be better to just replace capturedMap with a single entry?
847
+ Also, are we OK with straight up making picking up multiple objects impossible?
848
+
849
+ const pointerId = (data as ThreeEvent<PointerEvent>).pointerId
850
+ if (pointerId !== undefined) {
851
+ const capturedMeshSet = internal.capturedMap.get(pointerId)
852
+ if (capturedMeshSet) {
853
+ const captured = capturedMeshSet.get(eventObject)
854
+ if (captured && captured.localState.stopped) return
855
+ }
846
856
  }*/
847
857
 
848
858
  if (isPointerMove) {
@@ -1133,11 +1143,11 @@ const createStore = (invalidate, advance) => {
1133
1143
  return rootStore;
1134
1144
  };
1135
1145
 
1136
- /**
1137
- * Exposes an object's {@link Instance}.
1138
- * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#useInstanceHandle
1139
- *
1140
- * **Note**: this is an escape hatch to react-internal fields. Expect this to change significantly between versions.
1146
+ /**
1147
+ * Exposes an object's {@link Instance}.
1148
+ * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#useInstanceHandle
1149
+ *
1150
+ * **Note**: this is an escape hatch to react-internal fields. Expect this to change significantly between versions.
1141
1151
  */
1142
1152
  function useInstanceHandle(ref) {
1143
1153
  const instance = React__namespace.useRef(null);
@@ -1145,9 +1155,9 @@ function useInstanceHandle(ref) {
1145
1155
  return instance;
1146
1156
  }
1147
1157
 
1148
- /**
1149
- * Returns the R3F Canvas' Zustand store. Useful for [transient updates](https://github.com/pmndrs/zustand#transient-updates-for-often-occurring-state-changes).
1150
- * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#usestore
1158
+ /**
1159
+ * Returns the R3F Canvas' Zustand store. Useful for [transient updates](https://github.com/pmndrs/zustand#transient-updates-for-often-occurring-state-changes).
1160
+ * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#usestore
1151
1161
  */
1152
1162
  function useStore() {
1153
1163
  const store = React__namespace.useContext(context);
@@ -1155,18 +1165,18 @@ function useStore() {
1155
1165
  return store;
1156
1166
  }
1157
1167
 
1158
- /**
1159
- * Accesses R3F's internal state, containing renderer, canvas, scene, etc.
1160
- * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#usethree
1168
+ /**
1169
+ * Accesses R3F's internal state, containing renderer, canvas, scene, etc.
1170
+ * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#usethree
1161
1171
  */
1162
1172
  function useThree(selector = state => state, equalityFn) {
1163
1173
  return useStore()(selector, equalityFn);
1164
1174
  }
1165
1175
 
1166
- /**
1167
- * Executes a callback before render in a shared frame loop.
1168
- * Can order effects with render priority or manually render with a positive priority.
1169
- * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#useframe
1176
+ /**
1177
+ * Executes a callback before render in a shared frame loop.
1178
+ * Can order effects with render priority or manually render with a positive priority.
1179
+ * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#useframe
1170
1180
  */
1171
1181
  function useFrame(callback, renderPriority = 0) {
1172
1182
  const store = useStore();
@@ -1178,9 +1188,9 @@ function useFrame(callback, renderPriority = 0) {
1178
1188
  return null;
1179
1189
  }
1180
1190
 
1181
- /**
1182
- * Returns a node graph of an object with named nodes & materials.
1183
- * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#usegraph
1191
+ /**
1192
+ * Returns a node graph of an object with named nodes & materials.
1193
+ * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#usegraph
1184
1194
  */
1185
1195
  function useGraph(object) {
1186
1196
  return React__namespace.useMemo(() => buildGraph(object), [object]);
@@ -1216,11 +1226,11 @@ function loadingFn(extensions, onProgress) {
1216
1226
  };
1217
1227
  }
1218
1228
 
1219
- /**
1220
- * Synchronously loads and caches assets with a three loader.
1221
- *
1222
- * Note: this hook's caller must be wrapped with `React.Suspense`
1223
- * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#useloader
1229
+ /**
1230
+ * Synchronously loads and caches assets with a three loader.
1231
+ *
1232
+ * Note: this hook's caller must be wrapped with `React.Suspense`
1233
+ * @see https://docs.pmnd.rs/react-three-fiber/api/hooks#useloader
1224
1234
  */
1225
1235
  function useLoader(loader, input, extensions, onProgress) {
1226
1236
  // Use suspense to load async assets
@@ -1232,16 +1242,16 @@ function useLoader(loader, input, extensions, onProgress) {
1232
1242
  return Array.isArray(input) ? results : results[0];
1233
1243
  }
1234
1244
 
1235
- /**
1236
- * Preloads an asset into cache as a side-effect.
1245
+ /**
1246
+ * Preloads an asset into cache as a side-effect.
1237
1247
  */
1238
1248
  useLoader.preload = function (loader, input, extensions) {
1239
1249
  const keys = Array.isArray(input) ? input : [input];
1240
1250
  return suspendReact.preload(loadingFn(extensions), [loader, ...keys]);
1241
1251
  };
1242
1252
 
1243
- /**
1244
- * Removes a loaded asset from cache.
1253
+ /**
1254
+ * Removes a loaded asset from cache.
1245
1255
  */
1246
1256
  useLoader.clear = function (loader, input) {
1247
1257
  const keys = Array.isArray(input) ? input : [input];
@@ -1357,15 +1367,24 @@ function handleContainerEffects(parent, child, beforeChild) {
1357
1367
  } else if (isObject3D(child.object) && isObject3D(parent.object)) {
1358
1368
  const childIndex = parent.object.children.indexOf(beforeChild == null ? void 0 : beforeChild.object);
1359
1369
  if (beforeChild && childIndex !== -1) {
1360
- child.object.parent = parent.object;
1361
- parent.object.children.splice(childIndex, 0, child.object);
1362
- child.object.dispatchEvent({
1363
- type: 'added'
1364
- });
1365
- parent.object.dispatchEvent({
1366
- type: 'childadded',
1367
- child: child.object
1368
- });
1370
+ // If the child is already in the parent's children array, move it to the new position
1371
+ // Otherwise, just insert it at the target position
1372
+ const existingIndex = parent.object.children.indexOf(child.object);
1373
+ if (existingIndex !== -1) {
1374
+ parent.object.children.splice(existingIndex, 1);
1375
+ const adjustedIndex = existingIndex < childIndex ? childIndex - 1 : childIndex;
1376
+ parent.object.children.splice(adjustedIndex, 0, child.object);
1377
+ } else {
1378
+ child.object.parent = parent.object;
1379
+ parent.object.children.splice(childIndex, 0, child.object);
1380
+ child.object.dispatchEvent({
1381
+ type: 'added'
1382
+ });
1383
+ parent.object.dispatchEvent({
1384
+ type: 'childadded',
1385
+ child: child.object
1386
+ });
1387
+ }
1369
1388
  } else {
1370
1389
  parent.object.add(child.object);
1371
1390
  }
@@ -2066,10 +2085,10 @@ function Portal({
2066
2085
  children,
2067
2086
  container
2068
2087
  }) {
2069
- /** This has to be a component because it would not be able to call useThree/useStore otherwise since
2070
- * if this is our environment, then we are not in r3f's renderer but in react-dom, it would trigger
2071
- * the "R3F hooks can only be used within the Canvas component!" warning:
2072
- * <Canvas>
2088
+ /** This has to be a component because it would not be able to call useThree/useStore otherwise since
2089
+ * if this is our environment, then we are not in r3f's renderer but in react-dom, it would trigger
2090
+ * the "R3F hooks can only be used within the Canvas component!" warning:
2091
+ * <Canvas>
2073
2092
  * {createPortal(...)} */
2074
2093
  const {
2075
2094
  events,
@@ -2161,21 +2180,21 @@ const globalEffects = new Set();
2161
2180
  const globalAfterEffects = new Set();
2162
2181
  const globalTailEffects = new Set();
2163
2182
 
2164
- /**
2165
- * Adds a global render callback which is called each frame.
2166
- * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#addEffect
2183
+ /**
2184
+ * Adds a global render callback which is called each frame.
2185
+ * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#addEffect
2167
2186
  */
2168
2187
  const addEffect = callback => createSubs(callback, globalEffects);
2169
2188
 
2170
- /**
2171
- * Adds a global after-render callback which is called each frame.
2172
- * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#addAfterEffect
2189
+ /**
2190
+ * Adds a global after-render callback which is called each frame.
2191
+ * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#addAfterEffect
2173
2192
  */
2174
2193
  const addAfterEffect = callback => createSubs(callback, globalAfterEffects);
2175
2194
 
2176
- /**
2177
- * Adds a global callback which is called when rendering stops.
2178
- * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#addTail
2195
+ /**
2196
+ * Adds a global callback which is called when rendering stops.
2197
+ * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#addTail
2179
2198
  */
2180
2199
  const addTail = callback => createSubs(callback, globalTailEffects);
2181
2200
  function run(effects, timestamp) {
@@ -2263,9 +2282,9 @@ function loop(timestamp) {
2263
2282
  }
2264
2283
  }
2265
2284
 
2266
- /**
2267
- * Invalidates the view, requesting a frame to be rendered. Will globally invalidate unless passed a root's state.
2268
- * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#invalidate
2285
+ /**
2286
+ * Invalidates the view, requesting a frame to be rendered. Will globally invalidate unless passed a root's state.
2287
+ * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#invalidate
2269
2288
  */
2270
2289
  function invalidate(state, frames = 1) {
2271
2290
  var _state$gl$xr2;
@@ -2292,9 +2311,9 @@ function invalidate(state, frames = 1) {
2292
2311
  }
2293
2312
  }
2294
2313
 
2295
- /**
2296
- * Advances the frameloop and runs render effects, useful for when manually rendering via `frameloop="never"`.
2297
- * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#advance
2314
+ /**
2315
+ * Advances the frameloop and runs render effects, useful for when manually rendering via `frameloop="never"`.
2316
+ * @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#advance
2298
2317
  */
2299
2318
  function advance(timestamp, runGlobalEffects = true, state, frame) {
2300
2319
  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-cee74b95.cjs.dev.js');
5
+ var events = require('./events-b2f77bcf.cjs.dev.js');
6
6
  var React = require('react');
7
7
  var THREE = require('three');
8
8
  var useMeasure = require('react-use-measure');
@@ -179,9 +179,9 @@ function CanvasImpl({
179
179
  });
180
180
  }
181
181
 
182
- /**
183
- * A DOM canvas which accepts threejs elements as children.
184
- * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
182
+ /**
183
+ * A DOM canvas which accepts threejs elements as children.
184
+ * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
185
185
  */
186
186
  function Canvas(props) {
187
187
  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-ff8de4d2.cjs.prod.js');
5
+ var events = require('./events-fed10990.cjs.prod.js');
6
6
  var React = require('react');
7
7
  var THREE = require('three');
8
8
  var useMeasure = require('react-use-measure');
@@ -179,9 +179,9 @@ function CanvasImpl({
179
179
  });
180
180
  }
181
181
 
182
- /**
183
- * A DOM canvas which accepts threejs elements as children.
184
- * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
182
+ /**
183
+ * A DOM canvas which accepts threejs elements as children.
184
+ * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
185
185
  */
186
186
  function Canvas(props) {
187
187
  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-2895749c.esm.js';
2
- export { t as ReactThreeFiber, _ as _roots, w as act, k as addAfterEffect, j as addEffect, l as addTail, n as advance, q as applyProps, x as buildGraph, p as context, g as createEvents, o as createPortal, c as createRoot, v as dispose, f as events, e as extend, h as flushGlobalEffects, s as getRootState, m as invalidate, r as reconciler, d as unmountComponentAtNode, C as useFrame, D as useGraph, y as useInstanceHandle, F as useLoader, z as useStore, A as useThree } from './events-2895749c.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-9ea6854d.esm.js';
2
+ export { t as ReactThreeFiber, _ as _roots, w as act, k as addAfterEffect, j as addEffect, l as addTail, n as advance, q as applyProps, x as buildGraph, p as context, g as createEvents, o as createPortal, c as createRoot, v as dispose, f as events, e as extend, h as flushGlobalEffects, s as getRootState, m as invalidate, r as reconciler, d as unmountComponentAtNode, C as useFrame, D as useGraph, y as useInstanceHandle, F as useLoader, z as useStore, A as useThree } from './events-9ea6854d.esm.js';
3
3
  import * as React from 'react';
4
4
  import * as THREE from 'three';
5
5
  import useMeasure from 'react-use-measure';
@@ -152,9 +152,9 @@ function CanvasImpl({
152
152
  });
153
153
  }
154
154
 
155
- /**
156
- * A DOM canvas which accepts threejs elements as children.
157
- * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
155
+ /**
156
+ * A DOM canvas which accepts threejs elements as children.
157
+ * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
158
158
  */
159
159
  function Canvas(props) {
160
160
  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-cee74b95.cjs.dev.js');
5
+ var events = require('../../dist/events-b2f77bcf.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-ff8de4d2.cjs.prod.js');
5
+ var events = require('../../dist/events-fed10990.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-2895749c.esm.js';
2
- export { t as ReactThreeFiber, _ as _roots, w as act, k as addAfterEffect, j as addEffect, l as addTail, n as advance, q as applyProps, x as buildGraph, p as context, g as createEvents, o as createPortal, c as createRoot, v as dispose, e as extend, h as flushGlobalEffects, s as getRootState, m as invalidate, r as reconciler, d as unmountComponentAtNode, C as useFrame, D as useGraph, y as useInstanceHandle, F as useLoader, z as useStore, A as useThree } from '../../dist/events-2895749c.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-9ea6854d.esm.js';
2
+ export { t as ReactThreeFiber, _ as _roots, w as act, k as addAfterEffect, j as addEffect, l as addTail, n as advance, q as applyProps, x as buildGraph, p as context, g as createEvents, o as createPortal, c as createRoot, v as dispose, e as extend, h as flushGlobalEffects, s as getRootState, m as invalidate, r as reconciler, d as unmountComponentAtNode, C as useFrame, D as useGraph, y as useInstanceHandle, F as useLoader, z as useStore, A as useThree } from '../../dist/events-9ea6854d.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';
@@ -244,9 +244,9 @@ function CanvasImpl({
244
244
  });
245
245
  }
246
246
 
247
- /**
248
- * A native canvas which accepts threejs elements as children.
249
- * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
247
+ /**
248
+ * A native canvas which accepts threejs elements as children.
249
+ * @see https://docs.pmnd.rs/react-three-fiber/api/canvas
250
250
  */
251
251
  function Canvas(props) {
252
252
  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.0.4",
3
+ "version": "9.1.1",
4
4
  "description": "A React renderer for Threejs",
5
5
  "keywords": [
6
6
  "react",
@@ -13,7 +13,8 @@
13
13
  "license": "MIT",
14
14
  "maintainers": [
15
15
  "Josh Ellis (https://github.com/joshuaellis)",
16
- "Cody Bennett (https://github.com/codyjasonbennett)"
16
+ "Cody Bennett (https://github.com/codyjasonbennett)",
17
+ "Kris Baumgarnter (https://github.com/krispya)"
17
18
  ],
18
19
  "bugs": {
19
20
  "url": "https://github.com/pmndrs/react-three-fiber/issues"