• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 276 项符合查询结果, 库内数据总量为 30,723 项。 (搜索耗时: 0.0038 秒)

41. [LayaAir3]资源未清理干净 [ 78%]

..._bg.png (4) [6, Texture, 7, Texture2D] loader http://localhost:18090/atlas/comp/img_bg.png (4) [6, Texture, 7, Texture2D] close --------------------------------gc 6000----------------------------------- loader http://localhost:18090/resources/chest_bg.png (2) [6, Texture] loader http://localhost:180...

来源: Laya_社区 发布时间: 20240109

42. 发现惊天大bug给官方报备一下 [ 78%]

...shiyang • 2021-09-09 20:33 给你举个例子,比如我图片路径为 comp/btn.png,设置Laya.URL.basePath = "xxx",第一张图里面,传入的url是comp/btn.png,format以后就是xxx/comp/btn.png,然后else里面有format以后就是“xxx/xxx/comp/btn.png” layabox • 2021-09-22...

来源: Laya_社区 发布时间: 20210909

43. 请问怎么制作一个layabox js版本的加载效果 [ 77%]

... Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(["./comp/progress.png", "./comp/progress$bar.png"], Handler.create(this, onLoadComplete)); } console.log(1); Laya.class(Loadings,"Loadings",_super); function onLoadComplete() { progressBar = new ProgressBar("./comp/progress.png")...

来源: Laya_社区 发布时间: 20171230

44. LayaRender渲染含有多个part的Body存在Bug [ 77%]

...  例如:如下代码,创建两个body:partA和partB,然后创建comp,将这两个body组合起来。测试代码如下: function createBody() { var size = 200, x = 200, y = 200; var sp = new Laya.Sprite(); var text = Laya.loader.getRes("res/bar.png"); var w = size, h = size/5; sp.pivot...

来源: Laya_社区 发布时间: 20180625

45. drawcall优化问题 [ 77%]

...注: 5 人 jacksing888 • 2018-01-22 23:37 Laya.loader.load( 'res/atlas/comp.json', Handler.create(this, function(){ container = new Laya.Sprite(); var x = 0,y =80; Laya.stage.addChild(container); for(var i=0;i<1200;i++){ var role = new Laya.Sprite(); x = x+0.1; y = y+0.1 role.x = x; role.y = y;...

来源: Laya_社区 发布时间: 20180122

46. 如何用代码控制panel的vscroll滚动幅度 [ 76%]

...a.init(600,600); Laya.stage.bgColor='#EEFFCC'; Laya.loader.load("res/atlas/comp.json",Handler.create(this,onLoaded),null,Loader.ATLAS); } private function onLoaded():void { //panel 切记设置宽高,否则panel不显示 var panel:Panel=new Panel(); panel.size(300,300); panel.pos(100,100); panel.v...

来源: Laya_社区 发布时间: 20170719

47. Panel滚动条滑块位于最下方 [ 75%]

...00,WebGL); Laya.stage.bgColor="#EEFFCC"; Laya.loader.load([{url:"res/atlas/comp.json",type:Loader.ATLAS},{url:"bg2.png"}],Handler.create(this,onCom)); } private function onCom():void { var img:Image=new Image(); img.skin="bg2.png"; panel=new Panel(); panel.vScrollBarSkin="comp/vscroll.png"; panel.wi...

来源: Laya_社区 发布时间: 20161103

48. 使用以下代码打开超大分辨率图片 WebGL 模式无法正常显示 [ 74%]

...Laya.Stat.show(0,0); let sp:Laya.Sprite = new Laya.Sprite; //sp.loadImage("comp/big.png"); //读取分辨率小的图片 正常 sp.loadImage("comp/hug.png"); //读取大分辨率图片 无法显示 Laya.stage.addChild(sp); } } new GameMain();//问题描述 客户要求使用LAYA引擎打开一张图...

来源: Laya_社区 发布时间: 20180314

49. 没有预加载的图片怎么获取width和height ? [ 74%]

...() {      Laya.init(600,400);     Laya.loader.load(["../laya/assets/comp/image.png","../laya/assets/comp/vscroll.png"],Laya.Handler.create(this,onAssetLoad));      } function onAssetLoad() {      older = new Laya.Sprite();      older.loadImage("../laya/assets/comp/image.png");   ...

来源: Laya_社区 发布时间: 20170118

50. Sprite中的width,height和size(width,height)感觉没作用啊 [ 73%]

...代码如下: 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