大约有 105 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0046 秒)
...ge { import laya.display.Sprite; import laya.maths.Matrix; import laya.net.Loader; import laya.resource.Texture; import laya.utils.Browser; import laya.utils.Handler; import laya.webgl.WebGL; public class GraCmdsDemo { public function GraCmdsDemo() { //初始化舞台 Laya.init(Browser.width,Browser...
来源: Laya_社区 发布时间: 20170519
... ```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
...y convention, only resource files in the level-1 directory are loaded Laya.loader.create([{ url: "xx.zip", type:"ZIP"}]) [/size][/code] 如果只需要加载zip包中的部分资源,或者资源路径在多级目录下。可以在constructParams中进行配置,来加载指定文件资源。[size...
来源: Laya_社区 发布时间: 20211227
... //开启统计信息 Laya.Stat.show(); //预加载角色动画资源 Laya.loader.create("monkey/monkey.ls",Laya.Handler.create(this,this.onSceneOK)); } onSceneOK() { //添加3D场景 var scene = Laya.loader.getRes("monkey/monkey.ls"); Laya.stage.addChild(scene); //从场景中获取摄像机 var ca...
来源: Laya2.0_文档 发布时间: 20210714
... //开启统计信息 Laya.Stat.show(); //预加载角色动画资源 Laya.loader.create("monkey/monkey.ls",Laya.Handler.create(this,this.onSceneOK)); } onSceneOK() { //添加3D场景 var scene = Laya.loader.getRes("monkey/monkey.ls"); Laya.stage.addChild(scene); //从场景中获取摄像机 var ca...
来源: Laya2.0_文档 发布时间: 20210715
...板,urls接收的是图片地址集合,所以我们需要先使用Laya.loader.load()将图集文件先加载进来。下面我们直接看示例代码及注释。 ```javascript //初始化舞台 Laya.init(1334, 750,Laya.WebGL); //加载完动画的图集后执行回调方法onLoaded Laya.loader....
来源: Laya2.0_文档 发布时间: 20210715
...I DocumentationAll Packages | All Classes | Index | Frames No Frames LoaderManagerProperties | Methods | Events Packagelaya.netClasspublic class LoaderManagerInheritanceLoaderManager EventDispatcher Object LoaderManager 类用于用于批量加载资源。此类是单例,不要手动实...
来源: laya_api 发布时间: 20170929
...的示例代码为: ```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