/ Entry. // Initialize the engine based on the IDE. if (window["Laya3D"]) Laya3D.init(GameConfig.width, GameConfig.height); else Laya.init(GameConfig.width, GameConfig.height, Laya["WebGL"]); Laya["Physics"] && Laya["Physics"].enable(); Laya["DebugPanel"] && Laya["DebugPanel"].enable(); Laya.stage.scaleMode = GameConfig.scaleMode; Laya.stage.screenMode = GameConfig.screenMode; Laya.stage.alignV = GameConfig.alignV; Laya.stage.alignH = GameConfig.alignH; // Screen adaptation starts. if (typeof getAdapterInfo !== "undefined") { var stage = Laya.stage; var info = getAdapterInfo({ width: GameConfig.width, height: GameConfig.height, scaleMode: GameConfig.scaleMode }); // Note: GameConfig.width and GameConfig.height indicate the width and height of the quick game in the demo, respectively. Set them based on your needs. stage.designWidth = info.w; stage.designHeight = info.h; stage.width = info.rw; stage.height = info.rh; stage.scale(info.scaleX, info.scaleY); } // Screen adaptation ends.