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

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

141. Sprite-切换纹理 [ 75%]

...GN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load([texture1, texture2], Handler.create(this, onAssetsLoaded)); })(); function onAssetsLoaded() { ape = new Sprite(); Laya.stage.addChild(ape); ape.pivot(55, 72); ape.po...

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

142. 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"; let gap = 150; this.ape1 = new Sprite(); Laya.stage.addChild(this.ape1); this....

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

143. 3D平行光产生的投影,如何修改颜色深浅? [ 75%]

...是绿色,我想换成其他颜色,如何操作? 关于适配采用showAll后留白部分的颜色问题 求问shader中的attribute变量怎么动态修改 修改stage的scale后,会发生异常情况 如何修改物理引擎中的图层 3D模型无法修改scale? Laya.Stage.SCALE_SHOWALL ...

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

144. Sprite-遮罩-放大镜 [ 75%]

...GN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load("../../res/bg2.png", Handler.create(this, setup)); })(); function setup() { var bg = new Sprite(); bg.loadImage("../../res/bg2.png"); Laya.stage.addChild(bg); bg2 = n...

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

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

...Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { this.createSprite(); } createSprite() { const Sprite = Laya.Sprite, Event = Laya.Event; this.sp = new Sprite(); this.sp.graphics.drawRect(0, 0, 2...

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

146. UI-Dialog [ 75%]

...Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; assets = ["../../res/ui/dialog (1).png", "../../res/ui/close.png"]; Laya.loader.load(assets, Handler.create(this, onSkinLoadComplete)); })(); function onSkinLoadComplete() { var dialog...

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

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

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

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

148. UI-Dialog [ 75%]

...Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(assets, Handler.create(this, this.onSkinLoadComplete)); } onSkinLoadComplete() { const Dialog = Laya.Dialog, Image = Laya.Image, Button = Laya.Button; let dialog = new...

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

149. 小游戏如何在iphone x下真正全屏 [ 75%]

...使用: Laya.init(750, 1334, WebGL); Laya.stage.scaleMode = Stage.SCALE_SHOWALL; 如果在iphone x下让游戏全屏不变形? 2018-08-03 添加评论 已悬赏20元 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Laya_Aaron 赞同...

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

150. 鼠标交互-键盘交互 [ 75%]

...GN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { listenKeyboard(); createLogger(); Laya.timer.frameLoop(1, this, keyboardInspector); } function listenKeyboard() { keyDownList = []; //添加键盘按...

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