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

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

1. 垂直布局容器组件 · LayaAir3.0文档 · LAYABOX [ 100%]

... void { this.vbox = new Laya.VBox; this.vbox.pos(100, 100); this.vbox.size(600, 300); this.vbox.bgColor = "#ffffff"; this.vbox.addChild(this.btn1); this.vbox.addChild(this.btn2); this.vbox.addChild(this.btn3); this.vbox.space = 80; this.vbox.align = "center"; } } Copyright ©Layabox 2022 all right r...

来源: Laya3.0_文档 发布时间: 20230922

2. 水平布局容器组件 · LayaAir3.0文档 · LAYABOX [ 99%]

... void { this.hbox = new Laya.HBox; this.hbox.pos(100, 100); this.hbox.size(600, 300); this.hbox.bgColor = "#ffffff"; this.hbox.addChild(this.btn1); this.hbox.addChild(this.btn2); this.hbox.addChild(this.btn3); this.hbox.space = 100; this.hbox.align = "middle"; } } Copyright ©Layabox 2022 all right ...

来源: Laya3.0_文档 发布时间: 20230922

3. 面板容器组件 · LayaAir3.0文档 · LAYABOX [ 96%]

... Laya.Panel(); panel.hScrollBarSkin = "atlas/comp/hscroll.png"; panel.size(600, 275); panel.pos(150, 150); this.owner.addChild(panel); // 创建Image组件,作为Panel的子节点 let img: Laya.Image; for (var i: number = 0; i < 4; i++) { // 创建4个Image,水平排列 img = new Laya.Image("...

来源: Laya3.0_文档 发布时间: 20230923

4. 多线程Worker · LayaAir3.0文档 · LAYABOX [ 81%]

...如下: class LayaUISample { constructor() { //初始化引擎 Laya.init(600,400,Laya.WebGL); //设置Laya提供的worker.js路径 Laya.WorkerLoader.workerPath = "libs/worker.js"; //开启worker线程 Laya.WorkerLoader.enable = true; //加载引擎需要的资源 Laya.loader.load("../atlas/comp.at...

来源: Laya3.0_文档 发布时间: 20240528

5. 动画节点 · LayaAir3.0文档 · LAYABOX [ 79%]

... = "resources/role.atlas"; //接收动画数据源为图集 Animation.size(600, 275); //设置节点大小 Animation.interval = 100; //动画播放的帧间隔时间为100毫秒 Animation.autoPlay = true; //开启自动播放 Animation.wrapMode = 2; //播放模式为pingpong播放模式(PINGPONG...

来源: Laya3.0_文档 发布时间: 20230629