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

Function handleMouseMove

components/liquid-chrome.tsx:149–156  ·  view source on GitHub ↗
(event: MouseEvent)

Source from the content-addressed store, hash-verified

147 resize();
148
149 function handleMouseMove(event: MouseEvent) {
150 const rect = container.getBoundingClientRect();
151 const x = (event.clientX - rect.left) / rect.width;
152 const y = 1 - (event.clientY - rect.top) / rect.height;
153 const mouseUniform = program.uniforms.uMouse.value as Float32Array;
154 mouseUniform[0] = x;
155 mouseUniform[1] = y;
156 }
157
158 function handleTouchMove(event: TouchEvent) {
159 if (event.touches.length > 0) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected