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

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

1. 计时器-延迟执行 [ 100%]

...; this.setup(); } setup() { const Event = Laya.Event; let vGap = 100; this.button1 = this.createButton("点我3秒之后 alpha - 0.5"); this.button1.x = (Laya.stage.width - this.button1.width) / 2; this.button1.y = (Laya.stage.height - this.button1.height - vGap) / 2; this.button1.on(Event.CLICK, th...

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

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

...= 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 = Laya.Stat, Handler = Laya.Handler; // 不支持Web...

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

3. 音频-播放演示 [ 93%]

...Event; var gap = 10; //创建一个Sprite充当音效播放按钮 let soundButton = this.createButton("播放音效"); soundButton.x = (Laya.stage.width - soundButton.width * 2 + gap) / 2; soundButton.y = (Laya.stage.height - soundButton.height) / 2; //创建一个Sprite充当音乐播放按钮 var ...

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

4. Sprite-屏幕截图 [ 88%]

... WebGL = Laya.WebGL, Stage = Laya.Stage; this.btnArr = ["res/threeDimen/ui/button.png", "res/threeDimen/ui/button.png", "res/threeDimen/ui/button.png"]; this.nameArr = ["canvas截图","sprite截图","清理"]; this._canvas = null; this.aimSp = null; this.drawImage = null; this.drawSp = null; this.mo...

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