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

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

121. [LayaAir3]sprite.drawToTexture( ) 无法绘制容器内容 [ 56%]

...   const { x, y, width, height } = this.box         Laya.loader.load('comp/image.png').then(v=>{             const texture = this.box.drawToTexture(width, height, x, y) as Laya.Texture             this.snapshot.texture = texture         });     } 2024-06-05 0 0 分享 微...

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

122. 百度小游戏 内存不断增大的情况 [ 56%]

...igLoaded=function(){ Laya.init(600,400); Laya.loader.load([{url:"res/atlas/comp.json",type:"atlas"}],Handler.create(this,this.onLoadUi)); } __proto.onLoadUi=function(){ Laya.timer.loop(100,this,this.onLoaded); } __proto.onLoaded=function(){ if(this.isOpen){ return; } this.isOpen=true; var testView=n...

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

123. Laya.loader Progress回调形同虚设 [ 56%]

...onLoaded),Handler.create(this, onProgress)); //Laya.loader.load("res/atlas/comp.atlas", Handler.create(this, onLoaded),Handler.create(this, onProgress)); } private function onProgress(v:Number):void { trace("onProgress",v); }    不管添加多少资源,onProgress都只会调用一次  之后...

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

124. 发布时勾选重新生成图集会生成分辨率错误的图集导致图集错乱 [ 56%]

...就是图集的分辨率不对。附件已经给了,请注意res/atlas/comp.png 这张图的分辨率,比正确的图宽和高都多了像素 lookdczar • 2017-12-31 23:21 另外一个人也和我出现了一样的问题 https://ask.layabox.com/question/10105 lookdczar • 2017-12-31 23:32 后...

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

125. UI界面加载有哪些回调方法可用 [ 56%]

...面加载有哪些回调方法可用 Laya.loader.load([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Handler.create(this, this.onLoaded)); 类似于this.onLoaded函数,还有哪些生命周期相关的回调呢。 我想在UI完全加载完毕后,完成一些init操作,this.onLoaded方...

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

126. QQ小游戏开发者工具环境下,已经被本地缓存的图片的加载回调不触发的问题 [ 55%]

...示,但是刷新过后,问题出现了,Laya.loader.load("res/atlas/comp.json", Handler.create(this, onLoaded), null, Loader.ATLAS);这里的onLoaded函数不会被触发,导致后续界面不显示。如果点QQ小程序开发者工具里的清理缓存,界面又再次可以显示,再刷...

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

127. 使用IDE生成图集后,无论使用图集下的某个小图 [ 55%]

...你的路径是错的。比如你的图集资源在ide里用的路径是 comp/bg.png,那你获取图片时也应该是这样的路径方式! 2017-02-23 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 mrchenx 相关问题 Layaair IDE的...

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

128. 关于layaair中类的大小写规则有没有基本的说明文档 [ 55%]

...规则有没有基本的说明文档 比如: Laya.loader.load("res/atlas/comp.json", Laya.Handler.create(null, onLoaded), null, Laya.Loader.ATLAS); Laya.loader.load(resArray, Laya.Handler.create(null,onLoaded)); loader与handler   2017-03-16 添加评论 免费帖 --> 分享 微博 QZONE 微信 ...

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

129. 内存释放问题 [ 55%]

...ew Laya.Dictionary(); constructor() { } static gameLoading(name: string, onCompleted: Function): 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", ty...

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

130. 关于资源加载的问题 [ 55%]

....FILENAME_VERSION); function beginLoad(){ Laya.loader.load("res/atlas/comp.atlas", Handler.create(null, onLoaded)); } function onLoaded(): void { //实例UI界面 var testUI: TestUI = new TestUI(); Laya.stage.addChild(testUI); } 并没有getRes操作。我按这样子写法就不行

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