真实接口预热

This commit is contained in:
yinsx
2026-01-04 09:58:26 +08:00
parent b56492f80f
commit 2bd183463d
10 changed files with 386 additions and 207 deletions

View File

@ -6,6 +6,7 @@ class BabylonSceneManager {
this.scene = null;
this.camera = null;
this.onModelLoaded = null;
this.onBeforeRender = null; // 渲染前回调
}
init() {
@ -28,6 +29,10 @@ class BabylonSceneManager {
this.scene.createDefaultEnvironment();
this.engine.runRenderLoop(() => {
// 在渲染前调用动画更新
if (this.onBeforeRender) {
this.onBeforeRender();
}
this.scene.render();
});