(event: TouchEvent)
| 156 | } |
| 157 | |
| 158 | function handleTouchMove(event: TouchEvent) { |
| 159 | if (event.touches.length > 0) { |
| 160 | const touch = event.touches[0]; |
| 161 | const rect = container.getBoundingClientRect(); |
| 162 | const x = (touch.clientX - rect.left) / rect.width; |
| 163 | const y = 1 - (touch.clientY - rect.top) / rect.height; |
| 164 | const mouseUniform = program.uniforms.uMouse.value as Float32Array; |
| 165 | mouseUniform[0] = x; |
| 166 | mouseUniform[1] = y; |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | if (interactive) { |
| 171 | container.addEventListener("mousemove", handleMouseMove); |
nothing calls this directly
no outgoing calls
no test coverage detected