(event: MouseEvent)
| 272 | this.mouseMoved = true; |
| 273 | } |
| 274 | onDocumentMouseMove(event: MouseEvent) { |
| 275 | if (!this.updateHoverState(event.clientX, event.clientY)) return; |
| 276 | if (this.onInteract) this.onInteract(); |
| 277 | if (this.isAutoActive && !this.hasUserControl && !this.takeoverActive) { |
| 278 | if (!this.container) return; |
| 279 | const rect = this.container.getBoundingClientRect(); |
| 280 | const nx = (event.clientX - rect.left) / rect.width; |
| 281 | const ny = (event.clientY - rect.top) / rect.height; |
| 282 | this.takeoverFrom.copy(this.coords); |
| 283 | this.takeoverTo.set(nx * 2 - 1, -(ny * 2 - 1)); |
| 284 | this.takeoverStartTime = performance.now(); |
| 285 | this.takeoverActive = true; |
| 286 | this.hasUserControl = true; |
| 287 | this.isAutoActive = false; |
| 288 | return; |
| 289 | } |
| 290 | this.setCoords(event.clientX, event.clientY); |
| 291 | this.hasUserControl = true; |
| 292 | } |
| 293 | onDocumentTouchStart(event: TouchEvent) { |
| 294 | if (event.touches.length !== 1) return; |
| 295 | const t = event.touches[0]; |
nothing calls this directly
no test coverage detected