大约有 41 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0026 秒)
...ches[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].stageX); sp.rotation...
来源: Laya_示例 发布时间: 20241117
...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); this.sp.rotation += ...
来源: Laya2.0_示例 发布时间: 20241117
...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 - lastDistance) * factor; ...
来源: Laya_示例 发布时间: 20241117
...ce = 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 - lastDistance) * factor;...
来源: Laya2.0_示例 发布时间: 20241117
...Down(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.max(Math.min(Laya.s...
来源: Laya_示例 发布时间: 20241117
...(50, 50); //设置mask bg2.mask = maskSp; Laya.stage.on("mousemove", this, onMouseMove); } function onMouseMove() { bg2.x = -Laya.stage.mouseX * 2; bg2.y = -Laya.stage.mouseY * 2; maskSp.x = Laya.stage.mouseX; maskSp.y = Laya.stage.mouseY; } })();module laya { import Sprite = Laya.Sprite; import Sta...
来源: Laya_示例 发布时间: 20241117
...ent; //添加鼠标移到侦听 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.button.x = Math.max(Math...
来源: Laya2.0_示例 发布时间: 20241117
...stage.on('mousedown', this, onMouseDown); Laya.stage.on('mousemove', this, onMouseMove); Laya.stage.on('mouseup', this, onMouseUp); })(); function createCanvases() { var graphicsCanvas = new Sprite(); Laya.stage.addChild(graphicsCanvas); var liveGraphicsCanvas = new Sprite(); Laya.stage.addChild(liv...
来源: Laya_示例 发布时间: 20241117
...mousedown', this, this.onMouseDown); Laya.stage.on('mousemove', this, this.onMouseMove); Laya.stage.on('mouseup', this, this.onMouseUp); } createCanvases() { const Sprite = Laya.Sprite; let graphicsCanvas = new Sprite(); Laya.stage.addChild(graphicsCanvas); let liveGraphicsCanvas = new Sprite(); Lay...
来源: Laya2.0_示例 发布时间: 20241117
...置mask this.bg2.mask = this.maskSp; Laya.stage.on("mousemove", this, this.onMouseMove); } private onMouseMove():void { this.bg2.x = -Laya.stage.mouseX * 2; this.bg2.y = -Laya.stage.mouseY * 2; this.maskSp.x = Laya.stage.mouseX; this.maskSp.y = Laya.stage.mouseY; } } } new laya.Sprite_MagnifyingGlas...
来源: Laya2.0_示例 发布时间: 20241117