大约有 277 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0036 秒)
Laya_社区(175) Laya2.0_api(58) Laya3.0_文档(21) Laya2.0_文档(16) laya_api(3) Laya3.0_api(2) Laya2.0_示例(1) Laya_示例(1)
...示例中是将Image作为纹理赋值了,在发布后,Image在图集comp.png中,引用的内部资源也打包了的,在internal目录下的comp.png图片与图集配置文件;您可以复制一份Image图片到assets下使用,预览与发布都是好的。 2025-09-04 0 1 分享 微博 ...
来源: Laya_社区 发布时间: 20250829
...代码如下: var sprite = new laya.display.Sprite(); sprite.loadImage("comp/bg.png",0,0,0,0,Handler.create(this,function(texture:laya.resource.Texture){ sprite.graphics.clear(); sprite.graphics.drawTexture(texture,0,0,50,50); sprite.autoSize = true; })); ...
来源: Laya_社区 发布时间: 20160711
...itionImg() { this.flag = false; //判断条件 this.img1 = "../laya/assets/comp/haoyoubang-liang.png"; //地址 this.img2 = "../laya/assets/comp/haoyuobang-hui.png"; var img = new Laya.Sprite(); //实例 img.width = 300; //宽高 img.height = 200; switchImg(); img.on(Laya.Event.CLICK, this, switchIm...
来源: Laya_社区 发布时间: 20180502
...n onLoaded() { var res_array = [ {url : "res/atlas/comp.atlas", type : Laya.Loader.ATLAS}, ] Laya.loader.load(res_array, Handler.create(null, onLoaded2)); } function onLoaded2() { Laya.stage.addChild(new TestUI()); }当用这种方式分步加载资...
来源: Laya_社区 发布时间: 20180730
...Browser.height); Laya.stage.bgColor="#EEFFCC"; Laya.loader.load("res/atlas/comp.json",Handler.create(this,onLoaded),null,Loader.ATLAS); } private function onLoaded():void { list=new List(); Laya.stage.addChild(list); list.itemRender=Item; list.repeatX=1; list.repeatY=6; list.x=((Laya.stage.width-Ite...
来源: Laya_社区 发布时间: 20170626
...ic static uiView:any ={"type":"Scene","props":{"width":640,"height":1136},"compId":2,"child":[{"type":"Label","props":{"y":64,"x":214.5,"width":211,"text":"label","styleSkin":"comp/label.png","height":67},"compId":3}],"loadList":["comp/label.png"],"loadList3D":[]}; constructor(){ super()} createChil...
来源: Laya_社区 发布时间: 20190625
...Y失效 onClick(event: Laya.Event) { let sp = new Laya.Image(); sp.skin = "comp/tab.png" let body = new Laya.RigidBody(); body.gravityScale = 0; sp.addComponentIntance(body); sp.anchorX = sp.anchorY = 0.5; sp.pos(event.stageX, event.stageY); this.owner.parent.addChild(sp); }p.p1 {margin: 0.0px 0.0px...
来源: Laya_社区 发布时间: 20200216
...8-01-03 10:19 @helloworldlv:粒子中用到的texturename是不是的放在comp同级目录中, 1.如果放在comp子目录的一个文件夹中,导出是png和json,播放的粒子图片是错的(感觉像是裁剪错误); 2.如果放在comp同级目录中是没有问题的 Laya_Aaron ...
来源: Laya_社区 发布时间: 20171229
...致内存过高 let resArray: Array<any> = [ { url: hyip+"res/atlas/comp/01_shouye.json", type: Loader.ATLAS }, { url: hyip+"res/atlas/comp/02_zhujiemian.json", type: Loader.ATLAS }, { url: hyip+"res/atlas/comp/30_loading.json", type: Loader.ATLAS }, ]; Laya.loader.load(resArray, Laya.Handler....
来源: Laya_社区 发布时间: 20180122
...; body.appendChild(input); Laya.loader.load("comp/button.png"); let button = new UIButton("comp/button.png","点我"); button.labelSize = 30; button.size(300,100); button.centerX = 0; button.cent...
来源: Laya_社区 发布时间: 20161114