@react-three/fiber 8.0.0-beta.0 → 8.0.0-beta.3
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/dist/declarations/src/core/hooks.d.ts +1 -1
- package/dist/declarations/src/core/index.d.ts +8 -6
- package/dist/declarations/src/core/loop.d.ts +1 -1
- package/dist/declarations/src/core/store.d.ts +11 -15
- package/dist/declarations/src/core/utils.d.ts +7 -1
- package/dist/declarations/src/three-types.d.ts +19 -0
- package/dist/{index-95c17855.cjs.dev.js → index-05ebefd3.cjs.dev.js} +251 -207
- package/dist/{index-ff8b5912.cjs.prod.js → index-85b2df17.cjs.prod.js} +251 -207
- package/dist/{index-3f4e5f46.esm.js → index-e78dd2f0.esm.js} +251 -207
- package/dist/react-three-fiber.cjs.dev.js +9 -6
- package/dist/react-three-fiber.cjs.prod.js +9 -6
- package/dist/react-three-fiber.esm.js +10 -7
- package/native/dist/react-three-fiber-native.cjs.dev.js +11 -6
- package/native/dist/react-three-fiber-native.cjs.prod.js +11 -6
- package/native/dist/react-three-fiber-native.esm.js +12 -7
- package/package.json +8 -8
|
@@ -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-05ebefd3.cjs.dev.js');
|
|
6
6
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var THREE = require('three');
|
|
@@ -107,7 +107,7 @@ function createPointerEvents(store) {
|
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'orthographic', 'frameloop', 'dpr', 'performance', '
|
|
110
|
+
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'orthographic', 'frameloop', 'dpr', 'performance', 'raycaster', 'camera', 'onPointerMissed', 'onCreated'];
|
|
111
111
|
|
|
112
112
|
function Block({
|
|
113
113
|
set
|
|
@@ -146,7 +146,7 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(function Canvas({
|
|
|
146
146
|
fallback,
|
|
147
147
|
resize,
|
|
148
148
|
style,
|
|
149
|
-
events,
|
|
149
|
+
events = createPointerEvents,
|
|
150
150
|
...props
|
|
151
151
|
}, forwardedRef) {
|
|
152
152
|
// Create a known catalogue of Threejs-native elements
|
|
@@ -174,15 +174,18 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(function Canvas({
|
|
|
174
174
|
if (block) throw block; // Throw exception outwards if anything within canvas throws
|
|
175
175
|
|
|
176
176
|
if (error) throw error;
|
|
177
|
+
const root = React__namespace.useRef(null);
|
|
177
178
|
|
|
178
179
|
if (width > 0 && height > 0 && canvas) {
|
|
179
|
-
index.createRoot(canvas
|
|
180
|
+
if (!root.current) root.current = index.createRoot(canvas);
|
|
181
|
+
root.current.configure({ ...canvasProps,
|
|
180
182
|
size: {
|
|
181
183
|
width,
|
|
182
184
|
height
|
|
183
185
|
},
|
|
184
|
-
events
|
|
185
|
-
})
|
|
186
|
+
events
|
|
187
|
+
});
|
|
188
|
+
root.current.render( /*#__PURE__*/React__namespace.createElement(ErrorBoundary, {
|
|
186
189
|
set: setError
|
|
187
190
|
}, /*#__PURE__*/React__namespace.createElement(React__namespace.Suspense, {
|
|
188
191
|
fallback: /*#__PURE__*/React__namespace.createElement(Block, {
|
|
@@ -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-85b2df17.cjs.prod.js');
|
|
6
6
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var THREE = require('three');
|
|
@@ -107,7 +107,7 @@ function createPointerEvents(store) {
|
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'orthographic', 'frameloop', 'dpr', 'performance', '
|
|
110
|
+
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'orthographic', 'frameloop', 'dpr', 'performance', 'raycaster', 'camera', 'onPointerMissed', 'onCreated'];
|
|
111
111
|
|
|
112
112
|
function Block({
|
|
113
113
|
set
|
|
@@ -146,7 +146,7 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(function Canvas({
|
|
|
146
146
|
fallback,
|
|
147
147
|
resize,
|
|
148
148
|
style,
|
|
149
|
-
events,
|
|
149
|
+
events = createPointerEvents,
|
|
150
150
|
...props
|
|
151
151
|
}, forwardedRef) {
|
|
152
152
|
// Create a known catalogue of Threejs-native elements
|
|
@@ -174,15 +174,18 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(function Canvas({
|
|
|
174
174
|
if (block) throw block; // Throw exception outwards if anything within canvas throws
|
|
175
175
|
|
|
176
176
|
if (error) throw error;
|
|
177
|
+
const root = React__namespace.useRef(null);
|
|
177
178
|
|
|
178
179
|
if (width > 0 && height > 0 && canvas) {
|
|
179
|
-
index.createRoot(canvas
|
|
180
|
+
if (!root.current) root.current = index.createRoot(canvas);
|
|
181
|
+
root.current.configure({ ...canvasProps,
|
|
180
182
|
size: {
|
|
181
183
|
width,
|
|
182
184
|
height
|
|
183
185
|
},
|
|
184
|
-
events
|
|
185
|
-
})
|
|
186
|
+
events
|
|
187
|
+
});
|
|
188
|
+
root.current.render( /*#__PURE__*/React__namespace.createElement(ErrorBoundary, {
|
|
186
189
|
set: setError
|
|
187
190
|
}, /*#__PURE__*/React__namespace.createElement(React__namespace.Suspense, {
|
|
188
191
|
fallback: /*#__PURE__*/React__namespace.createElement(Block, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as createEvents, e as extend, p as pick, o as omit, a as createRoot, u as unmountComponentAtNode } from './index-
|
|
2
|
-
export { t as ReactThreeFiber, q as _roots, n as act, l as addAfterEffect, k as addEffect, m as addTail, j as advance, g as applyProps, b as context, d as createPortal, a as createRoot, h as dispose, e as extend, i as invalidate, f as reconciler, r as render, u as unmountComponentAtNode, w as useFrame, x as useGraph, y as useLoader, s as useStore, v as useThree } from './index-
|
|
1
|
+
import { c as createEvents, e as extend, p as pick, o as omit, a as createRoot, u as unmountComponentAtNode } from './index-e78dd2f0.esm.js';
|
|
2
|
+
export { t as ReactThreeFiber, q as _roots, n as act, l as addAfterEffect, k as addEffect, m as addTail, j as advance, g as applyProps, b as context, d as createPortal, a as createRoot, h as dispose, e as extend, i as invalidate, f as reconciler, r as render, u as unmountComponentAtNode, w as useFrame, x as useGraph, y as useLoader, s as useStore, v as useThree } from './index-e78dd2f0.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';
|
|
@@ -77,7 +77,7 @@ function createPointerEvents(store) {
|
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'orthographic', 'frameloop', 'dpr', 'performance', '
|
|
80
|
+
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'orthographic', 'frameloop', 'dpr', 'performance', 'raycaster', 'camera', 'onPointerMissed', 'onCreated'];
|
|
81
81
|
|
|
82
82
|
function Block({
|
|
83
83
|
set
|
|
@@ -116,7 +116,7 @@ const Canvas = /*#__PURE__*/React.forwardRef(function Canvas({
|
|
|
116
116
|
fallback,
|
|
117
117
|
resize,
|
|
118
118
|
style,
|
|
119
|
-
events,
|
|
119
|
+
events = createPointerEvents,
|
|
120
120
|
...props
|
|
121
121
|
}, forwardedRef) {
|
|
122
122
|
// Create a known catalogue of Threejs-native elements
|
|
@@ -144,15 +144,18 @@ const Canvas = /*#__PURE__*/React.forwardRef(function Canvas({
|
|
|
144
144
|
if (block) throw block; // Throw exception outwards if anything within canvas throws
|
|
145
145
|
|
|
146
146
|
if (error) throw error;
|
|
147
|
+
const root = React.useRef(null);
|
|
147
148
|
|
|
148
149
|
if (width > 0 && height > 0 && canvas) {
|
|
149
|
-
createRoot(canvas
|
|
150
|
+
if (!root.current) root.current = createRoot(canvas);
|
|
151
|
+
root.current.configure({ ...canvasProps,
|
|
150
152
|
size: {
|
|
151
153
|
width,
|
|
152
154
|
height
|
|
153
155
|
},
|
|
154
|
-
events
|
|
155
|
-
})
|
|
156
|
+
events
|
|
157
|
+
});
|
|
158
|
+
root.current.render( /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
156
159
|
set: setError
|
|
157
160
|
}, /*#__PURE__*/React.createElement(React.Suspense, {
|
|
158
161
|
fallback: /*#__PURE__*/React.createElement(Block, {
|
|
@@ -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-05ebefd3.cjs.dev.js');
|
|
8
8
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
9
9
|
var React = require('react');
|
|
10
10
|
var reactNative = require('react-native');
|
|
@@ -113,7 +113,7 @@ function createTouchEvents(store) {
|
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'orthographic', 'frameloop', 'performance', '
|
|
116
|
+
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'orthographic', 'frameloop', 'performance', 'raycaster', 'camera', 'onPointerMissed', 'onCreated'];
|
|
117
117
|
|
|
118
118
|
function Block({
|
|
119
119
|
set
|
|
@@ -175,6 +175,7 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
175
175
|
if (block) throw block; // Throw exception outwards if anything within canvas throws
|
|
176
176
|
|
|
177
177
|
if (error) throw error;
|
|
178
|
+
const root = React__namespace.useRef(null);
|
|
178
179
|
const onLayout = React__namespace.useCallback(e => {
|
|
179
180
|
const {
|
|
180
181
|
width,
|
|
@@ -199,7 +200,8 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
199
200
|
}, []);
|
|
200
201
|
|
|
201
202
|
if (width > 0 && height > 0 && canvas) {
|
|
202
|
-
// Overwrite onCreated to apply RN bindings
|
|
203
|
+
if (!root.current) root.current = index.createRoot(canvas); // Overwrite onCreated to apply RN bindings
|
|
204
|
+
|
|
203
205
|
const onCreated = state => {
|
|
204
206
|
// Bind events after creation
|
|
205
207
|
const handlers = state.events.connect == null ? void 0 : state.events.connect(canvas);
|
|
@@ -216,7 +218,7 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
216
218
|
return canvasProps == null ? void 0 : canvasProps.onCreated == null ? void 0 : canvasProps.onCreated(state);
|
|
217
219
|
};
|
|
218
220
|
|
|
219
|
-
|
|
221
|
+
root.current.configure({ ...canvasProps,
|
|
220
222
|
// expo-gl can only render at native dpr/resolution
|
|
221
223
|
// https://github.com/expo/expo-three/issues/39
|
|
222
224
|
dpr: reactNative.PixelRatio.get(),
|
|
@@ -226,7 +228,8 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
226
228
|
},
|
|
227
229
|
events: events || createTouchEvents,
|
|
228
230
|
onCreated
|
|
229
|
-
})
|
|
231
|
+
});
|
|
232
|
+
root.current.render( /*#__PURE__*/React__namespace.createElement(ErrorBoundary, {
|
|
230
233
|
set: setError
|
|
231
234
|
}, /*#__PURE__*/React__namespace.createElement(React__namespace.Suspense, {
|
|
232
235
|
fallback: /*#__PURE__*/React__namespace.createElement(Block, {
|
|
@@ -271,7 +274,9 @@ const getAsset = input => {
|
|
|
271
274
|
}; // Don't pre-process urls, let expo-asset generate an absolute URL
|
|
272
275
|
|
|
273
276
|
|
|
274
|
-
THREE__namespace.LoaderUtils.extractUrlBase
|
|
277
|
+
const extractUrlBase = THREE__namespace.LoaderUtils.extractUrlBase.bind(THREE__namespace.LoaderUtils);
|
|
278
|
+
|
|
279
|
+
THREE__namespace.LoaderUtils.extractUrlBase = url => typeof url === 'string' ? extractUrlBase(url) : './'; // There's no Image in native, so create a data texture instead
|
|
275
280
|
|
|
276
281
|
|
|
277
282
|
THREE__namespace.TextureLoader.prototype.load = function load(url, onLoad, onProgress, onError) {
|
|
@@ -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-85b2df17.cjs.prod.js');
|
|
8
8
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
9
9
|
var React = require('react');
|
|
10
10
|
var reactNative = require('react-native');
|
|
@@ -113,7 +113,7 @@ function createTouchEvents(store) {
|
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'orthographic', 'frameloop', 'performance', '
|
|
116
|
+
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'orthographic', 'frameloop', 'performance', 'raycaster', 'camera', 'onPointerMissed', 'onCreated'];
|
|
117
117
|
|
|
118
118
|
function Block({
|
|
119
119
|
set
|
|
@@ -175,6 +175,7 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
175
175
|
if (block) throw block; // Throw exception outwards if anything within canvas throws
|
|
176
176
|
|
|
177
177
|
if (error) throw error;
|
|
178
|
+
const root = React__namespace.useRef(null);
|
|
178
179
|
const onLayout = React__namespace.useCallback(e => {
|
|
179
180
|
const {
|
|
180
181
|
width,
|
|
@@ -199,7 +200,8 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
199
200
|
}, []);
|
|
200
201
|
|
|
201
202
|
if (width > 0 && height > 0 && canvas) {
|
|
202
|
-
// Overwrite onCreated to apply RN bindings
|
|
203
|
+
if (!root.current) root.current = index.createRoot(canvas); // Overwrite onCreated to apply RN bindings
|
|
204
|
+
|
|
203
205
|
const onCreated = state => {
|
|
204
206
|
// Bind events after creation
|
|
205
207
|
const handlers = state.events.connect == null ? void 0 : state.events.connect(canvas);
|
|
@@ -216,7 +218,7 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
216
218
|
return canvasProps == null ? void 0 : canvasProps.onCreated == null ? void 0 : canvasProps.onCreated(state);
|
|
217
219
|
};
|
|
218
220
|
|
|
219
|
-
|
|
221
|
+
root.current.configure({ ...canvasProps,
|
|
220
222
|
// expo-gl can only render at native dpr/resolution
|
|
221
223
|
// https://github.com/expo/expo-three/issues/39
|
|
222
224
|
dpr: reactNative.PixelRatio.get(),
|
|
@@ -226,7 +228,8 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
226
228
|
},
|
|
227
229
|
events: events || createTouchEvents,
|
|
228
230
|
onCreated
|
|
229
|
-
})
|
|
231
|
+
});
|
|
232
|
+
root.current.render( /*#__PURE__*/React__namespace.createElement(ErrorBoundary, {
|
|
230
233
|
set: setError
|
|
231
234
|
}, /*#__PURE__*/React__namespace.createElement(React__namespace.Suspense, {
|
|
232
235
|
fallback: /*#__PURE__*/React__namespace.createElement(Block, {
|
|
@@ -271,7 +274,9 @@ const getAsset = input => {
|
|
|
271
274
|
}; // Don't pre-process urls, let expo-asset generate an absolute URL
|
|
272
275
|
|
|
273
276
|
|
|
274
|
-
THREE__namespace.LoaderUtils.extractUrlBase
|
|
277
|
+
const extractUrlBase = THREE__namespace.LoaderUtils.extractUrlBase.bind(THREE__namespace.LoaderUtils);
|
|
278
|
+
|
|
279
|
+
THREE__namespace.LoaderUtils.extractUrlBase = url => typeof url === 'string' ? extractUrlBase(url) : './'; // There's no Image in native, so create a data texture instead
|
|
275
280
|
|
|
276
281
|
|
|
277
282
|
THREE__namespace.TextureLoader.prototype.load = function load(url, onLoad, onProgress, onError) {
|
|
@@ -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, p as pick, o as omit, a as createRoot, u as unmountComponentAtNode } from '../../dist/index-
|
|
4
|
-
export { t as ReactThreeFiber, q as _roots, n as act, l as addAfterEffect, k as addEffect, m as addTail, j as advance, g as applyProps, b as context, d as createPortal, a as createRoot, h as dispose, e as extend, i as invalidate, f as reconciler, r as render, u as unmountComponentAtNode, w as useFrame, x as useGraph, y as useLoader, s as useStore, v as useThree } from '../../dist/index-
|
|
3
|
+
import { c as createEvents, e as extend, p as pick, o as omit, a as createRoot, u as unmountComponentAtNode } from '../../dist/index-e78dd2f0.esm.js';
|
|
4
|
+
export { t as ReactThreeFiber, q as _roots, n as act, l as addAfterEffect, k as addEffect, m as addTail, j as advance, g as applyProps, b as context, d as createPortal, a as createRoot, h as dispose, e as extend, i as invalidate, f as reconciler, r as render, u as unmountComponentAtNode, w as useFrame, x as useGraph, y as useLoader, s as useStore, v as useThree } from '../../dist/index-e78dd2f0.esm.js';
|
|
5
5
|
import _extends from '@babel/runtime/helpers/esm/extends';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { PixelRatio, View, StyleSheet } from 'react-native';
|
|
@@ -84,7 +84,7 @@ function createTouchEvents(store) {
|
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'orthographic', 'frameloop', 'performance', '
|
|
87
|
+
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'orthographic', 'frameloop', 'performance', 'raycaster', 'camera', 'onPointerMissed', 'onCreated'];
|
|
88
88
|
|
|
89
89
|
function Block({
|
|
90
90
|
set
|
|
@@ -146,6 +146,7 @@ const Canvas = /*#__PURE__*/React.forwardRef(({
|
|
|
146
146
|
if (block) throw block; // Throw exception outwards if anything within canvas throws
|
|
147
147
|
|
|
148
148
|
if (error) throw error;
|
|
149
|
+
const root = React.useRef(null);
|
|
149
150
|
const onLayout = React.useCallback(e => {
|
|
150
151
|
const {
|
|
151
152
|
width,
|
|
@@ -170,7 +171,8 @@ const Canvas = /*#__PURE__*/React.forwardRef(({
|
|
|
170
171
|
}, []);
|
|
171
172
|
|
|
172
173
|
if (width > 0 && height > 0 && canvas) {
|
|
173
|
-
// Overwrite onCreated to apply RN bindings
|
|
174
|
+
if (!root.current) root.current = createRoot(canvas); // Overwrite onCreated to apply RN bindings
|
|
175
|
+
|
|
174
176
|
const onCreated = state => {
|
|
175
177
|
// Bind events after creation
|
|
176
178
|
const handlers = state.events.connect == null ? void 0 : state.events.connect(canvas);
|
|
@@ -187,7 +189,7 @@ const Canvas = /*#__PURE__*/React.forwardRef(({
|
|
|
187
189
|
return canvasProps == null ? void 0 : canvasProps.onCreated == null ? void 0 : canvasProps.onCreated(state);
|
|
188
190
|
};
|
|
189
191
|
|
|
190
|
-
|
|
192
|
+
root.current.configure({ ...canvasProps,
|
|
191
193
|
// expo-gl can only render at native dpr/resolution
|
|
192
194
|
// https://github.com/expo/expo-three/issues/39
|
|
193
195
|
dpr: PixelRatio.get(),
|
|
@@ -197,7 +199,8 @@ const Canvas = /*#__PURE__*/React.forwardRef(({
|
|
|
197
199
|
},
|
|
198
200
|
events: events || createTouchEvents,
|
|
199
201
|
onCreated
|
|
200
|
-
})
|
|
202
|
+
});
|
|
203
|
+
root.current.render( /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
201
204
|
set: setError
|
|
202
205
|
}, /*#__PURE__*/React.createElement(React.Suspense, {
|
|
203
206
|
fallback: /*#__PURE__*/React.createElement(Block, {
|
|
@@ -242,7 +245,9 @@ const getAsset = input => {
|
|
|
242
245
|
}; // Don't pre-process urls, let expo-asset generate an absolute URL
|
|
243
246
|
|
|
244
247
|
|
|
245
|
-
THREE.LoaderUtils.extractUrlBase
|
|
248
|
+
const extractUrlBase = THREE.LoaderUtils.extractUrlBase.bind(THREE.LoaderUtils);
|
|
249
|
+
|
|
250
|
+
THREE.LoaderUtils.extractUrlBase = url => typeof url === 'string' ? extractUrlBase(url) : './'; // There's no Image in native, so create a data texture instead
|
|
246
251
|
|
|
247
252
|
|
|
248
253
|
THREE.TextureLoader.prototype.load = function load(url, onLoad, onProgress, onError) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-three/fiber",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.3",
|
|
4
4
|
"description": "A React renderer for Threejs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -42,21 +42,21 @@
|
|
|
42
42
|
"prebuild": "cp ../../readme.md readme.md"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@babel/runtime": "^7.
|
|
45
|
+
"@babel/runtime": "^7.17.2",
|
|
46
46
|
"react-merge-refs": "^1.1.0",
|
|
47
|
-
"react-reconciler": "^0.27.0-rc.
|
|
47
|
+
"react-reconciler": "^0.27.0-rc.2",
|
|
48
48
|
"react-use-measure": "^2.1.1",
|
|
49
|
-
"scheduler": "0.21.0-rc.
|
|
49
|
+
"scheduler": "^0.21.0-rc.2",
|
|
50
50
|
"suspend-react": "^0.0.8",
|
|
51
|
-
"zustand": "^3.
|
|
51
|
+
"zustand": "^3.7.1"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"react": ">=18.0",
|
|
55
|
-
"react-dom": ">=18.0",
|
|
56
|
-
"react-native": ">=0.64",
|
|
57
54
|
"expo": ">=43.0",
|
|
58
55
|
"expo-asset": ">=8.4",
|
|
59
56
|
"expo-gl": ">=11.0",
|
|
57
|
+
"react": ">=18.0",
|
|
58
|
+
"react-dom": ">=18.0",
|
|
59
|
+
"react-native": ">=0.64",
|
|
60
60
|
"three": ">=0.133"
|
|
61
61
|
},
|
|
62
62
|
"peerDependenciesMeta": {
|