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

大约有 3,506 项符合查询结果, 库内数据总量为 31,671 项。 (搜索耗时: 0.0072 秒)

131. Laya适配IpnhoneX的缩放问题 [ 76%]

...缩放问题   Laya.init(750, 1334, Laya.WebGL); Laya.stage.scaleMode = "showall"; Laya.stage.alignH = Laya.Stage.ALIGN_CENTER; Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE大概设置就是上面的, [img][attach]11977[/attach][/img] [img][attach]11978[/attach][/img] 分别是iphone7和iphone X...

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

132. 图片之间拼接有缝隙的问题 [ 76%]

...了 Laya.stage.bgColor="#ffffff";    Laya.stage.scaleMode=Stage.SCALE_SHOWALL; 然后就只有一个UI页面 yyy.rar 2016-12-15 0 2 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 vvv123 相关问题 unity导出粒子文件问题 laya针...

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

133. 文本-自动调整文本尺寸 [ 76%]

...Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.setup(); } setup() { const Text = Laya.Text; // 该文本自动适应尺寸 var autoSizeText = this.createSampleText(); autoSizeText.overflow = Text.VISIBLE; autoSizeText.y = 50; ...

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

134. Sprite-节点控制 [ 76%]

...GN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; createApes(); })(); function createApes() { //显示两只猩猩 ape1 = new Sprite(); ape2 = new Sprite(); ape1.loadImage("../../res/apes/monkey2.png"); ape2.loadImage("../../res/apes...

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

135. 鼠标交互-自定义事件 [ 75%]

...GN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; createSprite(); })(); function createSprite() { sp = new Sprite(); sp.graphics.drawRect(0, 0, 200, 200, "#D2691E"); sp.pivot(100, 100); sp.x = Laya.stage.width / 2; sp.y = Laya.stage....

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

136. Sprite-轴心点 [ 75%]

...GN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; createApes(); })(); function createApes() { var gap = 300; sp1 = new Sprite(); sp1.loadImage("../../res/apes/monkey2.png", 0, 0); sp1.pos((Laya.stage.width - gap) / 2, Laya.stage.heig...

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

137. 计时器-间隔循环 [ 75%]

...Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { let vGap = 100; this.rotateTimeBasedText = this.createText("基于时间旋转", Laya.stage.width / 2, (Laya.stage.height - vGap) / 2); this.rota...

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

138. 输入设备-摇一摇 [ 75%]

...Browser.height * picW / Browser.width); Laya.stage.scaleMode = Stage.SCALE_SHOWALL; showShakePic(); showConsoleText(); startShake(); })(); function showShakePic() { var shakePic = new Sprite(); shakePic.loadImage("../../res/inputDevice/shake.png"); Laya.stage.addChild(shakePic); } function showConso...

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

139. Sprite-节点控制 [ 75%]

...Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createApes(); } createApes() { const Sprite = Laya.Sprite; let monkey2Path = "res/apes/monkey2.png"; this.ape1 = new Sprite(); this.ape2 = new Sprite(); this.ape1.loadImage(monkey...

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

140. 文本-字符限制 [ 75%]

...Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createTexts(); })(); function createTexts() { createLabel("只允许输入数字:").pos(50, 20); var input = createInput(); input.pos(50, 50); input.restrict = "0-9"; createLabel("...

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