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

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

1. 资源加载 · LayaAir3.0文档 · LAYABOX [ 100%]

....SOUND sound 声音类型 Laya.Loader.VIDEO video 视频类型 Laya.Loader.ATLAS atlas 图集类型,加载完成后返回图集json信息(并创建图集内小图Texture) Laya.Loader.HIERARCHY HIERARCHY 层级资源,比如:场景ls文件与预制体lh文件 Laya.Loader.FONT font 位图字体...

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

2. 通用发布 · LayaAir3.0文档 · LAYABOX [ 95%]

...的代码拆分到了分包script文件夹中。 三、打包图集 图集(Atlas)是游戏开发中常见的一种美术资源,通过IDE发布流程将多张图片合并成一张大图,并通过atlas格式的文件存放原始图片资源信息。 图3-1就是采用LayaAirIDE打包好的一张pn...

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

3. 使用二进制图片 · LayaAir3.0文档 · LAYABOX [ 91%]

...作。代码如下: var xhr = new XMLHttpRequest(); xhr.open("get", "res/atlas/comp.png", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload =...

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

4. 多行输入文本组件 · LayaAir3.0文档 · LAYABOX [ 86%]

...行 this.txtarea.overflow = "scroll"; //文本溢出 this.txtarea.skin = "atlas/comp/textarea.png"; //皮肤 this.txtarea.borderColor = "#f6ff03" //边框颜色 this.txtarea.scrollType = Laya.ScrollType.Vertical; //滚动方式 this.txtarea.vScrollBarSkin = "atlas/comp/vscroll.png"; //滚动条皮...

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

5. 树状列表组件 · LayaAir3.0文档 · LAYABOX [ 82%]

...建完毕,此方法只执行一次 onAwake(): void { var res: any[] = ["atlas/comp/vscroll.png", "atlas/comp/vscroll$bar.png", "atlas/comp/vscroll$down.png", "atlas/comp/vscroll$up.png", "resources/tree/clip_selectBox.png", "resources/tree/clip_tree_folder.png", "resources/tree/clip_tree_arrow.png...

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

6. 位图切片组件 · LayaAir3.0文档 · LAYABOX [ 81%]

...dth >> 1, Laya.stage.height >> 1); // 位置 this.clip.skin = "atlas/comp/clip_num.png"; // 皮肤 this.clip.interval = 1000; // 切片动画的播放时间间隔1000毫秒 this.clip.clipX = 10; // 切片x轴数量 this.clip.autoPlay = true; // 动画自动播放 } } 二、通过代码...

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

7. 按钮组件 · LayaAir3.0文档 · LAYABOX [ 80%]

... onAwake(): void { this.btn.scale(5, 5); //放大五倍 this.btn.skin = "atlas/comp/button.png"; //皮肤 this.btn.stateNum = 3; //皮肤状态 this.btn.label = "确定"; //文本标签 this.btn.labelFont = "宋体"; //文本标签字体 this.btn.labelSize = 20; //文本标签字体大小 this.btn.l...

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

8. 输入文本组件 · LayaAir3.0文档 · LAYABOX [ 79%]

...行 this.txtin.overflow = "scroll"; //文本溢出 // this.txtin.skin = "atlas/comp/textinput.png"; //皮肤 this.txtin.bgColor = "#19a4f1"; //背景颜色 this.txtin.borderColor = "#f6ff03" //边框颜色 this.txtin.editable = true; //可编辑状态 // this.txtin.type = "password"; //输入框类...

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

9. 精灵 · LayaAir3.0文档 · LAYABOX [ 69%]

...毕,此方法只执行一次 */ onAwake(): void { this.sprite.loadImage("atlas/comp/image.png"); //纹理:图片路径 this.sprite.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置:屏幕中心 this.sprite.x = Laya.stage.width/2; //x、y分别设置位置 this.sprite.y =...

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

10. 下拉选项框组件 · LayaAir3.0文档 · LAYABOX [ 67%]

...,#ffffff"; this.combobox.selectedIndex = 1; this.combobox.scrollBarSkin = "atlas/comp/vscroll.png"; } } 二、通过代码创建ComboBox组件 在进行书写代码的时候,免不了通过代码控制UI,创建UI_ComboBox类,通过代码设定ComboBox相关的属性。下述示例演示了如...

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