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

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

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

...         this._mapHeightHalf = this._map.height / 2;             switch (layerData.type) {                 case "tilelayer":                     break;                 case "objectgroup":                     var tArray = layerData.objects;          ...

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

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

...awUnderline(align, x, y, lineIndex) { var lineWidth = this.underLineWidth; switch (align) { case 'center': x -= lineWidth / 2; break; case 'right': x -= lineWidth; break; case 'left': default: break; } y += this._charSize.height; this._graphics.drawLine(x, y, x + lineWidth, y, this.underColor || thi...

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

43. socket大型项目回调 [ 73%]

... for (var name in msg) { if (protos[name]) { var proto:any = protos[name]; switch (proto.option) { case "optional": case "required": buffer.writeArrayBuffer(this.encodeTag(proto.type, proto.tag)); this.encodeProp(msg[name], proto.type, protos, buffer); break; case "repeated": if (!!msg[name] &&a...

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

44. Laya.loader.load(xx) 当地址""的时候,会报错。 [ 72%]

...           let format;                     switch (ext) {                         case "ktx":                             format = exports.TextureFormat.ETC1RGB;                         ...

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

45. 分享2.0 使用官方的woker.js 游戏无法运行的问题 [ 71%]

... onmessage = function(t) { var e = t.data; e = { type: "load", url: e }; switch (e.type) { case "load": loadImage2(e) } }; 原因在于worker中接受的参数 与所需的格式不符 手动修改下就好了 2020-10-21 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 ...

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

46. Laya.Event.MOUSE_MOVE的触发问题 [ 70%]

Laya.Event.MOUSE_MOVE的触发问题 switch (e.type) case Laya.Event.MOUSE_MOVE:有的手机点击就触发move,例如个别oppo机,iphonexr 有的手机点击不触发move,例如iphone12pro 附件 : --> 2021-11-15 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已...

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

47. 2.0.2使用worker加载图片的问题 [ 68%]

...后 在worker.js中执行了这句话`onmessage=function(t){var e=t.data;switch(e.type){case"load":loadImage2(e)}};`,e=t.data,也就是上面postMessage中的url,是一个字符串,那么e.type是undefined,根本不会执行到loadImage2(e)。 附件 : --> Demo.rar 2019-06-05 添加评论 ...

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

48. canvas下资源清理的问题 [ 67%]

...rivate function onClick(e:Event):void         {             switch(e.currentTarget)             {                 case btn1:                     show();                     break;                 case btn2:         ...

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

49. unity导出 [ 66%]

...一个键值对的值确认是Scene,可是这里报错后我看了下,switch case语句进入了sprite3D里边。。。这我很纳闷。而且导出过程都是按照技术文档里做的,导出后却没有贴图文件。这又是怎么回事。是不是我使用的工具版本太旧。 ymsda...

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

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

...rtCharsByAlign(align: string): void { let alignConfig = XUtils.TEXT_ALIGN; switch (align) { case alignConfig.CENTER: this.sortOnCenter(); break; case alignConfig.RIGHT: this.sortOnRight(); break; case alignConfig.LEFT: default: this.sortOnLeft(); break; } } /** * 排列字符(适合从左到右)...

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