(e: MouseEvent)
| 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 () => { |
nothing calls this directly
no outgoing calls
no test coverage detected