@react-three/fiber 9.4.0 → 9.4.2
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 +12 -0
- package/dist/{events-f8cd670d.esm.js → events-1eccaf1c.esm.js} +97 -6
- package/dist/{events-3afec6fc.cjs.prod.js → events-5c8d1731.cjs.prod.js} +97 -6
- package/dist/{events-6ab58ae5.cjs.dev.js → events-c80effae.cjs.dev.js} +97 -6
- package/dist/react-three-fiber.cjs.dev.js +1 -1
- package/dist/react-three-fiber.cjs.prod.js +1 -1
- package/dist/react-three-fiber.esm.js +2 -2
- package/native/dist/react-three-fiber-native.cjs.dev.js +18 -10
- package/native/dist/react-three-fiber-native.cjs.prod.js +18 -10
- package/native/dist/react-three-fiber-native.esm.js +12 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @react-three/fiber
|
|
2
2
|
|
|
3
|
+
## 9.4.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3d445fd158b25eb380cd27bd2e01304016aa23e3: fix: Expo SDK 54 compatibility through workaround
|
|
8
|
+
|
|
9
|
+
## 9.4.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 4f8cec0d79003a9ef6d1ca1e56de94aec4158714: fix: pass DevTools config through createReconciler to fix React DevTools
|
|
14
|
+
|
|
3
15
|
## 9.4.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -1257,13 +1257,101 @@ useLoader.clear = function (loader, input) {
|
|
|
1257
1257
|
return clear([loader, ...keys]);
|
|
1258
1258
|
};
|
|
1259
1259
|
|
|
1260
|
+
var packageData = {
|
|
1261
|
+
name: "@react-three/fiber",
|
|
1262
|
+
version: "9.4.2",
|
|
1263
|
+
description: "A React renderer for Threejs",
|
|
1264
|
+
keywords: [
|
|
1265
|
+
"react",
|
|
1266
|
+
"renderer",
|
|
1267
|
+
"fiber",
|
|
1268
|
+
"three",
|
|
1269
|
+
"threejs"
|
|
1270
|
+
],
|
|
1271
|
+
author: "Paul Henschel (https://github.com/drcmda)",
|
|
1272
|
+
license: "MIT",
|
|
1273
|
+
maintainers: [
|
|
1274
|
+
"Josh Ellis (https://github.com/joshuaellis)",
|
|
1275
|
+
"Cody Bennett (https://github.com/codyjasonbennett)",
|
|
1276
|
+
"Kris Baumgarter (https://github.com/krispya)"
|
|
1277
|
+
],
|
|
1278
|
+
bugs: {
|
|
1279
|
+
url: "https://github.com/pmndrs/react-three-fiber/issues"
|
|
1280
|
+
},
|
|
1281
|
+
homepage: "https://github.com/pmndrs/react-three-fiber#readme",
|
|
1282
|
+
repository: {
|
|
1283
|
+
type: "git",
|
|
1284
|
+
url: "git+https://github.com/pmndrs/react-three-fiber.git"
|
|
1285
|
+
},
|
|
1286
|
+
collective: {
|
|
1287
|
+
type: "opencollective",
|
|
1288
|
+
url: "https://opencollective.com/react-three-fiber"
|
|
1289
|
+
},
|
|
1290
|
+
main: "dist/react-three-fiber.cjs.js",
|
|
1291
|
+
module: "dist/react-three-fiber.esm.js",
|
|
1292
|
+
types: "dist/react-three-fiber.cjs.d.ts",
|
|
1293
|
+
"react-native": "native/dist/react-three-fiber-native.cjs.js",
|
|
1294
|
+
sideEffects: false,
|
|
1295
|
+
preconstruct: {
|
|
1296
|
+
entrypoints: [
|
|
1297
|
+
"index.tsx",
|
|
1298
|
+
"native.tsx"
|
|
1299
|
+
]
|
|
1300
|
+
},
|
|
1301
|
+
scripts: {
|
|
1302
|
+
prebuild: "cp ../../readme.md readme.md"
|
|
1303
|
+
},
|
|
1304
|
+
dependencies: {
|
|
1305
|
+
"@babel/runtime": "^7.17.8",
|
|
1306
|
+
"@types/react-reconciler": "^0.32.0",
|
|
1307
|
+
"@types/webxr": "*",
|
|
1308
|
+
"base64-js": "^1.5.1",
|
|
1309
|
+
buffer: "^6.0.3",
|
|
1310
|
+
"its-fine": "^2.0.0",
|
|
1311
|
+
"react-reconciler": "^0.31.0",
|
|
1312
|
+
"react-use-measure": "^2.1.7",
|
|
1313
|
+
scheduler: "^0.25.0",
|
|
1314
|
+
"suspend-react": "^0.1.3",
|
|
1315
|
+
"use-sync-external-store": "^1.4.0",
|
|
1316
|
+
zustand: "^5.0.3"
|
|
1317
|
+
},
|
|
1318
|
+
peerDependencies: {
|
|
1319
|
+
expo: ">=43.0",
|
|
1320
|
+
"expo-asset": ">=8.4",
|
|
1321
|
+
"expo-file-system": ">=11.0",
|
|
1322
|
+
"expo-gl": ">=11.0",
|
|
1323
|
+
react: "^19.0.0",
|
|
1324
|
+
"react-dom": "^19.0.0",
|
|
1325
|
+
"react-native": ">=0.78",
|
|
1326
|
+
three: ">=0.156"
|
|
1327
|
+
},
|
|
1328
|
+
peerDependenciesMeta: {
|
|
1329
|
+
"react-dom": {
|
|
1330
|
+
optional: true
|
|
1331
|
+
},
|
|
1332
|
+
"react-native": {
|
|
1333
|
+
optional: true
|
|
1334
|
+
},
|
|
1335
|
+
expo: {
|
|
1336
|
+
optional: true
|
|
1337
|
+
},
|
|
1338
|
+
"expo-asset": {
|
|
1339
|
+
optional: true
|
|
1340
|
+
},
|
|
1341
|
+
"expo-file-system": {
|
|
1342
|
+
optional: true
|
|
1343
|
+
},
|
|
1344
|
+
"expo-gl": {
|
|
1345
|
+
optional: true
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
};
|
|
1349
|
+
|
|
1260
1350
|
function createReconciler(config) {
|
|
1261
1351
|
const reconciler = Reconciler(config);
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
version: React.version
|
|
1266
|
-
});
|
|
1352
|
+
|
|
1353
|
+
// @ts-ignore DefinitelyTyped is not up to date
|
|
1354
|
+
reconciler.injectIntoDevTools();
|
|
1267
1355
|
return reconciler;
|
|
1268
1356
|
}
|
|
1269
1357
|
const NoEventPriority = 0;
|
|
@@ -1685,7 +1773,10 @@ const reconciler = /* @__PURE__ */createReconciler({
|
|
|
1685
1773
|
return DefaultEventPriority;
|
|
1686
1774
|
}
|
|
1687
1775
|
},
|
|
1688
|
-
resetFormInstance() {}
|
|
1776
|
+
resetFormInstance() {},
|
|
1777
|
+
// @ts-ignore DefinitelyTyped is not up to date
|
|
1778
|
+
rendererPackageName: '@react-three/fiber',
|
|
1779
|
+
rendererVersion: packageData.version
|
|
1689
1780
|
});
|
|
1690
1781
|
|
|
1691
1782
|
const _roots = new Map();
|
|
@@ -1283,13 +1283,101 @@ useLoader.clear = function (loader, input) {
|
|
|
1283
1283
|
return suspendReact.clear([loader, ...keys]);
|
|
1284
1284
|
};
|
|
1285
1285
|
|
|
1286
|
+
var packageData = {
|
|
1287
|
+
name: "@react-three/fiber",
|
|
1288
|
+
version: "9.4.2",
|
|
1289
|
+
description: "A React renderer for Threejs",
|
|
1290
|
+
keywords: [
|
|
1291
|
+
"react",
|
|
1292
|
+
"renderer",
|
|
1293
|
+
"fiber",
|
|
1294
|
+
"three",
|
|
1295
|
+
"threejs"
|
|
1296
|
+
],
|
|
1297
|
+
author: "Paul Henschel (https://github.com/drcmda)",
|
|
1298
|
+
license: "MIT",
|
|
1299
|
+
maintainers: [
|
|
1300
|
+
"Josh Ellis (https://github.com/joshuaellis)",
|
|
1301
|
+
"Cody Bennett (https://github.com/codyjasonbennett)",
|
|
1302
|
+
"Kris Baumgarter (https://github.com/krispya)"
|
|
1303
|
+
],
|
|
1304
|
+
bugs: {
|
|
1305
|
+
url: "https://github.com/pmndrs/react-three-fiber/issues"
|
|
1306
|
+
},
|
|
1307
|
+
homepage: "https://github.com/pmndrs/react-three-fiber#readme",
|
|
1308
|
+
repository: {
|
|
1309
|
+
type: "git",
|
|
1310
|
+
url: "git+https://github.com/pmndrs/react-three-fiber.git"
|
|
1311
|
+
},
|
|
1312
|
+
collective: {
|
|
1313
|
+
type: "opencollective",
|
|
1314
|
+
url: "https://opencollective.com/react-three-fiber"
|
|
1315
|
+
},
|
|
1316
|
+
main: "dist/react-three-fiber.cjs.js",
|
|
1317
|
+
module: "dist/react-three-fiber.esm.js",
|
|
1318
|
+
types: "dist/react-three-fiber.cjs.d.ts",
|
|
1319
|
+
"react-native": "native/dist/react-three-fiber-native.cjs.js",
|
|
1320
|
+
sideEffects: false,
|
|
1321
|
+
preconstruct: {
|
|
1322
|
+
entrypoints: [
|
|
1323
|
+
"index.tsx",
|
|
1324
|
+
"native.tsx"
|
|
1325
|
+
]
|
|
1326
|
+
},
|
|
1327
|
+
scripts: {
|
|
1328
|
+
prebuild: "cp ../../readme.md readme.md"
|
|
1329
|
+
},
|
|
1330
|
+
dependencies: {
|
|
1331
|
+
"@babel/runtime": "^7.17.8",
|
|
1332
|
+
"@types/react-reconciler": "^0.32.0",
|
|
1333
|
+
"@types/webxr": "*",
|
|
1334
|
+
"base64-js": "^1.5.1",
|
|
1335
|
+
buffer: "^6.0.3",
|
|
1336
|
+
"its-fine": "^2.0.0",
|
|
1337
|
+
"react-reconciler": "^0.31.0",
|
|
1338
|
+
"react-use-measure": "^2.1.7",
|
|
1339
|
+
scheduler: "^0.25.0",
|
|
1340
|
+
"suspend-react": "^0.1.3",
|
|
1341
|
+
"use-sync-external-store": "^1.4.0",
|
|
1342
|
+
zustand: "^5.0.3"
|
|
1343
|
+
},
|
|
1344
|
+
peerDependencies: {
|
|
1345
|
+
expo: ">=43.0",
|
|
1346
|
+
"expo-asset": ">=8.4",
|
|
1347
|
+
"expo-file-system": ">=11.0",
|
|
1348
|
+
"expo-gl": ">=11.0",
|
|
1349
|
+
react: "^19.0.0",
|
|
1350
|
+
"react-dom": "^19.0.0",
|
|
1351
|
+
"react-native": ">=0.78",
|
|
1352
|
+
three: ">=0.156"
|
|
1353
|
+
},
|
|
1354
|
+
peerDependenciesMeta: {
|
|
1355
|
+
"react-dom": {
|
|
1356
|
+
optional: true
|
|
1357
|
+
},
|
|
1358
|
+
"react-native": {
|
|
1359
|
+
optional: true
|
|
1360
|
+
},
|
|
1361
|
+
expo: {
|
|
1362
|
+
optional: true
|
|
1363
|
+
},
|
|
1364
|
+
"expo-asset": {
|
|
1365
|
+
optional: true
|
|
1366
|
+
},
|
|
1367
|
+
"expo-file-system": {
|
|
1368
|
+
optional: true
|
|
1369
|
+
},
|
|
1370
|
+
"expo-gl": {
|
|
1371
|
+
optional: true
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
};
|
|
1375
|
+
|
|
1286
1376
|
function createReconciler(config) {
|
|
1287
1377
|
const reconciler = Reconciler__default["default"](config);
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
version: React__namespace.version
|
|
1292
|
-
});
|
|
1378
|
+
|
|
1379
|
+
// @ts-ignore DefinitelyTyped is not up to date
|
|
1380
|
+
reconciler.injectIntoDevTools();
|
|
1293
1381
|
return reconciler;
|
|
1294
1382
|
}
|
|
1295
1383
|
const NoEventPriority = 0;
|
|
@@ -1711,7 +1799,10 @@ const reconciler = /* @__PURE__ */createReconciler({
|
|
|
1711
1799
|
return constants.DefaultEventPriority;
|
|
1712
1800
|
}
|
|
1713
1801
|
},
|
|
1714
|
-
resetFormInstance() {}
|
|
1802
|
+
resetFormInstance() {},
|
|
1803
|
+
// @ts-ignore DefinitelyTyped is not up to date
|
|
1804
|
+
rendererPackageName: '@react-three/fiber',
|
|
1805
|
+
rendererVersion: packageData.version
|
|
1715
1806
|
});
|
|
1716
1807
|
|
|
1717
1808
|
const _roots = new Map();
|
|
@@ -1283,13 +1283,101 @@ useLoader.clear = function (loader, input) {
|
|
|
1283
1283
|
return suspendReact.clear([loader, ...keys]);
|
|
1284
1284
|
};
|
|
1285
1285
|
|
|
1286
|
+
var packageData = {
|
|
1287
|
+
name: "@react-three/fiber",
|
|
1288
|
+
version: "9.4.2",
|
|
1289
|
+
description: "A React renderer for Threejs",
|
|
1290
|
+
keywords: [
|
|
1291
|
+
"react",
|
|
1292
|
+
"renderer",
|
|
1293
|
+
"fiber",
|
|
1294
|
+
"three",
|
|
1295
|
+
"threejs"
|
|
1296
|
+
],
|
|
1297
|
+
author: "Paul Henschel (https://github.com/drcmda)",
|
|
1298
|
+
license: "MIT",
|
|
1299
|
+
maintainers: [
|
|
1300
|
+
"Josh Ellis (https://github.com/joshuaellis)",
|
|
1301
|
+
"Cody Bennett (https://github.com/codyjasonbennett)",
|
|
1302
|
+
"Kris Baumgarter (https://github.com/krispya)"
|
|
1303
|
+
],
|
|
1304
|
+
bugs: {
|
|
1305
|
+
url: "https://github.com/pmndrs/react-three-fiber/issues"
|
|
1306
|
+
},
|
|
1307
|
+
homepage: "https://github.com/pmndrs/react-three-fiber#readme",
|
|
1308
|
+
repository: {
|
|
1309
|
+
type: "git",
|
|
1310
|
+
url: "git+https://github.com/pmndrs/react-three-fiber.git"
|
|
1311
|
+
},
|
|
1312
|
+
collective: {
|
|
1313
|
+
type: "opencollective",
|
|
1314
|
+
url: "https://opencollective.com/react-three-fiber"
|
|
1315
|
+
},
|
|
1316
|
+
main: "dist/react-three-fiber.cjs.js",
|
|
1317
|
+
module: "dist/react-three-fiber.esm.js",
|
|
1318
|
+
types: "dist/react-three-fiber.cjs.d.ts",
|
|
1319
|
+
"react-native": "native/dist/react-three-fiber-native.cjs.js",
|
|
1320
|
+
sideEffects: false,
|
|
1321
|
+
preconstruct: {
|
|
1322
|
+
entrypoints: [
|
|
1323
|
+
"index.tsx",
|
|
1324
|
+
"native.tsx"
|
|
1325
|
+
]
|
|
1326
|
+
},
|
|
1327
|
+
scripts: {
|
|
1328
|
+
prebuild: "cp ../../readme.md readme.md"
|
|
1329
|
+
},
|
|
1330
|
+
dependencies: {
|
|
1331
|
+
"@babel/runtime": "^7.17.8",
|
|
1332
|
+
"@types/react-reconciler": "^0.32.0",
|
|
1333
|
+
"@types/webxr": "*",
|
|
1334
|
+
"base64-js": "^1.5.1",
|
|
1335
|
+
buffer: "^6.0.3",
|
|
1336
|
+
"its-fine": "^2.0.0",
|
|
1337
|
+
"react-reconciler": "^0.31.0",
|
|
1338
|
+
"react-use-measure": "^2.1.7",
|
|
1339
|
+
scheduler: "^0.25.0",
|
|
1340
|
+
"suspend-react": "^0.1.3",
|
|
1341
|
+
"use-sync-external-store": "^1.4.0",
|
|
1342
|
+
zustand: "^5.0.3"
|
|
1343
|
+
},
|
|
1344
|
+
peerDependencies: {
|
|
1345
|
+
expo: ">=43.0",
|
|
1346
|
+
"expo-asset": ">=8.4",
|
|
1347
|
+
"expo-file-system": ">=11.0",
|
|
1348
|
+
"expo-gl": ">=11.0",
|
|
1349
|
+
react: "^19.0.0",
|
|
1350
|
+
"react-dom": "^19.0.0",
|
|
1351
|
+
"react-native": ">=0.78",
|
|
1352
|
+
three: ">=0.156"
|
|
1353
|
+
},
|
|
1354
|
+
peerDependenciesMeta: {
|
|
1355
|
+
"react-dom": {
|
|
1356
|
+
optional: true
|
|
1357
|
+
},
|
|
1358
|
+
"react-native": {
|
|
1359
|
+
optional: true
|
|
1360
|
+
},
|
|
1361
|
+
expo: {
|
|
1362
|
+
optional: true
|
|
1363
|
+
},
|
|
1364
|
+
"expo-asset": {
|
|
1365
|
+
optional: true
|
|
1366
|
+
},
|
|
1367
|
+
"expo-file-system": {
|
|
1368
|
+
optional: true
|
|
1369
|
+
},
|
|
1370
|
+
"expo-gl": {
|
|
1371
|
+
optional: true
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
};
|
|
1375
|
+
|
|
1286
1376
|
function createReconciler(config) {
|
|
1287
1377
|
const reconciler = Reconciler__default["default"](config);
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
version: React__namespace.version
|
|
1292
|
-
});
|
|
1378
|
+
|
|
1379
|
+
// @ts-ignore DefinitelyTyped is not up to date
|
|
1380
|
+
reconciler.injectIntoDevTools();
|
|
1293
1381
|
return reconciler;
|
|
1294
1382
|
}
|
|
1295
1383
|
const NoEventPriority = 0;
|
|
@@ -1711,7 +1799,10 @@ const reconciler = /* @__PURE__ */createReconciler({
|
|
|
1711
1799
|
return constants.DefaultEventPriority;
|
|
1712
1800
|
}
|
|
1713
1801
|
},
|
|
1714
|
-
resetFormInstance() {}
|
|
1802
|
+
resetFormInstance() {},
|
|
1803
|
+
// @ts-ignore DefinitelyTyped is not up to date
|
|
1804
|
+
rendererPackageName: '@react-three/fiber',
|
|
1805
|
+
rendererVersion: packageData.version
|
|
1715
1806
|
});
|
|
1716
1807
|
|
|
1717
1808
|
const _roots = new Map();
|
|
@@ -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-c80effae.cjs.dev.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var THREE = require('three');
|
|
8
8
|
var useMeasure = require('react-use-measure');
|
|
@@ -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-5c8d1731.cjs.prod.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var THREE = require('three');
|
|
8
8
|
var useMeasure = require('react-use-measure');
|
|
@@ -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-1eccaf1c.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-1eccaf1c.esm.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as THREE from 'three';
|
|
5
5
|
import useMeasure from 'react-use-measure';
|
|
@@ -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-c80effae.cjs.dev.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var THREE = require('three');
|
|
8
8
|
var reactNative = require('react-native');
|
|
@@ -10,7 +10,6 @@ var expoGl = require('expo-gl');
|
|
|
10
10
|
var itsFine = require('its-fine');
|
|
11
11
|
var jsxRuntime = require('react/jsx-runtime');
|
|
12
12
|
var expoAsset = require('expo-asset');
|
|
13
|
-
var fs = require('expo-file-system');
|
|
14
13
|
var base64Js = require('base64-js');
|
|
15
14
|
var buffer = require('buffer');
|
|
16
15
|
require('react-reconciler/constants');
|
|
@@ -39,7 +38,6 @@ function _interopNamespace(e) {
|
|
|
39
38
|
|
|
40
39
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
41
40
|
var THREE__namespace = /*#__PURE__*/_interopNamespace(THREE);
|
|
42
|
-
var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
|
|
43
41
|
|
|
44
42
|
// TODO: React 19 needs support from react-native
|
|
45
43
|
const _View = reactNative.View;
|
|
@@ -367,6 +365,16 @@ function createTouchEvents(store) {
|
|
|
367
365
|
};
|
|
368
366
|
}
|
|
369
367
|
|
|
368
|
+
// Conditionally import expo-file-system/legacy to support Expo 54
|
|
369
|
+
const getFileSystem = () => {
|
|
370
|
+
try {
|
|
371
|
+
return require('expo-file-system/legacy');
|
|
372
|
+
} catch {
|
|
373
|
+
return require('expo-file-system');
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
const fs = getFileSystem();
|
|
377
|
+
|
|
370
378
|
// http://stackoverflow.com/questions/105034
|
|
371
379
|
function uuidv4() {
|
|
372
380
|
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
|
|
@@ -405,9 +413,9 @@ async function getAsset(input) {
|
|
|
405
413
|
if (input.startsWith('data:')) {
|
|
406
414
|
const [header, data] = input.split(';base64,');
|
|
407
415
|
const [, type] = header.split('/');
|
|
408
|
-
const uri =
|
|
409
|
-
await
|
|
410
|
-
encoding:
|
|
416
|
+
const uri = fs.cacheDirectory + uuidv4() + `.${type}`;
|
|
417
|
+
await fs.writeAsStringAsync(uri, data, {
|
|
418
|
+
encoding: fs.EncodingType.Base64
|
|
411
419
|
});
|
|
412
420
|
return uri;
|
|
413
421
|
}
|
|
@@ -419,8 +427,8 @@ async function getAsset(input) {
|
|
|
419
427
|
|
|
420
428
|
// Unpack assets in Android Release Mode
|
|
421
429
|
if (!uri.includes(':')) {
|
|
422
|
-
const file = `${
|
|
423
|
-
await
|
|
430
|
+
const file = `${fs.cacheDirectory}ExponentAsset-${asset.hash}.${asset.type}`;
|
|
431
|
+
await fs.copyAsync({
|
|
424
432
|
from: uri,
|
|
425
433
|
to: file
|
|
426
434
|
});
|
|
@@ -514,8 +522,8 @@ function polyfills() {
|
|
|
514
522
|
if (this.path && typeof url === 'string') url = this.path + url;
|
|
515
523
|
this.manager.itemStart(url);
|
|
516
524
|
getAsset(url).then(async uri => {
|
|
517
|
-
const base64 = await
|
|
518
|
-
encoding:
|
|
525
|
+
const base64 = await fs.readAsStringAsync(uri, {
|
|
526
|
+
encoding: fs.EncodingType.Base64
|
|
519
527
|
});
|
|
520
528
|
const data = buffer.Buffer.from(base64, 'base64');
|
|
521
529
|
onLoad == null ? void 0 : onLoad(data.buffer);
|
|
@@ -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-5c8d1731.cjs.prod.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var THREE = require('three');
|
|
8
8
|
var reactNative = require('react-native');
|
|
@@ -10,7 +10,6 @@ var expoGl = require('expo-gl');
|
|
|
10
10
|
var itsFine = require('its-fine');
|
|
11
11
|
var jsxRuntime = require('react/jsx-runtime');
|
|
12
12
|
var expoAsset = require('expo-asset');
|
|
13
|
-
var fs = require('expo-file-system');
|
|
14
13
|
var base64Js = require('base64-js');
|
|
15
14
|
var buffer = require('buffer');
|
|
16
15
|
require('react-reconciler/constants');
|
|
@@ -39,7 +38,6 @@ function _interopNamespace(e) {
|
|
|
39
38
|
|
|
40
39
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
41
40
|
var THREE__namespace = /*#__PURE__*/_interopNamespace(THREE);
|
|
42
|
-
var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
|
|
43
41
|
|
|
44
42
|
// TODO: React 19 needs support from react-native
|
|
45
43
|
const _View = reactNative.View;
|
|
@@ -367,6 +365,16 @@ function createTouchEvents(store) {
|
|
|
367
365
|
};
|
|
368
366
|
}
|
|
369
367
|
|
|
368
|
+
// Conditionally import expo-file-system/legacy to support Expo 54
|
|
369
|
+
const getFileSystem = () => {
|
|
370
|
+
try {
|
|
371
|
+
return require('expo-file-system/legacy');
|
|
372
|
+
} catch {
|
|
373
|
+
return require('expo-file-system');
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
const fs = getFileSystem();
|
|
377
|
+
|
|
370
378
|
// http://stackoverflow.com/questions/105034
|
|
371
379
|
function uuidv4() {
|
|
372
380
|
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
|
|
@@ -405,9 +413,9 @@ async function getAsset(input) {
|
|
|
405
413
|
if (input.startsWith('data:')) {
|
|
406
414
|
const [header, data] = input.split(';base64,');
|
|
407
415
|
const [, type] = header.split('/');
|
|
408
|
-
const uri =
|
|
409
|
-
await
|
|
410
|
-
encoding:
|
|
416
|
+
const uri = fs.cacheDirectory + uuidv4() + `.${type}`;
|
|
417
|
+
await fs.writeAsStringAsync(uri, data, {
|
|
418
|
+
encoding: fs.EncodingType.Base64
|
|
411
419
|
});
|
|
412
420
|
return uri;
|
|
413
421
|
}
|
|
@@ -419,8 +427,8 @@ async function getAsset(input) {
|
|
|
419
427
|
|
|
420
428
|
// Unpack assets in Android Release Mode
|
|
421
429
|
if (!uri.includes(':')) {
|
|
422
|
-
const file = `${
|
|
423
|
-
await
|
|
430
|
+
const file = `${fs.cacheDirectory}ExponentAsset-${asset.hash}.${asset.type}`;
|
|
431
|
+
await fs.copyAsync({
|
|
424
432
|
from: uri,
|
|
425
433
|
to: file
|
|
426
434
|
});
|
|
@@ -514,8 +522,8 @@ function polyfills() {
|
|
|
514
522
|
if (this.path && typeof url === 'string') url = this.path + url;
|
|
515
523
|
this.manager.itemStart(url);
|
|
516
524
|
getAsset(url).then(async uri => {
|
|
517
|
-
const base64 = await
|
|
518
|
-
encoding:
|
|
525
|
+
const base64 = await fs.readAsStringAsync(uri, {
|
|
526
|
+
encoding: fs.EncodingType.Base64
|
|
519
527
|
});
|
|
520
528
|
const data = buffer.Buffer.from(base64, 'base64');
|
|
521
529
|
onLoad == null ? void 0 : onLoad(data.buffer);
|
|
@@ -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-1eccaf1c.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-1eccaf1c.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';
|
|
@@ -7,7 +7,6 @@ import { GLView } from 'expo-gl';
|
|
|
7
7
|
import { FiberProvider } from 'its-fine';
|
|
8
8
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
9
|
import { Asset } from 'expo-asset';
|
|
10
|
-
import * as fs from 'expo-file-system';
|
|
11
10
|
import { fromByteArray } from 'base64-js';
|
|
12
11
|
import { Buffer } from 'buffer';
|
|
13
12
|
import 'react-reconciler/constants';
|
|
@@ -342,6 +341,16 @@ function createTouchEvents(store) {
|
|
|
342
341
|
};
|
|
343
342
|
}
|
|
344
343
|
|
|
344
|
+
// Conditionally import expo-file-system/legacy to support Expo 54
|
|
345
|
+
const getFileSystem = () => {
|
|
346
|
+
try {
|
|
347
|
+
return require('expo-file-system/legacy');
|
|
348
|
+
} catch {
|
|
349
|
+
return require('expo-file-system');
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
const fs = getFileSystem();
|
|
353
|
+
|
|
345
354
|
// http://stackoverflow.com/questions/105034
|
|
346
355
|
function uuidv4() {
|
|
347
356
|
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
|