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

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

1. 缓动-缓动函数演示 [ 100%]

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

2. 文本-字符限制 [ 99%]

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

3. IDE-显示IDE创建的界面 [ 93%]

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

4. UI-Label [ 90%]

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

5. DOM元素-表单输入 [ 87%]

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

6. 输入设备-地图 [ 87%]

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

7. UI-Tree [ 80%]

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

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

...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. UI-RefreshList [ 73%]

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