@react-three/fiber 8.0.0-beta.9 → 8.0.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 +29 -0
- package/dist/declarations/src/core/store.d.ts +1 -0
- package/dist/declarations/src/core/utils.d.ts +1 -1
- package/dist/{index-f5108bb9.cjs.prod.js → index-1a4e6043.cjs.prod.js} +6 -3
- package/dist/{index-2056f0b6.cjs.dev.js → index-2d896758.cjs.dev.js} +6 -3
- package/dist/{index-3238fd12.esm.js → index-634e3679.esm.js} +6 -3
- 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 +1 -1
- package/native/dist/react-three-fiber-native.cjs.prod.js +1 -1
- package/native/dist/react-three-fiber-native.esm.js +2 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @react-three/fiber
|
|
2
2
|
|
|
3
|
+
## 8.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8035d1f: fix: legacy mode
|
|
8
|
+
|
|
9
|
+
## 8.0.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 26db195: add legacy flag to turn of three.colormanagement
|
|
14
|
+
|
|
15
|
+
## 8.0.0
|
|
16
|
+
|
|
17
|
+
### Major Changes
|
|
18
|
+
|
|
19
|
+
- 385ba9c: v8 major, react-18 compat
|
|
20
|
+
- 04c07b8: v8 major, react-18 compat
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- 347ea79: new beta for library testing
|
|
25
|
+
|
|
26
|
+
## 8.0.0-beta.0
|
|
27
|
+
|
|
28
|
+
### Major Changes
|
|
29
|
+
|
|
30
|
+
- 385ba9c: v8 major, react-18 compat
|
|
31
|
+
|
|
3
32
|
## 8.0.0-beta.0
|
|
4
33
|
|
|
5
34
|
### Patch Changes
|
|
@@ -91,6 +91,7 @@ export declare type StoreProps = {
|
|
|
91
91
|
shadows?: boolean | Partial<THREE.WebGLShadowMap>;
|
|
92
92
|
linear?: boolean;
|
|
93
93
|
flat?: boolean;
|
|
94
|
+
legacy?: boolean;
|
|
94
95
|
orthographic?: boolean;
|
|
95
96
|
frameloop?: 'always' | 'demand' | 'never';
|
|
96
97
|
performance?: Partial<Omit<Performance, 'regress'>>;
|
|
@@ -52,6 +52,6 @@ export declare function prepare<T = THREE.Object3D>(object: T, state?: Partial<L
|
|
|
52
52
|
export declare function attach(parent: Instance, child: Instance, type: AttachType): void;
|
|
53
53
|
export declare function detach(parent: Instance, child: Instance, type: AttachType): void;
|
|
54
54
|
export declare function diffProps(instance: Instance, { children: cN, key: kN, ref: rN, ...props }: InstanceProps, { children: cP, key: kP, ref: rP, ...previous }?: InstanceProps, remove?: boolean): DiffSet;
|
|
55
|
-
export declare function applyProps(instance: Instance, data: InstanceProps | DiffSet):
|
|
55
|
+
export declare function applyProps(instance: Instance, data: InstanceProps | DiffSet): Instance;
|
|
56
56
|
export declare function invalidateInstance(instance: Instance): void;
|
|
57
57
|
export declare function updateInstance(instance: Instance): void;
|
|
@@ -340,7 +340,6 @@ function applyProps$1(instance, data) {
|
|
|
340
340
|
} else currentInstance[key] = value;
|
|
341
341
|
|
|
342
342
|
invalidateInstance(instance);
|
|
343
|
-
return instance;
|
|
344
343
|
});
|
|
345
344
|
|
|
346
345
|
if (localState.parent && rootState.internal && instance.raycast && prevHandlers !== localState.eventCount) {
|
|
@@ -353,6 +352,7 @@ function applyProps$1(instance, data) {
|
|
|
353
352
|
|
|
354
353
|
|
|
355
354
|
if (changes.length && instance.parent) updateInstance(instance);
|
|
355
|
+
return instance;
|
|
356
356
|
}
|
|
357
357
|
function invalidateInstance(instance) {
|
|
358
358
|
var _instance$__r3f4, _instance$__r3f4$root;
|
|
@@ -1327,7 +1327,6 @@ const createStore = (invalidate, advance) => {
|
|
|
1327
1327
|
camera,
|
|
1328
1328
|
size,
|
|
1329
1329
|
viewport,
|
|
1330
|
-
internal,
|
|
1331
1330
|
gl
|
|
1332
1331
|
} = rootState.getState();
|
|
1333
1332
|
|
|
@@ -1580,6 +1579,7 @@ function createRoot(canvas) {
|
|
|
1580
1579
|
shadows = false,
|
|
1581
1580
|
linear = false,
|
|
1582
1581
|
flat = false,
|
|
1582
|
+
legacy = false,
|
|
1583
1583
|
orthographic = false,
|
|
1584
1584
|
frameloop = 'always',
|
|
1585
1585
|
dpr = [1, 2],
|
|
@@ -1682,7 +1682,10 @@ function createRoot(canvas) {
|
|
|
1682
1682
|
} // Set color management
|
|
1683
1683
|
|
|
1684
1684
|
|
|
1685
|
-
if (THREE__namespace.ColorManagement)
|
|
1685
|
+
if (THREE__namespace.ColorManagement) {
|
|
1686
|
+
THREE__namespace.ColorManagement.legacyMode = legacy;
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1686
1689
|
const outputEncoding = linear ? THREE__namespace.LinearEncoding : THREE__namespace.sRGBEncoding;
|
|
1687
1690
|
const toneMapping = flat ? THREE__namespace.NoToneMapping : THREE__namespace.ACESFilmicToneMapping;
|
|
1688
1691
|
if (gl.outputEncoding !== outputEncoding) gl.outputEncoding = outputEncoding;
|
|
@@ -340,7 +340,6 @@ function applyProps$1(instance, data) {
|
|
|
340
340
|
} else currentInstance[key] = value;
|
|
341
341
|
|
|
342
342
|
invalidateInstance(instance);
|
|
343
|
-
return instance;
|
|
344
343
|
});
|
|
345
344
|
|
|
346
345
|
if (localState.parent && rootState.internal && instance.raycast && prevHandlers !== localState.eventCount) {
|
|
@@ -353,6 +352,7 @@ function applyProps$1(instance, data) {
|
|
|
353
352
|
|
|
354
353
|
|
|
355
354
|
if (changes.length && instance.parent) updateInstance(instance);
|
|
355
|
+
return instance;
|
|
356
356
|
}
|
|
357
357
|
function invalidateInstance(instance) {
|
|
358
358
|
var _instance$__r3f4, _instance$__r3f4$root;
|
|
@@ -1327,7 +1327,6 @@ const createStore = (invalidate, advance) => {
|
|
|
1327
1327
|
camera,
|
|
1328
1328
|
size,
|
|
1329
1329
|
viewport,
|
|
1330
|
-
internal,
|
|
1331
1330
|
gl
|
|
1332
1331
|
} = rootState.getState();
|
|
1333
1332
|
|
|
@@ -1580,6 +1579,7 @@ function createRoot(canvas) {
|
|
|
1580
1579
|
shadows = false,
|
|
1581
1580
|
linear = false,
|
|
1582
1581
|
flat = false,
|
|
1582
|
+
legacy = false,
|
|
1583
1583
|
orthographic = false,
|
|
1584
1584
|
frameloop = 'always',
|
|
1585
1585
|
dpr = [1, 2],
|
|
@@ -1682,7 +1682,10 @@ function createRoot(canvas) {
|
|
|
1682
1682
|
} // Set color management
|
|
1683
1683
|
|
|
1684
1684
|
|
|
1685
|
-
if (THREE__namespace.ColorManagement)
|
|
1685
|
+
if (THREE__namespace.ColorManagement) {
|
|
1686
|
+
THREE__namespace.ColorManagement.legacyMode = legacy;
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1686
1689
|
const outputEncoding = linear ? THREE__namespace.LinearEncoding : THREE__namespace.sRGBEncoding;
|
|
1687
1690
|
const toneMapping = flat ? THREE__namespace.NoToneMapping : THREE__namespace.ACESFilmicToneMapping;
|
|
1688
1691
|
if (gl.outputEncoding !== outputEncoding) gl.outputEncoding = outputEncoding;
|
|
@@ -311,7 +311,6 @@ function applyProps$1(instance, data) {
|
|
|
311
311
|
} else currentInstance[key] = value;
|
|
312
312
|
|
|
313
313
|
invalidateInstance(instance);
|
|
314
|
-
return instance;
|
|
315
314
|
});
|
|
316
315
|
|
|
317
316
|
if (localState.parent && rootState.internal && instance.raycast && prevHandlers !== localState.eventCount) {
|
|
@@ -324,6 +323,7 @@ function applyProps$1(instance, data) {
|
|
|
324
323
|
|
|
325
324
|
|
|
326
325
|
if (changes.length && instance.parent) updateInstance(instance);
|
|
326
|
+
return instance;
|
|
327
327
|
}
|
|
328
328
|
function invalidateInstance(instance) {
|
|
329
329
|
var _instance$__r3f4, _instance$__r3f4$root;
|
|
@@ -1298,7 +1298,6 @@ const createStore = (invalidate, advance) => {
|
|
|
1298
1298
|
camera,
|
|
1299
1299
|
size,
|
|
1300
1300
|
viewport,
|
|
1301
|
-
internal,
|
|
1302
1301
|
gl
|
|
1303
1302
|
} = rootState.getState();
|
|
1304
1303
|
|
|
@@ -1551,6 +1550,7 @@ function createRoot(canvas) {
|
|
|
1551
1550
|
shadows = false,
|
|
1552
1551
|
linear = false,
|
|
1553
1552
|
flat = false,
|
|
1553
|
+
legacy = false,
|
|
1554
1554
|
orthographic = false,
|
|
1555
1555
|
frameloop = 'always',
|
|
1556
1556
|
dpr = [1, 2],
|
|
@@ -1653,7 +1653,10 @@ function createRoot(canvas) {
|
|
|
1653
1653
|
} // Set color management
|
|
1654
1654
|
|
|
1655
1655
|
|
|
1656
|
-
if (THREE.ColorManagement)
|
|
1656
|
+
if (THREE.ColorManagement) {
|
|
1657
|
+
THREE.ColorManagement.legacyMode = legacy;
|
|
1658
|
+
}
|
|
1659
|
+
|
|
1657
1660
|
const outputEncoding = linear ? THREE.LinearEncoding : THREE.sRGBEncoding;
|
|
1658
1661
|
const toneMapping = flat ? THREE.NoToneMapping : THREE.ACESFilmicToneMapping;
|
|
1659
1662
|
if (gl.outputEncoding !== outputEncoding) gl.outputEncoding = outputEncoding;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./index-
|
|
5
|
+
var index = require('./index-2d896758.cjs.dev.js');
|
|
6
6
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var THREE = require('three');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./index-
|
|
5
|
+
var index = require('./index-1a4e6043.cjs.prod.js');
|
|
6
6
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var THREE = require('three');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as createEvents, e as extend, u as useMemoizedFn, p as pick, o as omit, a as createRoot, b as unmountComponentAtNode } from './index-
|
|
2
|
-
export { t as ReactThreeFiber, v as _roots, s as act, m as addAfterEffect, l as addEffect, n as addTail, k as advance, h as applyProps, d as context, f as createPortal, a as createRoot, i as dispose, e as extend, q as getRootState, j as invalidate, g as reconciler, r as render, b as unmountComponentAtNode, y as useFrame, z as useGraph, A as useLoader, u as useMemoizedFn, w as useStore, x as useThree } from './index-
|
|
1
|
+
import { c as createEvents, e as extend, u as useMemoizedFn, p as pick, o as omit, a as createRoot, b as unmountComponentAtNode } from './index-634e3679.esm.js';
|
|
2
|
+
export { t as ReactThreeFiber, v as _roots, s as act, m as addAfterEffect, l as addEffect, n as addTail, k as advance, h as applyProps, d as context, f as createPortal, a as createRoot, i as dispose, e as extend, q as getRootState, j as invalidate, g as reconciler, r as render, b as unmountComponentAtNode, y as useFrame, z as useGraph, A as useLoader, u as useMemoizedFn, w as useStore, x as useThree } from './index-634e3679.esm.js';
|
|
3
3
|
import _extends from '@babel/runtime/helpers/esm/extends';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import * as THREE from 'three';
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var THREE = require('three');
|
|
6
6
|
var expoAsset = require('expo-asset');
|
|
7
|
-
var index = require('../../dist/index-
|
|
7
|
+
var index = require('../../dist/index-2d896758.cjs.dev.js');
|
|
8
8
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
9
9
|
var React = require('react');
|
|
10
10
|
var mergeRefs = require('react-merge-refs');
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var THREE = require('three');
|
|
6
6
|
var expoAsset = require('expo-asset');
|
|
7
|
-
var index = require('../../dist/index-
|
|
7
|
+
var index = require('../../dist/index-1a4e6043.cjs.prod.js');
|
|
8
8
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
9
9
|
var React = require('react');
|
|
10
10
|
var mergeRefs = require('react-merge-refs');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
import { Asset } from 'expo-asset';
|
|
3
|
-
import { c as createEvents, e as extend, u as useMemoizedFn, p as pick, o as omit, a as createRoot, b as unmountComponentAtNode } from '../../dist/index-
|
|
4
|
-
export { t as ReactThreeFiber, v as _roots, s as act, m as addAfterEffect, l as addEffect, n as addTail, k as advance, h as applyProps, d as context, f as createPortal, a as createRoot, i as dispose, e as extend, q as getRootState, j as invalidate, g as reconciler, r as render, b as unmountComponentAtNode, y as useFrame, z as useGraph, A as useLoader, u as useMemoizedFn, w as useStore, x as useThree } from '../../dist/index-
|
|
3
|
+
import { c as createEvents, e as extend, u as useMemoizedFn, p as pick, o as omit, a as createRoot, b as unmountComponentAtNode } from '../../dist/index-634e3679.esm.js';
|
|
4
|
+
export { t as ReactThreeFiber, v as _roots, s as act, m as addAfterEffect, l as addEffect, n as addTail, k as advance, h as applyProps, d as context, f as createPortal, a as createRoot, i as dispose, e as extend, q as getRootState, j as invalidate, g as reconciler, r as render, b as unmountComponentAtNode, y as useFrame, z as useGraph, A as useLoader, u as useMemoizedFn, w as useStore, x as useThree } from '../../dist/index-634e3679.esm.js';
|
|
5
5
|
import _extends from '@babel/runtime/helpers/esm/extends';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import mergeRefs from 'react-merge-refs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-three/fiber",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.2",
|
|
4
4
|
"description": "A React renderer for Threejs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"prebuild": "cp ../../readme.md readme.md"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@babel/runtime": "^7.17.
|
|
45
|
+
"@babel/runtime": "^7.17.8",
|
|
46
46
|
"@types/react-reconciler": "^0.26.4",
|
|
47
47
|
"react-merge-refs": "^1.1.0",
|
|
48
|
-
"react-reconciler": "^0.27.0
|
|
48
|
+
"react-reconciler": "^0.27.0",
|
|
49
49
|
"react-use-measure": "^2.1.1",
|
|
50
|
-
"scheduler": "^0.21.0
|
|
50
|
+
"scheduler": "^0.21.0",
|
|
51
51
|
"suspend-react": "^0.0.8",
|
|
52
52
|
"zustand": "^3.7.1"
|
|
53
53
|
},
|