@wandelbots/wandelbots-js-react-components 1.9.1 → 1.9.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/dist/components/ConsoleFilter.d.ts +2 -0
- package/dist/components/ConsoleFilter.d.ts.map +1 -0
- package/dist/components/robots/SupportedRobot.d.ts.map +1 -1
- package/dist/index.cjs +11 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +670 -659
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ConsoleFilter.tsx +24 -0
- package/src/components/robots/SupportedRobot.tsx +2 -0
package/package.json
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import { useEffect } from "react"
|
|
3
|
+
|
|
4
|
+
const defaultWarn = console.warn
|
|
5
|
+
|
|
6
|
+
export default function ConsoleFilter() {
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
console.warn = (data) => {
|
|
9
|
+
// This message is caused by a bug from useSpring in combination with Canvas "demand" frameloop.
|
|
10
|
+
// For now we can only suppress this warning there are no sideeffects yet
|
|
11
|
+
// See https://github.com/pmndrs/react-spring/issues/1586#issuecomment-915051856
|
|
12
|
+
if (
|
|
13
|
+
data ===
|
|
14
|
+
"Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"
|
|
15
|
+
) {
|
|
16
|
+
return
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
defaultWarn(data)
|
|
20
|
+
}
|
|
21
|
+
}, [])
|
|
22
|
+
|
|
23
|
+
return <></>
|
|
24
|
+
}
|
|
@@ -30,6 +30,7 @@ import { DHRobot } from "./DHRobot"
|
|
|
30
30
|
|
|
31
31
|
import * as THREE from "three"
|
|
32
32
|
import { ErrorBoundary } from "react-error-boundary"
|
|
33
|
+
import ConsoleFilter from "../ConsoleFilter"
|
|
33
34
|
|
|
34
35
|
export type DHRobotProps = {
|
|
35
36
|
rapidlyChangingMotionState: MotionGroupStateResponse
|
|
@@ -265,6 +266,7 @@ export function SupportedRobot({
|
|
|
265
266
|
/>
|
|
266
267
|
</group>
|
|
267
268
|
</Suspense>
|
|
269
|
+
<ConsoleFilter />
|
|
268
270
|
</ErrorBoundary>
|
|
269
271
|
)
|
|
270
272
|
}
|