大约有 328 项符合查询结果, 库内数据总量为 30,779 项。 (搜索耗时: 0.0035 秒)
Laya_社区(101) Laya3.0_api(63) Laya2.0_api(58) laya_api(54) Laya2.0_文档(24) Laya2.0_示例(11) Laya_示例(11) Laya3.0_文档(6)
...ya.Vector2(); screenPoint.x = Laya.MouseManager.instance.mouseX; screenPoint.y = Laya.MouseManager.instance.mouseY; // console.log(screenPoint); let touchRay:Laya.Ray = new Laya.Ray(new Laya.Vector3(0, 0, 0), new Laya.Vector...
来源: Laya_社区 发布时间: 20220117
...都加上mousedown事件 function bigclick(e){ var thex = e.target.mouseX } 遗憾的是如果点击的位置没有小sprite那成功得到了相对bigSprite的X坐标。但是如果那里有小sprite比如smalla, 那么得到的这个坐标是相对smalla的。 怎么破。 ...
来源: Laya_社区 发布时间: 20160808
...th.length = 0; } onMouseMove() { if (!isDown) return; path.push(Laya.stage.mouseX); path.push(Laya.stage.mouseY); } onMouseUp() { isDown = false; canvasGraphics.drawPoly(0, 0, path.concat(), color); } animate() { liveGraphics.clear(); liveGraphics.drawPoly(0, 0, path, color); } } new PIXI_Example_21...
来源: Laya2.0_示例 发布时间: 20241119
...k() { var p = new Point(0, 0); layer.getTilePositionByScreenPos(Laya.stage.mouseX, Laya.stage.mouseY, p); layer.getScreenPositionByTilePos(Math.floor(p.x), Math.floor(p.y), p); sprite.pos(p.x, p.y); } function mapLoaded() { layer = tiledMap.getLayerByIndex(0); var radiusX = 32; var radiusY = Math.ta...
来源: Laya_示例 发布时间: 20241119
...取选中格子的索引 this.layer.getTilePositionByScreenPos(Laya.stage.mouseX, Laya.stage.mouseY, p); // 通过地图坐标得到屏幕坐标 this.layer.getScreenPositionByTilePos(Math.floor(p.x), Math.floor(p.y), p); this.sprite.pos(p.x, p.y); } mapLoaded() { this.layer = this.tiledMap.getLayerB...
来源: Laya2.0_示例 发布时间: 20241119
... } onMouseDown() { this.point.x = Laya.stage.mouseX; this.point.y = Laya.stage.mouseX; //产生射线 this.camera.viewportPointToRay(this.point,this._ray); //拿到射线碰撞的物体 this.scene.physicsSimula...
来源: Laya_社区 发布时间: 20220506
... _onMouseOver() { var tX = this.mouseX; var tY = this.mouseY; var i, len; var tHit; len = this._recList.length; for (i = 0; i < len; i++) { t...
来源: Laya_社区 发布时间: 20200724
..._MOVE ,this, this.onMouseMove); this.onMouseDownX = e.target.mouseX; this.onMouseDownY = e.target.mouseY; } onMouseUp(e : laya.events.Event):void{ console.log("MOUSE_UP"); this.off(laya.events.Event.MOUSE_MOVE ,this, this.onMouseM...
来源: Laya_社区 发布时间: 20160823
...} function onMouseMove() { bg2.x = -Laya.stage.mouseX * 2; bg2.y = -Laya.stage.mouseY * 2; maskSp.x = Laya.stage.mouseX; maskSp.y = Laya.stage.mouseY; } })(); 就会出现pivot和mask不能同时使用的问题 2017-10-11 0...
来源: Laya_社区 发布时间: 20170828
....RenderState):void{ // console.log(mX + "移动"); // console.log(this.lastMouseX + "按下"); let mX:number = Laya.stage.mouseX; let mY:number = Laya.stage.mouseY; let vec:Laya.Vector3 ; if(this.isDown){ if(this.lastMouseX - mX > 0) { vec = new Laya.Vector3(0,-1,0); } else { vec = new Laya.Vecto...
来源: Laya_社区 发布时间: 20180113