@react-three/fiber 8.0.25 → 8.0.26
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 +6 -0
- package/dist/{index-cd0062f1.cjs.prod.js → index-1301c9b6.cjs.prod.js} +11 -16
- package/dist/{index-63f47889.cjs.dev.js → index-7af14ac8.cjs.dev.js} +11 -16
- package/dist/{index-8d5cf4a3.esm.js → index-bfdbf5d7.esm.js} +11 -16
- 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 +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1389,42 +1389,37 @@ const createStore = (invalidate, advance) => {
|
|
|
1389
1389
|
}
|
|
1390
1390
|
};
|
|
1391
1391
|
});
|
|
1392
|
-
const state = rootState.getState();
|
|
1393
|
-
|
|
1392
|
+
const state = rootState.getState();
|
|
1394
1393
|
let oldSize = state.size;
|
|
1395
1394
|
let oldDpr = state.viewport.dpr;
|
|
1395
|
+
let oldCamera = state.camera;
|
|
1396
1396
|
rootState.subscribe(() => {
|
|
1397
1397
|
const {
|
|
1398
1398
|
camera,
|
|
1399
1399
|
size,
|
|
1400
1400
|
viewport,
|
|
1401
|
-
gl
|
|
1402
|
-
|
|
1401
|
+
gl,
|
|
1402
|
+
set
|
|
1403
|
+
} = rootState.getState(); // Resize camera and renderer on changes to size and pixelratio
|
|
1403
1404
|
|
|
1404
1405
|
if (size !== oldSize || viewport.dpr !== oldDpr) {
|
|
1405
|
-
|
|
1406
|
+
oldSize = size;
|
|
1407
|
+
oldDpr = viewport.dpr; // Update camera & renderer
|
|
1406
1408
|
|
|
1409
|
+
updateCamera(camera, size);
|
|
1407
1410
|
gl.setPixelRatio(viewport.dpr);
|
|
1408
1411
|
gl.setSize(size.width, size.height, size.updateStyle);
|
|
1409
|
-
|
|
1410
|
-
oldDpr = viewport.dpr;
|
|
1411
|
-
}
|
|
1412
|
-
}); // Update viewport once the camera changes
|
|
1412
|
+
} // Update viewport once the camera changes
|
|
1413
1413
|
|
|
1414
|
-
let oldCamera = state.camera;
|
|
1415
|
-
rootState.subscribe(() => {
|
|
1416
|
-
const {
|
|
1417
|
-
camera,
|
|
1418
|
-
set
|
|
1419
|
-
} = rootState.getState();
|
|
1420
1414
|
|
|
1421
1415
|
if (camera !== oldCamera) {
|
|
1416
|
+
oldCamera = camera; // Update viewport
|
|
1417
|
+
|
|
1422
1418
|
set(state => ({
|
|
1423
1419
|
viewport: { ...state.viewport,
|
|
1424
1420
|
...state.viewport.getCurrentViewport(camera)
|
|
1425
1421
|
}
|
|
1426
1422
|
}));
|
|
1427
|
-
oldCamera = camera;
|
|
1428
1423
|
}
|
|
1429
1424
|
}); // Invalidate on any change
|
|
1430
1425
|
|
|
@@ -1389,42 +1389,37 @@ const createStore = (invalidate, advance) => {
|
|
|
1389
1389
|
}
|
|
1390
1390
|
};
|
|
1391
1391
|
});
|
|
1392
|
-
const state = rootState.getState();
|
|
1393
|
-
|
|
1392
|
+
const state = rootState.getState();
|
|
1394
1393
|
let oldSize = state.size;
|
|
1395
1394
|
let oldDpr = state.viewport.dpr;
|
|
1395
|
+
let oldCamera = state.camera;
|
|
1396
1396
|
rootState.subscribe(() => {
|
|
1397
1397
|
const {
|
|
1398
1398
|
camera,
|
|
1399
1399
|
size,
|
|
1400
1400
|
viewport,
|
|
1401
|
-
gl
|
|
1402
|
-
|
|
1401
|
+
gl,
|
|
1402
|
+
set
|
|
1403
|
+
} = rootState.getState(); // Resize camera and renderer on changes to size and pixelratio
|
|
1403
1404
|
|
|
1404
1405
|
if (size !== oldSize || viewport.dpr !== oldDpr) {
|
|
1405
|
-
|
|
1406
|
+
oldSize = size;
|
|
1407
|
+
oldDpr = viewport.dpr; // Update camera & renderer
|
|
1406
1408
|
|
|
1409
|
+
updateCamera(camera, size);
|
|
1407
1410
|
gl.setPixelRatio(viewport.dpr);
|
|
1408
1411
|
gl.setSize(size.width, size.height, size.updateStyle);
|
|
1409
|
-
|
|
1410
|
-
oldDpr = viewport.dpr;
|
|
1411
|
-
}
|
|
1412
|
-
}); // Update viewport once the camera changes
|
|
1412
|
+
} // Update viewport once the camera changes
|
|
1413
1413
|
|
|
1414
|
-
let oldCamera = state.camera;
|
|
1415
|
-
rootState.subscribe(() => {
|
|
1416
|
-
const {
|
|
1417
|
-
camera,
|
|
1418
|
-
set
|
|
1419
|
-
} = rootState.getState();
|
|
1420
1414
|
|
|
1421
1415
|
if (camera !== oldCamera) {
|
|
1416
|
+
oldCamera = camera; // Update viewport
|
|
1417
|
+
|
|
1422
1418
|
set(state => ({
|
|
1423
1419
|
viewport: { ...state.viewport,
|
|
1424
1420
|
...state.viewport.getCurrentViewport(camera)
|
|
1425
1421
|
}
|
|
1426
1422
|
}));
|
|
1427
|
-
oldCamera = camera;
|
|
1428
1423
|
}
|
|
1429
1424
|
}); // Invalidate on any change
|
|
1430
1425
|
|
|
@@ -1362,42 +1362,37 @@ const createStore = (invalidate, advance) => {
|
|
|
1362
1362
|
}
|
|
1363
1363
|
};
|
|
1364
1364
|
});
|
|
1365
|
-
const state = rootState.getState();
|
|
1366
|
-
|
|
1365
|
+
const state = rootState.getState();
|
|
1367
1366
|
let oldSize = state.size;
|
|
1368
1367
|
let oldDpr = state.viewport.dpr;
|
|
1368
|
+
let oldCamera = state.camera;
|
|
1369
1369
|
rootState.subscribe(() => {
|
|
1370
1370
|
const {
|
|
1371
1371
|
camera,
|
|
1372
1372
|
size,
|
|
1373
1373
|
viewport,
|
|
1374
|
-
gl
|
|
1375
|
-
|
|
1374
|
+
gl,
|
|
1375
|
+
set
|
|
1376
|
+
} = rootState.getState(); // Resize camera and renderer on changes to size and pixelratio
|
|
1376
1377
|
|
|
1377
1378
|
if (size !== oldSize || viewport.dpr !== oldDpr) {
|
|
1378
|
-
|
|
1379
|
+
oldSize = size;
|
|
1380
|
+
oldDpr = viewport.dpr; // Update camera & renderer
|
|
1379
1381
|
|
|
1382
|
+
updateCamera(camera, size);
|
|
1380
1383
|
gl.setPixelRatio(viewport.dpr);
|
|
1381
1384
|
gl.setSize(size.width, size.height, size.updateStyle);
|
|
1382
|
-
|
|
1383
|
-
oldDpr = viewport.dpr;
|
|
1384
|
-
}
|
|
1385
|
-
}); // Update viewport once the camera changes
|
|
1385
|
+
} // Update viewport once the camera changes
|
|
1386
1386
|
|
|
1387
|
-
let oldCamera = state.camera;
|
|
1388
|
-
rootState.subscribe(() => {
|
|
1389
|
-
const {
|
|
1390
|
-
camera,
|
|
1391
|
-
set
|
|
1392
|
-
} = rootState.getState();
|
|
1393
1387
|
|
|
1394
1388
|
if (camera !== oldCamera) {
|
|
1389
|
+
oldCamera = camera; // Update viewport
|
|
1390
|
+
|
|
1395
1391
|
set(state => ({
|
|
1396
1392
|
viewport: { ...state.viewport,
|
|
1397
1393
|
...state.viewport.getCurrentViewport(camera)
|
|
1398
1394
|
}
|
|
1399
1395
|
}));
|
|
1400
|
-
oldCamera = camera;
|
|
1401
1396
|
}
|
|
1402
1397
|
}); // Invalidate on any change
|
|
1403
1398
|
|
|
@@ -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-7af14ac8.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-1301c9b6.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 useMutableCallback, a as createRoot, E as ErrorBoundary, B as Block, b as useIsomorphicLayoutEffect, d as unmountComponentAtNode } from './index-
|
|
2
|
-
export { t as ReactThreeFiber, s as _roots, q as act, n as addAfterEffect, m as addEffect, o as addTail, l as advance, i as applyProps, f as context, g as createPortal, a as createRoot, j as dispose, e as extend, p as getRootState, k as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, x as useFrame, y as useGraph, z as useLoader, v as useStore, w as useThree } from './index-
|
|
1
|
+
import { c as createEvents, e as extend, u as useMutableCallback, a as createRoot, E as ErrorBoundary, B as Block, b as useIsomorphicLayoutEffect, d as unmountComponentAtNode } from './index-bfdbf5d7.esm.js';
|
|
2
|
+
export { t as ReactThreeFiber, s as _roots, q as act, n as addAfterEffect, m as addEffect, o as addTail, l as advance, i as applyProps, f as context, g as createPortal, a as createRoot, j as dispose, e as extend, p as getRootState, k as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, x as useFrame, y as useGraph, z as useLoader, v as useStore, w as useThree } from './index-bfdbf5d7.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';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('../../dist/index-
|
|
5
|
+
var index = require('../../dist/index-7af14ac8.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('../../dist/index-
|
|
5
|
+
var index = require('../../dist/index-1301c9b6.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 useMutableCallback, a as createRoot, E as ErrorBoundary, B as Block, d as unmountComponentAtNode } from '../../dist/index-
|
|
2
|
-
export { t as ReactThreeFiber, s as _roots, q as act, n as addAfterEffect, m as addEffect, o as addTail, l as advance, i as applyProps, f as context, g as createPortal, a as createRoot, j as dispose, e as extend, p as getRootState, k as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, x as useFrame, y as useGraph, z as useLoader, v as useStore, w as useThree } from '../../dist/index-
|
|
1
|
+
import { c as createEvents, e as extend, u as useMutableCallback, a as createRoot, E as ErrorBoundary, B as Block, d as unmountComponentAtNode } from '../../dist/index-bfdbf5d7.esm.js';
|
|
2
|
+
export { t as ReactThreeFiber, s as _roots, q as act, n as addAfterEffect, m as addEffect, o as addTail, l as advance, i as applyProps, f as context, g as createPortal, a as createRoot, j as dispose, e as extend, p as getRootState, k as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, x as useFrame, y as useGraph, z as useLoader, v as useStore, w as useThree } from '../../dist/index-bfdbf5d7.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';
|