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

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

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

...; 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

2. 鼠标交互-双指旋转(多点触控) [ 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

3. 鼠标交互-双指缩放(多点触控) [ 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

4. 其他引擎的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

5. 加载-销毁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