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

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

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

来源: Laya_示例 发布时间: 20260818

2. 网络和格式-XML [ 85%]

...irectChildren(xml:any):void { var rootNode:any = xml.firstChild; var nodes:Array = rootNode.childNodes; for (var i:number = 0; i item aitem bsomethis..."; var xmlValue:String = "item aitem bsomethings..."; proessXML(xmlValueContainsError); trace("\n"); proessXML(xmlValue); } // 使用xml private fun...

来源: Laya_示例 发布时间: 20260818

3. 加载-多种类型资源加载 [ 78%]

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

来源: Laya_示例 发布时间: 20260818

4. 滤镜-颜色滤镜 [ 72%]

... 个项目(排列成 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....

来源: Laya_示例 发布时间: 20260818

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

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

来源: Laya_示例 发布时间: 20260818

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

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

来源: Laya_示例 发布时间: 20260818

7. 性能测试-虫子(慎入) [ 62%]

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

来源: Laya_示例 发布时间: 20260818

8. 高级应用-寻路导航 [ 55%]

...age.screenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); this.path = new Array(); //预加载所有资源 var resource = [ { url: "../../res/threeDimen/scene/TerrainScene/XunLongShi.ls", clas: Laya.Scene, priority: 1 }, { url: "../../res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh", clas: Laya.S...

来源: Laya_示例 发布时间: 20260818

9. Sprite-新手引导 [ 51%]

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

来源: Laya_示例 发布时间: 20260818

10. UI-Tree [ 42%]

....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", "../../re...

来源: Laya_示例 发布时间: 20260818