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

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

1331. 屏幕适配怎样实现铺满全屏,又不被拉伸? [ 46%]

...Mode = "none"; Laya.stage.alignV = "middle"; Laya.stage.alignH = "center"; if (Laya.Browser.onPC) { Laya.stage.scaleMode = "showall"; } else { Laya.stage.scaleMode = "custom"; }这一步能让引擎自动适配宽度(不变形),剩下的高度部分需要自己处理   第三步、监听引...

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

1332. 寻路系统(TypeScript-3D基础(TS)-LayaAir3D之高级应用) [ 46%]

...any).astar.search(this.graph, start, end, { closest: this.opts.closest }); if (_everyPath && _everyPath.length > 0) { getRealPosition(start, this._everyPath); } }); ``` > 通过3D世界的x,z换算出对应的网格索引,并且通过astar路径再转换为3D世界路径 ```typescript /** * 得...

来源: Laya2.0_文档 发布时间: 20210715

1333. 怎么像canvas那样做到每次循环去清空一次画布,我发现每次画的时候他会把上一次的坐标也画出来,导致变形了,该如何让他每次累加的同时清空上次的路径 [ 46%]

...); } move() { sp = new Laya.Sprite(); Laya.stage.addChild(sp); //画曲线 if(x<100){ x++; } sp.graphics.clear(); sp.graphics.drawCurves(10, 58, [x, 0, 19, -100, 39, 0], "#ff0000", 3); } } new Scene(); 附件 : --> 2019-05-20 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相...

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

1334. 寻路系统(ActionScript-3D基础(AS3)-LayaAir3D之高级应用) [ 46%]

...Browser.window.astar.search(graph, start, end, { closest: opts.closest }); if (_everyPath && _everyPath.length > 0) { getRealPosition(start, _everyPath); } }); ``` > 通过3D世界的x,z换算出对应的网格索引,并且通过astar路径再转换为3D世界路径 ```typescript /** * 得到整...

来源: Laya2.0_文档 发布时间: 20210714

1335. 修改了Scene下的WebGL参数导致渲染3D对象出现局部透明 [ 46%]

...ns( window.screen.orientation.angle, this.passThroughCamera.orientation ); if (combinedOrientation !== this.combinedOrientation) { this.combinedOrientation = combinedOrientation; this.gl.bufferData( Laya.WebGLContext.ARRAY_BUFFER, this.f32TextureCoords[this.combinedOrientation], Laya.WebGLContext.ST...

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

1336. Spine 间隔一段时间卡顿5000毫秒左右,期间GPU占用极高, Demo已上传 [ 46%]

...("ludo_ufo_feixing", true); }); ufo.on(Laya.Event.LABEL, this, (e) => { if (e.name == "xiaoshi") { ufo.offAllCaller(this); // ufo.removeSelf();   } });  })); }  genSpine(url, handler: Laya.Handler) { var templet = new Laya.SpineTemplet(Laya.SpineVersion.v4_0); templet.on(Laya.Event.COMPLETE, h...

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

1337. laya.sprite精灵无缝拼接地图,会出现黑线跟白线,使用laya的2.0.1beta版本 [ 46%]

....loader.getRes(this.name); this.texture = texture; }  clearImage(): void{ if (this.name != "") { this.isShow = false; Laya.Loader.clearTextureRes(this.name); Laya.Loader.clearRes(this.name); this.name = ""; } }  }   附件 : --> 2019-03-15 1 条评论 免费帖 --> 分享 微博 QZONE 微信 没...

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

1338. box2d引擎报错问题 [ 46%]

... this.owner) } onTriggerEnter(other: any, self: any, contact: any): void { if (other.label === "cloud") { Laya.Tween.clearAll(this._sp) let effect: Laya.Animation = Laya.Pool.getItemByCreateFun("deathEffect", this.createEffect, this); effect.pos(this._sp.x, this._sp.y); this._sp.parent.addChild(effe...

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

1339. JSON文件加载成功后,怎么解析成Object对象 [ 46%]

..."=================="); } private function traceMsg(msg:String = ""):void { if ( msg != null ) { txt.text += msg + "\n"; txt.scrollY = txt.maxScrollY; } } } } 输出信息: ------------------------- 0 Chen 加载: res/json/config.json readJsonFinish - 加载成功: res/json/config.json ...运行到 J...

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

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

... Laya.HTMLCanvas let tex = htmlCanvas.getTexture() as Laya.RenderTexture2D if (tex) { let u8 = tex.getData(0, 0, tex.width, tex.height) 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...

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