MCPcopy Create free account
hub / github.com/ecto/muni / ExplodedViewer

Function ExplodedViewer

web/src/components/home/ExplodedViewer.tsx:118–139  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

116}
117
118export function ExplodedViewer() {
119 const [ref, inView] = useInView("400px");
120 const prefersReducedMotion = useReducedMotion();
121 const isDarkMode = useDarkMode();
122
123 return (
124 <div ref={ref} className="exploded-viewer">
125 {inView && (
126 <Canvas
127 camera={{ fov: 35, near: 1, far: 5000, position: [490, 350, 700] }}
128 style={{ width: "100%", height: "100%" }}
129 gl={{ antialias: true, alpha: true }}
130 dpr={[1, 1.5]}
131 >
132 <color attach="background" args={[isDarkMode ? "#0a0a0b" : "#f8f8f8"]} />
133 <ResponsiveCamera />
134 <Scene enableRotation={!prefersReducedMotion} />
135 </Canvas>
136 )}
137 </div>
138 );
139}

Callers

nothing calls this directly

Calls 3

useInViewFunction · 0.90
useReducedMotionFunction · 0.90
useDarkModeFunction · 0.90

Tested by

no test coverage detected