1
This commit is contained in:
@ -14,6 +14,7 @@ import { AppRay } from './AppRay';
|
||||
import { GameManager } from './GameManager';
|
||||
import { EventBridge } from '../event/bridge';
|
||||
import { AppHotspot } from './AppHotspot';
|
||||
import { AppDomTo3D } from './AppDomTo3D';
|
||||
|
||||
/**
|
||||
* 主应用类 - 3D场景的核心控制器
|
||||
@ -28,6 +29,7 @@ export class MainApp {
|
||||
appEnv: AppEnv;
|
||||
appRay: AppRay;
|
||||
appHotspot: AppHotspot;
|
||||
appDomTo3D: AppDomTo3D;
|
||||
gameManager: GameManager;
|
||||
|
||||
|
||||
@ -40,6 +42,7 @@ export class MainApp {
|
||||
this.appEnv = new AppEnv(this);
|
||||
this.appRay = new AppRay(this);
|
||||
this.appHotspot = new AppHotspot(this);
|
||||
this.appDomTo3D = new AppDomTo3D(this);
|
||||
this.gameManager = new GameManager(this);
|
||||
|
||||
window.addEventListener("resize", () => this.appEngin.handleResize());
|
||||
@ -58,6 +61,7 @@ export class MainApp {
|
||||
async loadModel(): Promise<void> {
|
||||
await this.appModel.loadModel();
|
||||
await this.gameManager.Awake();
|
||||
console.log(1111111111111111111111);
|
||||
EventBridge.allReady({ scene: this.appScene.object });
|
||||
}
|
||||
|
||||
@ -68,7 +72,8 @@ export class MainApp {
|
||||
this.appCamera.Awake();
|
||||
this.appLight.Awake();
|
||||
this.appEnv.Awake();
|
||||
this.appRay.Awake()
|
||||
this.appRay.Awake();
|
||||
this.appDomTo3D.init();
|
||||
this.appModel.initManagers();
|
||||
this.update();
|
||||
EventBridge.sceneReady({ scene: this.appScene.object });
|
||||
@ -80,6 +85,7 @@ export class MainApp {
|
||||
this.appEngin.object.runRenderLoop(() => {
|
||||
this.appScene.object?.render();
|
||||
this.appCamera.update();
|
||||
this.appDomTo3D.updateDomPositions();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user