@react-three/fiber 8.15.10 → 8.15.11
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/declarations/src/core/events.d.ts +1 -1
- package/dist/declarations/src/core/hooks.d.ts +1 -1
- package/dist/declarations/src/core/utils.d.ts +1 -1
- package/dist/{index-28e9146f.cjs.dev.js → index-b3e44f21.cjs.dev.js} +9 -2
- package/dist/{index-0c28a0fd.esm.js → index-db8af450.esm.js} +9 -2
- package/dist/{index-ae8ad041.cjs.prod.js → index-e462a173.cjs.prod.js} +9 -2
- 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
|
@@ -86,7 +86,7 @@ export interface PointerCaptureTarget {
|
|
|
86
86
|
intersection: Intersection;
|
|
87
87
|
target: Element;
|
|
88
88
|
}
|
|
89
|
-
export declare function getEventPriority(): 1 |
|
|
89
|
+
export declare function getEventPriority(): 1 | 4 | 16;
|
|
90
90
|
export declare function removeInteractivity(store: UseBoundStore<RootState>, object: THREE.Object3D): void;
|
|
91
91
|
export declare function createEvents(store: UseBoundStore<RootState>): {
|
|
92
92
|
handlePointer: (name: string) => (event: DomEvent) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { StateSelector, EqualityChecker } from 'zustand';
|
|
4
|
-
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
|
|
4
|
+
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
5
5
|
import { RootState, RenderCallback } from './store';
|
|
6
6
|
import { ObjectMap } from './utils';
|
|
7
7
|
import { LocalState } from './renderer';
|
|
@@ -10,7 +10,7 @@ export declare type _XRFrame = THREE.WebGLRenderTargetOptions extends {
|
|
|
10
10
|
/**
|
|
11
11
|
* Returns `true` with correct TS type inference if an object has a configurable color space (since r152).
|
|
12
12
|
*/
|
|
13
|
-
export declare const hasColorSpace: <T extends object |
|
|
13
|
+
export declare const hasColorSpace: <T extends object | THREE.Texture | Renderer, P = T extends Renderer ? {
|
|
14
14
|
outputColorSpace: string;
|
|
15
15
|
} : {
|
|
16
16
|
colorSpace: string;
|
|
@@ -181,13 +181,20 @@ function createRenderer(_roots, _getEventPriority) {
|
|
|
181
181
|
|
|
182
182
|
// Dispose item whenever the reconciler feels like it
|
|
183
183
|
if (shouldDispose && child.dispose && child.type !== 'Scene') {
|
|
184
|
-
|
|
184
|
+
const callback = () => {
|
|
185
185
|
try {
|
|
186
186
|
child.dispose();
|
|
187
187
|
} catch (e) {
|
|
188
188
|
/* ... */
|
|
189
189
|
}
|
|
190
|
-
}
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
// Schedule async at runtime, flush sync in testing
|
|
193
|
+
if (typeof IS_REACT_ACT_ENVIRONMENT === 'undefined') {
|
|
194
|
+
scheduler.unstable_scheduleCallback(scheduler.unstable_IdlePriority, callback);
|
|
195
|
+
} else {
|
|
196
|
+
callback();
|
|
197
|
+
}
|
|
191
198
|
}
|
|
192
199
|
invalidateInstance(parentInstance);
|
|
193
200
|
}
|
|
@@ -154,13 +154,20 @@ function createRenderer(_roots, _getEventPriority) {
|
|
|
154
154
|
|
|
155
155
|
// Dispose item whenever the reconciler feels like it
|
|
156
156
|
if (shouldDispose && child.dispose && child.type !== 'Scene') {
|
|
157
|
-
|
|
157
|
+
const callback = () => {
|
|
158
158
|
try {
|
|
159
159
|
child.dispose();
|
|
160
160
|
} catch (e) {
|
|
161
161
|
/* ... */
|
|
162
162
|
}
|
|
163
|
-
}
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
// Schedule async at runtime, flush sync in testing
|
|
166
|
+
if (typeof IS_REACT_ACT_ENVIRONMENT === 'undefined') {
|
|
167
|
+
unstable_scheduleCallback(unstable_IdlePriority, callback);
|
|
168
|
+
} else {
|
|
169
|
+
callback();
|
|
170
|
+
}
|
|
164
171
|
}
|
|
165
172
|
invalidateInstance(parentInstance);
|
|
166
173
|
}
|
|
@@ -181,13 +181,20 @@ function createRenderer(_roots, _getEventPriority) {
|
|
|
181
181
|
|
|
182
182
|
// Dispose item whenever the reconciler feels like it
|
|
183
183
|
if (shouldDispose && child.dispose && child.type !== 'Scene') {
|
|
184
|
-
|
|
184
|
+
const callback = () => {
|
|
185
185
|
try {
|
|
186
186
|
child.dispose();
|
|
187
187
|
} catch (e) {
|
|
188
188
|
/* ... */
|
|
189
189
|
}
|
|
190
|
-
}
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
// Schedule async at runtime, flush sync in testing
|
|
193
|
+
if (typeof IS_REACT_ACT_ENVIRONMENT === 'undefined') {
|
|
194
|
+
scheduler.unstable_scheduleCallback(scheduler.unstable_IdlePriority, callback);
|
|
195
|
+
} else {
|
|
196
|
+
callback();
|
|
197
|
+
}
|
|
191
198
|
}
|
|
192
199
|
invalidateInstance(parentInstance);
|
|
193
200
|
}
|
|
@@ -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-b3e44f21.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-e462a173.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 useIsomorphicLayoutEffect, b as createRoot, i as isRef, E as ErrorBoundary, B as Block, d as unmountComponentAtNode } from './index-
|
|
2
|
-
export { t as ReactThreeFiber, x as _roots, v as act, o as addAfterEffect, n as addEffect, p as addTail, m as advance, j as applyProps, w as buildGraph, f as context, c as createEvents, g as createPortal, b as createRoot, k as dispose, e as extend, q as flushGlobalEffects, s as getRootState, l as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, C as useFrame, D as useGraph, y as useInstanceHandle, F as useLoader, z as useStore, A as useThree } from './index-
|
|
1
|
+
import { c as createEvents, 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 './index-db8af450.esm.js';
|
|
2
|
+
export { t as ReactThreeFiber, x as _roots, v as act, o as addAfterEffect, n as addEffect, p as addTail, m as advance, j as applyProps, w as buildGraph, f as context, c as createEvents, g as createPortal, b as createRoot, k as dispose, e as extend, q as flushGlobalEffects, s as getRootState, l as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, C as useFrame, D as useGraph, y as useInstanceHandle, F as useLoader, z as useStore, A as useThree } from './index-db8af450.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-b3e44f21.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-e462a173.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, b as createRoot, E as ErrorBoundary, B as Block, d as unmountComponentAtNode } from '../../dist/index-
|
|
2
|
-
export { t as ReactThreeFiber, x as _roots, v as act, o as addAfterEffect, n as addEffect, p as addTail, m as advance, j as applyProps, w as buildGraph, f as context, c as createEvents, g as createPortal, b as createRoot, k as dispose, e as extend, q as flushGlobalEffects, s as getRootState, l as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, C as useFrame, D as useGraph, y as useInstanceHandle, F as useLoader, z as useStore, A as useThree } from '../../dist/index-
|
|
1
|
+
import { c as createEvents, e as extend, u as useMutableCallback, b as createRoot, E as ErrorBoundary, B as Block, d as unmountComponentAtNode } from '../../dist/index-db8af450.esm.js';
|
|
2
|
+
export { t as ReactThreeFiber, x as _roots, v as act, o as addAfterEffect, n as addEffect, p as addTail, m as advance, j as applyProps, w as buildGraph, f as context, c as createEvents, g as createPortal, b as createRoot, k as dispose, e as extend, q as flushGlobalEffects, s as getRootState, l as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, C as useFrame, D as useGraph, y as useInstanceHandle, F as useLoader, z as useStore, A as useThree } from '../../dist/index-db8af450.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';
|