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

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

1. 动画-图集动画 [ 100%]

...age.bgColor = "#232628"; Laya.loader.load(aniConfPath, Laya.Handler.create(this, this.createAnimation), null, Laya.Loader.ATLAS); } createAnimation() { const Animation = Laya.Animation; let ani = new Animation(); Laya.stage.addChild(ani); ani.loadAtlas(aniConfPath); // 加载图集动画 ani.interva...

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

2. 网络和格式-GET [ 95%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.connect(); this.showLogger(); } connect() { const HttpRequest = Laya.HttpRequest, Event = Laya.Event; hr = new HttpRequest(); hr.once(Event.PROGRESS, this, this.onHttpRequestProgress); hr.once(Event.COMPLETE, this, this....

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

3. 网络和格式-POST [ 89%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.connect(); this.showLogger(); } connect() { const HttpRequest = Laya.HttpRequest, Event = Laya.Event; hr = new HttpRequest(); hr.once(Event.PROGRESS, this, this.onHttpRequestProgress); hr.once(Event.COMPLETE, this, this....

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

4. UI-RefreshList [ 89%]

...ya.Tween; TextArea = Laya.TextArea; class UI_RefreshList { constructor() { this.baseBox = null; this.refreshLoading = null; this.loadingAni = null; this.loadingLabel = null; this.refreshList = null; /** 消息生成的当前最大id值 */ this.msgIdNow=1; /** 滚动条效果是否停止 */ this.scro...

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

5. 骨骼动画-Spine事件 [ 86%]

... Laya.stage.bgColor = "#ffffff"; mLabelSprite = new Sprite(); Stat.show(); this.startFun(); } startFun() { const Templet = Laya.Templet, Event = Laya.Event; const mAniPath = "res/spine/spineRes6/alien.sk"; mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, this.parseComplete); mFactory.on(E...

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

6. 加载-多种类型资源加载 [ 79%]

...XTURE_PATH, type: Loader.IMAGE }); Laya.loader.load(assets, Handler.create(this, onAssetsLoaded)); })(); function onAssetsLoaded() { var robotData = Loader.getRes(ROBOT_DATA_PATH); var robotTexture = Loader.getRes(ROBOT_TEXTURE_PATH); // 使用资源 } })();module laya { import Loader = Laya.Loader;...

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

7. 滤镜-颜色滤镜 [ 68%]

...a.stage.bgColor = "#232628"; Laya.loader.load(apePath, Laya.Handler.create(this, this.setup)); } setup() { this.normalizeApe(); this.makeRedApe(); this.grayingApe(); } normalizeApe() { let originalApe = this.createApe(); originalApe.x = (Laya.stage.width - apeTexture.width * 3) / 2; originalApe.y = ...

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

8. 性能测试-虫子(慎入) [ 68%]

....stage.height + padding * 2); Laya.loader.load(texturePath, Handler.create(this, this.onTextureLoaded)); } onTextureLoaded() { maggotTexture = Laya.loader.getRes(texturePath); this.initMaggots(); Laya.timer.frameLoop(1, this, this.animate); } initMaggots() { let maggotContainer; for (let i = 0; i wb...

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

9. 混合模式-Lighter [ 60%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.bgColorTweener = new Tween(); this.setup(); } setup() { this.createPhoenixes(); // 动态背景渲染 this.evalBgColor(); Laya.timer.frameLoop(1, this, this.renderBg); } createPhoenixes() { let scaleFactor = Math.min( La...

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

10. UI-Tree [ 52%]

... "res/ui/tree/clip_tree_arrow.png" ]; Laya.loader.load(res, Handler.create(this, this.onLoadComplete)); } onLoadComplete() { const Utils = Laya.Utils, Tree = Laya.Tree; // 组装tree的数据 let treeData = ""; for (let i = 0; i "; for (let j = 0; j "; } treeData += ""; } treeData += ""; // 解析tr...

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