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

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

161. [LayaAir3]Laya.Slider 的结束拖拽的事件监听 怎么写, [ 78%]

...     this.owner.bar.on(Laya.Event.MOUSE_UP, () => {             console.log("aaa");         })     } 2025-07-11 0 1 分享 微博 QZONE 微信 Archangelᴱᴿᴵᑦ 赞同来自: this.owner.on(Laya.Event.CHANGE, this, () => { console.log("在拖着"); }); this.owner.on(Laya.Event...

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

162. 音频在设置音量大小scale=0时SoundManager无法回调, 并且阻塞所有laya本身的callback [ 78%]

...t中: SoundManager.playSound("XXX", this, ()=>{             console.log('触发1');             Laya.timer.scale = 0;             SoundManager.playSound("XXX", this, ()=>{                 console.log('触发2');                ...

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

163. 没有预加载的图片怎么获取width和height ? [ 78%]

.../laya/assets/comp/image.png");     Laya.stage.addChild(older);     console.log(older.scaleX,older.scaleY,older.rotation,older.x,older.y, older.width,older.height,older.getBounds().width,older.getBounds().height);      older.scale(2,2);     console.log(older.scaleX,older.scaleY,older....

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

164. 关于HttpRequest [ 77%]

... new Laya.HttpRequest(); hr.once(Laya.Event.PROGRESS, this, function (e) { console.log(e); }); hr.once(Laya.Event.COMPLETE, this, function () { console.log(hr.data); }); hr.once(Laya.Event.ERROR, this, function (e) { console.log(e); }); hr.send('http://stone.tt.be-xx.com/git/test.php', s, 'post', 't...

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

165. 是否支持条件编译? [ 77%]

... 赞同来自: 没有这样的参数,如果想关闭的话可以重写下console里边的log 2017-11-20 0 8 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 lilynumber1 相关问题 Layabox 2.0 bate5 运行编译之后 bundle.js 文件里面...

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

166. HTTP通信 · LayaAir3.3 · 引擎文档 · LAYABOX [ 77%]

...@param e 事件对象 */ private onHttpRequestError(e: any = null): void { console.error("请求失败:", e); this.logger.text = "请求失败,请重试。\n"; } /** * 请求进度改变触发的回调 * @param e 事件对象 */ private onHttpRequestProgress(e: any = null): void { //进度的百...

来源: Laya3.0_文档 发布时间: 20251010

167. 微信小游戏Worker使用 · LayaAir3.3 · 引擎文档 · LAYABOX [ 77%]

... 在workers/index.js中增加事件监听、图片处理与事件派发: console.log("worker/request/index.js") // 在 Worker 线程执行上下文会全局暴露一个 `worker` 对象,直接调用 worker.onMessage/postMessage 即可 worker.onMessage(function (data) { console.log("worker -------...

来源: Laya3.0_文档 发布时间: 20251010

168. 分享 修复webaudiosound 循环播放的声音 俩个失声问题 [ 77%]

..._proto.play = function () { // if (this.url.indexOf("music.d") != -1) { // console.log("play", this.url) // console.trace("play", this.url) // } Laya.SoundManager.addChannel(this); this.isStopped = false; this._clearBufferSource(); if (!this.audioBuffer) { // console.log("audioBuffer is null",this.u...

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

169. 修改position与修改localPosition结果不一致(同处于3d场景下的两个节点) [ 77%]

...1.transform.localPositionX += 0.016; res2.transform.position.x += 0.016;  console.log("本地坐标1:", res1.transform.localPosition); console.log("世界坐标1:", res1.transform.position); console.log("本地坐标2:", res2.transform.localPosition); console.log("世界坐标2:", res2.transform.po...

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

170. Laya.Pool.getItemByClass 找不到上次释放的对象 [ 77%]

...nd= Laya.Pool.getItemByClass("mybg",BackGround); Laya.stage.addChild(bg1); console.log("bg1->",bg1); //对象放回Pool里,并清除对象 Laya.Pool.recover("mybg",BackGround); bg1.removeSelf(); Laya.stage.removeChild(bg1); console.log("bg1->",bg1); //再次从Pool里获取对象的时候,...

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