大约有 10 项符合查询结果, 库内数据总量为 30,935 项。 (搜索耗时: 0.0049 秒)
....SOUND sound 声音类型 Laya.Loader.VIDEO video 视频类型 Laya.Loader.ATLAS atlas 图集类型,加载完成后返回图集json信息(并创建图集内小图Texture) Laya.Loader.HIERARCHY HIERARCHY 层级资源,比如:场景ls文件与预制体lh文件 Laya.Loader.FONT font 位图字体...
来源: Laya3.0_文档 发布时间: 20240910
...的代码拆分到了分包script文件夹中。 三、打包图集 图集(Atlas)是游戏开发中常见的一种美术资源,通过IDE发布流程将多张图片合并成一张大图,并通过atlas格式的文件存放原始图片资源信息。 图3-1就是采用LayaAirIDE打包好的一张pn...
来源: Laya3.0_文档 发布时间: 20250103
...作。代码如下: 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
...建完毕,此方法只执行一次 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_文档 发布时间: 20240910
... 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_文档 发布时间: 20240910
...行 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_文档 发布时间: 20240910
...毕,此方法只执行一次 */ 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_文档 发布时间: 20250103
...,#ffffff"; this.combobox.selectedIndex = 1; this.combobox.scrollBarSkin = "atlas/comp/vscroll.png"; } } 二、通过代码创建ComboBox组件 在进行书写代码的时候,免不了通过代码控制UI,创建UI_ComboBox类,通过代码设定ComboBox相关的属性。下述示例演示了如...
来源: Laya3.0_文档 发布时间: 20240910
...dth, height, sizeGrid, false, color)); } 代码示例: Laya.loader.load("atlas/comp/image.png").then((res: Laya.Texture) => { let sp = new Laya.Sprite(); // 绘制九宫格纹理 sp.graphics.draw9Grid(res, 0, 0, 1024, 626, [0, 0, 0, 0, 1]); this.owner.addChild(sp); }); 运行效果: (图9-2...
来源: Laya3.0_文档 发布时间: 20240910
...: void { this.spr.size(512, 313); //设置Sprite大小 this.spr.loadImage("atlas/comp/image.png"); //添加纹理 } } 效果如图4-2所示: (图4-2) 4.1.2 3D节点的基础使用 首先,如动图4-3所示,将场景中已经添加好的3D节点Cube拖入到@property暴露的属性入口中...
来源: Laya3.0_文档 发布时间: 20250103