Skip to content

Commit a31cc42

Browse files
committed
hide window related codes
1 parent 662455a commit a31cc42

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

packages/shadergradient-v2/src/ShaderGradient/Mesh/Mesh.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export function Mesh({
100100
vertexShader={vertex}
101101
fragmentShader={fragment}
102102
onInit={(material) => {
103-
debug.performance('material (onInit)', material)
103+
// debug.performance('material (onInit)', material)
104104
}}
105105
/>
106106
</mesh>

packages/shadergradient-v2/src/utils/debug.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ declare global {
4141
}
4242
}
4343

44-
if (typeof window !== 'undefined') {
45-
window.debug = debug
46-
}
44+
// if (typeof window !== 'undefined') {
45+
// window.debug = debug
46+
// }

packages/ui/src/components/Shared/ShaderGradientStateless/ShaderGradientStateless.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ export function ShaderGradientStateless(passedProps: GradientT): JSX.Element {
1818
onCameraUpdate={(updates) => {
1919
const { cAzimuthAngle, cPolarAngle, cDistance, cameraZoom } = updates
2020
// defer writing to the URL store; useQueryState itself handles URL push
21-
if (typeof window !== 'undefined') {
22-
// Lazy import to avoid coupling at build time; same store contract
23-
const { useQueryStore } = require('./store')
24-
const next: any = {}
25-
if (typeof cAzimuthAngle !== 'undefined')
26-
next.cAzimuthAngle = cAzimuthAngle
27-
if (typeof cPolarAngle !== 'undefined') next.cPolarAngle = cPolarAngle
28-
if (typeof cDistance !== 'undefined') next.cDistance = cDistance
29-
if (typeof cameraZoom !== 'undefined') next.cameraZoom = cameraZoom
30-
if (Object.keys(next).length) {
31-
useQueryStore.setState(next)
32-
}
33-
}
21+
// if (typeof window !== 'undefined') {
22+
// // Lazy import to avoid coupling at build time; same store contract
23+
// const { useQueryStore } = require('./store')
24+
// const next: any = {}
25+
// if (typeof cAzimuthAngle !== 'undefined')
26+
// next.cAzimuthAngle = cAzimuthAngle
27+
// if (typeof cPolarAngle !== 'undefined') next.cPolarAngle = cPolarAngle
28+
// if (typeof cDistance !== 'undefined') next.cDistance = cDistance
29+
// if (typeof cameraZoom !== 'undefined') next.cameraZoom = cameraZoom
30+
// if (Object.keys(next).length) {
31+
// useQueryStore.setState(next)
32+
// }
33+
// }
3434
}}
3535
/>
3636
)

0 commit comments

Comments
 (0)