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

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

161. 微信小游戏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_文档 发布时间: 20250103

162. 分享 修复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

163. 修改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

164. 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

165. 人物行走图动画 [ 77%]

...隔(单位:毫秒)  ani.index = 0;     // 当前播放索引  console.log(ani.index);  ani.play();       console.log(ani.index);  var bounds = ani.getGraphicBounds();  ani.pivot(bounds.width / 2, bounds.height / 2);    ani.pos(Laya.stage.width / 2, Laya.stage.height / 2);  con...

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

166. 保存数据的数组在回调的时候变为undifine [ 77%]

...t[i].x = i%3*190; _heroItemList[i].y = parseInt((i/3).toString()) * 155; } console.debug("创建的实例的数量::"+_heroItemList.length); } private function onSelectedHeroChange():void { _curSelectedHeroId = []; _curSelectedHeroProp = []; console.debug("当前保存的实例::"+_heroItemList); } ...

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

167. 用raycast选取实体,hitresult始终是false [ 77%]

...MouseManager.instance.mouseX; point.y = Laya.MouseManager.instance.mouseY; console.log("rayPoint111 pointx:"+ point.x+" pointy:"+point.y+ " ray.origin.x:"+ray.origin.x+ " ray.origin.y:"+ray.origin.y+ " ray.origin.z:"+ray.origin.z+" ray.direction.x:"+ray.direction.x+" ray.direction.y:"+ray.direction....

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

168. 实体组件系统 · LayaAir3.3 · 引擎文档 · LAYABOX [ 77%]

...wake不同的是即使节点未激活onAdded也会调用 onAdded(): void { console.log("Game onAdded"); } //重置组件参数到默认值,如果实现了这个函数,则组件会被重置并且自动回收到对象池,方便下次复用。如果没有重置,则不进行回收复用 onReset(...

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

169. laya websocket 在微信小游戏连接不上服务器 [ 77%]

...w.com" }); wx.onSocketOpen(function (res) { // webSocket打开事件处理 console.log('websocket opened.'); var msg = JSON.stringify({ Hello: { Name: 'hi lei lei~' }}) wx.sendSocketMessage({ data: msg }); }); wx.onSocketError(function (res) { // 链接出错时的处理 console.log('webSocket fail'...

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

170. Laya中textinput的监听事件的执行顺序是FOCUS=>MOUSE_DOWN=>CLICK,有没有比FOCUS还要先触发的监听 [ 77%]

...触发的监听 this.textinput_message.on(Laya.Event.CLICK,this,()=>{ console.log("CLICK>>>"); }) this.textinput_message.on(Laya.Event.MOUSE_DOWN,this,()=>{ console.log("MOUSE_DOWN>>>"); }) this.textinput_message.on(Laya.Event.FOCUS, this, () => { console.log("FOCUS>&gt...

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