@react-three/fiber 8.0.2 → 8.0.5
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 +18 -0
- package/dist/declarations/src/core/store.d.ts +2 -1
- package/dist/declarations/src/three-types.d.ts +1 -0
- package/dist/{index-1a4e6043.cjs.prod.js → index-1ff856c3.cjs.prod.js} +44 -6
- package/dist/{index-2d896758.cjs.dev.js → index-28a77253.cjs.dev.js} +44 -6
- package/dist/{index-634e3679.esm.js → index-635ddfb2.esm.js} +44 -6
- package/dist/react-three-fiber.cjs.dev.js +2 -2
- package/dist/react-three-fiber.cjs.prod.js +2 -2
- package/dist/react-three-fiber.esm.js +3 -3
- package/native/dist/react-three-fiber-native.cjs.dev.js +2 -2
- package/native/dist/react-three-fiber-native.cjs.prod.js +2 -2
- package/native/dist/react-three-fiber-native.esm.js +3 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @react-three/fiber
|
|
2
2
|
|
|
3
|
+
## 8.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 227c328: fix pointer for root and portals
|
|
8
|
+
|
|
9
|
+
## 8.0.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- e981a72: fix: mock three color management, loosen peer dep
|
|
14
|
+
|
|
15
|
+
## 8.0.3
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 3252aed: setevents needs to spread and be mirrored in portals
|
|
20
|
+
|
|
3
21
|
## 8.0.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -67,6 +67,7 @@ export declare type RootState = {
|
|
|
67
67
|
controls: THREE.EventDispatcher | null;
|
|
68
68
|
pointer: THREE.Vector2;
|
|
69
69
|
mouse: THREE.Vector2;
|
|
70
|
+
legacy: boolean;
|
|
70
71
|
linear: boolean;
|
|
71
72
|
flat: boolean;
|
|
72
73
|
frameloop: 'always' | 'demand' | 'never';
|
|
@@ -89,9 +90,9 @@ export declare type StoreProps = {
|
|
|
89
90
|
gl: THREE.WebGLRenderer;
|
|
90
91
|
size: Size;
|
|
91
92
|
shadows?: boolean | Partial<THREE.WebGLShadowMap>;
|
|
93
|
+
legacy?: boolean;
|
|
92
94
|
linear?: boolean;
|
|
93
95
|
flat?: boolean;
|
|
94
|
-
legacy?: boolean;
|
|
95
96
|
orthographic?: boolean;
|
|
96
97
|
frameloop?: 'always' | 'demand' | 'never';
|
|
97
98
|
performance?: Partial<Omit<Performance, 'regress'>>;
|
|
@@ -334,10 +334,22 @@ function applyProps$1(instance, data) {
|
|
|
334
334
|
|
|
335
335
|
if (!isColor && targetProp.setScalar) targetProp.setScalar(value); // Layers have no copy function, we must therefore copy the mask property
|
|
336
336
|
else if (targetProp instanceof THREE__namespace.Layers && value instanceof THREE__namespace.Layers) targetProp.mask = value.mask; // Otherwise just set ...
|
|
337
|
-
else targetProp.set(value);
|
|
337
|
+
else targetProp.set(value); // For versions of three which don't support THREE.ColorManagement,
|
|
338
|
+
// Auto-convert sRGB colors
|
|
339
|
+
// https://github.com/pmndrs/react-three-fiber/issues/344
|
|
340
|
+
|
|
341
|
+
const supportsColorManagement = THREE__namespace.ColorManagement;
|
|
342
|
+
if (!supportsColorManagement && !rootState.linear && isColor) targetProp.convertSRGBToLinear();
|
|
338
343
|
} // Else, just overwrite the value
|
|
339
344
|
|
|
340
|
-
} else
|
|
345
|
+
} else {
|
|
346
|
+
currentInstance[key] = value; // Auto-convert sRGB textures, for now ...
|
|
347
|
+
// https://github.com/pmndrs/react-three-fiber/issues/344
|
|
348
|
+
|
|
349
|
+
if (!rootState.linear && currentInstance[key] instanceof THREE__namespace.Texture) {
|
|
350
|
+
currentInstance[key].encoding = THREE__namespace.sRGBEncoding;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
341
353
|
|
|
342
354
|
invalidateInstance(instance);
|
|
343
355
|
});
|
|
@@ -468,7 +480,13 @@ function createEvents(store) {
|
|
|
468
480
|
if (state) {
|
|
469
481
|
state.raycaster.camera = undefined;
|
|
470
482
|
}
|
|
471
|
-
});
|
|
483
|
+
});
|
|
484
|
+
|
|
485
|
+
if (!state.previousRoot) {
|
|
486
|
+
// Make sure root-level pointer and ray are set up
|
|
487
|
+
state.events.compute == null ? void 0 : state.events.compute(event, state);
|
|
488
|
+
} // Collect events
|
|
489
|
+
|
|
472
490
|
|
|
473
491
|
let hits = eventsObjects // Intersect objects
|
|
474
492
|
.flatMap(obj => {
|
|
@@ -1192,6 +1210,7 @@ const createStore = (invalidate, advance) => {
|
|
|
1192
1210
|
xr: null,
|
|
1193
1211
|
invalidate: () => invalidate(get()),
|
|
1194
1212
|
advance: (timestamp, runGlobalEffects) => advance(timestamp, runGlobalEffects, get()),
|
|
1213
|
+
legacy: false,
|
|
1195
1214
|
linear: false,
|
|
1196
1215
|
flat: false,
|
|
1197
1216
|
scene: prepare(new THREE__namespace.Scene()),
|
|
@@ -1232,7 +1251,7 @@ const createStore = (invalidate, advance) => {
|
|
|
1232
1251
|
},
|
|
1233
1252
|
setEvents: events => set(state => ({ ...state,
|
|
1234
1253
|
events: { ...state.events,
|
|
1235
|
-
events
|
|
1254
|
+
...events
|
|
1236
1255
|
}
|
|
1237
1256
|
})),
|
|
1238
1257
|
setSize: (width, height) => {
|
|
@@ -1689,7 +1708,17 @@ function createRoot(canvas) {
|
|
|
1689
1708
|
const outputEncoding = linear ? THREE__namespace.LinearEncoding : THREE__namespace.sRGBEncoding;
|
|
1690
1709
|
const toneMapping = flat ? THREE__namespace.NoToneMapping : THREE__namespace.ACESFilmicToneMapping;
|
|
1691
1710
|
if (gl.outputEncoding !== outputEncoding) gl.outputEncoding = outputEncoding;
|
|
1692
|
-
if (gl.toneMapping !== toneMapping) gl.toneMapping = toneMapping; //
|
|
1711
|
+
if (gl.toneMapping !== toneMapping) gl.toneMapping = toneMapping; // Update color management state
|
|
1712
|
+
|
|
1713
|
+
if (state.legacy !== legacy) state.set(() => ({
|
|
1714
|
+
legacy
|
|
1715
|
+
}));
|
|
1716
|
+
if (state.linear !== linear) state.set(() => ({
|
|
1717
|
+
linear
|
|
1718
|
+
}));
|
|
1719
|
+
if (state.flat !== flat) state.set(() => ({
|
|
1720
|
+
flat
|
|
1721
|
+
})); // Set gl props
|
|
1693
1722
|
|
|
1694
1723
|
if (glConfig && !is.fun(glConfig) && !isRenderer(glConfig) && !is.equ(glConfig, gl, shallowLoose)) applyProps(gl, glConfig); // Store events internally
|
|
1695
1724
|
|
|
@@ -1826,6 +1855,7 @@ function Portal({
|
|
|
1826
1855
|
} = state;
|
|
1827
1856
|
const previousRoot = useStore();
|
|
1828
1857
|
const [raycaster] = React__namespace.useState(() => new THREE__namespace.Raycaster());
|
|
1858
|
+
const [pointer] = React__namespace.useState(() => new THREE__namespace.Vector2());
|
|
1829
1859
|
const inject = React__namespace.useCallback((state, injectState) => {
|
|
1830
1860
|
const intersect = { ...state
|
|
1831
1861
|
};
|
|
@@ -1844,6 +1874,9 @@ function Portal({
|
|
|
1844
1874
|
previousRoot,
|
|
1845
1875
|
raycaster,
|
|
1846
1876
|
events: { ...state.events,
|
|
1877
|
+
...(injectState == null ? void 0 : injectState.events),
|
|
1878
|
+
pointer,
|
|
1879
|
+
mouse: pointer,
|
|
1847
1880
|
...events
|
|
1848
1881
|
},
|
|
1849
1882
|
...rest
|
|
@@ -1852,7 +1885,12 @@ function Portal({
|
|
|
1852
1885
|
const [useInjectStore] = React__namespace.useState(() => {
|
|
1853
1886
|
const store = create__default['default']((set, get) => ({ ...inject(previousRoot.getState()),
|
|
1854
1887
|
set,
|
|
1855
|
-
get
|
|
1888
|
+
get,
|
|
1889
|
+
setEvents: events => set(state => ({ ...state,
|
|
1890
|
+
events: { ...state.events,
|
|
1891
|
+
...events
|
|
1892
|
+
}
|
|
1893
|
+
}))
|
|
1856
1894
|
}));
|
|
1857
1895
|
previousRoot.subscribe(state => useInjectStore.setState(injectState => inject(state, injectState)));
|
|
1858
1896
|
return store;
|
|
@@ -334,10 +334,22 @@ function applyProps$1(instance, data) {
|
|
|
334
334
|
|
|
335
335
|
if (!isColor && targetProp.setScalar) targetProp.setScalar(value); // Layers have no copy function, we must therefore copy the mask property
|
|
336
336
|
else if (targetProp instanceof THREE__namespace.Layers && value instanceof THREE__namespace.Layers) targetProp.mask = value.mask; // Otherwise just set ...
|
|
337
|
-
else targetProp.set(value);
|
|
337
|
+
else targetProp.set(value); // For versions of three which don't support THREE.ColorManagement,
|
|
338
|
+
// Auto-convert sRGB colors
|
|
339
|
+
// https://github.com/pmndrs/react-three-fiber/issues/344
|
|
340
|
+
|
|
341
|
+
const supportsColorManagement = THREE__namespace.ColorManagement;
|
|
342
|
+
if (!supportsColorManagement && !rootState.linear && isColor) targetProp.convertSRGBToLinear();
|
|
338
343
|
} // Else, just overwrite the value
|
|
339
344
|
|
|
340
|
-
} else
|
|
345
|
+
} else {
|
|
346
|
+
currentInstance[key] = value; // Auto-convert sRGB textures, for now ...
|
|
347
|
+
// https://github.com/pmndrs/react-three-fiber/issues/344
|
|
348
|
+
|
|
349
|
+
if (!rootState.linear && currentInstance[key] instanceof THREE__namespace.Texture) {
|
|
350
|
+
currentInstance[key].encoding = THREE__namespace.sRGBEncoding;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
341
353
|
|
|
342
354
|
invalidateInstance(instance);
|
|
343
355
|
});
|
|
@@ -468,7 +480,13 @@ function createEvents(store) {
|
|
|
468
480
|
if (state) {
|
|
469
481
|
state.raycaster.camera = undefined;
|
|
470
482
|
}
|
|
471
|
-
});
|
|
483
|
+
});
|
|
484
|
+
|
|
485
|
+
if (!state.previousRoot) {
|
|
486
|
+
// Make sure root-level pointer and ray are set up
|
|
487
|
+
state.events.compute == null ? void 0 : state.events.compute(event, state);
|
|
488
|
+
} // Collect events
|
|
489
|
+
|
|
472
490
|
|
|
473
491
|
let hits = eventsObjects // Intersect objects
|
|
474
492
|
.flatMap(obj => {
|
|
@@ -1192,6 +1210,7 @@ const createStore = (invalidate, advance) => {
|
|
|
1192
1210
|
xr: null,
|
|
1193
1211
|
invalidate: () => invalidate(get()),
|
|
1194
1212
|
advance: (timestamp, runGlobalEffects) => advance(timestamp, runGlobalEffects, get()),
|
|
1213
|
+
legacy: false,
|
|
1195
1214
|
linear: false,
|
|
1196
1215
|
flat: false,
|
|
1197
1216
|
scene: prepare(new THREE__namespace.Scene()),
|
|
@@ -1232,7 +1251,7 @@ const createStore = (invalidate, advance) => {
|
|
|
1232
1251
|
},
|
|
1233
1252
|
setEvents: events => set(state => ({ ...state,
|
|
1234
1253
|
events: { ...state.events,
|
|
1235
|
-
events
|
|
1254
|
+
...events
|
|
1236
1255
|
}
|
|
1237
1256
|
})),
|
|
1238
1257
|
setSize: (width, height) => {
|
|
@@ -1689,7 +1708,17 @@ function createRoot(canvas) {
|
|
|
1689
1708
|
const outputEncoding = linear ? THREE__namespace.LinearEncoding : THREE__namespace.sRGBEncoding;
|
|
1690
1709
|
const toneMapping = flat ? THREE__namespace.NoToneMapping : THREE__namespace.ACESFilmicToneMapping;
|
|
1691
1710
|
if (gl.outputEncoding !== outputEncoding) gl.outputEncoding = outputEncoding;
|
|
1692
|
-
if (gl.toneMapping !== toneMapping) gl.toneMapping = toneMapping; //
|
|
1711
|
+
if (gl.toneMapping !== toneMapping) gl.toneMapping = toneMapping; // Update color management state
|
|
1712
|
+
|
|
1713
|
+
if (state.legacy !== legacy) state.set(() => ({
|
|
1714
|
+
legacy
|
|
1715
|
+
}));
|
|
1716
|
+
if (state.linear !== linear) state.set(() => ({
|
|
1717
|
+
linear
|
|
1718
|
+
}));
|
|
1719
|
+
if (state.flat !== flat) state.set(() => ({
|
|
1720
|
+
flat
|
|
1721
|
+
})); // Set gl props
|
|
1693
1722
|
|
|
1694
1723
|
if (glConfig && !is.fun(glConfig) && !isRenderer(glConfig) && !is.equ(glConfig, gl, shallowLoose)) applyProps(gl, glConfig); // Store events internally
|
|
1695
1724
|
|
|
@@ -1826,6 +1855,7 @@ function Portal({
|
|
|
1826
1855
|
} = state;
|
|
1827
1856
|
const previousRoot = useStore();
|
|
1828
1857
|
const [raycaster] = React__namespace.useState(() => new THREE__namespace.Raycaster());
|
|
1858
|
+
const [pointer] = React__namespace.useState(() => new THREE__namespace.Vector2());
|
|
1829
1859
|
const inject = React__namespace.useCallback((state, injectState) => {
|
|
1830
1860
|
const intersect = { ...state
|
|
1831
1861
|
};
|
|
@@ -1844,6 +1874,9 @@ function Portal({
|
|
|
1844
1874
|
previousRoot,
|
|
1845
1875
|
raycaster,
|
|
1846
1876
|
events: { ...state.events,
|
|
1877
|
+
...(injectState == null ? void 0 : injectState.events),
|
|
1878
|
+
pointer,
|
|
1879
|
+
mouse: pointer,
|
|
1847
1880
|
...events
|
|
1848
1881
|
},
|
|
1849
1882
|
...rest
|
|
@@ -1852,7 +1885,12 @@ function Portal({
|
|
|
1852
1885
|
const [useInjectStore] = React__namespace.useState(() => {
|
|
1853
1886
|
const store = create__default['default']((set, get) => ({ ...inject(previousRoot.getState()),
|
|
1854
1887
|
set,
|
|
1855
|
-
get
|
|
1888
|
+
get,
|
|
1889
|
+
setEvents: events => set(state => ({ ...state,
|
|
1890
|
+
events: { ...state.events,
|
|
1891
|
+
...events
|
|
1892
|
+
}
|
|
1893
|
+
}))
|
|
1856
1894
|
}));
|
|
1857
1895
|
previousRoot.subscribe(state => useInjectStore.setState(injectState => inject(state, injectState)));
|
|
1858
1896
|
return store;
|
|
@@ -305,10 +305,22 @@ function applyProps$1(instance, data) {
|
|
|
305
305
|
|
|
306
306
|
if (!isColor && targetProp.setScalar) targetProp.setScalar(value); // Layers have no copy function, we must therefore copy the mask property
|
|
307
307
|
else if (targetProp instanceof THREE.Layers && value instanceof THREE.Layers) targetProp.mask = value.mask; // Otherwise just set ...
|
|
308
|
-
else targetProp.set(value);
|
|
308
|
+
else targetProp.set(value); // For versions of three which don't support THREE.ColorManagement,
|
|
309
|
+
// Auto-convert sRGB colors
|
|
310
|
+
// https://github.com/pmndrs/react-three-fiber/issues/344
|
|
311
|
+
|
|
312
|
+
const supportsColorManagement = THREE.ColorManagement;
|
|
313
|
+
if (!supportsColorManagement && !rootState.linear && isColor) targetProp.convertSRGBToLinear();
|
|
309
314
|
} // Else, just overwrite the value
|
|
310
315
|
|
|
311
|
-
} else
|
|
316
|
+
} else {
|
|
317
|
+
currentInstance[key] = value; // Auto-convert sRGB textures, for now ...
|
|
318
|
+
// https://github.com/pmndrs/react-three-fiber/issues/344
|
|
319
|
+
|
|
320
|
+
if (!rootState.linear && currentInstance[key] instanceof THREE.Texture) {
|
|
321
|
+
currentInstance[key].encoding = THREE.sRGBEncoding;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
312
324
|
|
|
313
325
|
invalidateInstance(instance);
|
|
314
326
|
});
|
|
@@ -439,7 +451,13 @@ function createEvents(store) {
|
|
|
439
451
|
if (state) {
|
|
440
452
|
state.raycaster.camera = undefined;
|
|
441
453
|
}
|
|
442
|
-
});
|
|
454
|
+
});
|
|
455
|
+
|
|
456
|
+
if (!state.previousRoot) {
|
|
457
|
+
// Make sure root-level pointer and ray are set up
|
|
458
|
+
state.events.compute == null ? void 0 : state.events.compute(event, state);
|
|
459
|
+
} // Collect events
|
|
460
|
+
|
|
443
461
|
|
|
444
462
|
let hits = eventsObjects // Intersect objects
|
|
445
463
|
.flatMap(obj => {
|
|
@@ -1163,6 +1181,7 @@ const createStore = (invalidate, advance) => {
|
|
|
1163
1181
|
xr: null,
|
|
1164
1182
|
invalidate: () => invalidate(get()),
|
|
1165
1183
|
advance: (timestamp, runGlobalEffects) => advance(timestamp, runGlobalEffects, get()),
|
|
1184
|
+
legacy: false,
|
|
1166
1185
|
linear: false,
|
|
1167
1186
|
flat: false,
|
|
1168
1187
|
scene: prepare(new THREE.Scene()),
|
|
@@ -1203,7 +1222,7 @@ const createStore = (invalidate, advance) => {
|
|
|
1203
1222
|
},
|
|
1204
1223
|
setEvents: events => set(state => ({ ...state,
|
|
1205
1224
|
events: { ...state.events,
|
|
1206
|
-
events
|
|
1225
|
+
...events
|
|
1207
1226
|
}
|
|
1208
1227
|
})),
|
|
1209
1228
|
setSize: (width, height) => {
|
|
@@ -1660,7 +1679,17 @@ function createRoot(canvas) {
|
|
|
1660
1679
|
const outputEncoding = linear ? THREE.LinearEncoding : THREE.sRGBEncoding;
|
|
1661
1680
|
const toneMapping = flat ? THREE.NoToneMapping : THREE.ACESFilmicToneMapping;
|
|
1662
1681
|
if (gl.outputEncoding !== outputEncoding) gl.outputEncoding = outputEncoding;
|
|
1663
|
-
if (gl.toneMapping !== toneMapping) gl.toneMapping = toneMapping; //
|
|
1682
|
+
if (gl.toneMapping !== toneMapping) gl.toneMapping = toneMapping; // Update color management state
|
|
1683
|
+
|
|
1684
|
+
if (state.legacy !== legacy) state.set(() => ({
|
|
1685
|
+
legacy
|
|
1686
|
+
}));
|
|
1687
|
+
if (state.linear !== linear) state.set(() => ({
|
|
1688
|
+
linear
|
|
1689
|
+
}));
|
|
1690
|
+
if (state.flat !== flat) state.set(() => ({
|
|
1691
|
+
flat
|
|
1692
|
+
})); // Set gl props
|
|
1664
1693
|
|
|
1665
1694
|
if (glConfig && !is.fun(glConfig) && !isRenderer(glConfig) && !is.equ(glConfig, gl, shallowLoose)) applyProps(gl, glConfig); // Store events internally
|
|
1666
1695
|
|
|
@@ -1797,6 +1826,7 @@ function Portal({
|
|
|
1797
1826
|
} = state;
|
|
1798
1827
|
const previousRoot = useStore();
|
|
1799
1828
|
const [raycaster] = React.useState(() => new THREE.Raycaster());
|
|
1829
|
+
const [pointer] = React.useState(() => new THREE.Vector2());
|
|
1800
1830
|
const inject = React.useCallback((state, injectState) => {
|
|
1801
1831
|
const intersect = { ...state
|
|
1802
1832
|
};
|
|
@@ -1815,6 +1845,9 @@ function Portal({
|
|
|
1815
1845
|
previousRoot,
|
|
1816
1846
|
raycaster,
|
|
1817
1847
|
events: { ...state.events,
|
|
1848
|
+
...(injectState == null ? void 0 : injectState.events),
|
|
1849
|
+
pointer,
|
|
1850
|
+
mouse: pointer,
|
|
1818
1851
|
...events
|
|
1819
1852
|
},
|
|
1820
1853
|
...rest
|
|
@@ -1823,7 +1856,12 @@ function Portal({
|
|
|
1823
1856
|
const [useInjectStore] = React.useState(() => {
|
|
1824
1857
|
const store = create((set, get) => ({ ...inject(previousRoot.getState()),
|
|
1825
1858
|
set,
|
|
1826
|
-
get
|
|
1859
|
+
get,
|
|
1860
|
+
setEvents: events => set(state => ({ ...state,
|
|
1861
|
+
events: { ...state.events,
|
|
1862
|
+
...events
|
|
1863
|
+
}
|
|
1864
|
+
}))
|
|
1827
1865
|
}));
|
|
1828
1866
|
previousRoot.subscribe(state => useInjectStore.setState(injectState => inject(state, injectState)));
|
|
1829
1867
|
return store;
|
|
@@ -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-28a77253.cjs.dev.js');
|
|
6
6
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var THREE = require('three');
|
|
@@ -117,7 +117,7 @@ function createPointerEvents(store) {
|
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'orthographic', 'frameloop', 'dpr', 'performance', 'raycaster', 'camera', 'onPointerMissed', 'onCreated'];
|
|
120
|
+
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'legacy', 'orthographic', 'frameloop', 'dpr', 'performance', 'raycaster', 'camera', 'onPointerMissed', 'onCreated'];
|
|
121
121
|
|
|
122
122
|
function Block({
|
|
123
123
|
set
|
|
@@ -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-1ff856c3.cjs.prod.js');
|
|
6
6
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var THREE = require('three');
|
|
@@ -117,7 +117,7 @@ function createPointerEvents(store) {
|
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'orthographic', 'frameloop', 'dpr', 'performance', 'raycaster', 'camera', 'onPointerMissed', 'onCreated'];
|
|
120
|
+
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'legacy', 'orthographic', 'frameloop', 'dpr', 'performance', 'raycaster', 'camera', 'onPointerMissed', 'onCreated'];
|
|
121
121
|
|
|
122
122
|
function Block({
|
|
123
123
|
set
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as createEvents, e as extend, u as useMemoizedFn, p as pick, o as omit, a as createRoot, b as unmountComponentAtNode } from './index-
|
|
2
|
-
export { t as ReactThreeFiber, v as _roots, s as act, m as addAfterEffect, l as addEffect, n as addTail, k as advance, h as applyProps, d as context, f as createPortal, a as createRoot, i as dispose, e as extend, q as getRootState, j as invalidate, g as reconciler, r as render, b as unmountComponentAtNode, y as useFrame, z as useGraph, A as useLoader, u as useMemoizedFn, w as useStore, x as useThree } from './index-
|
|
1
|
+
import { c as createEvents, e as extend, u as useMemoizedFn, p as pick, o as omit, a as createRoot, b as unmountComponentAtNode } from './index-635ddfb2.esm.js';
|
|
2
|
+
export { t as ReactThreeFiber, v as _roots, s as act, m as addAfterEffect, l as addEffect, n as addTail, k as advance, h as applyProps, d as context, f as createPortal, a as createRoot, i as dispose, e as extend, q as getRootState, j as invalidate, g as reconciler, r as render, b as unmountComponentAtNode, y as useFrame, z as useGraph, A as useLoader, u as useMemoizedFn, w as useStore, x as useThree } from './index-635ddfb2.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';
|
|
@@ -87,7 +87,7 @@ function createPointerEvents(store) {
|
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'orthographic', 'frameloop', 'dpr', 'performance', 'raycaster', 'camera', 'onPointerMissed', 'onCreated'];
|
|
90
|
+
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'legacy', 'orthographic', 'frameloop', 'dpr', 'performance', 'raycaster', 'camera', 'onPointerMissed', 'onCreated'];
|
|
91
91
|
|
|
92
92
|
function Block({
|
|
93
93
|
set
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var THREE = require('three');
|
|
6
6
|
var expoAsset = require('expo-asset');
|
|
7
|
-
var index = require('../../dist/index-
|
|
7
|
+
var index = require('../../dist/index-28a77253.cjs.dev.js');
|
|
8
8
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
9
9
|
var React = require('react');
|
|
10
10
|
var mergeRefs = require('react-merge-refs');
|
|
@@ -125,7 +125,7 @@ function createTouchEvents(store) {
|
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'orthographic', 'frameloop', 'performance', 'raycaster', 'camera', 'onPointerMissed', 'onCreated'];
|
|
128
|
+
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'legacy', 'orthographic', 'frameloop', 'performance', 'raycaster', 'camera', 'onPointerMissed', 'onCreated'];
|
|
129
129
|
|
|
130
130
|
function Block({
|
|
131
131
|
set
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var THREE = require('three');
|
|
6
6
|
var expoAsset = require('expo-asset');
|
|
7
|
-
var index = require('../../dist/index-
|
|
7
|
+
var index = require('../../dist/index-1ff856c3.cjs.prod.js');
|
|
8
8
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
9
9
|
var React = require('react');
|
|
10
10
|
var mergeRefs = require('react-merge-refs');
|
|
@@ -125,7 +125,7 @@ function createTouchEvents(store) {
|
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'orthographic', 'frameloop', 'performance', 'raycaster', 'camera', 'onPointerMissed', 'onCreated'];
|
|
128
|
+
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'legacy', 'orthographic', 'frameloop', 'performance', 'raycaster', 'camera', 'onPointerMissed', 'onCreated'];
|
|
129
129
|
|
|
130
130
|
function Block({
|
|
131
131
|
set
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
import { Asset } from 'expo-asset';
|
|
3
|
-
import { c as createEvents, e as extend, u as useMemoizedFn, p as pick, o as omit, a as createRoot, b as unmountComponentAtNode } from '../../dist/index-
|
|
4
|
-
export { t as ReactThreeFiber, v as _roots, s as act, m as addAfterEffect, l as addEffect, n as addTail, k as advance, h as applyProps, d as context, f as createPortal, a as createRoot, i as dispose, e as extend, q as getRootState, j as invalidate, g as reconciler, r as render, b as unmountComponentAtNode, y as useFrame, z as useGraph, A as useLoader, u as useMemoizedFn, w as useStore, x as useThree } from '../../dist/index-
|
|
3
|
+
import { c as createEvents, e as extend, u as useMemoizedFn, p as pick, o as omit, a as createRoot, b as unmountComponentAtNode } from '../../dist/index-635ddfb2.esm.js';
|
|
4
|
+
export { t as ReactThreeFiber, v as _roots, s as act, m as addAfterEffect, l as addEffect, n as addTail, k as advance, h as applyProps, d as context, f as createPortal, a as createRoot, i as dispose, e as extend, q as getRootState, j as invalidate, g as reconciler, r as render, b as unmountComponentAtNode, y as useFrame, z as useGraph, A as useLoader, u as useMemoizedFn, w as useStore, x as useThree } from '../../dist/index-635ddfb2.esm.js';
|
|
5
5
|
import _extends from '@babel/runtime/helpers/esm/extends';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import mergeRefs from 'react-merge-refs';
|
|
@@ -95,7 +95,7 @@ function createTouchEvents(store) {
|
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'orthographic', 'frameloop', 'performance', 'raycaster', 'camera', 'onPointerMissed', 'onCreated'];
|
|
98
|
+
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'legacy', 'orthographic', 'frameloop', 'performance', 'raycaster', 'camera', 'onPointerMissed', 'onCreated'];
|
|
99
99
|
|
|
100
100
|
function Block({
|
|
101
101
|
set
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-three/fiber",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.5",
|
|
4
4
|
"description": "A React renderer for Threejs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"react": ">=18.0",
|
|
59
59
|
"react-dom": ">=18.0",
|
|
60
60
|
"react-native": ">=0.64",
|
|
61
|
-
"three": ">=0.
|
|
61
|
+
"three": ">=0.133"
|
|
62
62
|
},
|
|
63
63
|
"peerDependenciesMeta": {
|
|
64
64
|
"react-dom": {
|