@react-three/fiber 8.10.4 → 8.11.1
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 +13 -0
- package/dist/declarations/src/core/events.d.ts +1 -0
- package/dist/{index-455b51ca.cjs.prod.js → index-2929b2e6.cjs.prod.js} +4 -2
- package/dist/{index-7dbf758c.esm.js → index-73d51a81.esm.js} +4 -2
- package/dist/{index-6442a2a3.cjs.dev.js → index-d9aa5cee.cjs.dev.js} +4 -2
- package/dist/react-three-fiber.cjs.dev.js +9 -1
- package/dist/react-three-fiber.cjs.prod.js +9 -1
- package/dist/react-three-fiber.esm.js +10 -2
- package/native/dist/react-three-fiber-native.cjs.dev.js +9 -1
- package/native/dist/react-three-fiber-native.cjs.prod.js +9 -1
- package/native/dist/react-three-fiber-native.esm.js +10 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @react-three/fiber
|
|
2
2
|
|
|
3
|
+
## 8.11.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 58cadeff: fix: skip circular onUpdate calls
|
|
8
|
+
|
|
9
|
+
## 8.11.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 2917a47b: events.update, allow raycast w/o user interaction
|
|
14
|
+
- 521bfb07: events.update, allow raycast w/o user interaction
|
|
15
|
+
|
|
3
16
|
## 8.10.4
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -383,8 +383,10 @@ function applyProps$1(instance, data) {
|
|
|
383
383
|
if (localState.eventCount) rootState.internal.interaction.push(instance);
|
|
384
384
|
}
|
|
385
385
|
|
|
386
|
-
// Call the update lifecycle when it is being updated, but only when it is part of the scene
|
|
387
|
-
|
|
386
|
+
// Call the update lifecycle when it is being updated, but only when it is part of the scene.
|
|
387
|
+
// Skip updates to the `onUpdate` prop itself
|
|
388
|
+
const isCircular = changes.length === 1 && changes[0][0] === 'onUpdate';
|
|
389
|
+
if (!isCircular && changes.length && (_instance$__r3f4 = instance.__r3f) != null && _instance$__r3f4.parent) updateInstance(instance);
|
|
388
390
|
return instance;
|
|
389
391
|
}
|
|
390
392
|
function invalidateInstance(instance) {
|
|
@@ -356,8 +356,10 @@ function applyProps$1(instance, data) {
|
|
|
356
356
|
if (localState.eventCount) rootState.internal.interaction.push(instance);
|
|
357
357
|
}
|
|
358
358
|
|
|
359
|
-
// Call the update lifecycle when it is being updated, but only when it is part of the scene
|
|
360
|
-
|
|
359
|
+
// Call the update lifecycle when it is being updated, but only when it is part of the scene.
|
|
360
|
+
// Skip updates to the `onUpdate` prop itself
|
|
361
|
+
const isCircular = changes.length === 1 && changes[0][0] === 'onUpdate';
|
|
362
|
+
if (!isCircular && changes.length && (_instance$__r3f4 = instance.__r3f) != null && _instance$__r3f4.parent) updateInstance(instance);
|
|
361
363
|
return instance;
|
|
362
364
|
}
|
|
363
365
|
function invalidateInstance(instance) {
|
|
@@ -383,8 +383,10 @@ function applyProps$1(instance, data) {
|
|
|
383
383
|
if (localState.eventCount) rootState.internal.interaction.push(instance);
|
|
384
384
|
}
|
|
385
385
|
|
|
386
|
-
// Call the update lifecycle when it is being updated, but only when it is part of the scene
|
|
387
|
-
|
|
386
|
+
// Call the update lifecycle when it is being updated, but only when it is part of the scene.
|
|
387
|
+
// Skip updates to the `onUpdate` prop itself
|
|
388
|
+
const isCircular = changes.length === 1 && changes[0][0] === 'onUpdate';
|
|
389
|
+
if (!isCircular && changes.length && (_instance$__r3f4 = instance.__r3f) != null && _instance$__r3f4.parent) updateInstance(instance);
|
|
388
390
|
return instance;
|
|
389
391
|
}
|
|
390
392
|
function invalidateInstance(instance) {
|
|
@@ -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-d9aa5cee.cjs.dev.js');
|
|
6
6
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var THREE = require('three');
|
|
@@ -70,6 +70,14 @@ function createPointerEvents(store) {
|
|
|
70
70
|
...acc,
|
|
71
71
|
[key]: handlePointer(key)
|
|
72
72
|
}), {}),
|
|
73
|
+
update: () => {
|
|
74
|
+
var _internal$lastEvent;
|
|
75
|
+
const {
|
|
76
|
+
events,
|
|
77
|
+
internal
|
|
78
|
+
} = store.getState();
|
|
79
|
+
if ((_internal$lastEvent = internal.lastEvent) != null && _internal$lastEvent.current && events.handlers) events.handlers.onPointerMove(internal.lastEvent.current);
|
|
80
|
+
},
|
|
73
81
|
connect: target => {
|
|
74
82
|
var _events$handlers;
|
|
75
83
|
const {
|
|
@@ -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-2929b2e6.cjs.prod.js');
|
|
6
6
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var THREE = require('three');
|
|
@@ -70,6 +70,14 @@ function createPointerEvents(store) {
|
|
|
70
70
|
...acc,
|
|
71
71
|
[key]: handlePointer(key)
|
|
72
72
|
}), {}),
|
|
73
|
+
update: () => {
|
|
74
|
+
var _internal$lastEvent;
|
|
75
|
+
const {
|
|
76
|
+
events,
|
|
77
|
+
internal
|
|
78
|
+
} = store.getState();
|
|
79
|
+
if ((_internal$lastEvent = internal.lastEvent) != null && _internal$lastEvent.current && events.handlers) events.handlers.onPointerMove(internal.lastEvent.current);
|
|
80
|
+
},
|
|
73
81
|
connect: target => {
|
|
74
82
|
var _events$handlers;
|
|
75
83
|
const {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as createEvents, e as extend, u as useMutableCallback, a as createRoot, i as isRef, E as ErrorBoundary, B as Block, b as useIsomorphicLayoutEffect, d as unmountComponentAtNode } from './index-
|
|
2
|
-
export { t as ReactThreeFiber, w as _roots, v as act, o as addAfterEffect, n as addEffect, p as addTail, m as advance, j as applyProps, f as context, c as createEvents, g as createPortal, a 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, A as useFrame, C as useGraph, x as useInstanceHandle, D as useLoader, y as useStore, z as useThree } from './index-
|
|
1
|
+
import { c as createEvents, e as extend, u as useMutableCallback, a as createRoot, i as isRef, E as ErrorBoundary, B as Block, b as useIsomorphicLayoutEffect, d as unmountComponentAtNode } from './index-73d51a81.esm.js';
|
|
2
|
+
export { t as ReactThreeFiber, w as _roots, v as act, o as addAfterEffect, n as addEffect, p as addTail, m as advance, j as applyProps, f as context, c as createEvents, g as createPortal, a 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, A as useFrame, C as useGraph, x as useInstanceHandle, D as useLoader, y as useStore, z as useThree } from './index-73d51a81.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';
|
|
@@ -43,6 +43,14 @@ function createPointerEvents(store) {
|
|
|
43
43
|
...acc,
|
|
44
44
|
[key]: handlePointer(key)
|
|
45
45
|
}), {}),
|
|
46
|
+
update: () => {
|
|
47
|
+
var _internal$lastEvent;
|
|
48
|
+
const {
|
|
49
|
+
events,
|
|
50
|
+
internal
|
|
51
|
+
} = store.getState();
|
|
52
|
+
if ((_internal$lastEvent = internal.lastEvent) != null && _internal$lastEvent.current && events.handlers) events.handlers.onPointerMove(internal.lastEvent.current);
|
|
53
|
+
},
|
|
46
54
|
connect: target => {
|
|
47
55
|
var _events$handlers;
|
|
48
56
|
const {
|
|
@@ -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-d9aa5cee.cjs.dev.js');
|
|
6
6
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var THREE = require('three');
|
|
@@ -92,6 +92,14 @@ function createTouchEvents(store) {
|
|
|
92
92
|
...acc,
|
|
93
93
|
[name]: event => handleTouch(event, name)
|
|
94
94
|
}), {}),
|
|
95
|
+
update: () => {
|
|
96
|
+
var _internal$lastEvent;
|
|
97
|
+
const {
|
|
98
|
+
events,
|
|
99
|
+
internal
|
|
100
|
+
} = store.getState();
|
|
101
|
+
if ((_internal$lastEvent = internal.lastEvent) != null && _internal$lastEvent.current && events.handlers) events.handlers.onPointerMove(internal.lastEvent.current);
|
|
102
|
+
},
|
|
95
103
|
connect: () => {
|
|
96
104
|
const {
|
|
97
105
|
set,
|
|
@@ -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-2929b2e6.cjs.prod.js');
|
|
6
6
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var THREE = require('three');
|
|
@@ -92,6 +92,14 @@ function createTouchEvents(store) {
|
|
|
92
92
|
...acc,
|
|
93
93
|
[name]: event => handleTouch(event, name)
|
|
94
94
|
}), {}),
|
|
95
|
+
update: () => {
|
|
96
|
+
var _internal$lastEvent;
|
|
97
|
+
const {
|
|
98
|
+
events,
|
|
99
|
+
internal
|
|
100
|
+
} = store.getState();
|
|
101
|
+
if ((_internal$lastEvent = internal.lastEvent) != null && _internal$lastEvent.current && events.handlers) events.handlers.onPointerMove(internal.lastEvent.current);
|
|
102
|
+
},
|
|
95
103
|
connect: () => {
|
|
96
104
|
const {
|
|
97
105
|
set,
|
|
@@ -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, w as _roots, v as act, o as addAfterEffect, n as addEffect, p as addTail, m as advance, j as applyProps, f as context, c as createEvents, g as createPortal, a 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, A as useFrame, C as useGraph, x as useInstanceHandle, D as useLoader, y as useStore, z 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-73d51a81.esm.js';
|
|
2
|
+
export { t as ReactThreeFiber, w as _roots, v as act, o as addAfterEffect, n as addEffect, p as addTail, m as advance, j as applyProps, f as context, c as createEvents, g as createPortal, a 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, A as useFrame, C as useGraph, x as useInstanceHandle, D as useLoader, y as useStore, z as useThree } from '../../dist/index-73d51a81.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';
|
|
@@ -65,6 +65,14 @@ function createTouchEvents(store) {
|
|
|
65
65
|
...acc,
|
|
66
66
|
[name]: event => handleTouch(event, name)
|
|
67
67
|
}), {}),
|
|
68
|
+
update: () => {
|
|
69
|
+
var _internal$lastEvent;
|
|
70
|
+
const {
|
|
71
|
+
events,
|
|
72
|
+
internal
|
|
73
|
+
} = store.getState();
|
|
74
|
+
if ((_internal$lastEvent = internal.lastEvent) != null && _internal$lastEvent.current && events.handlers) events.handlers.onPointerMove(internal.lastEvent.current);
|
|
75
|
+
},
|
|
68
76
|
connect: () => {
|
|
69
77
|
const {
|
|
70
78
|
set,
|