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

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

1. 屏幕适配-自动竖屏 [ 100%]

...Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.screenMode = Stage.SCREEN_VERTICAL; Laya.stage.bgColor = "#232628"; this.showText(); } showText() { const Text = Laya.Text; let text = new Text(); text.text = "Orientation-Portrait"; text.color = "gray"; text.font = "Impact";...

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

2. 屏幕适配-自动横屏 [ 100%]

...Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL; Laya.stage.bgColor = "#232628"; this.showText(); } showText() { const Text = Laya.Text; let text = new Text(); text.text = "Orientation-Landscape"; text.color = "gray"; text.font = "Impac...

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

3. 屏幕适配-屏幕适配 [ 82%]

...配模式 Laya.stage.scaleMode = "noscale"; //设置横竖屏 Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL; //设置水平对齐 Laya.stage.alignH = "center"; //设置垂直对齐 Laya.stage.alignV = "middle"; //实例一个背景 let bg = new Image(); bg.skin = "res/bg.jpg"; Laya.stage.addChild(...

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

4. DOM元素-表单输入 [ 73%]

....ALIGN_MIDDLE; Laya.stage.scaleMode = Laya.Stage.SCALE_SHOWALL; Laya.stage.screenMode = Laya.Stage.SCREEN_HORIZONTAL; Laya.stage.bgColor = "#FFFFFF"; this.form = new Laya.Sprite(); this.form.size(250, 120); this.form.pos((Laya.stage.width - this.form.width) / 2, (Laya.stage.height - this.form.height...

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

5. 性能测试-卡通人物2 [ 69%]

...caleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL; Stat.enable(); Laya.stage.loadImage("res/cartoon2/background.jpg", 0, 0, 1280, 900); this.createCharacters(); text = new Text(); text.zOrder = 10000; text.fontSize = 60; text.color = "#ff...

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

6. 其他引擎的Demo-Example_23 [ 51%]

...structor() { Laya.init(this.viewWidth, this.viewHeight, WebGL); Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL; Laya.stage.scaleMode = Stage.SCALE_NOBORDER; // create a background texture Laya.stage.loadImage("res/pixi/laserBG.jpg"); Laya.stage.frameLoop(1, this, this.animate); } private animate():...

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