大约有 207 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0043 秒)
...,加了日志后发现是在HTMLImageElement类中的onloaded方法里,tex是null,同时this._url也是null。 蛋疼的是这里报错后,后续的其他loader凡是图片都失败。 附件 : --> 2019-10-23 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已...
来源: Laya_社区 发布时间: 20191023
...: laya.resource.HTMLCanvas = Laya.stage.drawToCanvas(600, 1000, 0, 0); let tex: laya.resource.Texture = canvas.getTexture(); let sp: Laya.Sprite = new Laya.Sprite(); sp.texture = tex; Laya.stage.addChild(sp); 附件 : --> 2019-10-12 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到...
来源: Laya_社区 发布时间: 20191012
...graphics.clear(); sp.graphics.drawPie(128,128,128,0,angle,"0xff0000"); var tex = sp.drawToTexture(256,256,0,0); //var html:Laya.HTMLCanvas = sp.drawToCanvas(256,256,0,0); //img.loadImageSource(html.source,true); //html.clear(); //html.destroy(); mat.albedoTexture.destroy(); // 先删除旧的 mat.al...
来源: Laya_社区 发布时间: 20190520
...,大的可以,小的图集能清除掉么? private function onLoad(tex:Texture):void { var g:Graphics = new Graphics(); g.drawTexture(tex, 0, 0); _s.graphics = g; Laya.timer.once(2000, this, onClear); } private function onClear():void { _s.graphics.clear(); _s.destroy(tr...
来源: Laya_社区 发布时间: 20170222
..., 10))); //新建材质 var planeMat = new Laya.BlinnPhongMaterial(); Laya.Texture2D.load("res/threeDimen/Physics/grass.png", Laya.Handler.create(this, function(tex) { planeMat.albedoTexture = tex; })); //设置纹理平铺和偏移 planeMat.tilingOffset = new Laya.Vector4(10, 10, 0, 0); //设置材...
来源: Laya2.0_文档 发布时间: 20210714
...andler.create(this, this.createView)); 在createView回调里面调用 let tex: Texture = Laya.Loader.getRes("image/shake_01.png"); 想拿图集中的某一张图片。发现拿不到这张图片。 但是我换个默认的图集Laya.loader.load("res/atlas/comp.atlas", Handler.create(this, this.crea...
来源: Laya_社区 发布时间: 20180326
...接在unity添加相同材质显然不会出现这种情况) Laya.Texture2D.load("res/skin/2.jpg",new Laya.Handler(this,this.loadfinish));//加载贴图 loadfinish(tex){ var mat=new Laya.UnlitMaterial();//创建材质 mat.albedoTexture=tex;//给材质添加贴图 //mat.albedoColorA = 0.5; //...
来源: Laya_社区 发布时间: 20200626
...一个图片,宽度为100*100,要画1000*1000,一种方法就是drawTexture(tex,0,0,1000,1000)直接拉伸,另一种方法就是使用fillTexture(tex,0,0,1000,1000,'repeat'),两种模式drawcall不一样,后者高很多。 另外,使用fillTexture,九宫格交界处会有黑线,我...
来源: Laya_社区 发布时间: 20190108
...取后内存释放不了 private var oriDBArr:Array = null;//位图源 var tex:Texture = Laya.loader.getRes(_url); for (var i:int = 0; i < list1["oriBDPos"].length; i++ ) { var g:Graphics = new Graphics(); var t:Texture = Texture.createFromTexture(tex, posObj.x, posObj.y, posObj.w, posObj.h); g.d...
来源: Laya_社区 发布时间: 20170224
...var planeMat:Laya.BlinnPhongMaterial = new Laya.BlinnPhongMaterial(); Laya.Texture2D.load("res/threeDimen/Physics/grass.png", Laya.Handler.create(this, function(tex:Laya.Texture2D) { planeMat.albedoTexture = tex; })); //设置纹理平铺和偏移 planeMat.tilingOffset = new Laya.Vector4(10, 10, 0, ...
来源: Laya2.0_文档 发布时间: 20210715