@react-three/fiber 8.13.6 → 8.13.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/{index-673ef987.esm.js → index-6662eaf2.esm.js} +7 -2
- package/dist/{index-3bf7d7a3.cjs.dev.js → index-be1f7f7b.cjs.dev.js} +7 -2
- package/dist/{index-e0fec69f.cjs.prod.js → index-dad7ba86.cjs.prod.js} +7 -2
- package/dist/react-three-fiber.cjs.dev.js +3 -1
- package/dist/react-three-fiber.cjs.prod.js +3 -1
- package/dist/react-three-fiber.esm.js +4 -2
- package/native/dist/react-three-fiber-native.cjs.dev.js +3 -1
- package/native/dist/react-three-fiber-native.cjs.prod.js +3 -1
- package/native/dist/react-three-fiber-native.esm.js +4 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1631,16 +1631,21 @@ function useFrame(callback, renderPriority = 0) {
|
|
|
1631
1631
|
function useGraph(object) {
|
|
1632
1632
|
return React.useMemo(() => buildGraph(object), [object]);
|
|
1633
1633
|
}
|
|
1634
|
+
const memoizedLoaders = new WeakMap();
|
|
1634
1635
|
function loadingFn(extensions, onProgress) {
|
|
1635
1636
|
return function (Proto, ...input) {
|
|
1636
1637
|
// Construct new loader and run extensions
|
|
1637
|
-
|
|
1638
|
+
let loader = memoizedLoaders.get(Proto);
|
|
1639
|
+
if (!loader) {
|
|
1640
|
+
loader = new Proto();
|
|
1641
|
+
memoizedLoaders.set(Proto, loader);
|
|
1642
|
+
}
|
|
1638
1643
|
if (extensions) extensions(loader);
|
|
1639
1644
|
// Go through the urls and load them
|
|
1640
1645
|
return Promise.all(input.map(input => new Promise((res, reject) => loader.load(input, data => {
|
|
1641
1646
|
if (data.scene) Object.assign(data, buildGraph(data.scene));
|
|
1642
1647
|
res(data);
|
|
1643
|
-
}, onProgress, error => reject(new Error(`Could not load ${input}: ${error.message}`))))));
|
|
1648
|
+
}, onProgress, error => reject(new Error(`Could not load ${input}: ${error.message}`)))))).finally(() => loader.dispose == null ? void 0 : loader.dispose());
|
|
1644
1649
|
};
|
|
1645
1650
|
}
|
|
1646
1651
|
|
|
@@ -1658,16 +1658,21 @@ function useFrame(callback, renderPriority = 0) {
|
|
|
1658
1658
|
function useGraph(object) {
|
|
1659
1659
|
return React__namespace.useMemo(() => buildGraph(object), [object]);
|
|
1660
1660
|
}
|
|
1661
|
+
const memoizedLoaders = new WeakMap();
|
|
1661
1662
|
function loadingFn(extensions, onProgress) {
|
|
1662
1663
|
return function (Proto, ...input) {
|
|
1663
1664
|
// Construct new loader and run extensions
|
|
1664
|
-
|
|
1665
|
+
let loader = memoizedLoaders.get(Proto);
|
|
1666
|
+
if (!loader) {
|
|
1667
|
+
loader = new Proto();
|
|
1668
|
+
memoizedLoaders.set(Proto, loader);
|
|
1669
|
+
}
|
|
1665
1670
|
if (extensions) extensions(loader);
|
|
1666
1671
|
// Go through the urls and load them
|
|
1667
1672
|
return Promise.all(input.map(input => new Promise((res, reject) => loader.load(input, data => {
|
|
1668
1673
|
if (data.scene) Object.assign(data, buildGraph(data.scene));
|
|
1669
1674
|
res(data);
|
|
1670
|
-
}, onProgress, error => reject(new Error(`Could not load ${input}: ${error.message}`))))));
|
|
1675
|
+
}, onProgress, error => reject(new Error(`Could not load ${input}: ${error.message}`)))))).finally(() => loader.dispose == null ? void 0 : loader.dispose());
|
|
1671
1676
|
};
|
|
1672
1677
|
}
|
|
1673
1678
|
|
|
@@ -1658,16 +1658,21 @@ function useFrame(callback, renderPriority = 0) {
|
|
|
1658
1658
|
function useGraph(object) {
|
|
1659
1659
|
return React__namespace.useMemo(() => buildGraph(object), [object]);
|
|
1660
1660
|
}
|
|
1661
|
+
const memoizedLoaders = new WeakMap();
|
|
1661
1662
|
function loadingFn(extensions, onProgress) {
|
|
1662
1663
|
return function (Proto, ...input) {
|
|
1663
1664
|
// Construct new loader and run extensions
|
|
1664
|
-
|
|
1665
|
+
let loader = memoizedLoaders.get(Proto);
|
|
1666
|
+
if (!loader) {
|
|
1667
|
+
loader = new Proto();
|
|
1668
|
+
memoizedLoaders.set(Proto, loader);
|
|
1669
|
+
}
|
|
1665
1670
|
if (extensions) extensions(loader);
|
|
1666
1671
|
// Go through the urls and load them
|
|
1667
1672
|
return Promise.all(input.map(input => new Promise((res, reject) => loader.load(input, data => {
|
|
1668
1673
|
if (data.scene) Object.assign(data, buildGraph(data.scene));
|
|
1669
1674
|
res(data);
|
|
1670
|
-
}, onProgress, error => reject(new Error(`Could not load ${input}: ${error.message}`))))));
|
|
1675
|
+
}, onProgress, error => reject(new Error(`Could not load ${input}: ${error.message}`)))))).finally(() => loader.dispose == null ? void 0 : loader.dispose());
|
|
1671
1676
|
};
|
|
1672
1677
|
}
|
|
1673
1678
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./index-
|
|
5
|
+
var index = require('./index-be1f7f7b.cjs.dev.js');
|
|
6
6
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var THREE = require('three');
|
|
@@ -141,6 +141,7 @@ const CanvasImpl = /*#__PURE__*/React__namespace.forwardRef(function Canvas({
|
|
|
141
141
|
performance,
|
|
142
142
|
raycaster,
|
|
143
143
|
camera,
|
|
144
|
+
scene,
|
|
144
145
|
onPointerMissed,
|
|
145
146
|
onCreated,
|
|
146
147
|
...props
|
|
@@ -187,6 +188,7 @@ const CanvasImpl = /*#__PURE__*/React__namespace.forwardRef(function Canvas({
|
|
|
187
188
|
performance,
|
|
188
189
|
raycaster,
|
|
189
190
|
camera,
|
|
191
|
+
scene,
|
|
190
192
|
size: containerRect,
|
|
191
193
|
// Pass mutable reference to onPointerMissed so it's free to update
|
|
192
194
|
onPointerMissed: (...args) => handlePointerMissed.current == null ? void 0 : handlePointerMissed.current(...args),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./index-
|
|
5
|
+
var index = require('./index-dad7ba86.cjs.prod.js');
|
|
6
6
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var THREE = require('three');
|
|
@@ -141,6 +141,7 @@ const CanvasImpl = /*#__PURE__*/React__namespace.forwardRef(function Canvas({
|
|
|
141
141
|
performance,
|
|
142
142
|
raycaster,
|
|
143
143
|
camera,
|
|
144
|
+
scene,
|
|
144
145
|
onPointerMissed,
|
|
145
146
|
onCreated,
|
|
146
147
|
...props
|
|
@@ -187,6 +188,7 @@ const CanvasImpl = /*#__PURE__*/React__namespace.forwardRef(function Canvas({
|
|
|
187
188
|
performance,
|
|
188
189
|
raycaster,
|
|
189
190
|
camera,
|
|
191
|
+
scene,
|
|
190
192
|
size: containerRect,
|
|
191
193
|
// Pass mutable reference to onPointerMissed so it's free to update
|
|
192
194
|
onPointerMissed: (...args) => handlePointerMissed.current == null ? void 0 : handlePointerMissed.current(...args),
|
|
@@ -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-
|
|
2
|
-
export { t as ReactThreeFiber, w as _roots, v as act, o as addAfterEffect, n as addEffect, p as addTail, m as advance, j as applyProps, 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, A as useFrame, C as useGraph, x as useInstanceHandle, D as useLoader, y as useStore, z as useThree } from './index-
|
|
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-6662eaf2.esm.js';
|
|
2
|
+
export { t as ReactThreeFiber, w as _roots, v as act, o as addAfterEffect, n as addEffect, p as addTail, m as advance, j as applyProps, 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, A as useFrame, C as useGraph, x as useInstanceHandle, D as useLoader, y as useStore, z as useThree } from './index-6662eaf2.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';
|
|
@@ -114,6 +114,7 @@ const CanvasImpl = /*#__PURE__*/React.forwardRef(function Canvas({
|
|
|
114
114
|
performance,
|
|
115
115
|
raycaster,
|
|
116
116
|
camera,
|
|
117
|
+
scene,
|
|
117
118
|
onPointerMissed,
|
|
118
119
|
onCreated,
|
|
119
120
|
...props
|
|
@@ -160,6 +161,7 @@ const CanvasImpl = /*#__PURE__*/React.forwardRef(function Canvas({
|
|
|
160
161
|
performance,
|
|
161
162
|
raycaster,
|
|
162
163
|
camera,
|
|
164
|
+
scene,
|
|
163
165
|
size: containerRect,
|
|
164
166
|
// Pass mutable reference to onPointerMissed so it's free to update
|
|
165
167
|
onPointerMissed: (...args) => handlePointerMissed.current == null ? void 0 : handlePointerMissed.current(...args),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('../../dist/index-
|
|
5
|
+
var index = require('../../dist/index-be1f7f7b.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,6 +251,7 @@ const CanvasImpl = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
251
251
|
performance,
|
|
252
252
|
raycaster,
|
|
253
253
|
camera,
|
|
254
|
+
scene,
|
|
254
255
|
onPointerMissed,
|
|
255
256
|
onCreated,
|
|
256
257
|
...props
|
|
@@ -330,6 +331,7 @@ const CanvasImpl = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
330
331
|
performance,
|
|
331
332
|
raycaster,
|
|
332
333
|
camera,
|
|
334
|
+
scene,
|
|
333
335
|
// expo-gl can only render at native dpr/resolution
|
|
334
336
|
// https://github.com/expo/expo-three/issues/39
|
|
335
337
|
dpr: reactNative.PixelRatio.get(),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('../../dist/index-
|
|
5
|
+
var index = require('../../dist/index-dad7ba86.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,6 +251,7 @@ const CanvasImpl = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
251
251
|
performance,
|
|
252
252
|
raycaster,
|
|
253
253
|
camera,
|
|
254
|
+
scene,
|
|
254
255
|
onPointerMissed,
|
|
255
256
|
onCreated,
|
|
256
257
|
...props
|
|
@@ -330,6 +331,7 @@ const CanvasImpl = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
330
331
|
performance,
|
|
331
332
|
raycaster,
|
|
332
333
|
camera,
|
|
334
|
+
scene,
|
|
333
335
|
// expo-gl can only render at native dpr/resolution
|
|
334
336
|
// https://github.com/expo/expo-three/issues/39
|
|
335
337
|
dpr: reactNative.PixelRatio.get(),
|
|
@@ -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-
|
|
2
|
-
export { t as ReactThreeFiber, w as _roots, v as act, o as addAfterEffect, n as addEffect, p as addTail, m as advance, j as applyProps, 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, A as useFrame, C as useGraph, x as useInstanceHandle, D as useLoader, y as useStore, z as useThree } from '../../dist/index-
|
|
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-6662eaf2.esm.js';
|
|
2
|
+
export { t as ReactThreeFiber, w as _roots, v as act, o as addAfterEffect, n as addEffect, p as addTail, m as advance, j as applyProps, 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, A as useFrame, C as useGraph, x as useInstanceHandle, D as useLoader, y as useStore, z as useThree } from '../../dist/index-6662eaf2.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,6 +224,7 @@ const CanvasImpl = /*#__PURE__*/React.forwardRef(({
|
|
|
224
224
|
performance,
|
|
225
225
|
raycaster,
|
|
226
226
|
camera,
|
|
227
|
+
scene,
|
|
227
228
|
onPointerMissed,
|
|
228
229
|
onCreated,
|
|
229
230
|
...props
|
|
@@ -303,6 +304,7 @@ const CanvasImpl = /*#__PURE__*/React.forwardRef(({
|
|
|
303
304
|
performance,
|
|
304
305
|
raycaster,
|
|
305
306
|
camera,
|
|
307
|
+
scene,
|
|
306
308
|
// expo-gl can only render at native dpr/resolution
|
|
307
309
|
// https://github.com/expo/expo-three/issues/39
|
|
308
310
|
dpr: PixelRatio.get(),
|