@react-three/fiber 8.15.6 → 8.15.8
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/{index-a2103d81.esm.js → index-594193f5.esm.js} +6 -15
- package/dist/{index-9bf2e8aa.cjs.dev.js → index-d26c5c57.cjs.dev.js} +6 -15
- package/dist/{index-66b6e976.cjs.prod.js → index-e6d64601.cjs.prod.js} +6 -15
- 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
|
@@ -100,11 +100,7 @@ function createRenderer(_roots, _getEventPriority) {
|
|
|
100
100
|
parentInstance.children = [...restSiblings.slice(0, index), child, ...restSiblings.slice(index)];
|
|
101
101
|
added = true;
|
|
102
102
|
}
|
|
103
|
-
|
|
104
|
-
if (!added && objects) {
|
|
105
|
-
const index = objects.indexOf(beforeChild);
|
|
106
|
-
if (index !== -1) objects.splice(index, 0, child);else objects.push(child);
|
|
107
|
-
}
|
|
103
|
+
if (!added) (_parentInstance$__r3f2 = parentInstance.__r3f) == null ? void 0 : _parentInstance$__r3f2.objects.push(child);
|
|
108
104
|
if (!child.__r3f) prepare(child, {});
|
|
109
105
|
child.__r3f.parent = parentInstance;
|
|
110
106
|
updateInstance(child);
|
|
@@ -120,11 +116,7 @@ function createRenderer(_roots, _getEventPriority) {
|
|
|
120
116
|
// Clear the parent reference
|
|
121
117
|
if (child.__r3f) child.__r3f.parent = null;
|
|
122
118
|
// Remove child from the parents objects
|
|
123
|
-
|
|
124
|
-
if (objects) {
|
|
125
|
-
const index = objects.indexOf(child);
|
|
126
|
-
if (index !== -1) objects.splice(index, 1);
|
|
127
|
-
}
|
|
119
|
+
if ((_parentInstance$__r3f3 = parentInstance.__r3f) != null && _parentInstance$__r3f3.objects) parentInstance.__r3f.objects = parentInstance.__r3f.objects.filter(x => x !== child);
|
|
128
120
|
// Remove attachment
|
|
129
121
|
if ((_child$__r3f3 = child.__r3f) != null && _child$__r3f3.attach) {
|
|
130
122
|
detach(parentInstance, child, child.__r3f.attach);
|
|
@@ -190,14 +182,13 @@ function createRenderer(_roots, _getEventPriority) {
|
|
|
190
182
|
}
|
|
191
183
|
instance.__r3f.objects.forEach(child => appendChild(newInstance, child));
|
|
192
184
|
instance.__r3f.objects = [];
|
|
193
|
-
const autoRemovedBeforeAppend = !!newInstance.parent;
|
|
194
185
|
if (!instance.__r3f.autoRemovedBeforeAppend) {
|
|
195
|
-
insertBefore(parent, newInstance, instance);
|
|
196
186
|
removeChild(parent, instance);
|
|
197
|
-
} else {
|
|
198
|
-
appendChild(parent, newInstance);
|
|
199
187
|
}
|
|
200
|
-
newInstance.
|
|
188
|
+
if (newInstance.parent) {
|
|
189
|
+
newInstance.__r3f.autoRemovedBeforeAppend = true;
|
|
190
|
+
}
|
|
191
|
+
appendChild(parent, newInstance);
|
|
201
192
|
|
|
202
193
|
// Re-bind event handlers
|
|
203
194
|
if (newInstance.raycast && newInstance.__r3f.eventCount) {
|
|
@@ -127,11 +127,7 @@ function createRenderer(_roots, _getEventPriority) {
|
|
|
127
127
|
parentInstance.children = [...restSiblings.slice(0, index), child, ...restSiblings.slice(index)];
|
|
128
128
|
added = true;
|
|
129
129
|
}
|
|
130
|
-
|
|
131
|
-
if (!added && objects) {
|
|
132
|
-
const index = objects.indexOf(beforeChild);
|
|
133
|
-
if (index !== -1) objects.splice(index, 0, child);else objects.push(child);
|
|
134
|
-
}
|
|
130
|
+
if (!added) (_parentInstance$__r3f2 = parentInstance.__r3f) == null ? void 0 : _parentInstance$__r3f2.objects.push(child);
|
|
135
131
|
if (!child.__r3f) prepare(child, {});
|
|
136
132
|
child.__r3f.parent = parentInstance;
|
|
137
133
|
updateInstance(child);
|
|
@@ -147,11 +143,7 @@ function createRenderer(_roots, _getEventPriority) {
|
|
|
147
143
|
// Clear the parent reference
|
|
148
144
|
if (child.__r3f) child.__r3f.parent = null;
|
|
149
145
|
// Remove child from the parents objects
|
|
150
|
-
|
|
151
|
-
if (objects) {
|
|
152
|
-
const index = objects.indexOf(child);
|
|
153
|
-
if (index !== -1) objects.splice(index, 1);
|
|
154
|
-
}
|
|
146
|
+
if ((_parentInstance$__r3f3 = parentInstance.__r3f) != null && _parentInstance$__r3f3.objects) parentInstance.__r3f.objects = parentInstance.__r3f.objects.filter(x => x !== child);
|
|
155
147
|
// Remove attachment
|
|
156
148
|
if ((_child$__r3f3 = child.__r3f) != null && _child$__r3f3.attach) {
|
|
157
149
|
detach(parentInstance, child, child.__r3f.attach);
|
|
@@ -217,14 +209,13 @@ function createRenderer(_roots, _getEventPriority) {
|
|
|
217
209
|
}
|
|
218
210
|
instance.__r3f.objects.forEach(child => appendChild(newInstance, child));
|
|
219
211
|
instance.__r3f.objects = [];
|
|
220
|
-
const autoRemovedBeforeAppend = !!newInstance.parent;
|
|
221
212
|
if (!instance.__r3f.autoRemovedBeforeAppend) {
|
|
222
|
-
insertBefore(parent, newInstance, instance);
|
|
223
213
|
removeChild(parent, instance);
|
|
224
|
-
} else {
|
|
225
|
-
appendChild(parent, newInstance);
|
|
226
214
|
}
|
|
227
|
-
newInstance.
|
|
215
|
+
if (newInstance.parent) {
|
|
216
|
+
newInstance.__r3f.autoRemovedBeforeAppend = true;
|
|
217
|
+
}
|
|
218
|
+
appendChild(parent, newInstance);
|
|
228
219
|
|
|
229
220
|
// Re-bind event handlers
|
|
230
221
|
if (newInstance.raycast && newInstance.__r3f.eventCount) {
|
|
@@ -127,11 +127,7 @@ function createRenderer(_roots, _getEventPriority) {
|
|
|
127
127
|
parentInstance.children = [...restSiblings.slice(0, index), child, ...restSiblings.slice(index)];
|
|
128
128
|
added = true;
|
|
129
129
|
}
|
|
130
|
-
|
|
131
|
-
if (!added && objects) {
|
|
132
|
-
const index = objects.indexOf(beforeChild);
|
|
133
|
-
if (index !== -1) objects.splice(index, 0, child);else objects.push(child);
|
|
134
|
-
}
|
|
130
|
+
if (!added) (_parentInstance$__r3f2 = parentInstance.__r3f) == null ? void 0 : _parentInstance$__r3f2.objects.push(child);
|
|
135
131
|
if (!child.__r3f) prepare(child, {});
|
|
136
132
|
child.__r3f.parent = parentInstance;
|
|
137
133
|
updateInstance(child);
|
|
@@ -147,11 +143,7 @@ function createRenderer(_roots, _getEventPriority) {
|
|
|
147
143
|
// Clear the parent reference
|
|
148
144
|
if (child.__r3f) child.__r3f.parent = null;
|
|
149
145
|
// Remove child from the parents objects
|
|
150
|
-
|
|
151
|
-
if (objects) {
|
|
152
|
-
const index = objects.indexOf(child);
|
|
153
|
-
if (index !== -1) objects.splice(index, 1);
|
|
154
|
-
}
|
|
146
|
+
if ((_parentInstance$__r3f3 = parentInstance.__r3f) != null && _parentInstance$__r3f3.objects) parentInstance.__r3f.objects = parentInstance.__r3f.objects.filter(x => x !== child);
|
|
155
147
|
// Remove attachment
|
|
156
148
|
if ((_child$__r3f3 = child.__r3f) != null && _child$__r3f3.attach) {
|
|
157
149
|
detach(parentInstance, child, child.__r3f.attach);
|
|
@@ -217,14 +209,13 @@ function createRenderer(_roots, _getEventPriority) {
|
|
|
217
209
|
}
|
|
218
210
|
instance.__r3f.objects.forEach(child => appendChild(newInstance, child));
|
|
219
211
|
instance.__r3f.objects = [];
|
|
220
|
-
const autoRemovedBeforeAppend = !!newInstance.parent;
|
|
221
212
|
if (!instance.__r3f.autoRemovedBeforeAppend) {
|
|
222
|
-
insertBefore(parent, newInstance, instance);
|
|
223
213
|
removeChild(parent, instance);
|
|
224
|
-
} else {
|
|
225
|
-
appendChild(parent, newInstance);
|
|
226
214
|
}
|
|
227
|
-
newInstance.
|
|
215
|
+
if (newInstance.parent) {
|
|
216
|
+
newInstance.__r3f.autoRemovedBeforeAppend = true;
|
|
217
|
+
}
|
|
218
|
+
appendChild(parent, newInstance);
|
|
228
219
|
|
|
229
220
|
// Re-bind event handlers
|
|
230
221
|
if (newInstance.raycast && newInstance.__r3f.eventCount) {
|
|
@@ -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-d26c5c57.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-e6d64601.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-594193f5.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-594193f5.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-d26c5c57.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-e6d64601.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-594193f5.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-594193f5.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';
|