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

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

1. 屏幕适配-对齐模式 [ 100%]

...NOSCALE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.bgColor = "#232628"; })(); })();module laya { import Stage = Laya.Stage; export class SmartScale_Align_Contral { constructor() { Laya.init(100, 100); Laya.stage.scaleMode = Stage.SCALE_NOSCALE; Laya.s...

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

2. UI-Image [ 95%]

...动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { var dialog = new Image("../../res/ui/dialog (3).png"); dialog.p...

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

3. 区块地图-PerspectiveWall [ 95%]

...动切换至Canvas Laya.init(700, 500, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.bgColor = "#232628"; createMap(); })(); function createMap() { tiledMap = new TiledMap(); tiledMap.createMap("../../res/tiledMap/perspective_walls.json", new Rect...

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

4. 区块地图-带动画的地图 [ 94%]

...动切换至Canvas Laya.init(1100, 800, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createMap(); })(); function createMap() { tiledMap = new TiledMap(); tiledMap.createMap("../../r...

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

5. 屏幕适配-自动横屏 [ 93%]

...动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL; Laya.stage.bgColor = "#232628"; showText(); })(); function showText() { var text = new Tex...

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

6. 屏幕适配-自动竖屏 [ 93%]

...动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.screenMode = Stage.SCREEN_VERTICAL; Laya.stage.bgColor = "#232628"; showText(); })(); function showText() { var text = new Text(...

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

7. 动画-SWF动画 [ 93%]

...owser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; createMovieClip(); })(); function createMovieClip() { var mc = new MovieClip(); mc.load(SWFPath); mc.x = ...

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

8. 文本-字数限制 [ 92%]

...owser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createInput(); })(); function createInput() { var inputText = new Input(); inputText.size(350, ...

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

9. 文本-单行输入 [ 92%]

...owser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; createInput(); })(); function createInput() { var inputText = new Input(); inputText.size(350, 100); inpu...

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

10. 文本-禁止编辑 [ 92%]

...owser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; createInput(); })(); function createInput() { var inputText = new Input(); inputText.size(350, 100); inpu...

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