大约有 212 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0161 秒)
Laya_社区(134) Laya2.0_文档(34) Laya3.0_api(21) Laya3.0_文档(16) Laya2.0_示例(3) laya_api(2) Laya2.0_api(2)
...使用的方式为: let myI18n: Laya.Translations; myI18n = await Laya.loader.load("editorResources/i18nSettings.i18ns"); console.log(myI18n.t("a")); 在很多情况下,如果只是代码里用到的一些小量国际化的支持,并不想创建多个json文件,那么也有全代码的方法...
来源: Laya3.0_文档 发布时间: 20251010
...i项目。简单的调用接口如下: ```java package { import laya.net.Loader; import laya.utils.Handler; import view.TestView; import laya.net.WorkerLoader; import laya.webgl.WebGL; public class LayaUISample { public function LayaUISample() { //初始化引擎 Laya.init(600, 400,WebGL); //设...
来源: Laya2.0_文档 发布时间: 20210715
...init(1024, 768, WebGL); Stat.show(0, 0); Laya.stage.bgColor = "#fff"; Laya.loader.load("assets/images/color1.png", Handler.create(this, __loadImageHandler)); } private function __loadImageHandler():void { _colorSpr = new Sprite(); _colorTex = Laya.loader.getRes("assets/images/color1.png"); _colorSpr...
来源: Laya_社区 发布时间: 20180302
....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
...内容并返回。如果不需要支持热重载,则忽略。 @Laya.regLoader(["abc"], null, true) export class DemoAssetLoader implements Laya.IResourceLoader { async load(task: Laya.ILoadTask): Promise<any> { let json = await task.loader.fetch(task.url, "json"); let res = task.obsoluteInst...
来源: Laya3.0_文档 发布时间: 20251010
...的示例代码为: ```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
...正确获取宽高。 3. **直接调用size设置:** ```javascript Laya.loader.load("res/apes/monkey2.png", Handler.create(this, function() { var texture:Texture = Laya.loader.getRes("res/apes/monkey2.png"); var sp:Spirte = new Sprite(); sp.graphics.drawTexture(tex...
来源: Laya2.0_文档 发布时间: 20210715
...正确获取宽高。 1. **直接调用size设置:** ```javascript Laya.loader.load("res/apes/monkey2.png",Handler.create(this,function() { var texture=Laya.loader.getRes("res/apes/monkey2.png"); var sp=new Laya.Sprite(); sp.graphics.drawTexture(texture,0,0); sp.size(texture.width,texture.height);...
来源: Laya2.0_文档 发布时间: 20210715