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

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

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

...MouseMove); 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.stage.mouseX, endPosition), beginPosition); } /**抬起事件处理*/ function...

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

2. 鼠标交互-滑动 [ 99%]

...; 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.min(Laya.stage.mouseX, endPosition), beginPosition); } /**抬起事件处理*/ onMouse...

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

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

...(); function setup() { createSprite(); 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...

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

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

... } setup() { this.createSprite(); Laya.stage.on(Event.MOUSE_UP, this, this.onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, this.onMouseUp); } createSprite() { const Sprite = Laya.Sprite, Event = Laya.Event; let w = 200, h = 300; this.sp = new Sprite(); Laya.stage.addChild(this.sp); this.sp.graphics...

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

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

...(); function setup() { createSprite(); 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...

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

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

... Laya.Event; this.createSprite(); Laya.stage.on(Event.MOUSE_UP, this, this.onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, this.onMouseUp); } createSprite() { const Sprite = Laya.Sprite, Event = Laya.Event; let w = 300, h = 300; this.sp = new Sprite(); Laya.stage.addChild(this.sp); this.sp.graphics...

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

7. 其他引擎的Demo-Example_21 [ 91%]

...a.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(liveGraphicsCanvas); liveGraphics = liveGraphics...

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

8. 其他引擎的Demo-Example_21 [ 90%]

...('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(); Laya.stage.addChild(liveGraphicsCanvas); liveGraphics...

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

9. 加载-销毁Texture使用的图片资源 [ 86%]

....addChild(this.btn); //添加侦听 this.btn.on(Event.MOUSE_UP, this, this.onMouseUp); } /** * 鼠标事件响应函数 * @param evt */ onMouseUp(evt) { if (this.isDestroyed) { //通过设置 visible=true ,来触发渲染,然后引擎会自动恢复资源 this.spBg.visible = true; this.aniFly.vi...

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

10. 加载-销毁Texture使用的图片资源 [ 85%]

....addChild(this.btn); //添加侦听 this.btn.on(Event.MOUSE_UP, this, this.onMouseUp); }; /** * 鼠标事件响应函数 * @param evt */ GameMain.prototype.onMouseUp = function (evt) { if (this.isDestroyed) { //通过设置 visible=true ,来触发渲染,然后引擎会自动恢复资源 this.spB...

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