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

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

1. socket大型项目回调 [ 100%]

...ks[event] || []).push(fn); } public request(route, msg, cb) { if(arguments.length === 2 && typeof msg === 'function') { cb = msg; msg = {}; } else { msg = msg || {}; } route = route || msg.route; if(!route) { return; } this.reqId++; if(this.reqId>127){ this.reqId = 1; } var reqId = this.r...

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

2. emoji表情文字乱码 [ 99%]

...tr){         this._sourceStr=str;         var texLen = str.length;         var idx = -1;         this._words = ;         while (++idx < texLen) {             var character = str.charAt(idx);             var code = str.charCodeAt(idx)...

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

3. 引擎 TiledMap 居然不支持图块翻转 [ 99%]

...Sprite;                 for (var i = 0; i < this.aniSpriteArray.length; i++) {                     tAniSprite = this.aniSpriteArray[i];                     tAniSprite.show();                 }             }         }         hide () {         ...

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

4. Byte writeArrayBuffer的Bug [ 99%]

...yBuffer的Bug     __proto.writeArrayBuffer=function(arraybuffer,offset,length){         (offset===void 0)&& (offset=0);         (length===void 0)&& (length=0);         if (offset < 0 || length < 0)throw "writeArrayBuffer error - Out of bounds";   ...

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

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

...rite",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,1); var charData: any = this._jsonData.frames[targetChar]; if(!charData){ console.warn("没有找到对应的字符:" + targetChar); ...

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

6. 分享:图集资源做位图文本的工具类(知道fontclip组件的可以略过了,之前一直没注意到这个组件) [ 98%]

...private createChars(v: string): void { if (!v) { return; } let charNum = v.length; for (let i = 0; i < charNum; i++) { let char = v.charAt(i); let resName = this.getResName(char); let sp: Laya.Sprite = this.getSprite(); let tx = Laya.Loader.getRes(resName); if (!tx) { console.warn(TipConfig.tips....

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

7. 3D 鼠标检测 错乱 [ 97%]

....d3.js _update方法为 _update() { var i=0,n=0,j=0,m=0; n=this._eventList.length; var cameras=this._scene._cameraPool; if (n > 0){ for (i=0;i < n;i++){ var e=this._eventList; switch (e.type){ case "mousedown": this._mouseTouchDown(); break ; case "mouseup": this._mouseTouchUp(); break ; case ...

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

8. 分享,扩展Laya.Text组件实现简单的富文本 [ 96%]

...._text) password = false; var x = 0, y = 0; var end = Math.min(this._lines.length, visibleLineCount + begin) || 1; let color = this.color; let underline = this.underline; let bold = this.bold; for (var i = begin; i < end; i++) { var lines = this.typeLines[i]; var _word; if (this.align == "right")...

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

9. 向官方反映1.75引擎库后 事件执行 发生的bug [ 96%]

...__proto.runEvent=function(){             var len=this._eventList.length;             if (!len)return;             var _this=this;             var i=0;             var localevnetList = this._eventList.slice();             this._eventList.length = ...

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

10. 富文本过程中我遇到的问题以及解决方法(超链接换行以及无法接收超链接鼠标事件以及br或者 标签会崩溃报错的问题) [ 95%]

...       if (words == null && (!this._children || this._children.length == 0))                 return false;             if (words) {                 for (var i = 0, n = words.length; i < n; i++) {                     out.push(words[i]);             ...

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