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

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

1. IDE-显示IDE创建的界面 [ 100%]

...ess组件的value为2 //复杂复制,可以通知某个属性,比如:label:{color:"#ff0000",text:"Hello LayaAir"} this.box.dataSource = {slider: 50, scroll: 80, progress: 0.2, input: "This is a input", label: {color: "#ff0000", text: "Hello LayaAir"}}; //list赋值,先获得一个数据源...

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

2. 2D物理-桥 [ 98%]

...ya.timer.frameOnce(120, this, function () { newBall.destroy(); }); }); let label = this.label = Laya.Laya.stage.addChild(new Laya.Label("单击屏幕产生新的小球刚体,击向bridge的随机位置")); label.top = 20; label.right = 20; label.fontSize = 16; label.color = "#e69999"; } dispose() ...

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

3. 2D物理-复合碰撞器 [ 98%]

...ider.width = 5; collider.height = 5; this.count++; } eventListener() { let label = this.label = Laya.Laya.stage.addChild(new Laya.Label("双击屏幕,将会产生100个新的小刚体")); label.top = 20; label.right = 20; label.fontSize = 16; label.color = "#e69999"; Laya.Laya.stage.on(Laya.Event....

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

4. 缓动-时间线 [ 97%]

...= Laya.TimeLine, Event = Laya.Event; this.timeLine = new TimeLine(); // addLabel(label:String, offset:Number) offset: 标签事件相对于上个动画的偏移时间(单位:毫秒) this.timeLine.addLabel("turnRight", 0).to(this.target, {x:450, y:100, scaleX:0.5, scaleY:0.5}, 2000, null, 0) .addLa...

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

5. 缓动-缓动函数演示 [ 97%]

...trongInOut'); easeFunctionsList.array = data; } renderList(item) { item.setLabel(item.dataSource); } onEaseFunctionChange(list) { const Tween = Laya.Tween, Ease = Laya.Ease; character.pos(100, 50); tween && tween.clear(); tween = Tween.to(character, { x: 350, y: 250 }, duration, Ease[list.selectedIt...

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

6. 2D物理-仿生机器人 [ 95%]

...ya.timer.frameOnce(120, this, function () { newBall.destroy(); }); }); let label = this.label = Laya.Laya.stage.addChild(new Laya.Label("双击屏幕,仿生机器人向相反方向运动\n单击产生新的小球刚体")); label.top = 20; label.right = 20; label.fontSize = 16; label.color = "#e699...

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

7. 计时器-延迟执行 [ 92%]

... this.button2.on(Event.CLICK, this, this.onDecreaseAlpha2); } createButton(label) { const Sprite = Laya.Sprite; let w = 300, h = 60; let button = new Sprite(); Laya.stage.addChild(button); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.size(w, h); button.graphics.fillText(label, w / 2, 17, ...

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

8. 音频-播放演示 [ 88%]

...ound); musicButton.on(Event.CLICK, this, this.onPlayMusic); } createButton(labelText) { let w = 110, h = 40; const Sprite = Laya.Sprite; let btn = new Sprite(); Laya.stage.addChild(btn); btn.size(w, h); btn.graphics.drawRect(0, 0, w, h, "#FF7F50"); btn.graphics.fillText(labelText, w / 2, 8, "24px Si...

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

9. DOM元素-表单输入 [ 85%]

...htDelta = this.rowSpacing + this.rowHeight; // 显示左侧标签 this.showLabel("邮箱", 0, rowHeightDelta * 0); this.showLabel("出生日期", 0, rowHeightDelta * 1); this.showLabel("密码", 0, rowHeightDelta * 2); // 显示右侧输入框 let emailInput = this.createInputElement(); let birthday...

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

10. 骨骼动画-Spine事件 [ 83%]

...。let mFactory, mArmature, mStartX = 400, mStartY = 500, mCurrIndex = 0, mLabelSprite; class Skeleton_SpineEvent { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Sprite = Laya.Sprite; // 不支持WebGL时自动切换至Canvas Laya.init(Browse...

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