@react-three/fiber 8.10.1 → 8.10.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 +6 -0
- package/dist/{index-5d1efa67.cjs.prod.js → index-661b9d11.cjs.prod.js} +4 -3
- package/dist/{index-f2e97578.cjs.dev.js → index-bf8a2906.cjs.dev.js} +4 -3
- package/dist/{index-adfddf12.esm.js → index-fb77d67d.esm.js} +4 -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 +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -586,6 +586,7 @@ function createEvents(store) {
|
|
|
586
586
|
/** Handles intersections by forwarding them to handlers */
|
|
587
587
|
function handleIntersects(intersections, event, delta, callback) {
|
|
588
588
|
const rootState = store.getState();
|
|
589
|
+
|
|
589
590
|
// If anything has been found, forward it to the event listeners
|
|
590
591
|
if (intersections.length) {
|
|
591
592
|
const localState = {
|
|
@@ -755,7 +756,6 @@ function createEvents(store) {
|
|
|
755
756
|
const isPointerMove = name === 'onPointerMove';
|
|
756
757
|
const isClickEvent = name === 'onClick' || name === 'onContextMenu' || name === 'onDoubleClick';
|
|
757
758
|
const filter = isPointerMove ? filterPointerEvents : undefined;
|
|
758
|
-
// const hits = patchIntersects(intersect(filter), event)
|
|
759
759
|
const hits = intersect(event, filter);
|
|
760
760
|
const delta = isClickEvent ? calculateDistance(event) : 0;
|
|
761
761
|
|
|
@@ -779,6 +779,7 @@ function createEvents(store) {
|
|
|
779
779
|
const eventObject = data.eventObject;
|
|
780
780
|
const instance = eventObject.__r3f;
|
|
781
781
|
const handlers = instance == null ? void 0 : instance.handlers;
|
|
782
|
+
|
|
782
783
|
// Check presence of handlers
|
|
783
784
|
if (!(instance != null && instance.eventCount)) return;
|
|
784
785
|
if (isPointerMove) {
|
|
@@ -1990,7 +1991,6 @@ function Portal({
|
|
|
1990
1991
|
* the "R3F hooks can only be used within the Canvas component!" warning:
|
|
1991
1992
|
* <Canvas>
|
|
1992
1993
|
* {createPortal(...)} */
|
|
1993
|
-
|
|
1994
1994
|
const {
|
|
1995
1995
|
events,
|
|
1996
1996
|
size,
|
|
@@ -2012,7 +2012,8 @@ function Portal({
|
|
|
2012
2012
|
// Some props should be off-limits
|
|
2013
2013
|
privateKeys.includes(key) ||
|
|
2014
2014
|
// Otherwise filter out the props that are different and let the inject layer take precedence
|
|
2015
|
-
|
|
2015
|
+
// Unless the inject layer props is undefined, then we keep the root layer
|
|
2016
|
+
rootState[key] !== injectState[key] && injectState[key]) {
|
|
2016
2017
|
delete intersect[key];
|
|
2017
2018
|
}
|
|
2018
2019
|
});
|
|
@@ -586,6 +586,7 @@ function createEvents(store) {
|
|
|
586
586
|
/** Handles intersections by forwarding them to handlers */
|
|
587
587
|
function handleIntersects(intersections, event, delta, callback) {
|
|
588
588
|
const rootState = store.getState();
|
|
589
|
+
|
|
589
590
|
// If anything has been found, forward it to the event listeners
|
|
590
591
|
if (intersections.length) {
|
|
591
592
|
const localState = {
|
|
@@ -755,7 +756,6 @@ function createEvents(store) {
|
|
|
755
756
|
const isPointerMove = name === 'onPointerMove';
|
|
756
757
|
const isClickEvent = name === 'onClick' || name === 'onContextMenu' || name === 'onDoubleClick';
|
|
757
758
|
const filter = isPointerMove ? filterPointerEvents : undefined;
|
|
758
|
-
// const hits = patchIntersects(intersect(filter), event)
|
|
759
759
|
const hits = intersect(event, filter);
|
|
760
760
|
const delta = isClickEvent ? calculateDistance(event) : 0;
|
|
761
761
|
|
|
@@ -779,6 +779,7 @@ function createEvents(store) {
|
|
|
779
779
|
const eventObject = data.eventObject;
|
|
780
780
|
const instance = eventObject.__r3f;
|
|
781
781
|
const handlers = instance == null ? void 0 : instance.handlers;
|
|
782
|
+
|
|
782
783
|
// Check presence of handlers
|
|
783
784
|
if (!(instance != null && instance.eventCount)) return;
|
|
784
785
|
if (isPointerMove) {
|
|
@@ -1990,7 +1991,6 @@ function Portal({
|
|
|
1990
1991
|
* the "R3F hooks can only be used within the Canvas component!" warning:
|
|
1991
1992
|
* <Canvas>
|
|
1992
1993
|
* {createPortal(...)} */
|
|
1993
|
-
|
|
1994
1994
|
const {
|
|
1995
1995
|
events,
|
|
1996
1996
|
size,
|
|
@@ -2012,7 +2012,8 @@ function Portal({
|
|
|
2012
2012
|
// Some props should be off-limits
|
|
2013
2013
|
privateKeys.includes(key) ||
|
|
2014
2014
|
// Otherwise filter out the props that are different and let the inject layer take precedence
|
|
2015
|
-
|
|
2015
|
+
// Unless the inject layer props is undefined, then we keep the root layer
|
|
2016
|
+
rootState[key] !== injectState[key] && injectState[key]) {
|
|
2016
2017
|
delete intersect[key];
|
|
2017
2018
|
}
|
|
2018
2019
|
});
|
|
@@ -559,6 +559,7 @@ function createEvents(store) {
|
|
|
559
559
|
/** Handles intersections by forwarding them to handlers */
|
|
560
560
|
function handleIntersects(intersections, event, delta, callback) {
|
|
561
561
|
const rootState = store.getState();
|
|
562
|
+
|
|
562
563
|
// If anything has been found, forward it to the event listeners
|
|
563
564
|
if (intersections.length) {
|
|
564
565
|
const localState = {
|
|
@@ -728,7 +729,6 @@ function createEvents(store) {
|
|
|
728
729
|
const isPointerMove = name === 'onPointerMove';
|
|
729
730
|
const isClickEvent = name === 'onClick' || name === 'onContextMenu' || name === 'onDoubleClick';
|
|
730
731
|
const filter = isPointerMove ? filterPointerEvents : undefined;
|
|
731
|
-
// const hits = patchIntersects(intersect(filter), event)
|
|
732
732
|
const hits = intersect(event, filter);
|
|
733
733
|
const delta = isClickEvent ? calculateDistance(event) : 0;
|
|
734
734
|
|
|
@@ -752,6 +752,7 @@ function createEvents(store) {
|
|
|
752
752
|
const eventObject = data.eventObject;
|
|
753
753
|
const instance = eventObject.__r3f;
|
|
754
754
|
const handlers = instance == null ? void 0 : instance.handlers;
|
|
755
|
+
|
|
755
756
|
// Check presence of handlers
|
|
756
757
|
if (!(instance != null && instance.eventCount)) return;
|
|
757
758
|
if (isPointerMove) {
|
|
@@ -1963,7 +1964,6 @@ function Portal({
|
|
|
1963
1964
|
* the "R3F hooks can only be used within the Canvas component!" warning:
|
|
1964
1965
|
* <Canvas>
|
|
1965
1966
|
* {createPortal(...)} */
|
|
1966
|
-
|
|
1967
1967
|
const {
|
|
1968
1968
|
events,
|
|
1969
1969
|
size,
|
|
@@ -1985,7 +1985,8 @@ function Portal({
|
|
|
1985
1985
|
// Some props should be off-limits
|
|
1986
1986
|
privateKeys.includes(key) ||
|
|
1987
1987
|
// Otherwise filter out the props that are different and let the inject layer take precedence
|
|
1988
|
-
|
|
1988
|
+
// Unless the inject layer props is undefined, then we keep the root layer
|
|
1989
|
+
rootState[key] !== injectState[key] && injectState[key]) {
|
|
1989
1990
|
delete intersect[key];
|
|
1990
1991
|
}
|
|
1991
1992
|
});
|
|
@@ -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-bf8a2906.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-661b9d11.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, 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-fb77d67d.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-fb77d67d.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-bf8a2906.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-661b9d11.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, 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-fb77d67d.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-fb77d67d.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';
|