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

大约有 2,654 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0086 秒)

351. js socket 连接不上 [ 84%]

...03:8888"); // this.socket.connect("10.10.1.103",8888); this.socket.on(Laya.Event.OPEN, this, openHandler); //建立连接 this.socket.on(Laya.Event.MESSAGE, this, receiveHandler); //接收到数据触发函数 this.socket.on(Laya.Event.CLOSE, this, closeHandler); //关闭事件 this.socket.on(Laya.E...

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

352. websocket连接, ws 时没问题,改成 wss 没反应 [ 84%]

...ectByUrl("wss://192.168.1.250:5000/websocket/");     this.socket.on(Laya.Event.OPEN, this, this.openHandler);     this.socket.on(Laya.Event.MESSAGE, this, this.receiveHandler);     this.socket.on(Laya.Event.CLOSE, this, this.closeHandler);     this.socket.on(Laya.Event.ERROR, this, this.erro...

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

353. panel问题 [ 84%]

...,仔细研究了源码,发现问题出在事件派发上 截图来自EventDispatcher 如图所示,当派发mouseup事件时,当前的type为mouseup,由于scrollBar移除了mouseUp事件,所以此时的this._events[type]是undefined,而源码中又去取undefined的run属性,肯定会报...

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

354. Bug:移动设备当两手指同时触摸屏幕,event.touches数组的长度有很大概率不对 [ 84%]

Bug:移动设备当两手指同时触摸屏幕,event.touches数组的长度有很大概率不对 两手指同时触摸屏幕,当两次按下MouseDown监听到的touches.length=2时,很大概率当松开一指,MouseUp时touches.length还是为2,再按下一指,MouseDown时touches.lengt...

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

355. laya.d3.component.physics.Collider [ 84%]

...ll Classes | Index | Frames No Frames ColliderProperties | Methods | Events Packagelaya.d3.component.physicsClasspublic class ColliderInheritanceCollider Component3D EventDispatcher ObjectSubclasses BoxCollider, MeshCollider, SphereCollider Collider 类用于创建碰撞器的父类,抽象...

来源: laya_api 发布时间: 20170929

356. startDrag 的 Bug? [ 84%]

startDrag 的 Bug? aaa.on(Event.DRAG_MOVE, this, onDragMove); aaa.startDrag(new Rectangle(0, 0, 100, 100), true, 0, 200);   private function onDragMove(e:Event = null):void { // 正常移动时, bbb 会和 aaa 坐标一至, 释放鼠标后也正常, 但 // BUG 出现在鼠标释放后 当aaa 进...

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

357. 为什么给Sprite容器添加点击事件没反应 [ 84%]

... 提交 2 个回复 honeyzzzz 赞同来自: cuixueying 、Y_Yao 改为Laya.Event试试?昨天我也遇到了。。。 2017-04-21 2 1 分享 微博 QZONE 微信 ippon 赞同来自: 把事件名称写完整可能比较安全,比如Laya.Event.Click 2019-02-21 0 0 分享 微博 QZONE 微信 为什...

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

358. 图片像素精准点击问题! [ 84%]

...过检测像素点颜色值来判断点击区域,这里不能用 on(Laya.Event.CLICK,只能通过 on(Laya.Event.MOUSE_DOWN 来检测。   下面是我的代码处理: class demo { private down:Laya.Image; constructor() { // 鼠标事件 Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.onMouseD...

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

359. 给Sprite 注册的触发器事件为什么没反应? [ 84%]

给Sprite 注册的触发器事件为什么没反应? ape.on( Event.TRIGGER_STAY, this, TRIGGER_STAY1);     ape.on(Event.TRIGGER_ENTER, this, TRIGGER_ENTER1);     ape.on(Event.TRIGGER_EXIT, this, TRIGGER_EXIT1);   鼠标拖拽一个Sprite 到 另外一个 Sprite 上,注册的上面3个...

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

360. websocket无法连接 [ 84%]

...Url("ws://"+host+":"+port+"/hoopster"); //建立连接 this.socket.on(Laya.Event.OPEN, this, onOpen); this.socket.on(Laya.Event.MESSAGE, this, onReceive); this.socket.on(Laya.Event.CLOSE, this, this.closeHandler); this.socket.on(Laya.Event.ERROR, this, this.errorHandler);   以上代码,host传...

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