大约有 81 项符合查询结果, 库内数据总量为 30,784 项。 (搜索耗时: 0.0048 秒)
...hes[1].stageY, touches[0].stageX - touches[1].stageX); Laya.stage.on(Event.MOUSE_MOVE, this, onMouseMove); } } function onMouseMove(e) { var touches = e.touches; if (touches && touches.length == 2) { var nowRadian = Math.atan2( touches[0].stageY - touches[1].stageY, touches[0].stageX - touches[1].st...
来源: Laya_示例 发布时间: 20241123
...hes[1].stageY, touches[0].stageX - touches[1].stageX); Laya.stage.on(Event.MOUSE_MOVE, this, this.onMouseMove); } } onMouseMove(e) { let touches = e.touches; if (touches && touches.length == 2) { let nowRadian = Math.atan2( touches[0].stageY - touches[1].stageY, touches[0].stageX - touches[1].stageX...
来源: Laya2.0_示例 发布时间: 20241123
... = Laya.stage.mouseX; mLastMouseY = Laya.stage.mouseY; Laya.stage.on(Event.MOUSE_MOVE, this, mouseMove); } function mouseMove() { //移动地图视口 tiledMap.moveViewPort(mX - (Laya.stage.mouseX - mLastMouseX), mY - (Laya.stage.mouseY - mLastMouseY)); } function mouseUp() { mX = mX - (Laya.stage.m...
来源: Laya_示例 发布时间: 20241123
...ya.stage.mouseX; mLastMouseY = Laya.stage.mouseY; Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.mouseMove); } mouseMove() { let moveX = mX - (Laya.stage.mouseX - mLastMouseX), moveY = mY - (Laya.stage.mouseY - mLastMouseY); // 移动地图视口 this.tiledMap.moveViewPort(moveX, moveY); } mouseUp(...
来源: Laya2.0_示例 发布时间: 20241123
...es.length == 2) { lastDistance = getDistance(touches); Laya.stage.on(Event.MOUSE_MOVE, this, onMouseMove); } } function onMouseMove(e) { var distance = getDistance(e.touches); //判断当前距离与上次距离变化,确定是放大还是缩小 const factor = 0.01; sp.scaleX += (distance - lastDi...
来源: Laya_示例 发布时间: 20241123
...ngth == 2) { lastDistance = this.getDistance(touches); Laya.stage.on(Event.MOUSE_MOVE, this, this.onMouseMove); } } onMouseMove(e) { let distance = this.getDistance(e.touches); //判断当前距离与上次距离变化,确定是放大还是缩小 const factor = 0.01; this.sp.scaleX += (distance - ...
来源: Laya2.0_示例 发布时间: 20241123
...useHandler); rect.on(Event.RIGHT_CLICK, this, mouseHandler); rect.on(Event.MOUSE_MOVE, this, mouseHandler); rect.on(Event.MOUSE_OVER, this, mouseHandler); rect.on(Event.MOUSE_OUT, this, mouseHandler); rect.on(Event.DOUBLE_CLICK, this, mouseHandler); rect.on(Event.MOUSE_WHEEL, this, mouseHandler); } ...
来源: Laya_示例 发布时间: 20241123
...ndler); rect.on(Event.RIGHT_CLICK, this, this.mouseHandler); rect.on(Event.MOUSE_MOVE, this, this.mouseHandler); rect.on(Event.MOUSE_OVER, this, this.mouseHandler); rect.on(Event.MOUSE_OUT, this, this.mouseHandler); rect.on(Event.DOUBLE_CLICK, this, this.mouseHandler); rect.on(Event.MOUSE_WHEEL, thi...
来源: Laya2.0_示例 发布时间: 20241123
.../ function onMouseDown(e) { //添加鼠标移到侦听 Laya.stage.on(Event.MOUSE_MOVE, this, onMouseMove); buttonPosition = button.x; Laya.stage.on(Event.MOUSE_UP, this, onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, onMouseUp); } /**移到事件处理*/ function onMouseMove(e) { button.x = Math.m...
来源: Laya_示例 发布时间: 20241123
...{ const Event = Laya.Event; //添加鼠标移到侦听 Laya.stage.on(Event.MOUSE_MOVE, this, this.onMouseMove); buttonPosition = this.button.x; Laya.stage.on(Event.MOUSE_UP, this, this.onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, this.onMouseUp); } /**移到事件处理*/ onMouseMove(e) { this.b...
来源: Laya2.0_示例 发布时间: 20241123