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

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

1. Sprite-绘制各种形状 [ 100%]

... 166, 90, "#ffff00"); //画多边形 sp.graphics.drawPoly(264, 166, [0, 0, 60, 0, 78.48, 57, 30, 93.48, -18.48, 57], "#ffff00"); //画三角形 sp.graphics.drawPoly(400, 166, [0, 100, 50, 0, 100, 100], "#ffff00"); //画圆 sp.graphics.drawCircle(98, 332, 50, "#00ffff"); //画扇形 sp.graphics.drawP...

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

2. 计时器-延迟执行 [ 89%]

...ICK, this, this.onDecreaseAlpha1); this.button2 =this. createButton("点我60帧之后 alpha - 0.5"); this.button2.pos(this.button1.x, this.button1.y + vGap); this.button2.on(Event.CLICK, this, this.onDecreaseAlpha2); } createButton(label) { const Sprite = Laya.Sprite; let w = 300, h = 60; let butto...

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

3. 性能测试-卡通人物2 [ 72%]

...reateCharacters(); text = new Text(); text.zOrder = 10000; text.fontSize = 60; text.color = "#ff0000" Laya.stage.addChild(text); Laya.timer.frameLoop(1, this, this.gameLoop); } createCharacters() { let char; let charSkin; for (let i = 0; i = 0; i--) { characters[i].update(); } if (Laya.timer.currFra...

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

4. 其他引擎的Demo-Example_23 [ 70%]

...(laser); Laya.stage.addChild(laser); frequency *= 0.9; } for (let i = 0; i 60 * 0.3) { laser.alpha *= 0.9; laser.scaleY = laser.alpha; if (laser.alpha = []; private tick: number = 0; private frequency: number = 80; private type: number = 0; constructor() { Laya.init(this.viewWidth, this.viewHeight, ...

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

5. UI-Clip [ 65%]

...r = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load([buttonSkin, clipSkin, bgSkin], Handler...

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

6. UI-RefreshList [ 37%]

...; this.addChild(this.avatar); this.avatar.pos(17, 17); this.avatar.width = 60; this.avatar.height = 60; // 列表item红点tips this.redHot = new Image("res/ui/refreshList/img_hd.png"); this.avatar.addChild(this.redHot); this.redHot.pos(-18.5, -18.5); this.redHot.autoSize = true; // 列表item红点...

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

7. 2D物理-仿生机器人 [ 20%]

...scale]; const p4 = [31 * s * this.scale, 8 * -1 * this.scale]; const p5 = [60 * s * this.scale, 15 * -1 * this.scale]; const p6 = [25 * s * this.scale, 37 * -1 * this.scale]; let leg1 = new Sprite(); leg1.pos(this.pos[0] + this.m_offset[0], this.pos[1] + this.m_offset[1] + 16 * this.scale); // TODO ...

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