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

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

1. 性能测试-卡通人物2 [ 100%]

...rformanceTest_Cartoon2 { private amount: number = 500; private character1: Array = [ "res/cartoon2/yd-6_01.png", "res/cartoon2/yd-6_02.png", "res/cartoon2/yd-6_03.png", "res/cartoon2/yd-6_04.png", "res/cartoon2/yd-6_05.png", "res/cartoon2/yd-6_06.png", "res/cartoon2/yd-6_07.png", "res/cartoon2/yd-6_...

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

2. UI-RefreshList [ 95%]

...建数据 var data = this.createData(9, "初始数据"); this.refreshList.array = data; // 添加事件监听 this.refreshList.on(Event.MOUSE_UP, this, this.stageOnMouseUp); this.refreshList.on(Event.MOUSE_OUT, this, this.stageOnMouseUp); //游戏逻辑关联引擎的停止滚动接口 this.refreshL...

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

3. 网络和格式-ProtocolBuffer [ 94%]

...(message); if (errMsg) throw Error(errMsg); // Encode a message to an Uint8Array (browser) or Buffer (node) var buffer = AwesomeMessage.encode(message).finish(); // ... do something with buffer // Or, encode a plain object var buffer = AwesomeMessage.encode( { awesomeField: "AwesomeString" }).finish...

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

4. 其他引擎的Demo-Example_05 [ 94%]

...[i]) { tpoint3[i] = tpoint3[i] + 1; } if (points3[i] = []; private points2:Array = []; private points3:Array = []; private tpoint1:Array = []; private tpoint2:Array = []; private tpoint3:Array = []; private balls:Array = []; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser...

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

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

...; 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_示例 发布时间: 20241124

6. IDE-显示IDE创建的界面 [ 83%]

...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

7. 混合模式-Lighter [ 83%]

...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_示例 发布时间: 20241124

8. 鼠标交互-双指旋转(多点触控) [ 80%]

...s, this.onMouseDown); } private onMouseDown(e: Event): void { var touches: Array = e.touches; if (touches && touches.length == 2) { this.preRadian = Math.atan2( touches[0].stageY - touches[1].stageY, touches[0].stageX - touches[1].stageX); Laya.stage.on(Event.MOUSE_MOVE, this, this.onMouseMove); } }...

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

9. 滤镜-颜色滤镜 [ 79%]

... 个项目(排列成 4 x 5 矩阵)组成的数组,红色 var redMat: Array = [ 1, 0, 0, 0, 0, //R 0, 0, 0, 0, 0, //G 0, 0, 0, 0, 0, //B 0, 0, 0, 1, 0, //A ]; //创建一个颜色滤镜对象,红色 var redFilter: ColorFilter = new ColorFilter(redMat); // 赤化猩猩 var redApe: Sprite = this....

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

10. UI-List [ 79%]

...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_示例 发布时间: 20241124