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

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

351. 精灵 · LayaAir3.3 · 引擎文档 · LAYABOX [ 48%]

... Texture; set texture(value: Texture); 我们来看看代码示例: Laya.loader.load("atlas/comp/image.png").then(() => { let sprite = new Laya.Sprite(); //精灵设置纹理并居中显示 let res = Laya.loader.getRes("atlas/comp/image.png"); sprite.pos(Laya.stage.width >> 1, Laya.stage....

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

352. LayaAir引擎工具会员专属功能介绍(TypeScript-简介篇(TS)-LayaAir引擎简介) [ 47%]

...下: ```typescript //先加载plf类型的合并后文件Image.json Laya.loader.load([{url: "res/Image.json", type: "plf"}], Handler.create(this, function():void { //在回调里,正常使用原来的图集 Laya.loader.load("res/atlas/comp.atlas", Handler.create(this, function():void { var img:T...

来源: Laya2.0_文档 发布时间: 20210714

353. 压缩纹理 · LayaAir3.3 · 引擎文档 · LAYABOX [ 46%]

...@regClass() export class Main extends Laya.Script { onAwake(): void { Laya.loader.load(["resource/AtlasConfig.atlas"], Laya.Handler.create(this, () => { let img = new Laya.Image; Laya.stage.addChild(img); img.pos(500, 100); img.skin = "resources/img_bg.png"; //图集中的图片 })); } onStart() ...

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

354. 自动图集配置 · LayaAir3.3 · 引擎文档 · LAYABOX [ 46%]

...在构建发布配置项里手动添加为始终包含的资源目录 Laya.loader.load("resources/aaa/test.atlas").then(() => {//更多资源加载方式,可查看《资源加载》文档 this.owner.skin = "resources/aaa/image.png"; //将图集路径+名称视为小图的资源目录,小图...

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

355. 2D网格渲染器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 46%]

...用后执行,例如节点被添加到舞台后 onEnable(): void { Laya.loader.load("resources/layabox.png", Laya.Loader.IMAGE).then(() => { this.setMesh2DRender(); }); } // 配置2D网格渲染器 setMesh2DRender(): void { let mesh2Drender = this.layaMonkey.getComponent(Laya.Mesh2DRender); // ...

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

356. [LayaAirIDE3]2d相机打包后问题 [ 46%]

...载建筑图片     private loadBuildingImage(): void {         Laya.loader.load(             "res/building.png", // 你的建筑图片路径             Laya.Handler.create(this, () => {                 // 加载完成后绘制到building Sprite上               ...

来源: Laya_社区 发布时间: 20251125

357. laya.ui.Dialog_API3.0 [ 46%]

...。 Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 Laya.loader.load("resource/ui/btn_close.png", Handler.create(this, onLoadComplete));//加载资源。 } private function onLoadComplete():void { dialog = new Dialog_Instance();//创建一个 Dialog_Instance 类的实例对象 dialog...

来源: Laya3.0_api 发布时间: 20231115

358. List翻页效果 [ 45%]

... text_info = cell.getChildByName("text_des") as Laya.Text; let i18n = Laya.loader.getRes("config/i18n.json"); text_info.text = i18n[`tips_text$text_i18n$${1101 + index}`][ConfigInfo.lang] } public setCurPage(index: number) { if (this.m_index != index) { for (let i = 1; i < 7; i++) { let skin = "u...

来源: Laya_社区 发布时间: 20171202

359. List翻页效果怎么实现 [ 45%]

... text_info = cell.getChildByName("text_des") as Laya.Text; let i18n = Laya.loader.getRes("config/i18n.json"); text_info.text = i18n[`tips_text$text_i18n$${1101 + index}`][ConfigInfo.lang] } public setCurPage(index: number) { if (this.m_index != index) { for (let i = 1; i < 7; i++) { let skin = "u...

来源: Laya_社区 发布时间: 20181112

360. 微信小游戏IDE加载位图字体,提示错误 [ 44%]

...nt.__proto.parseFont (http://127.0.0.1:61385/game/code.js:803:17)     at Loader.__proto.onLoaded (http://127.0.0.1:61385/game/code.js:12700:11)     at HTMLImage.onload (http://127.0.0.1:61385/game/code.js:21213:15)     at Image._source._source.onload (http://127.0.0.1:61385/game/code.js:20175:...

来源: Laya_社区 发布时间: 20180306