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

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

341. 帮忙看看Texture类getPixels内存泄漏的问题。 [ 77%]

...tPixel(_tex); /************调用该方法导致内存泄漏*************/ if(pixelCount / _initPixelCount < 0.3) { trace("remove"); _htmlCanvas.clear(); _htmlCanvas.destroy(); _tex.destroy(); _colorSpr.off(Event.MOUSE_MOVE, this, __moveHandler); } } private function getPixel(tex:Texture):int { v...

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

342. TimeLine如何判断其是否已经被销毁? [ 77%]

...timeLine给destroy,此时就会报错,那么我该如何加一个条件if判断timeLine1有没有被销毁? 附件 : --> 2016-12-15 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 cuixueying 赞同来自: 第...

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

343. 加载-加载序列 [ 77%]

...xture) { console.log(texture.source); // 恢复默认并发加载个数。 if (++numLoaded == 3) { Laya.loader.maxLoader = 5; console.log("All done."); } } })();module laya { import Texture = Laya.Texture; import Handler = Laya.Handler; export class Loader_Sequence { private numLoaded: number = 0; p...

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

344. laya2.0 截图功能分享,直接截取屏幕上所有对象 [ 77%]

....Texture; /**截图 */ public static drawScreenshot(width, height, x, y) { if (!SwitchHelper.screenDraw) { return null; }  if (!this.tempTexture2D) { this.tempTexture2D = new Laya.Texture2D(system.width, system.height); } if (!this.tempTexture) { this.tempTexture = new Laya.Texture(this.tempTexture...

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

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

...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"); var imageData = Laya.loader.getRes...

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

346. 同步龙骨插槽动画方案 [ 77%]

...oveChildren();//从显示列表移除龙骨动画子对象         if (!this.mArmature.destroyed) {             this.mArmature.destroy(true);         }         this.mFactory.destroy();//释放动画模板类下的纹理数据     } }     xx{     this.mSk...

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

347. 微信小游戏渲染开放域卡顿处理 [ 77%]

...// 检测             var texture = self.$texture;             if (texture) {                 let timer = self.$timer;                 // 通知+延迟刷新界面                 let post = pfUtils.postMessage;                 // post('resume');       ...

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

348. IOS 音乐和音效 切后台再回来 之后声音消失 [ 76%]

...能正常播放了。     static _visibilityChange() {             if (ILaya.stage.isVisibility) {                 SoundManager._recreateWebAudio(() => { SoundManager._stageOnFocus(); });             }             else {                 SoundManager._stageOnBlu...

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

349. 在Native端IOS下提示反射找不到方法? [ 76%]

...如下:(调用静态方法,其中Android使用方法调用正常) if (Laya.Render.isConchApp) { // 通过反射机制,调用Android和IOS原生代码的类和方法 let className = Laya.Browser.onAndriod ? "com.xxxx.yyyy.JSProxy" : "JSProxy"; console.log("className = " + className); var js...

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

350. 输入设备-指南针 [ 76%]

...dicator.y = compassImg.y; } function onOrientationChange(absolute, info) { if (info.alpha === null) { alert("当前设备不支持陀螺仪。"); } else if (firstTime && !absolute && !Browser.onIOS) { firstTime = false; alert("在当前设备中无法获取地球坐标系,使用设备坐标系,...

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