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

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

1. UI-Label [ 100%]

...AirIDE让项目开发更高效。(function() { var Stage = Laya.Stage; var Label = Laya.Label; var WebGL = Laya.WebGL; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleM...

来源: Laya_示例 发布时间: 20260303

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

...e.bgColor = "#232628"; createTexts(); })(); function createTexts() { createLabel("只允许输入数字:").pos(50, 20); var input = createInput(); input.pos(50, 50); input.restrict = "0-9"; createLabel("只允许输入字母:").pos(50, 100); input = createInput(); input.pos(50, 130); input.restr...

来源: Laya_示例 发布时间: 20260303

3. 缓动-缓动函数演示 [ 95%]

...目开发更高效。(function() { // 项渲染器 var Box = Laya.Box; var Label = Laya.Label; function ListItemRender() { var label = null; ListItemRender.__super.call(this); this.size(100, 20); label = new Label(); label.fontSize = 12; label.color = "#FFFFFF"; this.addChild(label); this.setLabel =...

来源: Laya_示例 发布时间: 20260303

4. UI-Tree [ 90%]

...发更高效。(function() { var Box = Laya.Box; var Clip = Laya.Clip; var Label = Laya.Label; var Utils = Laya.Utils; // 此类对应的json对象: // {"child": [{"type": "Clip", "props": {"x": "13", "y": "0", "left": "12", "height": "24", "name": "selectBox", "skin": "ui/clip_selectBox.png", "ri...

来源: Laya_示例 发布时间: 20260303

5. 缓动-时间线 [ 89%]

...t(55, 72); target.pos(100,100); } function createTimerLine() { timeLine.addLabel("turnRight",0).to(target,{x:450, y:100, scaleX:0.5, scaleY:0.5},2000,null,0) .addLabel("turnDown",0).to(target,{x:450, y:300, scaleX:0.2, scaleY:1, alpha:1},2000,null,0) .addLabel("turnLeft",0).to(target,{x:100, y:300, ...

来源: Laya_示例 发布时间: 20260303

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

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

来源: Laya_示例 发布时间: 20260303

7. 音频-播放演示 [ 87%]

...); musicButton.on(Event.CLICK, this, onPlayMusic); } function createButton(label) { var w = 110; var h = 40; var button = new Sprite(); button.size(w, h); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.graphics.fillText(label, w / 2, 8, "25px SimHei", "#FFFFFF", "center"); Laya.stage.addChi...

来源: Laya_示例 发布时间: 20260303

8. 计时器-延迟执行 [ 85%]

...; button2.on(Event.CLICK, this, onDecreaseAlpha2); } function createButton(label) { var w = 300, h = 60; var button = new Sprite(); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.size(w, h); button.graphics.fillText(label, w / 2, 17, "20px simHei", "#ffffff", "center"); return button; } fun...

来源: Laya_示例 发布时间: 20260303

9. UI-Clip [ 85%]

...teController() { controller = new Button(buttonSkin, "暂停"); controller.labelBold = true; controller.labelColors = "#FFFFFF,#FFFFFF,#FFFFFF,#FFFFFF"; controller.size(84, 30); controller.on('click', this, onClipSwitchState); controller.x = (Laya.stage.width - controller.width) / 2; controller.y = ...

来源: Laya_示例 发布时间: 20260303

10. UI-Tab [ 83%]

...n onSkinLoaded() { var tabA = createTab(skins[0]); tabA.pos(40, 120); tabA.labelColors = "#000000,#d3d3d3,#333333"; var tabB = createTab(skins[1]); tabB.pos(40, 220); tabB.labelColors = "#FFFFFF,#8FB299,#FFFFFF"; } function createTab(skin) { var tab = new Tab(); tab.skin = skin; tab.labelBold = true...

来源: Laya_示例 发布时间: 20260303