刘向辉 3 years ago
parent
commit
50d91a1c10
  1. 5
      src/app/babylon/game.ts

5
src/app/babylon/game.ts

@ -38,7 +38,10 @@ export class Game {
// 监听浏览器改变大小的事件,通过调用engine.resize()来自适应窗口大小
window.addEventListener("resize", function () {
Game.instance.engine.resize();
if (Game.instance != null) {
Game.instance.engine.resize();
}
});
}

Loading…
Cancel
Save