• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 2,840 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0073 秒)

161. 分享一下自己的屏幕适配方案 [ 78%]

...享一下自己的屏幕适配方案 废话不多说 上代码 Laya.stage.scaleMode = Laya.Stage.SCALE_FULL nWidth:number; nHeight:number; ImgX:number; ImgY:number; Img:Laya.Image =new Laya.Image(); this.nWidth =this.bg.width; //背景图宽 this.nHeight =this.bg.height;//背景图的高 this.Img....

来源: Laya_社区 发布时间: 20181123

162. 获取index.html中的值 [ 78%]

...le>     <meta name='viewport' content='width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no'/>     <meta name='apple-mobile-web-app-capable' content='yes' />     <meta name='full-screen' content='true' />     <meta name='screen...

来源: Laya_社区 发布时间: 20170413

163. 区块地图-带动画的地图 [ 78%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createMap(); })(); function createMap() { tiledMap = new TiledMap(); tiledMap.createMap("../../res/tiledMap/orthogonal-test-movelayer.json", new Rectangle(0, 0,...

来源: Laya_示例 发布时间: 20251130

164. android旋转屏幕 半边黑屏 [ 78%]

...Laya.stage.alignH = "left"; Laya.stage.screenMode = "vertical"; Laya.stage.scaleMode = Stage.SCALE_FULL; spr = new Sprite var te:Text = new Text(); te.fontSize = 50; te.text = "内容测试"; spr.addChild(te); Laya.stage.addChild(spr); Laya.stage.on(Event.CLICK, this, function():void { if (Laya.stag...

来源: Laya_社区 发布时间: 20170801

165. 为什么mc取得的时候有时候mc.getBounds().width;有值有时候是0 [ 78%]

...ndifined 对一张图片设置width=0 之后获取width为1e-7 设置适配SCALE_FIXED_WIDTH,结果少部分andriod机型不能正确适配屏幕 SCALE_FIXED_WIDTH适配屏幕的问题 我打印laya.stage时看到有个_width 但是我打印laya.stage._width 得到值和之前看到的不一样 SC...

来源: Laya_社区 发布时间: 20161227

166. 设置frame会使打包VIVO Tween动画抖动闪烁 [ 78%]

...once(700, this, this.FlashTween); } private FlashTween ():void { this.hand.scale(2, 2); this.hand.alpha = 1 Tween.to(this.hand, {scaleX:1, scaleY:1, alpha:1}, 300, null, Laya.Handler.create(this, this.DoFlash)); } 循环Tween 缩放一个图片, 从scale=2 缩小到scale=1但是在VIVO手机上看...

来源: Laya_社区 发布时间: 20211109

167. 区块地图-带动画的地图 [ 78%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createMap(); } createMap() { const TiledMap = Laya.TiledMap; let tiledMap = new TiledMap(); tiledMap.createMap("res/tiledMap/orthogonal-test-movelayer.json...

来源: Laya2.0_示例 发布时间: 20251130

168. 关于适配有点疑惑 [ 78%]

关于适配有点疑惑 在http://layaair.ldc.layabox.com/demo/?SmartScale_Scale_SHOW_ALL 这个demo中,我修改js代码测试几种适配模式,有一些困惑   我分别用noscale, fixedwidth, fixedheight进行试验, 代码如下:var rect; (function() { Laya.init(550, 400); // Laya.s...

来源: Laya_社区 发布时间: 20170206

169. 骨骼动画-多纹理 [ 78%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#ffffff"; Stat.show(); this.startFun(); } startFun() { const Templet = Laya.Templet, Event = Laya.Event; const mAniPath = "res/spine/spineRes1/dragon.sk"; mFactory = new ...

来源: Laya2.0_示例 发布时间: 20251130

170. laya.map.TiledMap_API3.0 [ 78%]

...ColumnsGrid numColumnsTile numRowsGrid numRowsTile orientation renderOrder scale tileHeight tileWidth width x y Methods changeViewPort changeViewPortBySize createMap destroy getLayerByIndex getLayerByName getLayerObject getMapProperties getSprite getTexture getTileProperties getTileUserData mapSprit...

来源: Laya3.0_api 发布时间: 20231115