26 lines
604 B
Plaintext
26 lines
604 B
Plaintext
import { CameraView } from "./camera";
|
|
|
|
export class CameraManager {
|
|
private cameraView : CameraView | null = null;
|
|
|
|
private static instance : CameraManager | null = null;
|
|
|
|
public static getInstance() : CameraManager {
|
|
if (CameraManager.instance == null) {
|
|
CameraManager.instance = new CameraManager();
|
|
}
|
|
return CameraManager.instance!;
|
|
}
|
|
|
|
public setCameraView(cameraView ?: CameraView) : void {
|
|
this.cameraView = cameraView!
|
|
}
|
|
|
|
public getCameraView() : CameraView | null {
|
|
return this.cameraView;
|
|
}
|
|
|
|
public dispose() : void {
|
|
this.cameraView = null;
|
|
}
|
|
} |