import { EventEmitter, type InputEventMouseButton } from '@galacean/effects'; import { Vector2 } from '../math'; import type { ViewportNavigationConfig } from '../configs/types'; import type { GizmoOwner } from '../gizmo-owner'; import type { ViewportParam } from './types'; export type ViewportNavigationSource = 'hand-pan' | 'wheel-pan' | 'wheel-zoom' | 'pinch-zoom'; export type ViewportNavigationChange = ViewportParam & { source: ViewportNavigationSource; }; export type ViewportNavigationEvents = { change: [ViewportNavigationChange]; }; /** * Shared viewport mutation backend. Hand remains a mouse-interaction gizmo, * while wheel classification lives here and both paths use the same camera * pan/zoom primitives and change notification. This class only mutates the * viewport; callers decide whether pointer routing needs to be refreshed. */ export declare class ViewportNavigationController extends EventEmitter { private readonly _owner; private _minScale; private _maxScale; private _configOff?; private _wheelSignature; private _wheelMode; constructor(owner: GizmoOwner); get config(): Readonly; private get _engine(); setScaleRange(minScale: number, maxScale: number): void; /** * Handle a normalized wheel input. * @returns whether the viewport actually changed */ handleWheel(event: InputEventMouseButton, _pointerCaptured: boolean): boolean; panByViewDelta(delta: Vector2, center: Vector2, source: 'hand-pan' | 'wheel-pan'): boolean; zoomByFactor(factor: number, center: Vector2, source: 'wheel-zoom' | 'pinch-zoom'): boolean; dispose(): void; private _classifyWheel; /** Convert runtime's directional wheel-button event to the SDK's view delta convention. */ private _normalizeWheel; private _zoomByShift; private _emitChange; private _containerSize; private _hasViewport; }