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

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

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

... 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.stage.mouseX, endPosition), beginPosition); } /**抬起事件处理*/ function onMouseUp(e) { Laya.stage.off(Event.M...

来源: Laya_示例 发布时间: 20241002

2. 鼠标交互-鼠标交互 [ 96%]

...ndler); 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); } /** * 鼠标响应事件处理 */ function mouseHandler(e) { switch (e.type) { case Event.MOUSE_DOWN...

来源: Laya_示例 发布时间: 20241002

3. 鼠标交互-双指旋转(多点触控) [ 85%]

... Laya.stage.on(Event.MOUSE_UP, this, onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, onMouseUp); } function createSprite() { sp = new Sprite(); var w = 200, h = 300; sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); sp.size(w, h); sp.pivot(w / 2, h / 2); sp.pos(Laya.stage.width / 2, Laya.stage.height / ...

来源: Laya_示例 发布时间: 20241002

4. 鼠标交互-双指缩放(多点触控) [ 83%]

... Laya.stage.on(Event.MOUSE_UP, this, onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, onMouseUp); } function createSprite() { sp = new Sprite(); var w = 300, h = 300; sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); sp.size(w, h); sp.pivot(w / 2, h / 2); sp.pos(Laya.stage.width / 2, Laya.stage.height / ...

来源: Laya_示例 发布时间: 20241002

5. Sprite-新手引导 [ 82%]

...ew Sprite(); //设置叠加模式 interactionArea.blendMode = "destination-out"; guideContainer.addChild(interactionArea); hitArea = new HitArea(); hitArea.hit.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); guideContainer.hitArea = hitArea; guideContainer.mouseEnabled = true; tipCon...

来源: Laya_示例 发布时间: 20241002