大约有 142 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0028 秒)
Laya2.0_api(59) laya_api(55) Laya_社区(18) Laya2.0_示例(3) Laya2.0_文档(3) Laya_示例(2) Laya3.0_api(1) Laya3.0_文档(1)
...CALE_FULL; Stat.show(); createMap(); Laya.stage.on(Event.MOUSE_DOWN, this, mouseDown); Laya.stage.on(Event.MOUSE_UP, this, mouseUp); })(); //创建地图 function createMap() { //创建地图对象 tiledMap = new TiledMap(); mX = mY = 0; //创建地图,适当的时候调用destory销毁地图 tile...
来源: Laya_示例 发布时间: 20241118
... = "#232628"; this.createMap(); Laya.stage.on(Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.on(Event.MOUSE_UP, this, this.mouseUp); Stat.show(); } // 创建地图 createMap() { const TiledMap = Laya.TiledMap, Rectangle = Laya.Rectangle, Handler = Laya.Handler, Browser = Laya.Browser; mX = mY =...
来源: Laya2.0_示例 发布时间: 20241118
...e.bgColor = "#232628"; this.createHouse(); for (let i = 1; i mouseJoint).onMouseDown); Laya.stage.on(Event.MOUSE_UP, this, this.destoryJoint); Laya.stage.on(Event.MOUSE_OUT, this, this.destoryJoint); // 方案二,自己实现,可以实现更大程度的控制 // Laya.stage.on(Event.MOUSE_MOVE, t...
来源: Laya2.0_示例 发布时间: 20241118
...er.load(['bg/world_bg.jpg']) Laya.stage.on(Laya.Event.MOUSE_DOWN,this,this.mouseDown) Laya.stage.on(Laya.Event.MOUSE_UP,this,this.mouseUp) this.moveMap(this.offsetX,this.offsetY) } moveMap(x,y){ let X = -x00 let Y = -y00 this.map0.x = X this.map0.y = Y this.map3.x = X + 1800 this.map3.y = Y + 1800 i...
来源: Laya_社区 发布时间: 20181220
...; createCanvases(); Laya.timer.frameLoop(1, this, animate); Laya.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...
来源: Laya_示例 发布时间: 20241118
...ateCanvases(); Laya.timer.frameLoop(1, this, this.animate); Laya.stage.on('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...
来源: Laya2.0_示例 发布时间: 20241118
...CALE_FULL; Stat.show(); createMap(); Laya.stage.on(Event.MOUSE_DOWN, this, mouseDown); Laya.stage.on(Event.MOUSE_UP, this, mouseUp); })(); //创建地图http://layaair.ldc.layabox.com/api/ function createMap() { //创建地图对象 tiledMap = new TiledMap(); mX = mY = 0; //创建地图,适当的...
来源: Laya_社区 发布时间: 20171205
...题 需要通过鼠标移动画出轨迹,我的实现方法是,通过mousedown事件绑定Mousemove事件,在mousemove监听方法中this.sp.graphics.drawCircle(Laya.stage.mouseX, Laya.stage.mouseY, 10, "#ffffff"); mouseUp移除监听,如果鼠标移动慢还好,稍微快一点就会出现...
来源: Laya_社区 发布时间: 20170901
...MOUSE_UP,this,this.mouseUp); Laya.stage.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; } ...
来源: Laya_社区 发布时间: 20180113
... 个回复 Laya_XS 赞同来自: 实现原理:你注册下点击舞台的mousedown、mousemove、mouseout事件,在mousemove事件的时候用一个数组记录下当前的坐标信息,然后调用绘制曲线的函数,创建的数组内容不要做清理,下次继续往里面存数据。 ...
来源: Laya_社区 发布时间: 20171213