MCPcopy Create free account
hub / github.com/TheOrcDev/github-creature / handleMouseMove

Function handleMouseMove

components/balatro.tsx:218–224  ·  view source on GitHub ↗
(e: MouseEvent)

Source from the content-addressed store, hash-verified

216 container.appendChild(gl.canvas);
217
218 function handleMouseMove(e: MouseEvent) {
219 if (!mouseInteraction) return;
220 const rect = container.getBoundingClientRect();
221 const x = (e.clientX - rect.left) / rect.width;
222 const y = 1.0 - (e.clientY - rect.top) / rect.height;
223 program.uniforms.uMouse.value = [x, y];
224 }
225 container.addEventListener("mousemove", handleMouseMove);
226
227 return () => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected