大约有 744 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0055 秒)
Laya_社区(536) Laya2.0_文档(76) Laya_示例(48) Laya2.0_示例(39) Laya3.0_文档(24) Laya3.0_api(19) laya_api(1) Laya2.0_api(1)
微信小游戏中如何加载XML文件? 使用Laya.loader.load("res/xml/info.xml", Laya.Handler.create(null, onLoadedXML),null,Laya.Loader.XML);来加载xml文件,在网页中能正常加载,在微信小游戏中显示 request:fail invalid url "res/xml/info.xml"。 2018-05-19 添加评论 ...
来源: Laya_社区 发布时间: 20180519
...对json进行预加载,加载完成后获取json的数据,如下 Laya.loader.load("aaa.json",Handler.create(this,onLoaded),null,Loader.JSON); } private function onLoaded():void { var js:JSON=Laya.loader.getRes("aaa.json"); trace(js); }2、你如果是想使用file读取文件的方式,这个...
来源: Laya_社区 发布时间: 20170620
...: 与内容相关的链接 提交 2 个回复 Laya_XS 赞同来自: 通过loader加载js文件获取的内容只有两种格式:一种是文本文件,一种是二进制,如果你在加载文件时没有指定加载类型,那么返回的就是文本类型,这个是没问题的,如果你...
来源: Laya_社区 发布时间: 20161102
...么将图片转换成base64格式 如题。一直转换没成功。 Laya.loader.load("hall/111.png",Handler.create(this,function():void { var img:Texture = Laya.loader.getRes("hall/111.png"); var encode:String = Base64ImageTool.getBase64Pic(img); } 2017-06-13 添加评论 免费帖 --> 分享 微博...
来源: Laya_社区 发布时间: 20170613
... number = 1188; static height: number = 594; constructor() { super(); Laya.loader.load("res/images/map_01.png", Laya.Handler.create(this, this.bgLoaded)); } bgLoaded(): void { let t: Laya.Texture = Laya.loader.getRes("res/images/map_01.png"); this.width = 1000; this.height = 500; this.graphics.fillT...
来源: Laya_社区 发布时间: 20170714
...错 Uncaught TypeError: this.setTo is not a function(function () { const Loader = Laya.Loader const Handler = Laya.Handler (function () { Laya.init(1136,640) Laya.stage.bgColor="#fff" Laya.loader.load('./../bin/res/atlas/res.atlas', Handler.create(this, onLoaded)) })() function onLoaded() { var cMa...
来源: Laya_社区 发布时间: 20180810
...Laya.View.regComponent("ScaleButton", ScaleButton); Laya.loader.load("res/atlas/com/loading.atlas", Laya.Handler.create(this, this.loadGame)); } private loadGame(): void { var resArray = [ { url: "res/atlas/lobby/cre...
来源: Laya_社区 发布时间: 20181213
...Laya.Stage.ALIGN_CENTER; Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE; Laya.loader.load("res/img/m1.jpg",Laya.Handler.create(this,load)); function load(){ let ctn2=new Laya.Sprite(); Laya.stage.addChild(ctn2); var gq=new Laya.Sprite(); gq.loadImage("res/img/m1.jpg",100,100,100,100); ctn2.addChild(...
来源: Laya_社区 发布时间: 20180806
...此方法只执行一次 */ onAwake(): void { //小游戏加载分包 Laya.loader.loadPackage("sub1", this.printProgress).then(() => { Laya.loader.load("sub1/Cube.lh").then((res: Laya.PrefabImpl) => { let sp3: Laya.Sprite3D = res.create() as Laya.Sprite3D; this.scene3d.addChild(sp3); }); }) La...
来源: Laya3.0_文档 发布时间: 20251010
...Laya.View.regComponent("ScaleButton", ScaleButton); Laya.loader.load("res/atlas/com/loading.atlas", Laya.Handler.create(this, this.loadGame)); } private loadGame(): void { var resArray = [ { url: "res/atlas/lobby/cre...
来源: Laya_社区 发布时间: 20181202