@react-three/fiber 8.0.22 → 8.0.23
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 +69 -69
- package/dist/declarations/src/core/hooks.d.ts +24 -24
- package/dist/declarations/src/core/index.d.ts +60 -60
- package/dist/declarations/src/core/loop.d.ts +13 -13
- package/dist/declarations/src/core/renderer.d.ts +51 -51
- package/dist/declarations/src/core/store.d.ts +93 -93
- package/dist/declarations/src/core/utils.d.ts +82 -82
- package/dist/declarations/src/index.d.ts +10 -10
- package/dist/declarations/src/native/Canvas.d.ts +8 -8
- package/dist/declarations/src/native/events.d.ts +4 -4
- package/dist/declarations/src/native/polyfills.d.ts +1 -1
- package/dist/declarations/src/native.d.ts +10 -10
- package/dist/declarations/src/three-types.d.ts +329 -329
- package/dist/declarations/src/web/Canvas.d.ts +9 -9
- package/dist/declarations/src/web/events.d.ts +4 -4
- package/dist/{index-8ec72a6b.cjs.dev.js → index-1c8e10cf.cjs.dev.js} +14 -26
- package/dist/{index-f1b43982.esm.js → index-ac97daed.esm.js} +14 -26
- package/dist/{index-b47473f2.cjs.prod.js → index-e8067a9e.cjs.prod.js} +14 -26
- 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
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { Options as ResizeOptions } from 'react-use-measure';
|
|
3
|
-
import { RenderProps } from '../core';
|
|
4
|
-
export interface Props extends Omit<RenderProps<HTMLCanvasElement>, 'size'>, React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
fallback?: React.ReactNode;
|
|
7
|
-
resize?: ResizeOptions;
|
|
8
|
-
}
|
|
9
|
-
export declare const Canvas: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLCanvasElement>>;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { Options as ResizeOptions } from 'react-use-measure';
|
|
3
|
+
import { RenderProps } from '../core';
|
|
4
|
+
export interface Props extends Omit<RenderProps<HTMLCanvasElement>, 'size'>, React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
fallback?: React.ReactNode;
|
|
7
|
+
resize?: ResizeOptions;
|
|
8
|
+
}
|
|
9
|
+
export declare const Canvas: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLCanvasElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UseBoundStore } from 'zustand';
|
|
2
|
-
import { RootState } from '../core/store';
|
|
3
|
-
import { EventManager } from '../core/events';
|
|
4
|
-
export declare function createPointerEvents(store: UseBoundStore<RootState>): EventManager<HTMLElement>;
|
|
1
|
+
import { UseBoundStore } from 'zustand';
|
|
2
|
+
import { RootState } from '../core/store';
|
|
3
|
+
import { EventManager } from '../core/events';
|
|
4
|
+
export declare function createPointerEvents(store: UseBoundStore<RootState>): EventManager<HTMLElement>;
|
|
@@ -173,7 +173,7 @@ function prepare(object, state) {
|
|
|
173
173
|
eventCount: 0,
|
|
174
174
|
handlers: {},
|
|
175
175
|
objects: [],
|
|
176
|
-
|
|
176
|
+
parent: null,
|
|
177
177
|
...state
|
|
178
178
|
};
|
|
179
179
|
}
|
|
@@ -287,7 +287,7 @@ function diffProps(instance, {
|
|
|
287
287
|
} // This function applies a set of changes to the instance
|
|
288
288
|
|
|
289
289
|
function applyProps$1(instance, data) {
|
|
290
|
-
var _instance$__r3f3, _root$getState
|
|
290
|
+
var _instance$__r3f3, _root$getState;
|
|
291
291
|
|
|
292
292
|
// Filter equals, events and reserved props
|
|
293
293
|
const localState = (_instance$__r3f3 = instance.__r3f) != null ? _instance$__r3f3 : {};
|
|
@@ -378,7 +378,7 @@ function applyProps$1(instance, data) {
|
|
|
378
378
|
invalidateInstance(instance);
|
|
379
379
|
});
|
|
380
380
|
|
|
381
|
-
if (
|
|
381
|
+
if (localState.parent && rootState.internal && instance.raycast && prevHandlers !== localState.eventCount) {
|
|
382
382
|
// Pre-emptively remove the instance from the interaction manager
|
|
383
383
|
const index = rootState.internal.interaction.indexOf(instance);
|
|
384
384
|
if (index > -1) rootState.internal.interaction.splice(index, 1); // Add the instance to the interaction manager only when it has handlers
|
|
@@ -871,7 +871,7 @@ function createRenderer(roots, getEventPriority) {
|
|
|
871
871
|
if (type === 'primitive') {
|
|
872
872
|
if (props.object === undefined) throw `Primitives without 'object' are invalid!`;
|
|
873
873
|
const object = props.object;
|
|
874
|
-
instance = prepare(object, {
|
|
874
|
+
instance = prepare(object, {
|
|
875
875
|
type,
|
|
876
876
|
root,
|
|
877
877
|
attach,
|
|
@@ -925,9 +925,7 @@ function createRenderer(roots, getEventPriority) {
|
|
|
925
925
|
|
|
926
926
|
if (!added) (_parentInstance$__r3f = parentInstance.__r3f) == null ? void 0 : _parentInstance$__r3f.objects.push(child);
|
|
927
927
|
if (!child.__r3f) prepare(child, {});
|
|
928
|
-
|
|
929
|
-
child.__r3f.parents.push(parentInstance);
|
|
930
|
-
|
|
928
|
+
child.__r3f.parent = parentInstance;
|
|
931
929
|
updateInstance(child);
|
|
932
930
|
invalidateInstance(child);
|
|
933
931
|
}
|
|
@@ -952,9 +950,7 @@ function createRenderer(roots, getEventPriority) {
|
|
|
952
950
|
|
|
953
951
|
if (!added) (_parentInstance$__r3f2 = parentInstance.__r3f) == null ? void 0 : _parentInstance$__r3f2.objects.push(child);
|
|
954
952
|
if (!child.__r3f) prepare(child, {});
|
|
955
|
-
|
|
956
|
-
child.__r3f.parents.push(parentInstance);
|
|
957
|
-
|
|
953
|
+
child.__r3f.parent = parentInstance;
|
|
958
954
|
updateInstance(child);
|
|
959
955
|
invalidateInstance(child);
|
|
960
956
|
}
|
|
@@ -969,7 +965,7 @@ function createRenderer(roots, getEventPriority) {
|
|
|
969
965
|
var _parentInstance$__r3f3, _child$__r3f3, _child$__r3f5;
|
|
970
966
|
|
|
971
967
|
// Clear the parent reference
|
|
972
|
-
if (child.__r3f) child.__r3f.
|
|
968
|
+
if (child.__r3f) child.__r3f.parent = null; // Remove child from the parents objects
|
|
973
969
|
|
|
974
970
|
if ((_parentInstance$__r3f3 = parentInstance.__r3f) != null && _parentInstance$__r3f3.objects) parentInstance.__r3f.objects = parentInstance.__r3f.objects.filter(x => x !== child); // Remove attachment
|
|
975
971
|
|
|
@@ -1032,8 +1028,8 @@ function createRenderer(roots, getEventPriority) {
|
|
|
1032
1028
|
function switchInstance(instance, type, newProps, fiber) {
|
|
1033
1029
|
var _instance$__r3f, _newInstance$__r3f;
|
|
1034
1030
|
|
|
1035
|
-
const
|
|
1036
|
-
if (!
|
|
1031
|
+
const parent = (_instance$__r3f = instance.__r3f) == null ? void 0 : _instance$__r3f.parent;
|
|
1032
|
+
if (!parent) return;
|
|
1037
1033
|
const newInstance = createInstance(type, newProps, instance.__r3f.root); // https://github.com/pmndrs/react-three-fiber/issues/1348
|
|
1038
1034
|
// When args change the instance has to be re-constructed, which then
|
|
1039
1035
|
// forces r3f to re-parent the children and non-scene objects
|
|
@@ -1052,12 +1048,8 @@ function createRenderer(roots, getEventPriority) {
|
|
|
1052
1048
|
}
|
|
1053
1049
|
|
|
1054
1050
|
instance.__r3f.objects = [];
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
removeChild(parent, instance);
|
|
1058
|
-
appendChild(parent, newInstance);
|
|
1059
|
-
} // Re-bind event handlers
|
|
1060
|
-
|
|
1051
|
+
removeChild(parent, instance);
|
|
1052
|
+
appendChild(parent, newInstance); // Re-bind event handlers
|
|
1061
1053
|
|
|
1062
1054
|
if (newInstance.raycast && newInstance.__r3f.eventCount) {
|
|
1063
1055
|
const rootState = newInstance.__r3f.root.getState();
|
|
@@ -1067,9 +1059,7 @@ function createRenderer(roots, getEventPriority) {
|
|
|
1067
1059
|
|
|
1068
1060
|
|
|
1069
1061
|
if ((_newInstance$__r3f = newInstance.__r3f) != null && _newInstance$__r3f.attach) {
|
|
1070
|
-
|
|
1071
|
-
attach(parent, newInstance, newInstance.__r3f.attach);
|
|
1072
|
-
}
|
|
1062
|
+
attach(parent, newInstance, newInstance.__r3f.attach);
|
|
1073
1063
|
} // This evil hack switches the react-internal fiber node
|
|
1074
1064
|
[fiber, fiber.alternate].forEach(fiber => {
|
|
1075
1065
|
if (fiber !== null) {
|
|
@@ -1159,10 +1149,8 @@ function createRenderer(roots, getEventPriority) {
|
|
|
1159
1149
|
} // The attach attribute implies that the object attaches itself on the parent
|
|
1160
1150
|
|
|
1161
1151
|
|
|
1162
|
-
if (localState.attach) {
|
|
1163
|
-
|
|
1164
|
-
attach(parent, instance, localState.attach);
|
|
1165
|
-
}
|
|
1152
|
+
if (localState.parent && localState.attach) {
|
|
1153
|
+
attach(localState.parent, instance, localState.attach);
|
|
1166
1154
|
}
|
|
1167
1155
|
},
|
|
1168
1156
|
|
|
@@ -146,7 +146,7 @@ function prepare(object, state) {
|
|
|
146
146
|
eventCount: 0,
|
|
147
147
|
handlers: {},
|
|
148
148
|
objects: [],
|
|
149
|
-
|
|
149
|
+
parent: null,
|
|
150
150
|
...state
|
|
151
151
|
};
|
|
152
152
|
}
|
|
@@ -260,7 +260,7 @@ function diffProps(instance, {
|
|
|
260
260
|
} // This function applies a set of changes to the instance
|
|
261
261
|
|
|
262
262
|
function applyProps$1(instance, data) {
|
|
263
|
-
var _instance$__r3f3, _root$getState
|
|
263
|
+
var _instance$__r3f3, _root$getState;
|
|
264
264
|
|
|
265
265
|
// Filter equals, events and reserved props
|
|
266
266
|
const localState = (_instance$__r3f3 = instance.__r3f) != null ? _instance$__r3f3 : {};
|
|
@@ -351,7 +351,7 @@ function applyProps$1(instance, data) {
|
|
|
351
351
|
invalidateInstance(instance);
|
|
352
352
|
});
|
|
353
353
|
|
|
354
|
-
if (
|
|
354
|
+
if (localState.parent && rootState.internal && instance.raycast && prevHandlers !== localState.eventCount) {
|
|
355
355
|
// Pre-emptively remove the instance from the interaction manager
|
|
356
356
|
const index = rootState.internal.interaction.indexOf(instance);
|
|
357
357
|
if (index > -1) rootState.internal.interaction.splice(index, 1); // Add the instance to the interaction manager only when it has handlers
|
|
@@ -844,7 +844,7 @@ function createRenderer(roots, getEventPriority) {
|
|
|
844
844
|
if (type === 'primitive') {
|
|
845
845
|
if (props.object === undefined) throw `Primitives without 'object' are invalid!`;
|
|
846
846
|
const object = props.object;
|
|
847
|
-
instance = prepare(object, {
|
|
847
|
+
instance = prepare(object, {
|
|
848
848
|
type,
|
|
849
849
|
root,
|
|
850
850
|
attach,
|
|
@@ -898,9 +898,7 @@ function createRenderer(roots, getEventPriority) {
|
|
|
898
898
|
|
|
899
899
|
if (!added) (_parentInstance$__r3f = parentInstance.__r3f) == null ? void 0 : _parentInstance$__r3f.objects.push(child);
|
|
900
900
|
if (!child.__r3f) prepare(child, {});
|
|
901
|
-
|
|
902
|
-
child.__r3f.parents.push(parentInstance);
|
|
903
|
-
|
|
901
|
+
child.__r3f.parent = parentInstance;
|
|
904
902
|
updateInstance(child);
|
|
905
903
|
invalidateInstance(child);
|
|
906
904
|
}
|
|
@@ -925,9 +923,7 @@ function createRenderer(roots, getEventPriority) {
|
|
|
925
923
|
|
|
926
924
|
if (!added) (_parentInstance$__r3f2 = parentInstance.__r3f) == null ? void 0 : _parentInstance$__r3f2.objects.push(child);
|
|
927
925
|
if (!child.__r3f) prepare(child, {});
|
|
928
|
-
|
|
929
|
-
child.__r3f.parents.push(parentInstance);
|
|
930
|
-
|
|
926
|
+
child.__r3f.parent = parentInstance;
|
|
931
927
|
updateInstance(child);
|
|
932
928
|
invalidateInstance(child);
|
|
933
929
|
}
|
|
@@ -942,7 +938,7 @@ function createRenderer(roots, getEventPriority) {
|
|
|
942
938
|
var _parentInstance$__r3f3, _child$__r3f3, _child$__r3f5;
|
|
943
939
|
|
|
944
940
|
// Clear the parent reference
|
|
945
|
-
if (child.__r3f) child.__r3f.
|
|
941
|
+
if (child.__r3f) child.__r3f.parent = null; // Remove child from the parents objects
|
|
946
942
|
|
|
947
943
|
if ((_parentInstance$__r3f3 = parentInstance.__r3f) != null && _parentInstance$__r3f3.objects) parentInstance.__r3f.objects = parentInstance.__r3f.objects.filter(x => x !== child); // Remove attachment
|
|
948
944
|
|
|
@@ -1005,8 +1001,8 @@ function createRenderer(roots, getEventPriority) {
|
|
|
1005
1001
|
function switchInstance(instance, type, newProps, fiber) {
|
|
1006
1002
|
var _instance$__r3f, _newInstance$__r3f;
|
|
1007
1003
|
|
|
1008
|
-
const
|
|
1009
|
-
if (!
|
|
1004
|
+
const parent = (_instance$__r3f = instance.__r3f) == null ? void 0 : _instance$__r3f.parent;
|
|
1005
|
+
if (!parent) return;
|
|
1010
1006
|
const newInstance = createInstance(type, newProps, instance.__r3f.root); // https://github.com/pmndrs/react-three-fiber/issues/1348
|
|
1011
1007
|
// When args change the instance has to be re-constructed, which then
|
|
1012
1008
|
// forces r3f to re-parent the children and non-scene objects
|
|
@@ -1025,12 +1021,8 @@ function createRenderer(roots, getEventPriority) {
|
|
|
1025
1021
|
}
|
|
1026
1022
|
|
|
1027
1023
|
instance.__r3f.objects = [];
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
removeChild(parent, instance);
|
|
1031
|
-
appendChild(parent, newInstance);
|
|
1032
|
-
} // Re-bind event handlers
|
|
1033
|
-
|
|
1024
|
+
removeChild(parent, instance);
|
|
1025
|
+
appendChild(parent, newInstance); // Re-bind event handlers
|
|
1034
1026
|
|
|
1035
1027
|
if (newInstance.raycast && newInstance.__r3f.eventCount) {
|
|
1036
1028
|
const rootState = newInstance.__r3f.root.getState();
|
|
@@ -1040,9 +1032,7 @@ function createRenderer(roots, getEventPriority) {
|
|
|
1040
1032
|
|
|
1041
1033
|
|
|
1042
1034
|
if ((_newInstance$__r3f = newInstance.__r3f) != null && _newInstance$__r3f.attach) {
|
|
1043
|
-
|
|
1044
|
-
attach(parent, newInstance, newInstance.__r3f.attach);
|
|
1045
|
-
}
|
|
1035
|
+
attach(parent, newInstance, newInstance.__r3f.attach);
|
|
1046
1036
|
} // This evil hack switches the react-internal fiber node
|
|
1047
1037
|
[fiber, fiber.alternate].forEach(fiber => {
|
|
1048
1038
|
if (fiber !== null) {
|
|
@@ -1132,10 +1122,8 @@ function createRenderer(roots, getEventPriority) {
|
|
|
1132
1122
|
} // The attach attribute implies that the object attaches itself on the parent
|
|
1133
1123
|
|
|
1134
1124
|
|
|
1135
|
-
if (localState.attach) {
|
|
1136
|
-
|
|
1137
|
-
attach(parent, instance, localState.attach);
|
|
1138
|
-
}
|
|
1125
|
+
if (localState.parent && localState.attach) {
|
|
1126
|
+
attach(localState.parent, instance, localState.attach);
|
|
1139
1127
|
}
|
|
1140
1128
|
},
|
|
1141
1129
|
|
|
@@ -173,7 +173,7 @@ function prepare(object, state) {
|
|
|
173
173
|
eventCount: 0,
|
|
174
174
|
handlers: {},
|
|
175
175
|
objects: [],
|
|
176
|
-
|
|
176
|
+
parent: null,
|
|
177
177
|
...state
|
|
178
178
|
};
|
|
179
179
|
}
|
|
@@ -287,7 +287,7 @@ function diffProps(instance, {
|
|
|
287
287
|
} // This function applies a set of changes to the instance
|
|
288
288
|
|
|
289
289
|
function applyProps$1(instance, data) {
|
|
290
|
-
var _instance$__r3f3, _root$getState
|
|
290
|
+
var _instance$__r3f3, _root$getState;
|
|
291
291
|
|
|
292
292
|
// Filter equals, events and reserved props
|
|
293
293
|
const localState = (_instance$__r3f3 = instance.__r3f) != null ? _instance$__r3f3 : {};
|
|
@@ -378,7 +378,7 @@ function applyProps$1(instance, data) {
|
|
|
378
378
|
invalidateInstance(instance);
|
|
379
379
|
});
|
|
380
380
|
|
|
381
|
-
if (
|
|
381
|
+
if (localState.parent && rootState.internal && instance.raycast && prevHandlers !== localState.eventCount) {
|
|
382
382
|
// Pre-emptively remove the instance from the interaction manager
|
|
383
383
|
const index = rootState.internal.interaction.indexOf(instance);
|
|
384
384
|
if (index > -1) rootState.internal.interaction.splice(index, 1); // Add the instance to the interaction manager only when it has handlers
|
|
@@ -871,7 +871,7 @@ function createRenderer(roots, getEventPriority) {
|
|
|
871
871
|
if (type === 'primitive') {
|
|
872
872
|
if (props.object === undefined) throw `Primitives without 'object' are invalid!`;
|
|
873
873
|
const object = props.object;
|
|
874
|
-
instance = prepare(object, {
|
|
874
|
+
instance = prepare(object, {
|
|
875
875
|
type,
|
|
876
876
|
root,
|
|
877
877
|
attach,
|
|
@@ -925,9 +925,7 @@ function createRenderer(roots, getEventPriority) {
|
|
|
925
925
|
|
|
926
926
|
if (!added) (_parentInstance$__r3f = parentInstance.__r3f) == null ? void 0 : _parentInstance$__r3f.objects.push(child);
|
|
927
927
|
if (!child.__r3f) prepare(child, {});
|
|
928
|
-
|
|
929
|
-
child.__r3f.parents.push(parentInstance);
|
|
930
|
-
|
|
928
|
+
child.__r3f.parent = parentInstance;
|
|
931
929
|
updateInstance(child);
|
|
932
930
|
invalidateInstance(child);
|
|
933
931
|
}
|
|
@@ -952,9 +950,7 @@ function createRenderer(roots, getEventPriority) {
|
|
|
952
950
|
|
|
953
951
|
if (!added) (_parentInstance$__r3f2 = parentInstance.__r3f) == null ? void 0 : _parentInstance$__r3f2.objects.push(child);
|
|
954
952
|
if (!child.__r3f) prepare(child, {});
|
|
955
|
-
|
|
956
|
-
child.__r3f.parents.push(parentInstance);
|
|
957
|
-
|
|
953
|
+
child.__r3f.parent = parentInstance;
|
|
958
954
|
updateInstance(child);
|
|
959
955
|
invalidateInstance(child);
|
|
960
956
|
}
|
|
@@ -969,7 +965,7 @@ function createRenderer(roots, getEventPriority) {
|
|
|
969
965
|
var _parentInstance$__r3f3, _child$__r3f3, _child$__r3f5;
|
|
970
966
|
|
|
971
967
|
// Clear the parent reference
|
|
972
|
-
if (child.__r3f) child.__r3f.
|
|
968
|
+
if (child.__r3f) child.__r3f.parent = null; // Remove child from the parents objects
|
|
973
969
|
|
|
974
970
|
if ((_parentInstance$__r3f3 = parentInstance.__r3f) != null && _parentInstance$__r3f3.objects) parentInstance.__r3f.objects = parentInstance.__r3f.objects.filter(x => x !== child); // Remove attachment
|
|
975
971
|
|
|
@@ -1032,8 +1028,8 @@ function createRenderer(roots, getEventPriority) {
|
|
|
1032
1028
|
function switchInstance(instance, type, newProps, fiber) {
|
|
1033
1029
|
var _instance$__r3f, _newInstance$__r3f;
|
|
1034
1030
|
|
|
1035
|
-
const
|
|
1036
|
-
if (!
|
|
1031
|
+
const parent = (_instance$__r3f = instance.__r3f) == null ? void 0 : _instance$__r3f.parent;
|
|
1032
|
+
if (!parent) return;
|
|
1037
1033
|
const newInstance = createInstance(type, newProps, instance.__r3f.root); // https://github.com/pmndrs/react-three-fiber/issues/1348
|
|
1038
1034
|
// When args change the instance has to be re-constructed, which then
|
|
1039
1035
|
// forces r3f to re-parent the children and non-scene objects
|
|
@@ -1052,12 +1048,8 @@ function createRenderer(roots, getEventPriority) {
|
|
|
1052
1048
|
}
|
|
1053
1049
|
|
|
1054
1050
|
instance.__r3f.objects = [];
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
removeChild(parent, instance);
|
|
1058
|
-
appendChild(parent, newInstance);
|
|
1059
|
-
} // Re-bind event handlers
|
|
1060
|
-
|
|
1051
|
+
removeChild(parent, instance);
|
|
1052
|
+
appendChild(parent, newInstance); // Re-bind event handlers
|
|
1061
1053
|
|
|
1062
1054
|
if (newInstance.raycast && newInstance.__r3f.eventCount) {
|
|
1063
1055
|
const rootState = newInstance.__r3f.root.getState();
|
|
@@ -1067,9 +1059,7 @@ function createRenderer(roots, getEventPriority) {
|
|
|
1067
1059
|
|
|
1068
1060
|
|
|
1069
1061
|
if ((_newInstance$__r3f = newInstance.__r3f) != null && _newInstance$__r3f.attach) {
|
|
1070
|
-
|
|
1071
|
-
attach(parent, newInstance, newInstance.__r3f.attach);
|
|
1072
|
-
}
|
|
1062
|
+
attach(parent, newInstance, newInstance.__r3f.attach);
|
|
1073
1063
|
} // This evil hack switches the react-internal fiber node
|
|
1074
1064
|
[fiber, fiber.alternate].forEach(fiber => {
|
|
1075
1065
|
if (fiber !== null) {
|
|
@@ -1159,10 +1149,8 @@ function createRenderer(roots, getEventPriority) {
|
|
|
1159
1149
|
} // The attach attribute implies that the object attaches itself on the parent
|
|
1160
1150
|
|
|
1161
1151
|
|
|
1162
|
-
if (localState.attach) {
|
|
1163
|
-
|
|
1164
|
-
attach(parent, instance, localState.attach);
|
|
1165
|
-
}
|
|
1152
|
+
if (localState.parent && localState.attach) {
|
|
1153
|
+
attach(localState.parent, instance, localState.attach);
|
|
1166
1154
|
}
|
|
1167
1155
|
},
|
|
1168
1156
|
|
|
@@ -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-1c8e10cf.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-e8067a9e.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, b as useIsomorphicLayoutEffect, d as unmountComponentAtNode } from './index-
|
|
2
|
-
export { t as ReactThreeFiber, s as _roots, q as act, n as addAfterEffect, m as addEffect, o as addTail, l as advance, i as applyProps, f as context, g as createPortal, a as createRoot, j as dispose, e as extend, p as getRootState, k as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, x as useFrame, y as useGraph, z as useLoader, v as useStore, w as useThree } from './index-
|
|
1
|
+
import { c as createEvents, e as extend, u as useMutableCallback, a as createRoot, E as ErrorBoundary, B as Block, b as useIsomorphicLayoutEffect, d as unmountComponentAtNode } from './index-ac97daed.esm.js';
|
|
2
|
+
export { t as ReactThreeFiber, s as _roots, q as act, n as addAfterEffect, m as addEffect, o as addTail, l as advance, i as applyProps, f as context, g as createPortal, a as createRoot, j as dispose, e as extend, p as getRootState, k as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, x as useFrame, y as useGraph, z as useLoader, v as useStore, w as useThree } from './index-ac97daed.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-1c8e10cf.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-e8067a9e.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, s as _roots, q as act, n as addAfterEffect, m as addEffect, o as addTail, l as advance, i as applyProps, f as context, g as createPortal, a as createRoot, j as dispose, e as extend, p as getRootState, k as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, x as useFrame, y as useGraph, z as useLoader, v as useStore, w 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-ac97daed.esm.js';
|
|
2
|
+
export { t as ReactThreeFiber, s as _roots, q as act, n as addAfterEffect, m as addEffect, o as addTail, l as advance, i as applyProps, f as context, g as createPortal, a as createRoot, j as dispose, e as extend, p as getRootState, k as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, x as useFrame, y as useGraph, z as useLoader, v as useStore, w as useThree } from '../../dist/index-ac97daed.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';
|