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

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

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

...Input.on(Event.INPUT, this, function() { duration = parseInt(durationInput.text); }); } createInputWidthLabel(label, prompt, x, y) { const Text = Laya.Text, Input = Laya.Input; let text = new Text(); text.text = label; text.color = "white"; Laya.stage.addChild(text); text.pos(x, y); let input = new ...

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

2. UI-RefreshList [ 97%]

...ndler; 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.loadingLabel = null; thi...

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

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

.../复杂复制,可以通知某个属性,比如: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赋值,先获得一个数据源数组 var arr = []; for ...

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

4. 输入设备-指南针 [ 92%]

...高效。let compassImgPath = "res/inputDevice/kd.png", compassImg, degreesText, directionIndicator, firstTime = true; class InputDevice_Compass { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自...

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

5. UI-Label [ 90%]

...Label(); Laya.stage.addChild(label); label.font = "Microsoft YaHei"; label.text = "SAMPLE DEMO"; label.fontSize = 30; label.color = color; if (strokeColor) { label.stroke = STROKE_WIDTH; label.strokeColor = strokeColor; } return label; } } new UI_Label();module laya { import Stage = Laya.Stage; impo...

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

6. 屏幕适配-屏幕适配 [ 87%]

... Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler, Image = Laya.Image, Text = Laya.Text; // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); //设置适配模式 Laya.stage.scaleMode = "noscale"; //设置横竖屏 Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL; //设置水平...

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

7. Sprite-屏幕截图 [ 83%]

...; this.aimSp = null; this.drawImage = null; this.drawSp = null; this.monkeyTexture = null; // 不支持WebGL时自动切换至Canvas Config.preserveDrawingBuffer =true; Laya.init(Browser.clientWidth, Browser.clientHeight); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTE...

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

8. UI-Tree [ 76%]

...p_tree_folder.png", "clipY": "3"}}, {"type": "Label", "props": {"y": "1", "text": "treeItem", "width": "150", "left": "33", "height": "22", "name": "label", "color": "#ffff00", "right": "0", "x": "33"}}, {"type": "Clip", "props": {"x": "0", "name": "arrow", "y": "5", "skin": "ui/clip_tree_arrow.png"...

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