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

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

151. 请问如何释放atlas和他的png资源 [ 70%]

...ction clickFun():void { url = "res/CH/atlas/MORNUI_Z_Gongneng.atlas"; Laya.loader.load(url,new Handler(this,hh)); //trace( Laya.loader.getRes(url) ); } private function hh():void { Laya.stage.addChild(new Image("MORNUI_Z_Gongneng/clip_xue_quan.png")); Laya.timer.once(1000,1,ddd); } private function ...

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

152. drawcall优化问题 [ 70%]

...-22 17:58 浏览: 1094 关注: 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...

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

153. F5, 运行后提示找不到 Laya[ 70%]

... SKEvent = Laya.Event; var Socket = Laya.Socket; var Byte = Laya.Byte; var Loader = Laya.Loader; var dcodeIO = Browser.window.dcodeIO; var ProtoBuf = dcodeIO.ProtoBuf; var ef_protocol = new EF_DataProtocol(); (function() { (function() { Laya.init(1334, 750, WebGL); Laya.stage.scaleMode = Stage.SCALE...

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

154. 微信小游戏加载ProtoBuf文件和图片加载问题 [ 70%]

...oadArr:Array = new Array; loadArr= [{url: "res/atlas/hall_new.json", type: Loader.ATLAS}, // {url: "res/atlas/help.json", type: Loader.ATLAS},  // {url: "res/atlas/shop.json", type: Loader.ATLAS}, // {url: "shmjAssets/扣牌文字背景.png", type: Loader.IMAGE}, //这张图有问题。 ]; Laya.loa...

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

155. 关于Panel的双指响应问题 [ 70%]

...ge.bgColor = "#232628"; setup(); })(); function setup() {         Laya.loader.load("../../res/ui/dialog (3).png", Laya.Handler.create(this, function(){     var dialog = new Image("../../res/ui/dialog (3).png");     dialog.scaleX = 2;     dialog.scaleY = 2;     var panel = new Panel();  ...

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

156. Panel使用文档(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 69%]

...script //初始化引擎 Laya.init(800, 600); //预加载所需资源 Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, onLoaded)); function onLoaded() { //实例化Panel组件 var panel = new Laya.Panel(); //给panel添加背景色 panel.graphics.drawRect(0, 0, 100, 100, "#ffcccc")...

来源: Laya2.0_文档 发布时间: 20210715

157. 3D支持图集吗? [ 69%]

...的一个图片吗?  //2D加载图集 var texture: Laya.Texture = Laya.loader.getRes("magic/sg.png"); var sp = new Laya.Sprite(); sp.graphics.drawTexture(texture, 0, 0); Laya.stage.addChild(sp);   //3D加载图集 var box: Laya.MeshSprite3D = scene.addChild(new Laya.MeshSprite3D(new Laya.PlaneMe...

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

158. LayaAir2.0(LayaBox)之小游戏开放域开发 [ 69%]

...JSON.stringify(data.url)); if(mark == 4)//确认数据全部接收后 Laya.loader.load(["res/atlas/test.atlas", "test/1.png", "test/2.png", "test/3.png"],Laya.Handler.create(this,this.onComplete)); } }.bind(this)); }else { Laya.loader.load("res/atlas/test.atlas",Laya.Handler.create(this,this.onCompl...

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

159. 图片切换后显示两个状态 [ 69%]

... loadImage() 的 complete 对应函数中加了一句 myImg.source = Laya.loader.getRes("2.png"); 手动赋值 texture 就可以了。 Monica • 2017-06-18 11:21 @Loongman:给Image设置皮肤的话直接用skin即可,之后切换皮肤也只需要切换skin

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

160. 请问如何加载base64的图片 [ 69%]

...2-12 0 0 分享 微博 QZONE 微信 linxu345050878 赞同来自: __proto.uploaderHandler=function (files) { var self=this; var file=files[0]; var reader=new FileReader(); reader.onload=function () { this.headIcon.loadImage(this.result); } reader.readAsDataURL(file); } 是这样显示的吗?我的...

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