@react-three/fiber 9.1.0 → 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.
- package/CHANGELOG.md +1136 -1130
- package/dist/declarations/src/core/events.d.ts +92 -92
- package/dist/declarations/src/core/hooks.d.ts +53 -53
- package/dist/declarations/src/core/index.d.ts +13 -13
- package/dist/declarations/src/core/loop.d.ts +31 -31
- package/dist/declarations/src/core/reconciler.d.ts +50 -50
- package/dist/declarations/src/core/renderer.d.ts +89 -89
- package/dist/declarations/src/core/store.d.ts +130 -130
- package/dist/declarations/src/core/utils.d.ts +190 -190
- package/dist/declarations/src/index.d.ts +6 -6
- package/dist/declarations/src/native/Canvas.d.ts +13 -13
- package/dist/declarations/src/native/events.d.ts +4 -4
- package/dist/declarations/src/native.d.ts +6 -6
- package/dist/declarations/src/three-types.d.ts +67 -67
- package/dist/declarations/src/web/Canvas.d.ts +23 -23
- package/dist/declarations/src/web/events.d.ts +4 -4
- package/dist/{events-f80b1519.esm.js → events-9ea6854d.esm.js} +84 -79
- package/dist/{events-d47554c5.cjs.dev.js → events-b2f77bcf.cjs.dev.js} +84 -79
- package/dist/{events-9e217aef.cjs.prod.js → events-fed10990.cjs.prod.js} +84 -79
- package/dist/react-three-fiber.cjs.dev.js +4 -4
- package/dist/react-three-fiber.cjs.prod.js +4 -4
- package/dist/react-three-fiber.esm.js +5 -5
- package/native/dist/react-three-fiber-native.cjs.dev.js +4 -4
- package/native/dist/react-three-fiber-native.cjs.prod.js +4 -4
- package/native/dist/react-three-fiber-native.esm.js +5 -5
- package/native/package.json +5 -5
- package/package.json +3 -2
- 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 =
|
|
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;
|
|
@@ -486,9 +491,9 @@ function makeId(event) {
|
|
|
486
491
|
return (event.eventObject || event.object).uuid + '/' + event.index + event.instanceId;
|
|
487
492
|
}
|
|
488
493
|
|
|
489
|
-
/**
|
|
490
|
-
* Release pointer captures.
|
|
491
|
-
* 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.
|
|
492
497
|
*/
|
|
493
498
|
function releaseInternalPointerCapture(capturedMap, obj, captures, pointerId) {
|
|
494
499
|
const captureData = captures.get(obj);
|
|
@@ -835,19 +840,19 @@ function createEvents(store) {
|
|
|
835
840
|
if (!(instance != null && instance.eventCount)) return;
|
|
836
841
|
const handlers = instance.handlers;
|
|
837
842
|
|
|
838
|
-
/*
|
|
839
|
-
MAYBE TODO, DELETE IF NOT:
|
|
840
|
-
Check if the object is captured, captured events should not have intersects running in parallel
|
|
841
|
-
But wouldn't it be better to just replace capturedMap with a single entry?
|
|
842
|
-
Also, are we OK with straight up making picking up multiple objects impossible?
|
|
843
|
-
|
|
844
|
-
const pointerId = (data as ThreeEvent<PointerEvent>).pointerId
|
|
845
|
-
if (pointerId !== undefined) {
|
|
846
|
-
const capturedMeshSet = internal.capturedMap.get(pointerId)
|
|
847
|
-
if (capturedMeshSet) {
|
|
848
|
-
const captured = capturedMeshSet.get(eventObject)
|
|
849
|
-
if (captured && captured.localState.stopped) return
|
|
850
|
-
}
|
|
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
|
+
}
|
|
851
856
|
}*/
|
|
852
857
|
|
|
853
858
|
if (isPointerMove) {
|
|
@@ -1138,11 +1143,11 @@ const createStore = (invalidate, advance) => {
|
|
|
1138
1143
|
return rootStore;
|
|
1139
1144
|
};
|
|
1140
1145
|
|
|
1141
|
-
/**
|
|
1142
|
-
* Exposes an object's {@link Instance}.
|
|
1143
|
-
* @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#useInstanceHandle
|
|
1144
|
-
*
|
|
1145
|
-
* **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.
|
|
1146
1151
|
*/
|
|
1147
1152
|
function useInstanceHandle(ref) {
|
|
1148
1153
|
const instance = React__namespace.useRef(null);
|
|
@@ -1150,9 +1155,9 @@ function useInstanceHandle(ref) {
|
|
|
1150
1155
|
return instance;
|
|
1151
1156
|
}
|
|
1152
1157
|
|
|
1153
|
-
/**
|
|
1154
|
-
* Returns the R3F Canvas' Zustand store. Useful for [transient updates](https://github.com/pmndrs/zustand#transient-updates-for-often-occurring-state-changes).
|
|
1155
|
-
* @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
|
|
1156
1161
|
*/
|
|
1157
1162
|
function useStore() {
|
|
1158
1163
|
const store = React__namespace.useContext(context);
|
|
@@ -1160,18 +1165,18 @@ function useStore() {
|
|
|
1160
1165
|
return store;
|
|
1161
1166
|
}
|
|
1162
1167
|
|
|
1163
|
-
/**
|
|
1164
|
-
* Accesses R3F's internal state, containing renderer, canvas, scene, etc.
|
|
1165
|
-
* @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
|
|
1166
1171
|
*/
|
|
1167
1172
|
function useThree(selector = state => state, equalityFn) {
|
|
1168
1173
|
return useStore()(selector, equalityFn);
|
|
1169
1174
|
}
|
|
1170
1175
|
|
|
1171
|
-
/**
|
|
1172
|
-
* Executes a callback before render in a shared frame loop.
|
|
1173
|
-
* Can order effects with render priority or manually render with a positive priority.
|
|
1174
|
-
* @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
|
|
1175
1180
|
*/
|
|
1176
1181
|
function useFrame(callback, renderPriority = 0) {
|
|
1177
1182
|
const store = useStore();
|
|
@@ -1183,9 +1188,9 @@ function useFrame(callback, renderPriority = 0) {
|
|
|
1183
1188
|
return null;
|
|
1184
1189
|
}
|
|
1185
1190
|
|
|
1186
|
-
/**
|
|
1187
|
-
* Returns a node graph of an object with named nodes & materials.
|
|
1188
|
-
* @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
|
|
1189
1194
|
*/
|
|
1190
1195
|
function useGraph(object) {
|
|
1191
1196
|
return React__namespace.useMemo(() => buildGraph(object), [object]);
|
|
@@ -1221,11 +1226,11 @@ function loadingFn(extensions, onProgress) {
|
|
|
1221
1226
|
};
|
|
1222
1227
|
}
|
|
1223
1228
|
|
|
1224
|
-
/**
|
|
1225
|
-
* Synchronously loads and caches assets with a three loader.
|
|
1226
|
-
*
|
|
1227
|
-
* Note: this hook's caller must be wrapped with `React.Suspense`
|
|
1228
|
-
* @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
|
|
1229
1234
|
*/
|
|
1230
1235
|
function useLoader(loader, input, extensions, onProgress) {
|
|
1231
1236
|
// Use suspense to load async assets
|
|
@@ -1237,16 +1242,16 @@ function useLoader(loader, input, extensions, onProgress) {
|
|
|
1237
1242
|
return Array.isArray(input) ? results : results[0];
|
|
1238
1243
|
}
|
|
1239
1244
|
|
|
1240
|
-
/**
|
|
1241
|
-
* Preloads an asset into cache as a side-effect.
|
|
1245
|
+
/**
|
|
1246
|
+
* Preloads an asset into cache as a side-effect.
|
|
1242
1247
|
*/
|
|
1243
1248
|
useLoader.preload = function (loader, input, extensions) {
|
|
1244
1249
|
const keys = Array.isArray(input) ? input : [input];
|
|
1245
1250
|
return suspendReact.preload(loadingFn(extensions), [loader, ...keys]);
|
|
1246
1251
|
};
|
|
1247
1252
|
|
|
1248
|
-
/**
|
|
1249
|
-
* Removes a loaded asset from cache.
|
|
1253
|
+
/**
|
|
1254
|
+
* Removes a loaded asset from cache.
|
|
1250
1255
|
*/
|
|
1251
1256
|
useLoader.clear = function (loader, input) {
|
|
1252
1257
|
const keys = Array.isArray(input) ? input : [input];
|
|
@@ -2080,10 +2085,10 @@ function Portal({
|
|
|
2080
2085
|
children,
|
|
2081
2086
|
container
|
|
2082
2087
|
}) {
|
|
2083
|
-
/** This has to be a component because it would not be able to call useThree/useStore otherwise since
|
|
2084
|
-
* if this is our environment, then we are not in r3f's renderer but in react-dom, it would trigger
|
|
2085
|
-
* the "R3F hooks can only be used within the Canvas component!" warning:
|
|
2086
|
-
* <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>
|
|
2087
2092
|
* {createPortal(...)} */
|
|
2088
2093
|
const {
|
|
2089
2094
|
events,
|
|
@@ -2175,21 +2180,21 @@ const globalEffects = new Set();
|
|
|
2175
2180
|
const globalAfterEffects = new Set();
|
|
2176
2181
|
const globalTailEffects = new Set();
|
|
2177
2182
|
|
|
2178
|
-
/**
|
|
2179
|
-
* Adds a global render callback which is called each frame.
|
|
2180
|
-
* @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
|
|
2181
2186
|
*/
|
|
2182
2187
|
const addEffect = callback => createSubs(callback, globalEffects);
|
|
2183
2188
|
|
|
2184
|
-
/**
|
|
2185
|
-
* Adds a global after-render callback which is called each frame.
|
|
2186
|
-
* @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
|
|
2187
2192
|
*/
|
|
2188
2193
|
const addAfterEffect = callback => createSubs(callback, globalAfterEffects);
|
|
2189
2194
|
|
|
2190
|
-
/**
|
|
2191
|
-
* Adds a global callback which is called when rendering stops.
|
|
2192
|
-
* @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
|
|
2193
2198
|
*/
|
|
2194
2199
|
const addTail = callback => createSubs(callback, globalTailEffects);
|
|
2195
2200
|
function run(effects, timestamp) {
|
|
@@ -2277,9 +2282,9 @@ function loop(timestamp) {
|
|
|
2277
2282
|
}
|
|
2278
2283
|
}
|
|
2279
2284
|
|
|
2280
|
-
/**
|
|
2281
|
-
* Invalidates the view, requesting a frame to be rendered. Will globally invalidate unless passed a root's state.
|
|
2282
|
-
* @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
|
|
2283
2288
|
*/
|
|
2284
2289
|
function invalidate(state, frames = 1) {
|
|
2285
2290
|
var _state$gl$xr2;
|
|
@@ -2306,9 +2311,9 @@ function invalidate(state, frames = 1) {
|
|
|
2306
2311
|
}
|
|
2307
2312
|
}
|
|
2308
2313
|
|
|
2309
|
-
/**
|
|
2310
|
-
* Advances the frameloop and runs render effects, useful for when manually rendering via `frameloop="never"`.
|
|
2311
|
-
* @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
|
|
2312
2317
|
*/
|
|
2313
2318
|
function advance(timestamp, runGlobalEffects = true, state, frame) {
|
|
2314
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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, {
|
package/native/package.json
CHANGED
|
@@ -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.1.
|
|
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"
|