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

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

51. Touch接口缺少stageX,stageY [ 70%]

...].stageX - touches[1].stageX);                 Laya.stage.on(Event.MOUSE_MOVE, this, this.onMouseMove);             }         }   在微信调试时取出的touches是一个Touch数组,通过chrome看Touch类是包含stageX/stageY的,但lib.d.ts中声明的Touch接口中没有...

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

52. 3D模型旋转问题,鼠标移动之后,根据按下移动的X坐标差值判断左右旋转,但是会越转越快,请问是什么问题? [ 69%]

...ge.on(Laya.Event.MOUSE_DOWN,this,this.mouseDown); Laya.stage.on(Laya.Event.MOUSE_MOVE,this,this.mouseMove);   private mouseDown():void{ let mX:number = Laya.stage.mouseX; this.lastMouseX = mX; this.isDown = true; } private mouseUp():void{ this.isDown = false; } public rotate(vec:Laya.Vector3):void{...

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

53. 关于大量绘制 draw的性能优化问题 [ 69%]

...Layer); drawLayer.width = 800; drawLayer.height = 1030; drawLayer.on(Event.MOUSE_MOVE, this, mousemove); function  mousemove(e) {     drawLayer.graphics.drawCircle(e.target.mouseX,e.target.mouseY,20,"#ffffff")     drawLayer.cacheAsBitmap; }   我的思路是每一次move都把对应的圆形...

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

54. 帮忙看看Texture类getPixels内存泄漏的问题。 [ 68%]

...rTex); addEvent(); } private function addEvent():void { _colorSpr.on(Event.MOUSE_MOVE, this, __moveHandler); } private function __moveHandler():void { var p:Point = toLocal(new Point(Laya.stage.mouseX, Laya.stage.mouseY), _colorSpr); var cir:Sprite = new Sprite(); cir.graphics.drawCircle(0, 0, 15, "...

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

55. 请问如何获取触屏上两个或者更多位置的坐标 [ 66%]

...].stageX - touches[1].stageX);                 Laya.stage.on(Event.MOUSE_MOVE, this, this.onMouseMove);             }         }         private onMouseMove(e: Event): void {             var touches: Array<any> = e.touches;             if (touches &&...

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

56. 富文本过程中我遇到的问题以及解决方法(超链接换行以及无法接收超链接鼠标事件以及br或者 标签会崩溃报错的问题) [ 64%]

...t.MOUSE_OUT, this, this._onMouseOut);             this.on(Laya.Event.MOUSE_MOVE, this, this._onMouseMove);   增加如下3个方法         _onMouseOver()         {             var tX = this.mouseX;             var tY = this.mouseY;             var i, len;       ...

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

57. UI-RefreshList [ 62%]

...tage.mouseY)); //鼠标按下的时候进行移动侦听 e.target.on(Event.MOUSE_MOVE, this, this.onItemBoxMouseMove, [e.target, index]); } } if (e.type == Event.MOUSE_UP) { this.mouseDown = false; this.itemOnMouseUp(); } //点击标记文本 if (e.target.name == "flag" && e.type == Event.CLICK) thi...

来源: Laya2.0_示例 发布时间: 20240929

58. 刮刮卡效果实现 [ 59%]

....addChild(ape); ape.loadImage("WBSign/img_guakaituceng.png"); ape.on(Event.MOUSE_MOVE, this, onMouseMove); interactionArea = new Sprite(); interactionArea.blendMode = "destination-out"; ape.addChild(interactionArea); interactionArea.graphics.clear(); } function onMouseMove(e) { if(mouseX!=0){ if(Mat...

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

59. 如何能监听到TouchStart和TouchEnd事件 [ 59%]

...定义 mousemove 事件对象的 type 属性值。*/         static MOUSE_MOVE: string;         /** 定义 mouseover 事件对象的 type 属性值。*/         static MOUSE_OVER: string;         /** 定义 mouseout 事件对象的 type 属性值。*/         stati...

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

60. 怎么对graphics画出来的图片进行鼠标点击拖动??? [ 58%]

...-11-07 0 0 分享 微博 QZONE 微信 kezhiyu 赞同来自: 为什么不用MOUSE_MOVE, 请按照正常流程, mousedown以后 要监听层级的mousemove 然后将mousemove 的回调中的 e.clientx 和e.clientxY 赋值给...

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