28 lines
733 B
TypeScript
28 lines
733 B
TypeScript
import type { ViewerHudBindings } from "./viewerHudState";
|
|
import type { Selectable, CameraMode } from "./viewerTypes";
|
|
import { ViewerAppController } from "./ViewerAppController";
|
|
|
|
export class GameViewer {
|
|
private readonly controller: ViewerAppController;
|
|
|
|
constructor(container: HTMLElement, hud: ViewerHudBindings) {
|
|
this.controller = new ViewerAppController(container, hud);
|
|
}
|
|
|
|
async start() {
|
|
await this.controller.start();
|
|
}
|
|
|
|
focusSelection(selection: Selectable, cameraMode?: CameraMode) {
|
|
this.controller.focusSelection(selection, cameraMode);
|
|
}
|
|
|
|
openHistoryWindow(selection: Selectable) {
|
|
this.controller.openHistoryWindow(selection);
|
|
}
|
|
|
|
dispose() {
|
|
this.controller.dispose();
|
|
}
|
|
}
|