大约有 20 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0031 秒)
...可以找到drawTexture()方法,除此之外,还需要了解laya.net.LoaderManager中的load()方法和getRes()方法,以及laya.utils.Handler中的create()方法,各方法的参数图3、图4、图5、图6所示:  (图3)  (图4)  (图5...
来源: Laya2.0_文档 发布时间: 20210715
...ER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load([texture1, texture2], Handler.create(this, onAssetsLoaded)); })(); function onAssetsLoaded() { ape = new Sprite(); Laya.stage.addChild(ape); ape.pivot(55, 72); ape.pos(200, 200); // 显示默认纹理 switchTextur...
来源: Laya2.0_文档 发布时间: 20210715
...ER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#ffffff"; Laya.loader.load([this.texture1, this.texture2], Handler.create(this, this.onAssetsLoaded)); } private onAssetsLoaded(): void { this.ape = new Sprite(); Laya.stage.addChild(this.ape); this.ape.pivot(55, 72); this.ape.pos(100,50); ...
来源: Laya2.0_文档 发布时间: 20210715
...的示例代码为: ```javascript //atlas方式图集使用示例 Laya.loader.load("./res/test/c1.atlas", Laya.Handler.create(this, onLoaded)); ``` `.json`是一种兼容第三方的图集配置方式,由于`.json`文件应用广泛,不仅仅用于图集,所以为了识别是否为图...
来源: Laya2.0_文档 发布时间: 20210715
...的示例代码为: ```typescript //atlas方式图集使用示例 Laya.loader.load("./res/atlas/test.atlas", Laya.Handler.create(this, this.onLoaded)); ``` `.json`是一种兼容第三方的图集配置方式,由于`.json`文件应用广泛,不仅仅用于图集,所以为了识别是否为...
来源: Laya2.0_文档 发布时间: 20210714
...的示例代码为: ```typescript //atlas方式图集使用示例 Laya.loader.load("./res/atlas/test.atlas", Handler.create(this, onLoaded)); ``` `.json`是一种兼容第三方的图集配置方式,由于`.json`文件应用广泛,不仅仅用于图集,所以为了识别是否为图集配置...
来源: Laya2.0_文档 发布时间: 20210714
...。 ```typescript //初始化3D场景 var scene = Laya.stage.addChild(Laya.Loader.getRes("res/threeDimen/scene/ChangeMaterialDemo/Conventional/scene.ls")); //获取球型精灵 var sphere = scene.getChildByName("Sphere"); //获取精灵的mesh var sphereMesh = sphere.meshFilter.sharedMesh; //此时...
来源: Laya2.0_文档 发布时间: 20210714
...。 ```typescript //初始化3D场景 var scene = Laya.stage.addChild(Laya.Loader.getRes("res/threeDimen/scene/ChangeMaterialDemo/Conventional/scene.ls")); //获取球型精灵 var sphere = scene.getChildByName("Sphere"); //获取精灵的mesh var sphereMesh = sphere.meshFilter.sharedMesh; //此时...
来源: Laya2.0_文档 发布时间: 20210715
... ```typescript //初始化3D场景 var scene:Scene3D = Laya.stage.addChild(Loader.getRes("res/threeDimen/scene/ChangeMaterialDemo/Conventional/scene.ls")) as Scene3D; //获取球型精灵 var sphere:MeshSprite3D = scene.getChildByName("Sphere") as MeshSprite3D; //获取精灵的mesh var sphereMesh:M...
来源: Laya2.0_文档 发布时间: 20210714
... isliooping属性为true** ```typescript //获取精灵 var monkey = Laya.Loader.getRes("res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh"); this.scene.addChild(monkey); //获取角色动画组件 var ani = monkey.getChildAt(0).getComponent(Laya.Animator); //创建一个动画动作状态 var state...
来源: Laya2.0_文档 发布时间: 20210715