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

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

1. 输入设备-贪吃蛇(重力感应) [ 100%]

...wser; var Handler = Laya.Handler; var WebGL = Laya.WebGL; function Segment(width, height) { Segment.super(this); Segment.prototype.init = function() { this.graphics.drawRect(-height / 2, -height / 2, width + height, height, "#FF7F50"); } // 获取关节另一头位置 Segment.prototype.getPinPositio...

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

2. 性能测试-虫子(慎入) [ 96%]

...s = []; var wrapBounds; var maggotTexture; (function() { Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.bgColor = "#000000"; Stat.show(); wrapBounds = new Rectangle(-padding, -padding, Laya.stage.width + padding * 2, Laya.stage.height + padding * 2); Laya.loader.load(texturePath, Handle...

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

3. 滤镜-颜色滤镜 [ 96%]

...tion() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load(ApePath, Handler.create(t...

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

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

...assImg); compassImg.loadImage(compassImgPath); compassImg.pivot(compassImg.width / 2, compassImg.height / 2); compassImg.pos(Laya.stage.width / 2, 400); } function drawUI() { var canvas = new Sprite(); Laya.stage.addChild(canvas); canvas.graphics.drawLine(compassImg.x, 50, compassImg.x, 182, "#FFFFF...

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

5. UI-Tree [ 94%]

..."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", "clipY": "2"}}], "...

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

6. UI-Clip [ 92%]

...howBg() { var bg = new Image(bgSkin); bg.size(224, 302); bg.pos(Laya.stage.width - bg.width >> 1, Laya.stage.height - bg.height >> 1); Laya.stage.addChild(bg); } function createTimerAnimation() { counter = new Clip(clipSkin, 10, 1); counter.autoPlay = true; counter.interval = 1000; counter.x = (Laya...

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

7. 计时器-间隔循环 [ 92%]

...tion() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, 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() ...

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

8. Sprite-新手引导 [ 91%]

...prite(); maskArea.alpha = 0.5; maskArea.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); guideContainer.addChild(maskArea); //绘制一个圆形区域,利用叠加模式,从遮罩区域抠出可交互区 interactionArea = new Sprite(); //设置叠加模式 interactionArea...

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

9. 音频-播放演示 [ 91%]

...tion() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { var gap ...

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

10. 其他引擎的Demo-Example_04 [ 89%]

... 20); var sy = 1.0 + (Math.random() / 20); var stars = []; var w = Browser.width; var h = Browser.height; var slideX = w / 2; var slideY = h / 2; var speedInfo; (function() { Laya.init(w, h, WebGL); createText(); start(); })(); function start() { for (var i = 0; i w) { stars[i].x = stars[i].x - w; }...

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