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

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

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

...ut'); data.push('strongIn', 'strongOut', 'strongInOut'); easeFunctionsList.array = data; } renderList(item) { item.setLabel(item.dataSource); } onEaseFunctionChange(list) { const Tween = Laya.Tween, Ease = Laya.Ease; character.pos(100, 50); tween && tween.clear(); tween = Tween.to(character, { x: 35...

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

2. Sprite-根据数据绘制路径 [ 99%]

... var canvas: Sprite = new Sprite(); Laya.stage.addChild(canvas); var path: Array = []; 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.grap...

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

3. UI-List [ 95%]

...ush("res/ui/listskins/4.jpg"); data.push("res/ui/listskins/5.jpg"); } list.array = data; } private updateItem(cell: Item, index: number): void { cell.setImg(cell.dataSource); } private onSelect(index: number): void { console.log("当前选择的索引:" + index); } } import Box = Laya.Box; import ...

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

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

...leton/robot/texture.png"; constructor() { Laya.init(100, 100); var assets: Array = []; assets.push({ url: this.ROBOT_DATA_PATH, type: Loader.BUFFER }); assets.push({ url: this.ROBOT_TEXTURE_PATH, type: Loader.IMAGE }); Laya.loader.load(assets, Handler.create(this, this.onAssetsLoaded)); } private on...

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

5. 其他引擎的Demo-Example_21 [ 91%]

...; import WebGL = Laya.WebGL; export class PIXI_Example_21 { private colors:Array = ["#5D0776", "#EC8A49", "#AF3666", "#F6C84C", "#4C779A"]; private colorCount:number = 0; private isDown:Boolean = false; private path:Array = []; private color:String = this.colors[0]; private liveGraphics:Graphics; pr...

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

6. 混合模式-Lighter [ 89%]

...t * scaleFactor) / 2; } private createAnimation(): Animation { var frames: Array = []; for (var i: number = 1; i = animation.frames.concat(); // 反转帧 clips = clips.reverse(); // 添加到已有帧末尾 animation.frames = animation.frames.concat(clips); animation.play(); return animation; } pri...

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

7. UI-Slider [ 84%]

...caleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; var skins: Array = []; 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)); } private onLoadComplete(...

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

8. UI-ScrollBar [ 84%]

...caleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; var skins: Array = []; 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...

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

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

... class InputDevice_GluttonousSnake { private seg:Segment; private segments:Array = []; private foods:Array = []; private initialSegmentsAmount:number = 5; private vx:number = 0 private vy:number = 0; private targetPosition:Point; constructor() { Laya.init(Browser.width, Browser.height, WebGL); // ...

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

10. IDE-显示IDE创建的界面 [ 73%]

...Hello LayaAir" } }; //list赋值,先获得一个数据源数组 var arr: Array = []; for (var i: number = 0; i < 100; i++) { arr.push({ label: "item " + i, clip: i % 9 }); } //给list赋值更改list的显示 this.list.array = arr; //还可以自定义list渲染方式,可以打开下面注释看...

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