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

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

1. Sprite-根据数据绘制路径 [ 100%]

...nvas = new Laya.Sprite(); Laya.stage.addChild(canvas); let path = []; path.push(0, -130); path.push(33, -33); path.push(137, -30); path.push(55, 32); path.push(85, 130); path.push(0, 73); path.push(-85, 130); path.push(-55, 32); path.push(-137, -30); path.push(-33, -33); canvas.graphics.drawPoly(Lay...

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

2. 缓动-缓动函数演示 [ 97%]

...s.renderList); Laya.stage.addChild(easeFunctionsList); let data = []; data.push('backIn', 'backOut', 'backInOut'); data.push('bounceIn', 'bounceOut', 'bounceInOut'); data.push('circIn', 'circOut', 'circInOut'); data.push('cubicIn', 'cubicOut', 'cubicInOut'); data.push('elasticIn', 'elasticOut', 'ela...

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

3. UI-List [ 91%]

... = []; for (let i = 0; i = []; for (var i: number = 0; i < 10; ++i) { data.push("res/ui/listskins/1.jpg"); data.push("res/ui/listskins/2.jpg"); data.push("res/ui/listskins/3.jpg"); data.push("res/ui/listskins/4.jpg"); data.push("res/ui/listskins/5.jpg"); } list.array = data; } private updateItem(cel...

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

4. 加载-多种类型资源加载 [ 88%]

...t/texture.png"; (function() { Laya.init(100, 100); var assets = []; assets.push( { url: ROBOT_DATA_PATH, type: Loader.BUFFER }); assets.push( { url: ROBOT_TEXTURE_PATH, type: Loader.IMAGE }); Laya.loader.load(assets, Handler.create(this, onAssetsLoaded)); })(); function onAssetsLoaded() { var robotD...

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

5. UI-Slider [ 83%]

...LE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); skins = []; skins.push("res/ui/hslider.png", "res/ui/hslider$bar.png"); skins.push("res/ui/vslider.png", "res/ui/vslider$bar.png"); Laya.loader.load(skins, Handler.create(this, this.onLoadComplete)); } onLoadComplete() { this.placeHSlider(); t...

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

6. UI-ScrollBar [ 82%]

...e = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; skins = []; skins.push("res/ui/hscroll.png", "res/ui/hscroll$bar.png", "res/ui/hscroll$down.png", "res/ui/hscroll$up.png"); skins.push("res/ui/vscroll.png", "res/ui/vscroll$bar.png", "res/ui/vscroll$down.png", "res/ui/vscroll$up.png"); Laya.lo...

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

7. 其他引擎的Demo-Example_21 [ 82%]

...lors.length]; path.length = 0; } onMouseMove() { if (!isDown) return; path.push(Laya.stage.mouseX); path.push(Laya.stage.mouseY); } onMouseUp() { isDown = false; canvasGraphics.drawPoly(0, 0, path.concat(), color); } animate() { liveGraphics.clear(); liveGraphics.drawPoly(0, 0, path, color); } } new...

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

8. 混合模式-Lighter [ 80%]

... 2; } createAnimation() { let frames = []; for (let i = 1; i > 16); result.push(color >> 8 & 0xFF); result.push(color & 0xFF); return result; } onTweenComplete() { this.evalBgColor(); } renderBg() { Laya.stage.graphics.clear(); Laya.stage.graphics.drawRect( 0, 0, phoenixWidth, phoenixHeight, this.ge...

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

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

...on(); seg.x = prevSeg.x - point.x; seg.y = prevSeg.y - point.y; } segments.push(seg); } animate() { let seg = segments[0]; // 更新蛇的位置 targetPosition.x += vx; targetPosition.y += vy; // 限制蛇的移动范围 this.limitMoveRange(); // 检测觅食 this.checkEatFood(); // 更新所有关...

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

10. 其他引擎的Demo-Example_23 [ 67%]

...er.rotation = (Math.atan2(distY, distX) + Math.PI) * 180 / Math.PI; lasers.push(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; privat...

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