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

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

151. 微信小游戏 · LayaAir3.3 · 引擎文档 · LAYABOX [ 79%]

...小游戏中加载资源,如果引用的是本地路径,比如: Laya.loader.load("resources/layaair.png"); 如果项目的目录中,全部大小加起来不超过4M的话,只要能找到本地的资源,怎么写也没问题。 但是,微信小游戏的本地包有4M的限制,一旦...

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

152. 微信小游戏怎么加载本地的配置文件 [ 79%]

...nfig(){ this.configAsset=[ {url:"res/config/playerCard.json",type:laya.net.Loader.TEXT} ]; Laya.loader.load(this.configAsset,Handler.create(this,this.loadConfigCallBack)) } public loadConfigCallBack(str:boolean){ if(str){ var config; config=laya.net.Loader.getRes("res/config/playerCard.json"); Playe...

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

153. 设置遮罩(JavaScript-LayaAir基础篇(JS)-位图) [ 79%]

...源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(Res,Handler.create(this,graphicsImg)); })(); function graphicsImg() { img = new Sprite(); //获取图片资源,绘制到画布 img.graphics.drawTexture(Laya.loader.getRes(Res),150,50); //添加到舞台 Laya.sta...

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

154. UI-Tab [ 79%]

...e = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); Laya.loader.load(skins, Handler.create(this, this.onSkinLoaded)); } onSkinLoaded() { let tabA = this.createTab(skins[0]); tabA.pos(40, 120); tabA.labelColors = "#000000,#d3d3d3,#333333"; let tabB =this. createTab(skins[1]); tabB.p...

来源: Laya2.0_示例 发布时间: 20251130

155. 滤镜-颜色滤镜 [ 78%]

...ER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load(ApePath, Handler.create(this, setup)); })(); function setup() { normalizeApe(); makeRedApe(); grayingApe(); } function normalizeApe() { var originalApe = createApe(); apeTexture = Laya.loader.getRes(ApePath); orig...

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

156. 如何显示动画ani [ 78%]

...成了.ani 文件,可是怎么在主页面上显示啊。 教程中 Laya.loader.load("./res/atlas/ui.atlas",Handler.create(this,onLoaded));这个ui.atlas 死活没看见啊。   代码复制了,不行 啊,坑在哪里???? package{import laya.net.Loader;import laya.utils.Handler;import...

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

157. Loader 加载一张图片后,可以把这张图片改名字吗 [ 78%]

Loader 加载一张图片后,可以把这张图片改名字吗 您好,各位大神好。  请问:Loader 加载一张图片后,可以把这张图片改名字吗。 比如:图片图径是res/a.png, 用Loader加载:Laya.loader.load([{url:"res/a.png", type:Laya.Loader.IMAGE}]); 现在...

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

158. graphics使用matrix的异常情况 [ 78%]

graphics使用matrix的异常情况 Laya.loader.load("../../res/apes/monkey2.png", Handler.create(this, function() { var t = Laya.loader.getRes("../../res/apes/monkey2.png"); var ape = new Sprite(); ape.graphics.drawTexture(t, 0, 0); ape.graphics.scale(1.01, 1) Laya.stage.addChild(ape); ape.pos(200...

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

159. UI-TextArea [ 78%]

...tage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(skin, Handler.create(this, onLoadComplete)); })(); function onLoadComplete() { var ta = new TextArea(""); ta.skin = skin; ta.font = "Arial"; ta.fontSize = 18; ta.bold = true; ta.color = "#3d3d3d"; ta.pos(100, 15);...

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

160. 设置遮罩(TypeScript-LayaAir基础篇(TS)-位图) [ 78%]

...源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(this.Res,Laya.Handler.create(this,this.graphicsImg)); } private graphicsImg():void{ this.img = new Laya.Sprite(); //获取图片资源,绘制到画布 this.img.graphics.drawTexture(Laya.loader.getRes(this.Res),1...

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