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

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

1. 分享个用美术资源做位图文本的方法。。。 [ 100%]

... class GameMain{ constructor() { Laya.init(600,400); var that = this; Laya.loader.load([{"url":"res/playerKpiFont.json","type":Laya.Loader.JSON}, {"url":"res/playerKpiFont.png","type":Laya.Loader.IMAGE}],new Laya.Handler(that,function(){ var jsonData = Laya.loader.getRes("res/playerKpiFont.json"); v...

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

2. 为何发生此类报错Uncaught TypeError: Cannot read property '_tf' of null [ 94%]

...Mode="horizontal"; //加载FGUI中的文件 var ProgressBar,resArray; Laya.loader.load([ {url:"res/Public.fui",type:laya.net.Loader.BUFFER}, {url:"res/Public@atlas_ucn9w.png",type:laya.net.Loader.IMAGE}, {url:"res/Public@atlas_ucn90.png",type:laya.net.Loader.IMAGE}, {url:"res/Public@atlas0.png",type...

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

3. [LayaAirIDE 2.0]TextInput真机输入时显示蓝色字,求解 [ 94%]

...ut.text.trim().length == 0) { input.changeText(""); sp_icon.texture = Laya.loader.getRes("auth/sp_wrong.png"); switch (input.name) { case "input_nickname": this._arrCheck[0] = false; break; case "input_mobile": this._arrCheck[1] = false; break; case "input_password": this._arrCheck[2] = false; break...

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

4. Laya.loader.load(xx) 当地址""的时候,会报错。 [ 94%]

Laya.loader.load(xx) 当地址""的时候,会报错。 laya 引擎是2.5的      Laya.loader.load(cg_url,Laya.Handler.create(this,()=>{             let tur:Laya.Texture = Laya.loader.getRes(cg_url);             if(tur)img_cg.graphics.drawImage(tur)        ...

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

5. laya接入fairyGUI的时候资源加载方式? [ 93%]

laya接入fairyGUI的时候资源加载方式?     Laya.loader.load([{ url: "res/Basics_atlas0.png", type: laya.net.Loader.IMAGE },     { url: "res/Basics.fui", type: laya.net.Loader.BUFFER }, { url: "res/MainMenu_atlas0.png", type: laya.net.Loader.IMAGE },     { url: "res/MainMenu.fu...

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

6. 引擎 TiledMap 居然不支持图块翻转 [ 90%]

...450;             this._gridHeight = 450;             this._jsonLoader = null;             this._loader = null;             this._tileSetArray = [];             this._currTileSet = null;             this._completeHandler = null;             this._mapRect = ne...

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

7. 内存释放问题 [ 85%]

...ion): void { let uiResArray = [ { url: "res/atlas/common.json", type: Laya.Loader.ATLAS }, { url: "res/atlas/comp.json", type: Laya.Loader.ATLAS }, // 登录的UI和选角的UI { url: "res/atlas/user.json", type: Laya.Loader.ATLAS }, { url: resourcesCenter.ResourcesPathStr.PROTO_FILE_PATH, type: Lay...

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

8. htmlCanvas 像素级操作 [ 84%]

htmlCanvas 像素级操作 function showSprite() { Laya.loader.load("../src/img/testImg.png",Laya.Handler.create(this,graphicsImg)); } function graphicsImg() { //临时sprite var img = new Laya.Sprite(); //img.graphics.drawTexture(Laya.loader.getRes(("../src/img/testImg.png"),0,0)); //获取图片...

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

9. 分享:图集资源做位图文本的工具类(知道fontclip组件的可以略过了,之前一直没注意到这个组件) [ 83%]

...is.getResName(char); let sp: Laya.Sprite = this.getSprite(); let tx = Laya.Loader.getRes(resName); if (!tx) { console.warn(TipConfig.tips.haveNoTheChar, char); } sp.texture = tx; this.chars.push(sp); this.addChild(sp); } this.sortCharsByAlign(this._align); } /** * 水平对齐方式 */ public set al...

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

10. TS2D基础篇-图集动画运用 问题 [ 82%]

...码: --------源码--------- var aniData=_this_._parseGraphicAnimation(Loader.getRes(url)); if (!aniData)return; var aniList=aniData.animationList; var i=0,len=aniList.length; --------源码--------- 报错: aniList.length为null "Cannot read property 'length' of null" 2018-07-19 添加评论 ...

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