大约有 580 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0051 秒)
Laya_社区(372) Laya2.0_文档(74) Laya_示例(51) Laya2.0_示例(39) Laya3.0_文档(34) Laya3.0_api(8) Laya2.0_api(2)
...调。这个是异步获取,如果你要单个获取的话 window.Laya.loader.load(value.url, ls.Handler.create(this, function () { _this.graphics.clear() var texture = window.Laya.loader.getRes(value.url) _this.graphics.drawTexture(texture) _this.scaleX = _this.set_width / texture.sourceWidth _th...
来源: Laya_社区 发布时间: 20180530
...ite; import laya.display.Stage; import laya.utils.Handler; import laya.net.Loader; import laya.events.Event; public class LayaUISample { protected var text:Text; protected var aaa:AAA; public function LayaUISample() { Laya.init(1540, 990); Laya.Stat.show(); Laya.loader.load("res/atlas/war.json", Lay...
来源: Laya_社区 发布时间: 20161026
...{ url: Laya.ResourceVersion.manifest["res/atlas/loading.json"], type: Laya.Loader.ATLAS }, { url: Laya.ResourceVersion.manifest[utils.resourcesCenter.ResourcesPathStr.PROTO_FILE_PATH], type: Laya.Loader.TEXT }, ]; 手动修改了JS代码!! 可以成功...
来源: Laya_社区 发布时间: 20180421
...后缀格式造成的,而默认例子里面加载的是json格式的: Laya.loader.load("res/atlas/comp.json", Handler.create(this, onAssetLoaded), null, Loader.ATLAS); 所有导致了图集位置错乱,麻烦技术修下这个bug. 建议ui编辑器默认就导出成json格式大图~~ 2017-11-1...
来源: Laya_社区 发布时间: 20171110
...tage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(compassImgPath, Handler.create(this, this.init)); } init() { const Gyroscope = Laya.Gyroscope, Event = Laya.Event; // 创建罗盘 this.createCompass(); // 创建方位指示器 this.createDirectionIndicator(); //...
来源: Laya2.0_示例 发布时间: 20251130
...tance = this; } onTxtLoad(aText){ console.info("dfasd"); } initTxt(){ Laya.loader.load("res/localtxt.txt",Laya.Handler.create(this, onTxtLoad),null,Loader.TEXT); } } 2019-01-30 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1...
来源: Laya_社区 发布时间: 20190130
...源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(this.monkey2,Laya.Handler.create(this,graphicsImg)); function graphicsImg(){ var img = new Laya.Sprite(); //获取图片资源,绘制到画布 img.graphics.drawTexture(Laya.loader.getRes(this.monkey2),100,50); /...
来源: Laya_社区 发布时间: 20170825
...scaleMode = Laya.Stage.SCALE_NOSCALE; // Laya.stage.size(6000, 6000); Laya.loader.load([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Laya.Handler.create(this, this.onLoaded)); function onLoaded(): void { var sprite = new Laya.Sprite(); sprite.loadImage('comp/bg.png'); Laya.stage.addChild(spr...
来源: Laya_社区 发布时间: 20170803
...; } private function beginLoad():void { //加载引擎需要的资源 Laya.loader.load("res/atlas/comp.atlas", Handler.create(this, onLoaded)); } private function onLoad2():void { Laya.timer.once(2000, this, onLoaded); } private function onLoaded():void { //实例UI界面 //var testView:TestView = n...
来源: Laya_社区 发布时间: 20180525
...bgColor = "#ff0000"; Laya.stage.scaleMode = "fixedwidth"; Laya.loader.load("http://localhost/layabox/layabox/layabox/res/bg.png'", Handler.create(this, function () { var t = Laya.loader.getRes(skin); var _sprite = new Sprite(); _sprite.graphics.drawTex...
来源: Laya_社区 发布时间: 20170222