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

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

1. 网络和格式-ProtocolBuffer [ 100%]

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

2. UI-RefreshList [ 88%]

...建数据 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_示例 发布时间: 20260818

3. 滤镜-颜色滤镜 [ 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_示例 发布时间: 20260818

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

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

5. 骨骼动画-换装 [ 70%]

...mature:Skeleton; private var mCurrSkinIndex:int = 0; private var mSkinList:Array = ["goblin","goblingirl"]; public function Skeleton_ChangeSkin() { WebGL.enable(); Laya.init(Browser.width, Browser.height); Laya.stage.bgColor = "#ffffff"; Stat.show(); startFun(); } public function startFun():void { m...

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

6. 性能测试-虫子(慎入) [ 69%]

...ivate maggotAmount:number = 5000; private tick:number = 0; private maggots:Array = []; private wrapBounds:Rectangle; private maggotTexture:any; constructor() { Laya.init(Browser.width,Browser.height, WebGL); Laya.stage.bgColor = "#000000"; Stat.show(); this.wrapBounds = new Rectangle(-this.padding, ...

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

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

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

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

...ate guideContainer:Sprite; private tipContainer:Sprite; private guideSteps:Array = [ { x: 151, y: 575, radius:150, tip:"res/guide/help6.png", tipx:200, tipy:250 }, { x: 883, y: 620, radius:100, tip:"res/guide/help4.png", tipx:730, tipy:380 }, { x: 1128, y: 583, radius:110, tip:"res/guide/help3.png",...

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

9. UI-Tree [ 55%]

....scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; var res: Array = [ "res/ui/vscroll.png", "res/ui/vscroll$bar.png", "res/ui/vscroll$down.png", "res/ui/vscroll$up.png", "res/ui/tree/clip_selectBox.png", "res/ui/tree/clip_tree_folder.png", "res/ui/tree/clip_tree_arrow.png" ]; Laya.loa...

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