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

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

1. 鼠标交互-拖动 [ 100%]

...his.onStartDrag); } showDragRegion() { const Rectangle = Laya.Rectangle; //拖动限制区域 let dragWidthLimit = 350; let dragHeightLimit = 200; dragRegion = new Rectangle(Laya.stage.width - dragWidthLimit >> 1, Laya.stage.height - dragHeightLimit >> 1, dragWidthLimit, dragHeightLimit); //画出...

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

2. 区块地图-滚动地图 [ 70%]

....stage.on(Laya.Event.RESIZE, this.resize); this.resize(); } // 鼠标按下拖动地图 mouseDown() { mLastMouseX = Laya.stage.mouseX; mLastMouseY = Laya.stage.mouseY; Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.mouseMove); } mouseMove() { let moveX = mX - (Laya.stage.mouseX - mLastMouseX), move...

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

3. 鼠标交互-滑动 [ 65%]

...发更高效。//swipe滚动范围 let TrackLength = 200; //触发swipe的拖动距离 let TOGGLE_DIST = TrackLength / 2; let buttonPosition, beginPosition, endPosition; let button; class Interaction_Swipe { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat =...

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