首页 > 技术文章 > Egret Engine 2D - 缩放模式和旋转模式说明

jason-beijing 2017-08-06 15:29 原文

缩放模式和旋转模式说明
缩放模式showAll 常用
noScale
noBorder
exactFit 次常用
fixedWidth
fixedHeight
fixedNarrow
fixedWide
 
可在代码里设置this.stage.scaleMode = egret.StageScaleMode.SHOW_ALL ;可在index.html里配置<body> <divdata-scale-mode="noScale" > </div> </body>
 
旋转设置
auto
portrait
landscape
landscapeFipped 和landscape的方向相反
<body> <divdata-orientation="auto" > </div> </body>可在代码里设置this.stage.orientation = egret.OrientationMode.AUTO;

推荐阅读