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

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

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

...nt(v: string){ if(!v || v == ""){ return; } // 移除上次绘制的内容 for(var k=0;k<this.numChildren;k++){ Laya.Pool.recover("sprite",this._childs[k]); } this.removeChildren(); var charTotal: number = v.length; var charSps: any = ; for(var i=0;i<charTotal;i++){ var targetChar = v.substr(i...

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

42. 请问这个WebGL警告是怎么回事? [ 86%]

...WebGL: INVALID_VALUE: texImage2D: width or height out of range [.Offscreen-For-WebGL-00000000098F0810]GL ERROR :GL_INVALID_VALUE : glRenderbufferStorage: dimensions too large index.html:1 [.Offscreen-For-WebGL-00000000098F0810]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : glClear: framebuffer incompl...

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

43. 骨骼释放纹理 Templet.TEMPLET_DICTIONARY[this.url] url用错了导致Templet删不掉 [ 86%]

...   var tTexture;         var $each_tTexture;         /*for each*/for($each_tTexture in this.subTextureDic){             tTexture=this.subTextureDic[$each_tTexture];             if(tTexture)                 tTexture.destroy();        ...

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

44. 精灵添加名称 [ 86%]

精灵添加名称 在做精灵的过程中用for循环生成了四个精灵,并给每个精灵添加名称和鼠标监听,监听得到按钮,但是一直输出不出名称 代码如下:    for (var i:int = 0; i < 4; i++ ){         sp=new Sprite();          sp.name = i.toString();...

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

45. MOUSE_UP事件 [ 85%]

MOUSE_UP事件 当我使用 for(var i=0;i<3;i++){ this["_role_"+i].on(Event.MOUSE_DOWN,this,this.clickDown) ; this["_role_"+i].on(Event.MOUSE_MOVE,this,this.clickMove); // this["_role_"+i].on(Event.MOUSE_UP,this,this,clickUp); }这样的方式添加监听时,MOUSE_UP不支持对象采用拼接...

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

46. 手机浏览器运行会卡? [ 85%]

...现了一个问题。。我自己本身的的游戏工程在js代码里用for循环创建了很多Image,label等控件,放在panel里。。。在IDE里运行时没有任何问题。。很流畅。。但是发布后,手机浏览器进入游戏,程序走到这一步就会很卡。。不流畅...

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

47. js继承模式 [ 85%]

...(); } var __extends = (this && this.__extends) || function(d, b) { for (var p in b) { (b.hasOwnProperty(p)) && (d[p] = b[p]); } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var BackGround = (function(...

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

48. 输入设备-贪吃蛇(重力感应) [ 85%]

... 游戏开始时有一个食物 produceFood(); })() function initSnake() { for (var i = 0; i 0) { var prevSeg = segments[segments.length - 1]; seg.rotation = prevSeg.rotation; var point = seg.getPinPosition(); seg.x = prevSeg.x - point.x; seg.y = prevSeg.y - point.y; } segments.push(seg); } function...

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

49. Laya2.0编译后所有js都自动合并到bundle.js中,导致bundle.js过大,加载速度很慢,bundle.js可以拆分吗 [ 85%]

...  // "downlevelIteration": true,            /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */     // "isolatedModules": true,               /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ ...

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

50. 在安卓手机上drawToTexture不能正确返回纹理对象,是HTMLCanvas [ 84%]

...eight) let u = new Uint8Array(u8.length) let len = u8.length / 4 let i = 0 for (let x = len; x >= 0; x--) { for (let y = 0; y < 4; y++) { u[i * 4 + y] = u8[x * 4 + y] } i++ } u8 = u u = new Uint8Array(u8.length) len = u8.length / s.height let l2 = len / 4 for (let a = len; a >= 0; a--) { i ...

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