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

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

1. 加载-加载序列 [ 100%]

...); function onAssetLoaded(texture) { console.log(texture.source); // 恢复默认并发加载个数。 if (++numLoaded == 3) { Laya.loader.maxLoader = 5; console.log("All done."); } } })();module laya { import Texture = Laya.Texture; import Handler = Laya.Handler; export class Loader_Sequence { priv...

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

2. Sprite-轴心点 [ 94%]

...为中心 sp1.pivot(55, 72); Laya.stage.addChild(sp1); //不设置轴心点默认为左上角 sp2 = new Sprite(); sp2.loadImage("../../res/apes/monkey2.png", 0, 0); sp2.pos((Laya.stage.width + gap) / 2, Laya.stage.height / 2); Laya.stage.addChild(sp2); Laya.timer.frameLoop(1, this, animate); } funct...

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

3. Sprite-切换纹理 [ 93%]

...ot(55, 72); ape.pos(Laya.stage.width / 2, Laya.stage.height / 2); // 显示默认纹理 switchTexture(); ape.on("click", this, switchTexture); } function switchTexture() { var textureUrl = (flag = !flag) ? texture1 : texture2; // 更换纹理 ape.graphics.clear(); var texture = Laya.loader.getRes(te...

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

4. 高级应用-寻路导航 [ 65%]

...Dimen/scene/TerrainScene/XunLongShi.ls")); //删除原始资源中包含的默认相机 var camera = this.scene.getChildByName("Scenes").getChildByName("Main Camera"); camera.removeSelf(); var skyBox = new Laya.SkyBox(); skyBox.textureCube = Laya.TextureCube.load("../../res/threeDimen/skyBox/skyBox3...

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