| 410 | }; |
| 411 | |
| 412 | const onPointerMove = e => { |
| 413 | const rect = parent.getBoundingClientRect(); |
| 414 | const x = THREE.MathUtils.clamp((e.clientX - rect.left) / Math.max(1, rect.width), 0, 1); |
| 415 | const y = THREE.MathUtils.clamp(1 - (e.clientY - rect.top) / Math.max(1, rect.height), 0, 1); |
| 416 | currentMouseRef.current.set(x, y); |
| 417 | pointerActiveRef.current = true; |
| 418 | lastMoveTimeRef.current = performance.now(); |
| 419 | ensureLoop(); |
| 420 | }; |
| 421 | const onPointerEnter = () => { |
| 422 | pointerActiveRef.current = true; |
| 423 | ensureLoop(); |
nothing calls this directly
no test coverage detected