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

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

291. 跳转场景后laya.core.js就报Cannot read property 'width' of null的错误 [ 68%]

....core.js:1410)     at ResInfo.__proto.event (laya.core.js:1166)     at LoaderManager.__proto._endLoad (laya.core.js:14880)     at Loader.onLoaded (laya.core.js:14850)     at EventHandler.__proto.runWith (laya.core.js:1409)     at Loader.__proto.event (laya.core.js:1166)     at Loader.__p...

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

292. 异步加载一个UI对象时的问题 [ 68%]

...createChildren(); let assets = [ { url: "res/atlas/ui/shared.atlas", type: Loader.ATLAS }, { url: "res/atlas/ui/myview.atlas", type: Loader.ATLAS }, { url: "view/MyView.json", type: Loader.JSON }, ] Laya.loader.load(assets, Handler.create(this, this.onLoaded)); } private onLoaded():void { this.creat...

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

293. 自定义loadingView [ 68%]

...进行进度值传参 dd.loading(50); } //加载引擎需要的资源 Laya.loader.load([{url: "res/atlas/comp.json", type: Loader.ATLAS}], Handler.create(this, onLoaded)); } 这里的dd=__JS__("window.loadingView"); 换成 ts 怎么写 Apple • 2018-04-16 16:22 直接 Laya.Brows...

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

294. Laya.Texture2D.load 回调的参数为一堆乱码 [ 68%]

...来的GET参数 如何定义动画播放过某帧后的回调函数 Laya.loader.create 进度回调函数执行两次 怎么停止正在运行Laya.timer.frameLoop的回调函数 点击按钮打开对话框的时候能往对话框中传一个参数吗 对象池对类怎么传参数 IDE中js压缩工...

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

295. 分包后, 资源加载问题 [ 68%]

..., 能否在A项目里加载? 我感觉 应该是在A项目里用Laya.loader加载后, 再加载B.js,这样才合理。 具体代码: private function onAssetLoaded():void { //trace("加载结束"); //实例化类 Example,并添加到舞台显示 Laya.loader.load("js/loading100.js", Handl...

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

296. 微信开放数据域(TypeScript-小游戏适配文档-微信小游戏) [ 68%]

...``typescript if(Laya.Browser.onMiniGame){ //加载一个json和图集 Laya.loader.load(["json/reward.json","res/atlas/test.atlas"],Laya.Handler.create(null,function(){ //加载完成 //使用接口将图集透传到子域 Laya.MiniAdpter.sendAtlasToOpenDataContext("res/atlas/test.atlas"); //使用...

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

297. layaAir如何实现for循环加载多张图片,并且通过事件按比例缩小 [ 68%]

...。layaair折腾半天,搞不明白image组件,sprite.loadImage,Laya.loader.load如果用for循环操作,响应事件中用什么方法指向事件的发起对象?原来用e.target和e.data。现在事件发起者和加载的数据怎么得到呢?(不用循环可以用直接用变量...

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

298. 二进制图片(JavaScript-2D进阶篇(JS)-游戏加载策略) [ 68%]

...prite(); sp.loadImage(url); Laya.stage.addChild(sp);//添加到舞台 //用loader来加载url Laya.loader.load(url,Laya.Handler.create(this,showImg,[url]),null,Laya.Loader.IMAGE); } function errorHandler(url){ var t = new Laya.loader.getRes(url); var ape = new Laya.Sprite(); ape.graphics.drawTexture...

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

299. Laya.loader.getRes的声音资源如何用Laya.SoundManager播放? [ 68%]

Laya.loader.getRes的声音资源如何用Laya.SoundManager播放? var soundData = null; Laya.loader.load("res/audio/TheSacredWar.ogg", Laya.Handler.create(Laya.stage, function () { console.log('音乐加载完成>>>-----------------|>'); soundData = Laya.loader.getRes("res/audio/some...

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

300. 微信小游戏开放域(ActionScript-小游戏适配文档-微信小游戏) [ 68%]

...。 ```typescript if(Browser.onMiniGame){ //加载一个json和图集 Laya.loader.load(["json/reward.json","res/atlas/test.atlas"],Handler.create(this,function(){ //加载完成 //使用接口将图集透传到子域 MiniAdpter.sendAtlasToOpenDataContext("res/atlas/test.atlas"); //使用接口将jso...

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