@react-three/fiber 9.5.0 → 9.6.0
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 +1198 -1192
- 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 +262 -262
- 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 +68 -68
- package/dist/declarations/src/web/Canvas.d.ts +23 -23
- package/dist/declarations/src/web/events.d.ts +4 -4
- package/dist/{events-238e0986.cjs.prod.js → events-11ca7a92.cjs.prod.js} +100 -87
- package/dist/{events-358c3764.cjs.dev.js → events-508aad4b.cjs.dev.js} +100 -87
- package/dist/{events-5a94e5eb.esm.js → events-760a1017.esm.js} +100 -87
- 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 +1 -1
- package/readme.md +253 -253
|
@@ -11,17 +11,17 @@ var threeTypes = /*#__PURE__*/Object.freeze({
|
|
|
11
11
|
__proto__: null
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
/**
|
|
15
|
-
* Returns the instance's initial (outmost) root.
|
|
14
|
+
/**
|
|
15
|
+
* Returns the instance's initial (outmost) root.
|
|
16
16
|
*/
|
|
17
17
|
function findInitialRoot(instance) {
|
|
18
18
|
let root = instance.root;
|
|
19
19
|
while (root.getState().previousRoot) root = root.getState().previousRoot;
|
|
20
20
|
return root;
|
|
21
21
|
}
|
|
22
|
-
/**
|
|
23
|
-
* Safely flush async effects when testing, simulating a legacy root.
|
|
24
|
-
* @deprecated Import from React instead. import { act } from 'react'
|
|
22
|
+
/**
|
|
23
|
+
* Safely flush async effects when testing, simulating a legacy root.
|
|
24
|
+
* @deprecated Import from React instead. import { act } from 'react'
|
|
25
25
|
*/
|
|
26
26
|
// Reference with computed key to break Webpack static analysis
|
|
27
27
|
// https://github.com/webpack/webpack/issues/14814
|
|
@@ -30,14 +30,14 @@ const isOrthographicCamera = def => def && def.isOrthographicCamera;
|
|
|
30
30
|
const isRef = obj => obj && obj.hasOwnProperty('current');
|
|
31
31
|
const isColorRepresentation = value => value != null && (typeof value === 'string' || typeof value === 'number' || value.isColor);
|
|
32
32
|
|
|
33
|
-
/**
|
|
34
|
-
* An SSR-friendly useLayoutEffect.
|
|
35
|
-
*
|
|
36
|
-
* React currently throws a warning when using useLayoutEffect on the server.
|
|
37
|
-
* To get around it, we can conditionally useEffect on the server (no-op) and
|
|
38
|
-
* useLayoutEffect elsewhere.
|
|
39
|
-
*
|
|
40
|
-
* @see https://github.com/facebook/react/issues/14927
|
|
33
|
+
/**
|
|
34
|
+
* An SSR-friendly useLayoutEffect.
|
|
35
|
+
*
|
|
36
|
+
* React currently throws a warning when using useLayoutEffect on the server.
|
|
37
|
+
* To get around it, we can conditionally useEffect on the server (no-op) and
|
|
38
|
+
* useLayoutEffect elsewhere.
|
|
39
|
+
*
|
|
40
|
+
* @see https://github.com/facebook/react/issues/14927
|
|
41
41
|
*/
|
|
42
42
|
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.useLayoutEffect : React.useEffect;
|
|
43
43
|
function useMutableCallback(fn) {
|
|
@@ -45,8 +45,8 @@ function useMutableCallback(fn) {
|
|
|
45
45
|
useIsomorphicLayoutEffect(() => void (ref.current = fn), [fn]);
|
|
46
46
|
return ref;
|
|
47
47
|
}
|
|
48
|
-
/**
|
|
49
|
-
* Bridges renderer Context and StrictMode from a primary renderer.
|
|
48
|
+
/**
|
|
49
|
+
* Bridges renderer Context and StrictMode from a primary renderer.
|
|
50
50
|
*/
|
|
51
51
|
function useBridge() {
|
|
52
52
|
const fiber = useFiber();
|
|
@@ -98,8 +98,8 @@ function calculateDpr(dpr) {
|
|
|
98
98
|
return Array.isArray(dpr) ? Math.min(Math.max(dpr[0], target), dpr[1]) : dpr;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
/**
|
|
102
|
-
* Returns instance root state
|
|
101
|
+
/**
|
|
102
|
+
* Returns instance root state
|
|
103
103
|
*/
|
|
104
104
|
function getRootState(obj) {
|
|
105
105
|
var _r3f;
|
|
@@ -424,6 +424,19 @@ function applyProps(object, props) {
|
|
|
424
424
|
// Otherwise just set single value
|
|
425
425
|
else target.set(value);
|
|
426
426
|
}
|
|
427
|
+
// ShaderMaterial uniforms must keep a stable target reference
|
|
428
|
+
else if (root instanceof THREE.ShaderMaterial && key === 'uniforms' && is.obj(value)) {
|
|
429
|
+
if (!is.obj(root.uniforms)) root.uniforms = {};
|
|
430
|
+
const uniforms = root.uniforms;
|
|
431
|
+
const nextUniforms = value;
|
|
432
|
+
for (const name in nextUniforms) {
|
|
433
|
+
const uniform = nextUniforms[name];
|
|
434
|
+
const targetUniform = uniforms[name];
|
|
435
|
+
if (targetUniform) Object.assign(targetUniform, uniform);else uniforms[name] = {
|
|
436
|
+
...uniform
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
}
|
|
427
440
|
// Else, just overwrite the value
|
|
428
441
|
else {
|
|
429
442
|
var _root$key;
|
|
@@ -489,9 +502,9 @@ function makeId(event) {
|
|
|
489
502
|
return (event.eventObject || event.object).uuid + '/' + event.index + event.instanceId;
|
|
490
503
|
}
|
|
491
504
|
|
|
492
|
-
/**
|
|
493
|
-
* Release pointer captures.
|
|
494
|
-
* This is called by releasePointerCapture in the API, and when an object is removed.
|
|
505
|
+
/**
|
|
506
|
+
* Release pointer captures.
|
|
507
|
+
* This is called by releasePointerCapture in the API, and when an object is removed.
|
|
495
508
|
*/
|
|
496
509
|
function releaseInternalPointerCapture(capturedMap, obj, captures, pointerId) {
|
|
497
510
|
const captureData = captures.get(obj);
|
|
@@ -745,7 +758,7 @@ function createEvents(store) {
|
|
|
745
758
|
internal
|
|
746
759
|
} = store.getState();
|
|
747
760
|
for (const hoveredObj of internal.hovered.values()) {
|
|
748
|
-
// When no objects were hit or the
|
|
761
|
+
// When no objects were hit or the hovered object wasn't found underneath the cursor
|
|
749
762
|
// we call onPointerOut and delete the object from the hovered-elements map
|
|
750
763
|
if (!intersections.length || !intersections.find(hit => hit.object === hoveredObj.object && hit.index === hoveredObj.index && hit.instanceId === hoveredObj.instanceId)) {
|
|
751
764
|
const eventObject = hoveredObj.eventObject;
|
|
@@ -838,19 +851,19 @@ function createEvents(store) {
|
|
|
838
851
|
if (!(instance != null && instance.eventCount)) return;
|
|
839
852
|
const handlers = instance.handlers;
|
|
840
853
|
|
|
841
|
-
/*
|
|
842
|
-
MAYBE TODO, DELETE IF NOT:
|
|
843
|
-
Check if the object is captured, captured events should not have intersects running in parallel
|
|
844
|
-
But wouldn't it be better to just replace capturedMap with a single entry?
|
|
845
|
-
Also, are we OK with straight up making picking up multiple objects impossible?
|
|
846
|
-
|
|
847
|
-
const pointerId = (data as ThreeEvent<PointerEvent>).pointerId
|
|
848
|
-
if (pointerId !== undefined) {
|
|
849
|
-
const capturedMeshSet = internal.capturedMap.get(pointerId)
|
|
850
|
-
if (capturedMeshSet) {
|
|
851
|
-
const captured = capturedMeshSet.get(eventObject)
|
|
852
|
-
if (captured && captured.localState.stopped) return
|
|
853
|
-
}
|
|
854
|
+
/*
|
|
855
|
+
MAYBE TODO, DELETE IF NOT:
|
|
856
|
+
Check if the object is captured, captured events should not have intersects running in parallel
|
|
857
|
+
But wouldn't it be better to just replace capturedMap with a single entry?
|
|
858
|
+
Also, are we OK with straight up making picking up multiple objects impossible?
|
|
859
|
+
|
|
860
|
+
const pointerId = (data as ThreeEvent<PointerEvent>).pointerId
|
|
861
|
+
if (pointerId !== undefined) {
|
|
862
|
+
const capturedMeshSet = internal.capturedMap.get(pointerId)
|
|
863
|
+
if (capturedMeshSet) {
|
|
864
|
+
const captured = capturedMeshSet.get(eventObject)
|
|
865
|
+
if (captured && captured.localState.stopped) return
|
|
866
|
+
}
|
|
854
867
|
}*/
|
|
855
868
|
|
|
856
869
|
if (isPointerMove) {
|
|
@@ -1141,11 +1154,11 @@ const createStore = (invalidate, advance) => {
|
|
|
1141
1154
|
return rootStore;
|
|
1142
1155
|
};
|
|
1143
1156
|
|
|
1144
|
-
/**
|
|
1145
|
-
* Exposes an object's {@link Instance}.
|
|
1146
|
-
* @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#useInstanceHandle
|
|
1147
|
-
*
|
|
1148
|
-
* **Note**: this is an escape hatch to react-internal fields. Expect this to change significantly between versions.
|
|
1157
|
+
/**
|
|
1158
|
+
* Exposes an object's {@link Instance}.
|
|
1159
|
+
* @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#useInstanceHandle
|
|
1160
|
+
*
|
|
1161
|
+
* **Note**: this is an escape hatch to react-internal fields. Expect this to change significantly between versions.
|
|
1149
1162
|
*/
|
|
1150
1163
|
function useInstanceHandle(ref) {
|
|
1151
1164
|
const instance = React.useRef(null);
|
|
@@ -1153,9 +1166,9 @@ function useInstanceHandle(ref) {
|
|
|
1153
1166
|
return instance;
|
|
1154
1167
|
}
|
|
1155
1168
|
|
|
1156
|
-
/**
|
|
1157
|
-
* Returns the R3F Canvas' Zustand store. Useful for [transient updates](https://github.com/pmndrs/zustand#transient-updates-for-often-occurring-state-changes).
|
|
1158
|
-
* @see https://docs.pmnd.rs/react-three-fiber/api/hooks#usestore
|
|
1169
|
+
/**
|
|
1170
|
+
* Returns the R3F Canvas' Zustand store. Useful for [transient updates](https://github.com/pmndrs/zustand#transient-updates-for-often-occurring-state-changes).
|
|
1171
|
+
* @see https://docs.pmnd.rs/react-three-fiber/api/hooks#usestore
|
|
1159
1172
|
*/
|
|
1160
1173
|
function useStore() {
|
|
1161
1174
|
const store = React.useContext(context);
|
|
@@ -1163,18 +1176,18 @@ function useStore() {
|
|
|
1163
1176
|
return store;
|
|
1164
1177
|
}
|
|
1165
1178
|
|
|
1166
|
-
/**
|
|
1167
|
-
* Accesses R3F's internal state, containing renderer, canvas, scene, etc.
|
|
1168
|
-
* @see https://docs.pmnd.rs/react-three-fiber/api/hooks#usethree
|
|
1179
|
+
/**
|
|
1180
|
+
* Accesses R3F's internal state, containing renderer, canvas, scene, etc.
|
|
1181
|
+
* @see https://docs.pmnd.rs/react-three-fiber/api/hooks#usethree
|
|
1169
1182
|
*/
|
|
1170
1183
|
function useThree(selector = state => state, equalityFn) {
|
|
1171
1184
|
return useStore()(selector, equalityFn);
|
|
1172
1185
|
}
|
|
1173
1186
|
|
|
1174
|
-
/**
|
|
1175
|
-
* Executes a callback before render in a shared frame loop.
|
|
1176
|
-
* Can order effects with render priority or manually render with a positive priority.
|
|
1177
|
-
* @see https://docs.pmnd.rs/react-three-fiber/api/hooks#useframe
|
|
1187
|
+
/**
|
|
1188
|
+
* Executes a callback before render in a shared frame loop.
|
|
1189
|
+
* Can order effects with render priority or manually render with a positive priority.
|
|
1190
|
+
* @see https://docs.pmnd.rs/react-three-fiber/api/hooks#useframe
|
|
1178
1191
|
*/
|
|
1179
1192
|
function useFrame(callback, renderPriority = 0) {
|
|
1180
1193
|
const store = useStore();
|
|
@@ -1186,9 +1199,9 @@ function useFrame(callback, renderPriority = 0) {
|
|
|
1186
1199
|
return null;
|
|
1187
1200
|
}
|
|
1188
1201
|
|
|
1189
|
-
/**
|
|
1190
|
-
* Returns a node graph of an object with named nodes & materials.
|
|
1191
|
-
* @see https://docs.pmnd.rs/react-three-fiber/api/hooks#usegraph
|
|
1202
|
+
/**
|
|
1203
|
+
* Returns a node graph of an object with named nodes & materials.
|
|
1204
|
+
* @see https://docs.pmnd.rs/react-three-fiber/api/hooks#usegraph
|
|
1192
1205
|
*/
|
|
1193
1206
|
function useGraph(object) {
|
|
1194
1207
|
return React.useMemo(() => buildGraph(object), [object]);
|
|
@@ -1224,11 +1237,11 @@ function loadingFn(extensions, onProgress) {
|
|
|
1224
1237
|
};
|
|
1225
1238
|
}
|
|
1226
1239
|
|
|
1227
|
-
/**
|
|
1228
|
-
* Synchronously loads and caches assets with a three loader.
|
|
1229
|
-
*
|
|
1230
|
-
* Note: this hook's caller must be wrapped with `React.Suspense`
|
|
1231
|
-
* @see https://docs.pmnd.rs/react-three-fiber/api/hooks#useloader
|
|
1240
|
+
/**
|
|
1241
|
+
* Synchronously loads and caches assets with a three loader.
|
|
1242
|
+
*
|
|
1243
|
+
* Note: this hook's caller must be wrapped with `React.Suspense`
|
|
1244
|
+
* @see https://docs.pmnd.rs/react-three-fiber/api/hooks#useloader
|
|
1232
1245
|
*/
|
|
1233
1246
|
function useLoader(loader, input, extensions, onProgress) {
|
|
1234
1247
|
// Use suspense to load async assets
|
|
@@ -1240,16 +1253,16 @@ function useLoader(loader, input, extensions, onProgress) {
|
|
|
1240
1253
|
return Array.isArray(input) ? results : results[0];
|
|
1241
1254
|
}
|
|
1242
1255
|
|
|
1243
|
-
/**
|
|
1244
|
-
* Preloads an asset into cache as a side-effect.
|
|
1256
|
+
/**
|
|
1257
|
+
* Preloads an asset into cache as a side-effect.
|
|
1245
1258
|
*/
|
|
1246
1259
|
useLoader.preload = function (loader, input, extensions) {
|
|
1247
1260
|
const keys = Array.isArray(input) ? input : [input];
|
|
1248
1261
|
return preload(loadingFn(extensions), [loader, ...keys]);
|
|
1249
1262
|
};
|
|
1250
1263
|
|
|
1251
|
-
/**
|
|
1252
|
-
* Removes a loaded asset from cache.
|
|
1264
|
+
/**
|
|
1265
|
+
* Removes a loaded asset from cache.
|
|
1253
1266
|
*/
|
|
1254
1267
|
useLoader.clear = function (loader, input) {
|
|
1255
1268
|
const keys = Array.isArray(input) ? input : [input];
|
|
@@ -1271,7 +1284,7 @@ useLoader.clear = function (loader, input) {
|
|
|
1271
1284
|
|
|
1272
1285
|
var packageData = {
|
|
1273
1286
|
name: "@react-three/fiber",
|
|
1274
|
-
version: "9.
|
|
1287
|
+
version: "9.6.0",
|
|
1275
1288
|
description: "A React renderer for Threejs",
|
|
1276
1289
|
keywords: [
|
|
1277
1290
|
"react",
|
|
@@ -15851,10 +15864,10 @@ function Portal({
|
|
|
15851
15864
|
children,
|
|
15852
15865
|
container
|
|
15853
15866
|
}) {
|
|
15854
|
-
/** This has to be a component because it would not be able to call useThree/useStore otherwise since
|
|
15855
|
-
* if this is our environment, then we are not in r3f's renderer but in react-dom, it would trigger
|
|
15856
|
-
* the "R3F hooks can only be used within the Canvas component!" warning:
|
|
15857
|
-
* <Canvas>
|
|
15867
|
+
/** This has to be a component because it would not be able to call useThree/useStore otherwise since
|
|
15868
|
+
* if this is our environment, then we are not in r3f's renderer but in react-dom, it would trigger
|
|
15869
|
+
* the "R3F hooks can only be used within the Canvas component!" warning:
|
|
15870
|
+
* <Canvas>
|
|
15858
15871
|
* {createPortal(...)} */
|
|
15859
15872
|
const {
|
|
15860
15873
|
events,
|
|
@@ -15935,11 +15948,11 @@ function Portal({
|
|
|
15935
15948
|
);
|
|
15936
15949
|
}
|
|
15937
15950
|
|
|
15938
|
-
/**
|
|
15939
|
-
* Force React to flush any updates inside the provided callback synchronously and immediately.
|
|
15940
|
-
* All the same caveats documented for react-dom's `flushSync` apply here (see https://react.dev/reference/react-dom/flushSync).
|
|
15941
|
-
* Nevertheless, sometimes one needs to render synchronously, for example to keep DOM and 3D changes in lock-step without
|
|
15942
|
-
* having to revert to a non-React solution. Note: this will only flush updates within the `Canvas` root.
|
|
15951
|
+
/**
|
|
15952
|
+
* Force React to flush any updates inside the provided callback synchronously and immediately.
|
|
15953
|
+
* All the same caveats documented for react-dom's `flushSync` apply here (see https://react.dev/reference/react-dom/flushSync).
|
|
15954
|
+
* Nevertheless, sometimes one needs to render synchronously, for example to keep DOM and 3D changes in lock-step without
|
|
15955
|
+
* having to revert to a non-React solution. Note: this will only flush updates within the `Canvas` root.
|
|
15943
15956
|
*/
|
|
15944
15957
|
function flushSync(fn) {
|
|
15945
15958
|
// @ts-ignore - reconciler types are not maintained
|
|
@@ -15957,21 +15970,21 @@ const globalEffects = new Set();
|
|
|
15957
15970
|
const globalAfterEffects = new Set();
|
|
15958
15971
|
const globalTailEffects = new Set();
|
|
15959
15972
|
|
|
15960
|
-
/**
|
|
15961
|
-
* Adds a global render callback which is called each frame.
|
|
15962
|
-
* @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#addEffect
|
|
15973
|
+
/**
|
|
15974
|
+
* Adds a global render callback which is called each frame.
|
|
15975
|
+
* @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#addEffect
|
|
15963
15976
|
*/
|
|
15964
15977
|
const addEffect = callback => createSubs(callback, globalEffects);
|
|
15965
15978
|
|
|
15966
|
-
/**
|
|
15967
|
-
* Adds a global after-render callback which is called each frame.
|
|
15968
|
-
* @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#addAfterEffect
|
|
15979
|
+
/**
|
|
15980
|
+
* Adds a global after-render callback which is called each frame.
|
|
15981
|
+
* @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#addAfterEffect
|
|
15969
15982
|
*/
|
|
15970
15983
|
const addAfterEffect = callback => createSubs(callback, globalAfterEffects);
|
|
15971
15984
|
|
|
15972
|
-
/**
|
|
15973
|
-
* Adds a global callback which is called when rendering stops.
|
|
15974
|
-
* @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#addTail
|
|
15985
|
+
/**
|
|
15986
|
+
* Adds a global callback which is called when rendering stops.
|
|
15987
|
+
* @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#addTail
|
|
15975
15988
|
*/
|
|
15976
15989
|
const addTail = callback => createSubs(callback, globalTailEffects);
|
|
15977
15990
|
function run(effects, timestamp) {
|
|
@@ -16059,9 +16072,9 @@ function loop(timestamp) {
|
|
|
16059
16072
|
}
|
|
16060
16073
|
}
|
|
16061
16074
|
|
|
16062
|
-
/**
|
|
16063
|
-
* Invalidates the view, requesting a frame to be rendered. Will globally invalidate unless passed a root's state.
|
|
16064
|
-
* @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#invalidate
|
|
16075
|
+
/**
|
|
16076
|
+
* Invalidates the view, requesting a frame to be rendered. Will globally invalidate unless passed a root's state.
|
|
16077
|
+
* @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#invalidate
|
|
16065
16078
|
*/
|
|
16066
16079
|
function invalidate(state, frames = 1) {
|
|
16067
16080
|
var _state$gl$xr2;
|
|
@@ -16076,7 +16089,7 @@ function invalidate(state, frames = 1) {
|
|
|
16076
16089
|
//called from within a useFrame, it means the user wants an additional frame
|
|
16077
16090
|
state.internal.frames = 2;
|
|
16078
16091
|
} else {
|
|
16079
|
-
//the user
|
|
16092
|
+
//the user needs a new frame, no need to increment further than 1
|
|
16080
16093
|
state.internal.frames = 1;
|
|
16081
16094
|
}
|
|
16082
16095
|
}
|
|
@@ -16088,9 +16101,9 @@ function invalidate(state, frames = 1) {
|
|
|
16088
16101
|
}
|
|
16089
16102
|
}
|
|
16090
16103
|
|
|
16091
|
-
/**
|
|
16092
|
-
* Advances the frameloop and runs render effects, useful for when manually rendering via `frameloop="never"`.
|
|
16093
|
-
* @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#advance
|
|
16104
|
+
/**
|
|
16105
|
+
* Advances the frameloop and runs render effects, useful for when manually rendering via `frameloop="never"`.
|
|
16106
|
+
* @see https://docs.pmnd.rs/react-three-fiber/api/additional-exports#advance
|
|
16094
16107
|
*/
|
|
16095
16108
|
function advance(timestamp, runGlobalEffects = true, state, frame) {
|
|
16096
16109
|
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-508aad4b.cjs.dev.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var THREE = require('three');
|
|
8
8
|
var useMeasure = require('react-use-measure');
|
|
@@ -177,9 +177,9 @@ function CanvasImpl({
|
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
/**
|
|
181
|
-
* A DOM canvas which accepts threejs elements as children.
|
|
182
|
-
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
180
|
+
/**
|
|
181
|
+
* A DOM canvas which accepts threejs elements as children.
|
|
182
|
+
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
183
183
|
*/
|
|
184
184
|
function Canvas(props) {
|
|
185
185
|
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-11ca7a92.cjs.prod.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var THREE = require('three');
|
|
8
8
|
var useMeasure = require('react-use-measure');
|
|
@@ -177,9 +177,9 @@ function CanvasImpl({
|
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
/**
|
|
181
|
-
* A DOM canvas which accepts threejs elements as children.
|
|
182
|
-
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
180
|
+
/**
|
|
181
|
+
* A DOM canvas which accepts threejs elements as children.
|
|
182
|
+
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
183
183
|
*/
|
|
184
184
|
function Canvas(props) {
|
|
185
185
|
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, x as act, k as addAfterEffect, j as addEffect, l as addTail, n as advance, s as applyProps, y as buildGraph, q as context, g as createEvents, o as createPortal, c as createRoot, w as dispose, f as events, e as extend, h as flushGlobalEffects, p as flushSync, v as getRootState, m as invalidate, r as reconciler, d as unmountComponentAtNode, D as useFrame, F as useGraph, z as useInstanceHandle, G as useLoader, A as useStore, C 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-760a1017.esm.js';
|
|
2
|
+
export { t as ReactThreeFiber, _ as _roots, x as act, k as addAfterEffect, j as addEffect, l as addTail, n as advance, s as applyProps, y as buildGraph, q as context, g as createEvents, o as createPortal, c as createRoot, w as dispose, f as events, e as extend, h as flushGlobalEffects, p as flushSync, v as getRootState, m as invalidate, r as reconciler, d as unmountComponentAtNode, D as useFrame, F as useGraph, z as useInstanceHandle, G as useLoader, A as useStore, C as useThree } from './events-760a1017.esm.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as THREE from 'three';
|
|
5
5
|
import useMeasure from 'react-use-measure';
|
|
@@ -150,9 +150,9 @@ function CanvasImpl({
|
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
/**
|
|
154
|
-
* A DOM canvas which accepts threejs elements as children.
|
|
155
|
-
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
153
|
+
/**
|
|
154
|
+
* A DOM canvas which accepts threejs elements as children.
|
|
155
|
+
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
156
156
|
*/
|
|
157
157
|
function Canvas(props) {
|
|
158
158
|
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-508aad4b.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-11ca7a92.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, x as act, k as addAfterEffect, j as addEffect, l as addTail, n as advance, s as applyProps, y as buildGraph, q as context, g as createEvents, o as createPortal, c as createRoot, w as dispose, e as extend, h as flushGlobalEffects, p as flushSync, v as getRootState, m as invalidate, r as reconciler, d as unmountComponentAtNode, D as useFrame, F as useGraph, z as useInstanceHandle, G as useLoader, A as useStore, C 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-760a1017.esm.js';
|
|
2
|
+
export { t as ReactThreeFiber, _ as _roots, x as act, k as addAfterEffect, j as addEffect, l as addTail, n as advance, s as applyProps, y as buildGraph, q as context, g as createEvents, o as createPortal, c as createRoot, w as dispose, e as extend, h as flushGlobalEffects, p as flushSync, v as getRootState, m as invalidate, r as reconciler, d as unmountComponentAtNode, D as useFrame, F as useGraph, z as useInstanceHandle, G as useLoader, A as useStore, C as useThree } from '../../dist/events-760a1017.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';
|
|
@@ -245,9 +245,9 @@ function CanvasImpl({
|
|
|
245
245
|
});
|
|
246
246
|
}
|
|
247
247
|
|
|
248
|
-
/**
|
|
249
|
-
* A native canvas which accepts threejs elements as children.
|
|
250
|
-
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
248
|
+
/**
|
|
249
|
+
* A native canvas which accepts threejs elements as children.
|
|
250
|
+
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
251
251
|
*/
|
|
252
252
|
function Canvas(props) {
|
|
253
253
|
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
|
+
}
|