真实接口预热
This commit is contained in:
@ -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();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user