大约有 105 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0053 秒)
... (function(LayaSample){ (function(){ Laya.init(640,1027); Laya.loader.load("res/atlas/comp.json",Laya.Handler.create(this,onLoaded),null,Laya.Loader.ATLAS)})(); function onLoaded(){ var karaok = new Karaok(); // new出来的内存 如何主动销毁? } })(window.LayaSample || (window...
来源: Laya_社区 发布时间: 20170223
...NONE; //开启统计信息 Stat.show(); //预加载角色动画资源 Laya.loader.create("monkey/monkey.ls",Handler.create(this,onSceneOK)); } private function onSceneOK():void { //添加3D场景 var scene:Scene3D = Laya.loader.getRes("monkey/monkey.ls"); Laya.stage.addChild(scene); //从场景中...
来源: Laya2.0_文档 发布时间: 20210715
...板,urls接收的是图片地址集合,所以我们需要先使用Laya.loader.load()将图集文件先加载进来。下面我们直接看示例代码及注释。 ```typescript // 程序入口 class AtlasAniDemo{ private roleAni:Laya.Animation; constructor() { //初始化舞台 Laya.init(1334,75...
来源: Laya2.0_文档 发布时间: 20210715
...I DocumentationAll Packages | All Classes | Index | Frames No Frames LoaderManagerProperties | Methods | Events Packagelaya.netClasspublic class LoaderManagerInheritanceLoaderManager EventDispatcher Object LoaderManager 类用于用于批量加载资源。此类是单例,不要手动实...
来源: Laya2.0_api 发布时间: 20190513
...图片 执行代码说加载不出来资源 这个是怎么回事? Laya.loader.create 进度回调函数执行两次 如何动态的设定sprite的覆盖层级 Ctrl + 单击以跟踪链接 怎么可以打开到新标签页,而不是每次都覆盖掉上次打开的? MOUSE_OVER注册的响应...
来源: Laya_社区 发布时间: 20180524
...下: ```typescript //先加载plf类型的合并后文件Image.json Laya.loader.load([{url: "res/Image.json", type: "plf"}], Handler.create(this, function():void { //在回调里,正常使用原来的图集 Laya.loader.load("res/atlas/comp.atlas", Handler.create(this, function():void { var img:T...
来源: Laya2.0_文档 发布时间: 20210714
....create(null, function (res:any){ Laya.stage.addChild(res); })); //用Laya.loader的方式加载,加载后根节点是Scene2D Laya.loader.load('scene/Game.ls', Laya.Handler.create(this, this.onLoaded), Laya.Handler.create(this, this.onLoading)).then( (res)=>{ let scene = res.create(); //scene.s...
来源: Laya3.0_文档 发布时间: 20251010
... 有自带这种方式 这里我们用到图集 和 普通图片 1、Laya.Loader.IMAGE 2、Laya.Loader.ATLAS 因此我们的LayaSample.js需要修改一下加载代码如下: //加载单个资源 var asset = []; asset.push({ url : [ "res/background.png", "res/m_background.png", "res/floor.png" ...
来源: Laya_社区 发布时间: 20160801
... ```javascript //加载图集成功后,执行onLoaded回调方法 Laya.loader.load("res/atlas/ui.atlas", Laya.Handler.create(this, onLoaded)); ``` 第二步:创建Animation实例,加载动画文件 ```javascript //创建一个Animation实例 var tl = new Laya.Animation(); //加载动画文件 ...
来源: Laya2.0_文档 发布时间: 20210715
... ```typescript //加载图集成功后,执行onLoaded回调方法 Laya.loader.load("res/atlas/ui.atlas",Laya.Handler.create(this,this.onLoaded)); ``` 第二步:创建Animation实例,加载动画文件 ```typescript //创建一个Animation实例 var tl:Laya.Animation = new Laya.Animation(); //...
来源: Laya2.0_文档 发布时间: 20210715