react-three-game 0.0.35 → 0.0.36
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.
|
@@ -36,6 +36,19 @@ export const PrefabRoot = forwardRef(({ editMode, data, onPrefabChange, selected
|
|
|
36
36
|
if (id === selectedId)
|
|
37
37
|
setSelectedObject(obj);
|
|
38
38
|
}, [selectedId]);
|
|
39
|
+
// Suppress TransformControls scene graph warnings during transitions
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
const originalError = console.error;
|
|
42
|
+
console.error = (...args) => {
|
|
43
|
+
if (typeof args[0] === 'string' && args[0].includes('TransformControls') && args[0].includes('scene graph')) {
|
|
44
|
+
return; // Suppress this specific error
|
|
45
|
+
}
|
|
46
|
+
originalError.apply(console, args);
|
|
47
|
+
};
|
|
48
|
+
return () => {
|
|
49
|
+
console.error = originalError;
|
|
50
|
+
};
|
|
51
|
+
}, []);
|
|
39
52
|
useEffect(() => {
|
|
40
53
|
var _a;
|
|
41
54
|
setSelectedObject(selectedId ? (_a = objectRefs.current[selectedId]) !== null && _a !== void 0 ? _a : null : null);
|
package/package.json
CHANGED
|
@@ -46,6 +46,20 @@ export const PrefabRoot = forwardRef<Group, {
|
|
|
46
46
|
if (id === selectedId) setSelectedObject(obj);
|
|
47
47
|
}, [selectedId]);
|
|
48
48
|
|
|
49
|
+
// Suppress TransformControls scene graph warnings during transitions
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
const originalError = console.error;
|
|
52
|
+
console.error = (...args: any[]) => {
|
|
53
|
+
if (typeof args[0] === 'string' && args[0].includes('TransformControls') && args[0].includes('scene graph')) {
|
|
54
|
+
return; // Suppress this specific error
|
|
55
|
+
}
|
|
56
|
+
originalError.apply(console, args);
|
|
57
|
+
};
|
|
58
|
+
return () => {
|
|
59
|
+
console.error = originalError;
|
|
60
|
+
};
|
|
61
|
+
}, []);
|
|
62
|
+
|
|
49
63
|
useEffect(() => {
|
|
50
64
|
setSelectedObject(selectedId ? objectRefs.current[selectedId] ?? null : null);
|
|
51
65
|
}, [selectedId]);
|