@react-three/fiber 8.0.1 → 8.0.4
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/events.d.ts +69 -69
- package/dist/declarations/src/core/hooks.d.ts +25 -25
- package/dist/declarations/src/core/index.d.ts +42 -42
- package/dist/declarations/src/core/loop.d.ts +13 -13
- package/dist/declarations/src/core/renderer.d.ts +51 -51
- package/dist/declarations/src/core/store.d.ts +108 -107
- package/dist/declarations/src/core/utils.d.ts +57 -57
- package/dist/declarations/src/index.d.ts +10 -10
- package/dist/declarations/src/native/Canvas.d.ts +13 -13
- package/dist/declarations/src/native/events.d.ts +5 -5
- package/dist/declarations/src/native.d.ts +10 -10
- package/dist/declarations/src/three-types.d.ts +326 -326
- package/dist/declarations/src/web/Canvas.d.ts +13 -13
- package/dist/declarations/src/web/events.d.ts +4 -4
- package/dist/{index-a8a84b79.cjs.prod.js → index-227921b7.cjs.prod.js} +35 -6
- package/dist/{index-56f220df.cjs.dev.js → index-6cf8dd4b.cjs.dev.js} +35 -6
- package/dist/{index-2de459e5.esm.js → index-de9e845e.esm.js} +35 -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
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { Options as ResizeOptions } from 'react-use-measure';
|
|
3
|
-
import { UseBoundStore } from 'zustand';
|
|
4
|
-
import { RenderProps } from '../core';
|
|
5
|
-
import { RootState } from '../core/store';
|
|
6
|
-
import { EventManager } from '../core/events';
|
|
7
|
-
export interface Props extends Omit<RenderProps<HTMLCanvasElement>, 'size' | 'events'>, React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
-
children: React.ReactNode;
|
|
9
|
-
fallback?: React.ReactNode;
|
|
10
|
-
resize?: ResizeOptions;
|
|
11
|
-
events?: (store: UseBoundStore<RootState>) => EventManager<any>;
|
|
12
|
-
}
|
|
13
|
-
export declare const Canvas: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLCanvasElement>>;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { Options as ResizeOptions } from 'react-use-measure';
|
|
3
|
+
import { UseBoundStore } from 'zustand';
|
|
4
|
+
import { RenderProps } from '../core';
|
|
5
|
+
import { RootState } from '../core/store';
|
|
6
|
+
import { EventManager } from '../core/events';
|
|
7
|
+
export interface Props extends Omit<RenderProps<HTMLCanvasElement>, 'size' | 'events'>, React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
fallback?: React.ReactNode;
|
|
10
|
+
resize?: ResizeOptions;
|
|
11
|
+
events?: (store: UseBoundStore<RootState>) => EventManager<any>;
|
|
12
|
+
}
|
|
13
|
+
export declare const Canvas: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLCanvasElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UseBoundStore } from 'zustand';
|
|
2
|
-
import { RootState } from '../core/store';
|
|
3
|
-
import { EventManager } from '../core/events';
|
|
4
|
-
export declare function createPointerEvents(store: UseBoundStore<RootState>): EventManager<HTMLElement>;
|
|
1
|
+
import { UseBoundStore } from 'zustand';
|
|
2
|
+
import { RootState } from '../core/store';
|
|
3
|
+
import { EventManager } from '../core/events';
|
|
4
|
+
export declare function createPointerEvents(store: UseBoundStore<RootState>): EventManager<HTMLElement>;
|
|
@@ -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
|
});
|
|
@@ -1192,6 +1204,7 @@ const createStore = (invalidate, advance) => {
|
|
|
1192
1204
|
xr: null,
|
|
1193
1205
|
invalidate: () => invalidate(get()),
|
|
1194
1206
|
advance: (timestamp, runGlobalEffects) => advance(timestamp, runGlobalEffects, get()),
|
|
1207
|
+
legacy: false,
|
|
1195
1208
|
linear: false,
|
|
1196
1209
|
flat: false,
|
|
1197
1210
|
scene: prepare(new THREE__namespace.Scene()),
|
|
@@ -1232,7 +1245,7 @@ const createStore = (invalidate, advance) => {
|
|
|
1232
1245
|
},
|
|
1233
1246
|
setEvents: events => set(state => ({ ...state,
|
|
1234
1247
|
events: { ...state.events,
|
|
1235
|
-
events
|
|
1248
|
+
...events
|
|
1236
1249
|
}
|
|
1237
1250
|
})),
|
|
1238
1251
|
setSize: (width, height) => {
|
|
@@ -1683,13 +1696,23 @@ function createRoot(canvas) {
|
|
|
1683
1696
|
|
|
1684
1697
|
|
|
1685
1698
|
if (THREE__namespace.ColorManagement) {
|
|
1686
|
-
THREE__namespace.ColorManagement.legacyMode =
|
|
1699
|
+
THREE__namespace.ColorManagement.legacyMode = legacy;
|
|
1687
1700
|
}
|
|
1688
1701
|
|
|
1689
1702
|
const outputEncoding = linear ? THREE__namespace.LinearEncoding : THREE__namespace.sRGBEncoding;
|
|
1690
1703
|
const toneMapping = flat ? THREE__namespace.NoToneMapping : THREE__namespace.ACESFilmicToneMapping;
|
|
1691
1704
|
if (gl.outputEncoding !== outputEncoding) gl.outputEncoding = outputEncoding;
|
|
1692
|
-
if (gl.toneMapping !== toneMapping) gl.toneMapping = toneMapping; //
|
|
1705
|
+
if (gl.toneMapping !== toneMapping) gl.toneMapping = toneMapping; // Update color management state
|
|
1706
|
+
|
|
1707
|
+
if (state.legacy !== legacy) state.set(() => ({
|
|
1708
|
+
legacy
|
|
1709
|
+
}));
|
|
1710
|
+
if (state.linear !== linear) state.set(() => ({
|
|
1711
|
+
linear
|
|
1712
|
+
}));
|
|
1713
|
+
if (state.flat !== flat) state.set(() => ({
|
|
1714
|
+
flat
|
|
1715
|
+
})); // Set gl props
|
|
1693
1716
|
|
|
1694
1717
|
if (glConfig && !is.fun(glConfig) && !isRenderer(glConfig) && !is.equ(glConfig, gl, shallowLoose)) applyProps(gl, glConfig); // Store events internally
|
|
1695
1718
|
|
|
@@ -1844,6 +1867,7 @@ function Portal({
|
|
|
1844
1867
|
previousRoot,
|
|
1845
1868
|
raycaster,
|
|
1846
1869
|
events: { ...state.events,
|
|
1870
|
+
...(injectState == null ? void 0 : injectState.events),
|
|
1847
1871
|
...events
|
|
1848
1872
|
},
|
|
1849
1873
|
...rest
|
|
@@ -1852,7 +1876,12 @@ function Portal({
|
|
|
1852
1876
|
const [useInjectStore] = React__namespace.useState(() => {
|
|
1853
1877
|
const store = create__default['default']((set, get) => ({ ...inject(previousRoot.getState()),
|
|
1854
1878
|
set,
|
|
1855
|
-
get
|
|
1879
|
+
get,
|
|
1880
|
+
setEvents: events => set(state => ({ ...state,
|
|
1881
|
+
events: { ...state.events,
|
|
1882
|
+
...events
|
|
1883
|
+
}
|
|
1884
|
+
}))
|
|
1856
1885
|
}));
|
|
1857
1886
|
previousRoot.subscribe(state => useInjectStore.setState(injectState => inject(state, injectState)));
|
|
1858
1887
|
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
|
});
|
|
@@ -1192,6 +1204,7 @@ const createStore = (invalidate, advance) => {
|
|
|
1192
1204
|
xr: null,
|
|
1193
1205
|
invalidate: () => invalidate(get()),
|
|
1194
1206
|
advance: (timestamp, runGlobalEffects) => advance(timestamp, runGlobalEffects, get()),
|
|
1207
|
+
legacy: false,
|
|
1195
1208
|
linear: false,
|
|
1196
1209
|
flat: false,
|
|
1197
1210
|
scene: prepare(new THREE__namespace.Scene()),
|
|
@@ -1232,7 +1245,7 @@ const createStore = (invalidate, advance) => {
|
|
|
1232
1245
|
},
|
|
1233
1246
|
setEvents: events => set(state => ({ ...state,
|
|
1234
1247
|
events: { ...state.events,
|
|
1235
|
-
events
|
|
1248
|
+
...events
|
|
1236
1249
|
}
|
|
1237
1250
|
})),
|
|
1238
1251
|
setSize: (width, height) => {
|
|
@@ -1683,13 +1696,23 @@ function createRoot(canvas) {
|
|
|
1683
1696
|
|
|
1684
1697
|
|
|
1685
1698
|
if (THREE__namespace.ColorManagement) {
|
|
1686
|
-
THREE__namespace.ColorManagement.legacyMode =
|
|
1699
|
+
THREE__namespace.ColorManagement.legacyMode = legacy;
|
|
1687
1700
|
}
|
|
1688
1701
|
|
|
1689
1702
|
const outputEncoding = linear ? THREE__namespace.LinearEncoding : THREE__namespace.sRGBEncoding;
|
|
1690
1703
|
const toneMapping = flat ? THREE__namespace.NoToneMapping : THREE__namespace.ACESFilmicToneMapping;
|
|
1691
1704
|
if (gl.outputEncoding !== outputEncoding) gl.outputEncoding = outputEncoding;
|
|
1692
|
-
if (gl.toneMapping !== toneMapping) gl.toneMapping = toneMapping; //
|
|
1705
|
+
if (gl.toneMapping !== toneMapping) gl.toneMapping = toneMapping; // Update color management state
|
|
1706
|
+
|
|
1707
|
+
if (state.legacy !== legacy) state.set(() => ({
|
|
1708
|
+
legacy
|
|
1709
|
+
}));
|
|
1710
|
+
if (state.linear !== linear) state.set(() => ({
|
|
1711
|
+
linear
|
|
1712
|
+
}));
|
|
1713
|
+
if (state.flat !== flat) state.set(() => ({
|
|
1714
|
+
flat
|
|
1715
|
+
})); // Set gl props
|
|
1693
1716
|
|
|
1694
1717
|
if (glConfig && !is.fun(glConfig) && !isRenderer(glConfig) && !is.equ(glConfig, gl, shallowLoose)) applyProps(gl, glConfig); // Store events internally
|
|
1695
1718
|
|
|
@@ -1844,6 +1867,7 @@ function Portal({
|
|
|
1844
1867
|
previousRoot,
|
|
1845
1868
|
raycaster,
|
|
1846
1869
|
events: { ...state.events,
|
|
1870
|
+
...(injectState == null ? void 0 : injectState.events),
|
|
1847
1871
|
...events
|
|
1848
1872
|
},
|
|
1849
1873
|
...rest
|
|
@@ -1852,7 +1876,12 @@ function Portal({
|
|
|
1852
1876
|
const [useInjectStore] = React__namespace.useState(() => {
|
|
1853
1877
|
const store = create__default['default']((set, get) => ({ ...inject(previousRoot.getState()),
|
|
1854
1878
|
set,
|
|
1855
|
-
get
|
|
1879
|
+
get,
|
|
1880
|
+
setEvents: events => set(state => ({ ...state,
|
|
1881
|
+
events: { ...state.events,
|
|
1882
|
+
...events
|
|
1883
|
+
}
|
|
1884
|
+
}))
|
|
1856
1885
|
}));
|
|
1857
1886
|
previousRoot.subscribe(state => useInjectStore.setState(injectState => inject(state, injectState)));
|
|
1858
1887
|
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
|
});
|
|
@@ -1163,6 +1175,7 @@ const createStore = (invalidate, advance) => {
|
|
|
1163
1175
|
xr: null,
|
|
1164
1176
|
invalidate: () => invalidate(get()),
|
|
1165
1177
|
advance: (timestamp, runGlobalEffects) => advance(timestamp, runGlobalEffects, get()),
|
|
1178
|
+
legacy: false,
|
|
1166
1179
|
linear: false,
|
|
1167
1180
|
flat: false,
|
|
1168
1181
|
scene: prepare(new THREE.Scene()),
|
|
@@ -1203,7 +1216,7 @@ const createStore = (invalidate, advance) => {
|
|
|
1203
1216
|
},
|
|
1204
1217
|
setEvents: events => set(state => ({ ...state,
|
|
1205
1218
|
events: { ...state.events,
|
|
1206
|
-
events
|
|
1219
|
+
...events
|
|
1207
1220
|
}
|
|
1208
1221
|
})),
|
|
1209
1222
|
setSize: (width, height) => {
|
|
@@ -1654,13 +1667,23 @@ function createRoot(canvas) {
|
|
|
1654
1667
|
|
|
1655
1668
|
|
|
1656
1669
|
if (THREE.ColorManagement) {
|
|
1657
|
-
THREE.ColorManagement.legacyMode =
|
|
1670
|
+
THREE.ColorManagement.legacyMode = legacy;
|
|
1658
1671
|
}
|
|
1659
1672
|
|
|
1660
1673
|
const outputEncoding = linear ? THREE.LinearEncoding : THREE.sRGBEncoding;
|
|
1661
1674
|
const toneMapping = flat ? THREE.NoToneMapping : THREE.ACESFilmicToneMapping;
|
|
1662
1675
|
if (gl.outputEncoding !== outputEncoding) gl.outputEncoding = outputEncoding;
|
|
1663
|
-
if (gl.toneMapping !== toneMapping) gl.toneMapping = toneMapping; //
|
|
1676
|
+
if (gl.toneMapping !== toneMapping) gl.toneMapping = toneMapping; // Update color management state
|
|
1677
|
+
|
|
1678
|
+
if (state.legacy !== legacy) state.set(() => ({
|
|
1679
|
+
legacy
|
|
1680
|
+
}));
|
|
1681
|
+
if (state.linear !== linear) state.set(() => ({
|
|
1682
|
+
linear
|
|
1683
|
+
}));
|
|
1684
|
+
if (state.flat !== flat) state.set(() => ({
|
|
1685
|
+
flat
|
|
1686
|
+
})); // Set gl props
|
|
1664
1687
|
|
|
1665
1688
|
if (glConfig && !is.fun(glConfig) && !isRenderer(glConfig) && !is.equ(glConfig, gl, shallowLoose)) applyProps(gl, glConfig); // Store events internally
|
|
1666
1689
|
|
|
@@ -1815,6 +1838,7 @@ function Portal({
|
|
|
1815
1838
|
previousRoot,
|
|
1816
1839
|
raycaster,
|
|
1817
1840
|
events: { ...state.events,
|
|
1841
|
+
...(injectState == null ? void 0 : injectState.events),
|
|
1818
1842
|
...events
|
|
1819
1843
|
},
|
|
1820
1844
|
...rest
|
|
@@ -1823,7 +1847,12 @@ function Portal({
|
|
|
1823
1847
|
const [useInjectStore] = React.useState(() => {
|
|
1824
1848
|
const store = create((set, get) => ({ ...inject(previousRoot.getState()),
|
|
1825
1849
|
set,
|
|
1826
|
-
get
|
|
1850
|
+
get,
|
|
1851
|
+
setEvents: events => set(state => ({ ...state,
|
|
1852
|
+
events: { ...state.events,
|
|
1853
|
+
...events
|
|
1854
|
+
}
|
|
1855
|
+
}))
|
|
1827
1856
|
}));
|
|
1828
1857
|
previousRoot.subscribe(state => useInjectStore.setState(injectState => inject(state, injectState)));
|
|
1829
1858
|
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-6cf8dd4b.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-227921b7.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-de9e845e.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-de9e845e.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-6cf8dd4b.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-227921b7.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-de9e845e.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-de9e845e.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.4",
|
|
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": {
|