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

大约有 10 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0027 秒)

1. UI-Label [ 100%]

...peScript三种开发语言、LayaAirIDE让项目开发更高效。class UI_Label { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat; // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Lay...

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

2. IDE-显示IDE创建的界面 [ 97%]

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

3. 文本-字符限制 [ 93%]

...tage.bgColor = "#232628"; this.createTexts(); } createTexts() { this.createLabel("只允许输入数字:").pos(50, 20); let input = this.createInput(); input.pos(50, 50); input.restrict = "0-9"; this.createLabel("只允许输入字母:").pos(50, 100); input = this.createInput(); input.pos(50, 13...

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

4. 缓动-缓动函数演示 [ 92%]

...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_示例 发布时间: 20251130

5. UI-Tree [ 89%]

... 2; Laya.stage.addChild(tree); } } const Box = Laya.Box, Clip = Laya.Clip, Label = Laya.Label; // 此类对应的json对象: // {"child": [{"type": "Clip", "props": {"x": "13", "y": "0", "left": "12", "height": "24", "name": "selectBox", "skin": "ui/clip_selectBox.png", "right": "0", "clipY": "2"}...

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

6. 2D物理-桥 [ 82%]

...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_示例 发布时间: 20251130

7. 2D物理-复合碰撞器 [ 78%]

...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_示例 发布时间: 20251130

8. 输入设备-地图 [ 73%]

...marker = new BMap.Marker(new BMap.Point(0,0)); map.addOverlay(marker); let label = new BMap.Label("当前位置", { offset: new BMap.Size(-15, 30) }); marker.setLabel(label); } createInfoText() { const Text = Laya.Text; infoText = new Text(); Laya.stage.addChild(infoText); infoText.fontSize = 50; in...

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

9. 2D物理-仿生机器人 [ 70%]

...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_示例 发布时间: 20251130

10. UI-RefreshList [ 65%]

...t; Handler = Laya.Handler; WebGL = Laya.WebGL; Animation = Laya.Animation; Label = Laya.Label; Text = Laya.Text; Point = Laya.Point; Tween = Laya.Tween; TextArea = Laya.TextArea; class UI_RefreshList { constructor() { this.baseBox = null; this.refreshLoading = null; this.loadingAni = null; this.load...

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