@react-three/fiber 8.17.5 → 8.17.7
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 +1046 -1034
- package/dist/declarations/src/core/events.d.ts +93 -93
- package/dist/declarations/src/core/hooks.d.ts +57 -57
- package/dist/declarations/src/core/index.d.ts +94 -94
- package/dist/declarations/src/core/loop.d.ts +38 -38
- package/dist/declarations/src/core/renderer.d.ts +58 -58
- package/dist/declarations/src/core/store.d.ts +138 -138
- package/dist/declarations/src/core/utils.d.ts +134 -134
- package/dist/declarations/src/index.d.ts +12 -12
- package/dist/declarations/src/native/Canvas.d.ts +14 -14
- package/dist/declarations/src/native/events.d.ts +5 -5
- package/dist/declarations/src/native/polyfills.d.ts +1 -1
- package/dist/declarations/src/native.d.ts +13 -13
- package/dist/declarations/src/three-types.d.ts +396 -393
- package/dist/declarations/src/web/Canvas.d.ts +24 -24
- package/dist/declarations/src/web/events.d.ts +5 -5
- package/dist/declarations/src/web/use-measure.d.ts +34 -34
- package/dist/{events-be1682bd.cjs.prod.js → events-2e7e6eab.cjs.prod.js} +76 -76
- package/dist/{events-a5fc3e51.esm.js → events-3515660a.esm.js} +76 -76
- package/dist/{events-66f43fbc.cjs.dev.js → events-c54ce65e.cjs.dev.js} +76 -76
- 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 +15 -19
- package/native/dist/react-three-fiber-native.cjs.prod.js +15 -19
- package/native/dist/react-three-fiber-native.esm.js +16 -20
- package/native/package.json +5 -5
- package/package.json +1 -1
- package/readme.md +253 -253
|
@@ -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-c54ce65e.cjs.dev.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var THREE = require('three');
|
|
8
8
|
var reactNative = require('react-native');
|
|
@@ -41,9 +41,9 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
|
41
41
|
var THREE__namespace = /*#__PURE__*/_interopNamespace(THREE);
|
|
42
42
|
var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
|
|
43
43
|
|
|
44
|
-
/**
|
|
45
|
-
* A native canvas which accepts threejs elements as children.
|
|
46
|
-
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
44
|
+
/**
|
|
45
|
+
* A native canvas which accepts threejs elements as children.
|
|
46
|
+
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
47
47
|
*/
|
|
48
48
|
const CanvasImpl = /*#__PURE__*/React__namespace.forwardRef(({
|
|
49
49
|
children,
|
|
@@ -171,7 +171,8 @@ const CanvasImpl = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
171
171
|
type,
|
|
172
172
|
offsetX: gestureEvent.nativeEvent.locationX,
|
|
173
173
|
offsetY: gestureEvent.nativeEvent.locationY,
|
|
174
|
-
pointerType: 'touch'
|
|
174
|
+
pointerType: 'touch',
|
|
175
|
+
pointerId: gestureEvent.nativeEvent.identifier
|
|
175
176
|
}));
|
|
176
177
|
return true;
|
|
177
178
|
}
|
|
@@ -248,30 +249,25 @@ const CanvasImpl = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
248
249
|
}
|
|
249
250
|
}, [canvas]);
|
|
250
251
|
return /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
|
|
252
|
+
...props,
|
|
251
253
|
ref: viewRef,
|
|
252
254
|
onLayout: onLayout,
|
|
253
255
|
style: {
|
|
254
256
|
flex: 1,
|
|
255
257
|
...style
|
|
256
258
|
},
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
children: width > 0 && /*#__PURE__*/jsxRuntime.jsx(expoGl.GLView, {
|
|
263
|
-
...bind,
|
|
264
|
-
msaaSamples: antialias ? 4 : 0,
|
|
265
|
-
onContextCreate: onContextCreate,
|
|
266
|
-
style: reactNative.StyleSheet.absoluteFill
|
|
267
|
-
})
|
|
259
|
+
...bind,
|
|
260
|
+
children: width > 0 && /*#__PURE__*/jsxRuntime.jsx(expoGl.GLView, {
|
|
261
|
+
msaaSamples: antialias ? 4 : 0,
|
|
262
|
+
onContextCreate: onContextCreate,
|
|
263
|
+
style: reactNative.StyleSheet.absoluteFill
|
|
268
264
|
})
|
|
269
265
|
});
|
|
270
266
|
});
|
|
271
267
|
|
|
272
|
-
/**
|
|
273
|
-
* A native canvas which accepts threejs elements as children.
|
|
274
|
-
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
268
|
+
/**
|
|
269
|
+
* A native canvas which accepts threejs elements as children.
|
|
270
|
+
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
275
271
|
*/
|
|
276
272
|
const Canvas = /*#__PURE__*/React__namespace.forwardRef(function CanvasWrapper(props, ref) {
|
|
277
273
|
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-2e7e6eab.cjs.prod.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var THREE = require('three');
|
|
8
8
|
var reactNative = require('react-native');
|
|
@@ -41,9 +41,9 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
|
41
41
|
var THREE__namespace = /*#__PURE__*/_interopNamespace(THREE);
|
|
42
42
|
var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
|
|
43
43
|
|
|
44
|
-
/**
|
|
45
|
-
* A native canvas which accepts threejs elements as children.
|
|
46
|
-
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
44
|
+
/**
|
|
45
|
+
* A native canvas which accepts threejs elements as children.
|
|
46
|
+
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
47
47
|
*/
|
|
48
48
|
const CanvasImpl = /*#__PURE__*/React__namespace.forwardRef(({
|
|
49
49
|
children,
|
|
@@ -171,7 +171,8 @@ const CanvasImpl = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
171
171
|
type,
|
|
172
172
|
offsetX: gestureEvent.nativeEvent.locationX,
|
|
173
173
|
offsetY: gestureEvent.nativeEvent.locationY,
|
|
174
|
-
pointerType: 'touch'
|
|
174
|
+
pointerType: 'touch',
|
|
175
|
+
pointerId: gestureEvent.nativeEvent.identifier
|
|
175
176
|
}));
|
|
176
177
|
return true;
|
|
177
178
|
}
|
|
@@ -248,30 +249,25 @@ const CanvasImpl = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
248
249
|
}
|
|
249
250
|
}, [canvas]);
|
|
250
251
|
return /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
|
|
252
|
+
...props,
|
|
251
253
|
ref: viewRef,
|
|
252
254
|
onLayout: onLayout,
|
|
253
255
|
style: {
|
|
254
256
|
flex: 1,
|
|
255
257
|
...style
|
|
256
258
|
},
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
children: width > 0 && /*#__PURE__*/jsxRuntime.jsx(expoGl.GLView, {
|
|
263
|
-
...bind,
|
|
264
|
-
msaaSamples: antialias ? 4 : 0,
|
|
265
|
-
onContextCreate: onContextCreate,
|
|
266
|
-
style: reactNative.StyleSheet.absoluteFill
|
|
267
|
-
})
|
|
259
|
+
...bind,
|
|
260
|
+
children: width > 0 && /*#__PURE__*/jsxRuntime.jsx(expoGl.GLView, {
|
|
261
|
+
msaaSamples: antialias ? 4 : 0,
|
|
262
|
+
onContextCreate: onContextCreate,
|
|
263
|
+
style: reactNative.StyleSheet.absoluteFill
|
|
268
264
|
})
|
|
269
265
|
});
|
|
270
266
|
});
|
|
271
267
|
|
|
272
|
-
/**
|
|
273
|
-
* A native canvas which accepts threejs elements as children.
|
|
274
|
-
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
268
|
+
/**
|
|
269
|
+
* A native canvas which accepts threejs elements as children.
|
|
270
|
+
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
275
271
|
*/
|
|
276
272
|
const Canvas = /*#__PURE__*/React__namespace.forwardRef(function CanvasWrapper(props, ref) {
|
|
277
273
|
return /*#__PURE__*/jsxRuntime.jsx(itsFine.FiberProvider, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as createPointerEvents, e as extend, u as useMutableCallback, b as createRoot, E as ErrorBoundary, B as Block, d as unmountComponentAtNode, f as createEvents } from '../../dist/events-
|
|
2
|
-
export { t as ReactThreeFiber, z as _roots, x as act, p as addAfterEffect, o as addEffect, q as addTail, n as advance, k as applyProps, y as buildGraph, g as context, f as createEvents, c as createPointerEvents, h as createPortal, b as createRoot, l as dispose, e as extend, s as flushGlobalEffects, v as flushSync, w as getRootState, m as invalidate, j as reconciler, r as render, d as unmountComponentAtNode, F as useFrame, G as useGraph, A as useInstanceHandle, H as useLoader, C as useStore, D as useThree } from '../../dist/events-
|
|
1
|
+
import { c as createPointerEvents, e as extend, u as useMutableCallback, b as createRoot, E as ErrorBoundary, B as Block, d as unmountComponentAtNode, f as createEvents } from '../../dist/events-3515660a.esm.js';
|
|
2
|
+
export { t as ReactThreeFiber, z as _roots, x as act, p as addAfterEffect, o as addEffect, q as addTail, n as advance, k as applyProps, y as buildGraph, g as context, f as createEvents, c as createPointerEvents, h as createPortal, b as createRoot, l as dispose, e as extend, s as flushGlobalEffects, v as flushSync, w as getRootState, m as invalidate, j as reconciler, r as render, d as unmountComponentAtNode, F as useFrame, G as useGraph, A as useInstanceHandle, H as useLoader, C as useStore, D as useThree } from '../../dist/events-3515660a.esm.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as THREE from 'three';
|
|
5
5
|
import { PanResponder, PixelRatio, View, StyleSheet, Platform, Image, NativeModules } from 'react-native';
|
|
@@ -16,9 +16,9 @@ import 'suspend-react';
|
|
|
16
16
|
import 'react-reconciler';
|
|
17
17
|
import 'scheduler';
|
|
18
18
|
|
|
19
|
-
/**
|
|
20
|
-
* A native canvas which accepts threejs elements as children.
|
|
21
|
-
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
19
|
+
/**
|
|
20
|
+
* A native canvas which accepts threejs elements as children.
|
|
21
|
+
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
22
22
|
*/
|
|
23
23
|
const CanvasImpl = /*#__PURE__*/React.forwardRef(({
|
|
24
24
|
children,
|
|
@@ -146,7 +146,8 @@ const CanvasImpl = /*#__PURE__*/React.forwardRef(({
|
|
|
146
146
|
type,
|
|
147
147
|
offsetX: gestureEvent.nativeEvent.locationX,
|
|
148
148
|
offsetY: gestureEvent.nativeEvent.locationY,
|
|
149
|
-
pointerType: 'touch'
|
|
149
|
+
pointerType: 'touch',
|
|
150
|
+
pointerId: gestureEvent.nativeEvent.identifier
|
|
150
151
|
}));
|
|
151
152
|
return true;
|
|
152
153
|
}
|
|
@@ -223,30 +224,25 @@ const CanvasImpl = /*#__PURE__*/React.forwardRef(({
|
|
|
223
224
|
}
|
|
224
225
|
}, [canvas]);
|
|
225
226
|
return /*#__PURE__*/jsx(View, {
|
|
227
|
+
...props,
|
|
226
228
|
ref: viewRef,
|
|
227
229
|
onLayout: onLayout,
|
|
228
230
|
style: {
|
|
229
231
|
flex: 1,
|
|
230
232
|
...style
|
|
231
233
|
},
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
children: width > 0 && /*#__PURE__*/jsx(GLView, {
|
|
238
|
-
...bind,
|
|
239
|
-
msaaSamples: antialias ? 4 : 0,
|
|
240
|
-
onContextCreate: onContextCreate,
|
|
241
|
-
style: StyleSheet.absoluteFill
|
|
242
|
-
})
|
|
234
|
+
...bind,
|
|
235
|
+
children: width > 0 && /*#__PURE__*/jsx(GLView, {
|
|
236
|
+
msaaSamples: antialias ? 4 : 0,
|
|
237
|
+
onContextCreate: onContextCreate,
|
|
238
|
+
style: StyleSheet.absoluteFill
|
|
243
239
|
})
|
|
244
240
|
});
|
|
245
241
|
});
|
|
246
242
|
|
|
247
|
-
/**
|
|
248
|
-
* A native canvas which accepts threejs elements as children.
|
|
249
|
-
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
243
|
+
/**
|
|
244
|
+
* A native canvas which accepts threejs elements as children.
|
|
245
|
+
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
250
246
|
*/
|
|
251
247
|
const Canvas = /*#__PURE__*/React.forwardRef(function CanvasWrapper(props, ref) {
|
|
252
248
|
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
|
+
}
|