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

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

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

...GN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL; Laya.stage.bgColor = "#232628"; showText(); })(); function showText() { var text = new Text(); text.text = "Orientation-Landscape"; text.color = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = La...

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

2. DOM元素-表单输入 [ 86%]

...e.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) / 2); Laya.stage.addChi...

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

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

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

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

4. 其他引擎的Demo-Example_23 [ 75%]

...) { Laya.init(viewWidth, 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, animate); })(); function animate() { if (tick > ...

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

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

...r (function() { Laya.init(1280, 720, WebGL); Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL; Stat.enable(); Laya.stage.loadImage("../../res/cartoon2/background.jpg", 0, 0, 1280, 900); createCharacters(); text = new Text(); text.zOrder = 10000; text.fontSize = 60; text.color = "#ff0000" Laya.stage.a...

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