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

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

331. 图集动画没有显示 [ 73%]

...Laya.Handler.create(this, this.createAnimation), null, Laya.loader.ATLAS); function createAnimation() { var ani = new Laya.Animation(); ani.loadAtlas(AniConfPath); ani.interval = 30; ani.index = 1; ani.play(); Laya.stage.addChild(ani); } 2017-09-20 添加评论 免费帖 --> 分享 微博 QZONE 微...

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

332. Animation 的createFrames 使用已经加载的图集缓存动画失败 [ 73%]

...ath:String = "res/fighter/fighter.json"; private var fly:Animation; public function Animation_Altas() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.loader.load(AniConfPath, Handler.create(this, createAnimation), null, Loader.ATLAS); } p...

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

333. 动画-图集动画 [ 72%]

...rivate const AniConfPath:String = "../../res/fighter/fighter.json"; public function Animation_Altas() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.sc...

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

334. 请问laya里如何解析json,似乎和AS3的不太一样。 [ 72%]

...接 提交 2 个回复 cuixueying 赞同来自: SONIC3D 、sevennqi public function BBB() { Laya.init(550,400); Laya.loader.load("res/atlas/comp.json",Handler.create(this,onLoaded),null,Loader.ATLAS); } private function onLoaded():void { var json:JSON=Laya.loader.getRes("res/atlas/comp.json"); }JSON...

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

335. 发布小游戏时提示[ERR]|CompressJS Fail [ 72%]

...sole.log(res.model) } })[/code]  改为 [code]wx.getSystemInfo({ success: function (res) { =inheritconsole.log(res.model) } })[/code] 2018-11-19 0 0 分享 微博 QZONE 微信 zhangdiansong 赞同来自: 可以使用不压缩发布出来,然后用第三方工具如JSCompress单独对code.js压缩...

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

336. 华为快游戏分包指南(TypeScript-小游戏适配文档-华为快游戏) [ 72%]

...ipt var task = qg.loadSubpackage({ subpackage:'subpackageName1', success : function () { console.log("loadSubpackage success" ); }, fail:function(){ console.log("loadSubpackage fail"); }, complete:function() { console.log("loadSubpackage complete"); } }); task.onprogress( callback(res) { console.log...

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

337. wx.canvasToTempFilePath在TS下如何使用啊? [ 72%]

...ight: 100, destWidth: 100, destHeight: 100, canvasId: 'myCanvas', success: function (res) { wxd.shareUrl = res.tempFilePath wxd.ShareAppMessage() console.log(res.tempFilePath) } }) 一直报错[ts] The 'this' context of type 'typeof wx' is not assignable to method's 'this' of type 'string'. canvasId...

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

338. img点击事件。点击图片外,也触发了事件。请问怎么解决 [ 72%]

...MIDDLE; Laya.loader.load("res/img/m1.jpg",Laya.Handler.create(this,load)); function load(){ let ctn2=new Laya.Sprite(); Laya.stage.addChild(ctn2); var gq=new Laya.Sprite(); gq.loadImage("res/img/m1.jpg",100,100,100,100);   ctn2.addChild(gq); gq.on(Laya.Event.CLICK,this,Is);   }  function Is(){ co...

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

339. 微信小游戏wxmin图片加载有点问题 [ 72%]

微信小游戏wxmin图片加载有点问题 MiniFileMgr.copyFile=function(tempFilePath,readyUrl,callBack){ var temp=tempFilePath.split("/"); var tempFileName=temp[temp.length-1]; var fileurlkey=readyUrl.split("?")[0]; var fileObj=null var fileObj=MiniFileMgr.getFileInfo(readyUrl); // 这行会导...

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

340. vivo小游戏分包指南(TypeScript-小游戏适配文档-vivo小游戏) [ 72%]

...avascript const loadTaskA = qg.loadSubpackage({ name: 'sub1Name', success: function (data) { console.info('加载分包 sub1Name 成功') }, fail: function (err) { console.info('加载分包 sub1Name 失败', err) }, complete: function(){ // 不管分包加载成功还是失败都会执行此回调 ...

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