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

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

1. 文本-字符限制 [ 100%]

....WebGL; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(550, 300, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createTexts(); })(); function createTexts() { create...

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

2. Sprite-绘制各种形状 [ 95%]

...#ff0000", 3); //画连续直线 sp.graphics.drawLines(176, 58, [0, 0, 39, -50, 78, 0, 117, 50, 156, 0], "#ff0000", 5); //画曲线 sp.graphics.drawCurves(352, 58, [0, 0, 19, -100, 39, 0, 58, 100, 78, 0, 97, -100, 117, 0, 136, 100, 156, 0], "#ff0000", 5); //画矩形 sp.graphics.drawRect(10, 166, 166...

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

3. UI-Slider [ 94%]

....WebGL; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; var skins = []; skins.push("../../res/ui/hslider.png...

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

4. UI-Label [ 88%]

...8"; setup(); })(); function setup() { createLabel("#FFFFFF", null).pos(30, 50); createLabel("#00FFFF", null).pos(290, 50); createLabel("#FFFF00", "#FFFFFF").pos(30, 100); createLabel("#000000", "#FFFFFF").pos(290, 100); createLabel("#FFFFFF", "#00FFFF").pos(30, 150); createLabel("#0080FF", "#00FFFF"...

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

5. 文本-下划线 [ 88%]

...teText('left', 1, null, 100, 10); createText('center', 2, "#00BFFF", 155, 150); createText('right', 3, "#FF7F50", 210, 290); } function createText(align, underlineWidth, underlineColor, x, y) { var txt = new Text(); txt.text = "Layabox\n是HTML5引擎技术提供商\n与优秀的游戏发行商\n面...

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

6. 缓动-简单的Tween [ 87%]

...eateCharacter("../../res/cartoonCharacters/1.png"); characterA.pivot(46.5, 50); characterA.y = 100; var characterB = createCharacter("../../res/cartoonCharacters/2.png"); characterB.pivot(34, 50); characterB.y = 250; Laya.stage.graphics.drawLine(terminalX, 0, terminalX, Laya.stage.height, "#FFFFFF")...

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

7. UI-Input [ 87%]

...= Laya.WebGL; var SPACING = 100; var INPUT_WIDTH = 300; var INPUT_HEIGHT = 50; var Y_OFFSET = 50; var skins; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stag...

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

8. Sprite-遮罩-放大镜 [ 86%]

...askSp = new Sprite(); maskSp.loadImage("../../res/mask.png"); maskSp.pivot(50, 50); //设置mask bg2.mask = maskSp; Laya.stage.on("mousemove", this, onMouseMove); } function onMouseMove() { bg2.x = -Laya.stage.mouseX * 2; bg2.y = -Laya.stage.mouseY * 2; maskSp.x = Laya.stage.mouseX; maskSp.y = Laya....

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

9. UI-ScrollBar [ 85%]

....WebGL; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; var skins = []; skins.push("../../res/ui/hscroll.png...

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

10. 缓动-缓动函数演示 [ 84%]

... tween; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { createCharacter();...

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