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

大约有 5 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0020 秒)

1. 舞台的位置怎么自由设定 [ 100%]

...idth-realWidth)*0.5 / pixelRatio;         else if (this._alignH==="center")this.offset.x=(screenWidth-realWidth)*0.5 / pixelRatio;         if (this._alignV==="top")this.offset.y=0;         else if (this._alignV==="bottom")this.offset.y=screenHeight-realHeight;        ...

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

2. 自适应问题 [ 76%]

...tage.alignV = Stage.ALIGN_BOTTOM;       Laya.stage.alignH = Stage.ALIGN_CENTER;              Laya.stage.bgColor = "#ff0000";       Laya.stage.scaleMode = "fixedwidth";   Laya.loader.load("http://localhost/layabox/layabox/layabox/res/bg.png'", Handler.create(this, function () {      ...

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

3. 屏幕适配怎样实现铺满全屏,又不被拉伸? [ 75%]

...  第一步:所有的界面元素在IDE已设置好up/bottom/left/right/centerX/centerY以及layoutEnabled属性   第二步、PC使用showall,手机使用fixedwidth模式,就是下面的custom模式,这个模式是我自己有小改动(只是设置了canvas尺寸与屏幕尺寸始终一...

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

4. 微信小游戏中iPhoneX的适配问题 [ 73%]

...这边找到个临时的解决方法 Laya.stage.alignH = Laya.Stage.ALIGH_CENTER; Laya.stage.alighV = Laya.Stage.ALIGH_MIDDLE; Laya.stage.scaleMode = Laya.Stage.SCALE_FIXED_WIDTH; 然后掉微信的接口查System的信息判断是不是iPhone X 如果是的话在调用 Laya.stage.y = 150 强制调...

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

5. 分享,扩展Laya.Text组件实现简单的富文本 [ 65%]

...th - padding[1] - this.getTextLinesWidth(lines); } else if (this.align == "center") { startX = (this._width - this.getTextLinesWidth(lines)) * 0.5 + padding[3] - padding[1]; } let nowX = startX - (this._clipPoint ? this._clipPoint.x : 0); for (var line of lines) { var word = line['text']; x = nowX; ...

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