@react-three/fiber 8.17.10 → 8.17.12
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-09858d86.cjs.prod.js → events-0e73ba93.cjs.prod.js} +7 -5
- package/dist/{events-321b05fb.esm.js → events-776716bd.esm.js} +7 -5
- package/dist/{events-31675df9.cjs.dev.js → events-d0566a2e.cjs.dev.js} +7 -5
- 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 +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @react-three/fiber
|
|
2
2
|
|
|
3
|
+
## 8.17.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ff1a16f1: fix: narrow React peer dep range
|
|
8
|
+
|
|
9
|
+
## 8.17.11
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 7461bf0c: fix: loosen instanceof checks for CSB issue
|
|
14
|
+
|
|
3
15
|
## 8.17.10
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -81,7 +81,7 @@ function createRenderer(_roots, _getEventPriority) {
|
|
|
81
81
|
|
|
82
82
|
// Auto-attach geometries and materials
|
|
83
83
|
if (instance.__r3f.attach === undefined) {
|
|
84
|
-
if (instance
|
|
84
|
+
if (instance.isBufferGeometry) instance.__r3f.attach = 'geometry';else if (instance.isMaterial) instance.__r3f.attach = 'material';
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
// It should NOT call onUpdate on object instanciation, because it hasn't been added to the
|
|
@@ -757,7 +757,8 @@ function applyProps$1(instance, data) {
|
|
|
757
757
|
// If nothing else fits, just set the single value, ignore undefined
|
|
758
758
|
// https://github.com/pmndrs/react-three-fiber/issues/274
|
|
759
759
|
else if (value !== undefined) {
|
|
760
|
-
|
|
760
|
+
var _targetProp;
|
|
761
|
+
const isColor = (_targetProp = targetProp) == null ? void 0 : _targetProp.isColor;
|
|
761
762
|
// Allow setting array scalars
|
|
762
763
|
if (!isColor && targetProp.setScalar) targetProp.setScalar(value);
|
|
763
764
|
// Layers have no copy function, we must therefore copy the mask property
|
|
@@ -771,11 +772,12 @@ function applyProps$1(instance, data) {
|
|
|
771
772
|
}
|
|
772
773
|
// Else, just overwrite the value
|
|
773
774
|
} else {
|
|
775
|
+
var _currentInstance$key;
|
|
774
776
|
currentInstance[key] = value;
|
|
775
777
|
|
|
776
778
|
// Auto-convert sRGB textures, for now ...
|
|
777
779
|
// https://github.com/pmndrs/react-three-fiber/issues/344
|
|
778
|
-
if (currentInstance[key]
|
|
780
|
+
if ((_currentInstance$key = currentInstance[key]) != null && _currentInstance$key.isTexture &&
|
|
779
781
|
// sRGB textures must be RGBA8 since r137 https://github.com/mrdoob/three.js/pull/23129
|
|
780
782
|
currentInstance[key].format === THREE__namespace.RGBAFormat && currentInstance[key].type === THREE__namespace.UnsignedByteType && rootState) {
|
|
781
783
|
const texture = currentInstance[key];
|
|
@@ -1275,7 +1277,7 @@ const createStore = (invalidate, advance) => {
|
|
|
1275
1277
|
left
|
|
1276
1278
|
} = size;
|
|
1277
1279
|
const aspect = width / height;
|
|
1278
|
-
if (target
|
|
1280
|
+
if (target.isVector3) tempTarget.copy(target);else tempTarget.set(...target);
|
|
1279
1281
|
const distance = camera.getWorldPosition(position).distanceTo(tempTarget);
|
|
1280
1282
|
if (isOrthographicCamera(camera)) {
|
|
1281
1283
|
return {
|
|
@@ -1924,7 +1926,7 @@ function createRoot(canvas) {
|
|
|
1924
1926
|
// Set up scene (one time only!)
|
|
1925
1927
|
if (!state.scene) {
|
|
1926
1928
|
let scene;
|
|
1927
|
-
if (sceneOptions
|
|
1929
|
+
if (sceneOptions != null && sceneOptions.isScene) {
|
|
1928
1930
|
scene = sceneOptions;
|
|
1929
1931
|
} else {
|
|
1930
1932
|
scene = new THREE__namespace.Scene();
|
|
@@ -54,7 +54,7 @@ function createRenderer(_roots, _getEventPriority) {
|
|
|
54
54
|
|
|
55
55
|
// Auto-attach geometries and materials
|
|
56
56
|
if (instance.__r3f.attach === undefined) {
|
|
57
|
-
if (instance
|
|
57
|
+
if (instance.isBufferGeometry) instance.__r3f.attach = 'geometry';else if (instance.isMaterial) instance.__r3f.attach = 'material';
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
// It should NOT call onUpdate on object instanciation, because it hasn't been added to the
|
|
@@ -730,7 +730,8 @@ function applyProps$1(instance, data) {
|
|
|
730
730
|
// If nothing else fits, just set the single value, ignore undefined
|
|
731
731
|
// https://github.com/pmndrs/react-three-fiber/issues/274
|
|
732
732
|
else if (value !== undefined) {
|
|
733
|
-
|
|
733
|
+
var _targetProp;
|
|
734
|
+
const isColor = (_targetProp = targetProp) == null ? void 0 : _targetProp.isColor;
|
|
734
735
|
// Allow setting array scalars
|
|
735
736
|
if (!isColor && targetProp.setScalar) targetProp.setScalar(value);
|
|
736
737
|
// Layers have no copy function, we must therefore copy the mask property
|
|
@@ -744,11 +745,12 @@ function applyProps$1(instance, data) {
|
|
|
744
745
|
}
|
|
745
746
|
// Else, just overwrite the value
|
|
746
747
|
} else {
|
|
748
|
+
var _currentInstance$key;
|
|
747
749
|
currentInstance[key] = value;
|
|
748
750
|
|
|
749
751
|
// Auto-convert sRGB textures, for now ...
|
|
750
752
|
// https://github.com/pmndrs/react-three-fiber/issues/344
|
|
751
|
-
if (currentInstance[key]
|
|
753
|
+
if ((_currentInstance$key = currentInstance[key]) != null && _currentInstance$key.isTexture &&
|
|
752
754
|
// sRGB textures must be RGBA8 since r137 https://github.com/mrdoob/three.js/pull/23129
|
|
753
755
|
currentInstance[key].format === THREE.RGBAFormat && currentInstance[key].type === THREE.UnsignedByteType && rootState) {
|
|
754
756
|
const texture = currentInstance[key];
|
|
@@ -1248,7 +1250,7 @@ const createStore = (invalidate, advance) => {
|
|
|
1248
1250
|
left
|
|
1249
1251
|
} = size;
|
|
1250
1252
|
const aspect = width / height;
|
|
1251
|
-
if (target
|
|
1253
|
+
if (target.isVector3) tempTarget.copy(target);else tempTarget.set(...target);
|
|
1252
1254
|
const distance = camera.getWorldPosition(position).distanceTo(tempTarget);
|
|
1253
1255
|
if (isOrthographicCamera(camera)) {
|
|
1254
1256
|
return {
|
|
@@ -1897,7 +1899,7 @@ function createRoot(canvas) {
|
|
|
1897
1899
|
// Set up scene (one time only!)
|
|
1898
1900
|
if (!state.scene) {
|
|
1899
1901
|
let scene;
|
|
1900
|
-
if (sceneOptions
|
|
1902
|
+
if (sceneOptions != null && sceneOptions.isScene) {
|
|
1901
1903
|
scene = sceneOptions;
|
|
1902
1904
|
} else {
|
|
1903
1905
|
scene = new THREE.Scene();
|
|
@@ -81,7 +81,7 @@ function createRenderer(_roots, _getEventPriority) {
|
|
|
81
81
|
|
|
82
82
|
// Auto-attach geometries and materials
|
|
83
83
|
if (instance.__r3f.attach === undefined) {
|
|
84
|
-
if (instance
|
|
84
|
+
if (instance.isBufferGeometry) instance.__r3f.attach = 'geometry';else if (instance.isMaterial) instance.__r3f.attach = 'material';
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
// It should NOT call onUpdate on object instanciation, because it hasn't been added to the
|
|
@@ -757,7 +757,8 @@ function applyProps$1(instance, data) {
|
|
|
757
757
|
// If nothing else fits, just set the single value, ignore undefined
|
|
758
758
|
// https://github.com/pmndrs/react-three-fiber/issues/274
|
|
759
759
|
else if (value !== undefined) {
|
|
760
|
-
|
|
760
|
+
var _targetProp;
|
|
761
|
+
const isColor = (_targetProp = targetProp) == null ? void 0 : _targetProp.isColor;
|
|
761
762
|
// Allow setting array scalars
|
|
762
763
|
if (!isColor && targetProp.setScalar) targetProp.setScalar(value);
|
|
763
764
|
// Layers have no copy function, we must therefore copy the mask property
|
|
@@ -771,11 +772,12 @@ function applyProps$1(instance, data) {
|
|
|
771
772
|
}
|
|
772
773
|
// Else, just overwrite the value
|
|
773
774
|
} else {
|
|
775
|
+
var _currentInstance$key;
|
|
774
776
|
currentInstance[key] = value;
|
|
775
777
|
|
|
776
778
|
// Auto-convert sRGB textures, for now ...
|
|
777
779
|
// https://github.com/pmndrs/react-three-fiber/issues/344
|
|
778
|
-
if (currentInstance[key]
|
|
780
|
+
if ((_currentInstance$key = currentInstance[key]) != null && _currentInstance$key.isTexture &&
|
|
779
781
|
// sRGB textures must be RGBA8 since r137 https://github.com/mrdoob/three.js/pull/23129
|
|
780
782
|
currentInstance[key].format === THREE__namespace.RGBAFormat && currentInstance[key].type === THREE__namespace.UnsignedByteType && rootState) {
|
|
781
783
|
const texture = currentInstance[key];
|
|
@@ -1275,7 +1277,7 @@ const createStore = (invalidate, advance) => {
|
|
|
1275
1277
|
left
|
|
1276
1278
|
} = size;
|
|
1277
1279
|
const aspect = width / height;
|
|
1278
|
-
if (target
|
|
1280
|
+
if (target.isVector3) tempTarget.copy(target);else tempTarget.set(...target);
|
|
1279
1281
|
const distance = camera.getWorldPosition(position).distanceTo(tempTarget);
|
|
1280
1282
|
if (isOrthographicCamera(camera)) {
|
|
1281
1283
|
return {
|
|
@@ -1924,7 +1926,7 @@ function createRoot(canvas) {
|
|
|
1924
1926
|
// Set up scene (one time only!)
|
|
1925
1927
|
if (!state.scene) {
|
|
1926
1928
|
let scene;
|
|
1927
|
-
if (sceneOptions
|
|
1929
|
+
if (sceneOptions != null && sceneOptions.isScene) {
|
|
1928
1930
|
scene = sceneOptions;
|
|
1929
1931
|
} else {
|
|
1930
1932
|
scene = new THREE__namespace.Scene();
|
|
@@ -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-d0566a2e.cjs.dev.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var THREE = require('three');
|
|
8
8
|
var createDebounce = require('debounce');
|
|
@@ -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-0e73ba93.cjs.prod.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var THREE = require('three');
|
|
8
8
|
var createDebounce = require('debounce');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as createPointerEvents, e as extend, u as useMutableCallback, a as useIsomorphicLayoutEffect, b as createRoot, i as isRef, E as ErrorBoundary, B as Block, d as unmountComponentAtNode } from './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, c as events, 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 './events-
|
|
1
|
+
import { c as createPointerEvents, e as extend, u as useMutableCallback, a as useIsomorphicLayoutEffect, b as createRoot, i as isRef, E as ErrorBoundary, B as Block, d as unmountComponentAtNode } from './events-776716bd.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, c as events, 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 './events-776716bd.esm.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { useState, useRef, useEffect, useMemo } 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 events = require('../../dist/events-
|
|
5
|
+
var events = require('../../dist/events-d0566a2e.cjs.dev.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var THREE = require('three');
|
|
8
8
|
var reactNative = require('react-native');
|
|
@@ -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-0e73ba93.cjs.prod.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var THREE = require('three');
|
|
8
8
|
var reactNative = require('react-native');
|
|
@@ -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-776716bd.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-776716bd.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';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-three/fiber",
|
|
3
|
-
"version": "8.17.
|
|
3
|
+
"version": "8.17.12",
|
|
4
4
|
"description": "A React renderer for Threejs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"expo-asset": ">=8.4",
|
|
61
61
|
"expo-gl": ">=11.0",
|
|
62
62
|
"expo-file-system": ">=11.0",
|
|
63
|
-
"react": ">=18
|
|
64
|
-
"react-dom": ">=18
|
|
63
|
+
"react": ">=18 <19",
|
|
64
|
+
"react-dom": ">=18 <19",
|
|
65
65
|
"react-native": ">=0.64",
|
|
66
66
|
"three": ">=0.133"
|
|
67
67
|
},
|