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

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

151. 屏幕适配失效 [ 83%]

屏幕适配失效 屏幕适配时只有设置 Laya.stage.scaleMode = Stage.SCALE_NOSCALE; 的时候后面两个居中和底部对象属性才会生效 Laya.stage.alignH = "center"; Laya.stage.alignV = "bottom"; 如果缩放设置为 Laya.stage.scaleMode = Stage.SCALE_FIXED_AUTO; 或者非Stage.SCA...

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

152. UI-Slider [ 83%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; var skins = []; skins.push("../../res/ui/hslider.png", "../../res/ui/hslider$bar.png"); skins.push("../../res/ui/vslider.png", "../../res/ui/vslider$bar.png"); ...

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

153. 显示与切换图片(TypeScript-LayaAir基础篇(TS)-位图) [ 83%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#ffffff"; this.showApe(); } private showApe(): void { // 方法1:使用loadImage var ape: Sprite = new Sprite(); ape.pos(100,50); Laya.stage.addChild(ape); ape.loadImage("../../r...

来源: Laya2.0_文档 发布时间: 20210715

154. UI-Button [ 83%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; skins = [ "res/ui/button-1.png", "res/ui/button-2.png", "res/ui/button-3.png", "res/ui/button-4.png", "res/ui/button-5.png", "res/ui/button-6.png" ]; // 计算...

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

155. 关于stage的size问题 [ 83%]

...于stage的size问题 Laya.init(720, 1280, laya.webgl.WebGL); Laya.stage.scaleMode = Laya.Stage.SCALE_NOSCALE; // Laya.stage.size(6000, 6000); Laya.loader.load([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Laya.Handler.create(this, this.onLoaded)); function onLoaded(): void { var sprite = ne...

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

156. UI-Button [ 83%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; skins = [ "../../res/ui/button-1.png", "../../res/ui/button-2.png", "../../res/ui/button-3.png", "../../res/ui/button-4.png", "../../res/ui/button-5.png", "../....

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

157. Sprite-绘制各种形状 [ 83%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; drawSomething(); })(); function drawSomething() { sp = new Sprite(); Laya.stage.addChild(sp); //画线 sp.graphics.drawLine(10, 58, 146, 58, "#ff0000", 3); //画连续直...

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

158. 骨骼动画-适配版Spine [ 83%]

...is.index = -1; Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.scaleMode = Stage.SCALE_NOSCALE; Laya.stage.bgColor = "#232628"; Stat.show(); this.startFun(); } startFun() { this.templet = new SpineTemplet(Laya.SpineVersion.v3_8); this.templet.loadAni(this.aniPath); this.templet.on(Event....

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

159. Sprite-绘制各种形状 [ 83%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.drawSomething(); } drawSomething() { let sp = new Laya.Sprite(); Laya.stage.addChild(sp); //画线 sp.graphics.drawLine(10, 58, 146, 58, "#ff0000", 3); //...

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

160. UI-Slider [ 83%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); skins = []; skins.push("res/ui/hslider.png", "res/ui/hslider$bar.png"); skins.push("res/ui/vslider.png", "res/ui/vslider$bar.png"); Laya.loader.loa...

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