大约有 207 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0043 秒)
...ar material: Laya.BaseMaterial = new WaterMaterial(); Laya.Texture2D.load("res/water1.png", Laya.Handler.create(null, function(tex:Laya.Texture2D) { // material.albedoTexture = tex; material.mainTexture = tex; })); Laya.Texture2D.load("res/FoamTexture.jpg", Laya.Handler.create(null, ...
来源: Laya_社区 发布时间: 20181030
...hicsImg() { //临时sprite var img = new Laya.Sprite(); //img.graphics.drawTexture(Laya.loader.getRes(("../src/img/testImg.png"),0,0)); //获取图片资源 var tex = Laya.loader.getRes("../src/img/testImg.png"); //获取临时sprite的htmlCanvas var htmlCanvas = img.drawToCanvas(tex.width,tex.heigh...
来源: Laya_社区 发布时间: 20180413
LayaNative2.0 beta3 单像素图片平铺绘制失败 var tex:Texture = Laya.loader.getRes("res/repeattest.png");// 此图宽度只有1像素,横着平铺绘制无法显示 p.graphics.fillTexture(tex, 0, 0, 100, tex.height);// 无法显示 p.graphics.drawTexture(tex, 0, 0, 100, tex.height);// 正...
来源: Laya_社区 发布时间: 20181025
在安卓手机上drawToTexture不能正确返回纹理对象,是HTMLCanvas 浏览器上 是能返回正确值,在layaNative模式出包。手机上调用此方法返回的对象类型不对 private _agentTexture: any; private _agent:Laya.Sprite; public startDrag(dragCom: Laya.Sprite,...
来源: Laya_社区 发布时间: 20210911
帮忙看看Texture类getPixels内存泄漏的问题。 请帮忙看看这个demo,Texture类方法getPixels导致内存泄漏。 用的引擎版本是1.7.16beta。package { import laya.display.Sprite; import laya.events.Event; import laya.maths.Point; import laya.resource.HTMLCanvas; import laya....
来源: Laya_社区 发布时间: 20180302
...是,导入Layaair之后就遇到没有透明度的问题。 float4 _Main_Tex_var = tex2D(_Main_Tex,TRANSFORM_TEX(i.uv0, _Main_Tex)); float4 node_6615 = _Time + _TimeEditor; float3 emissive = (_Main_Tex_var.rgb * _Color.rgb * ((sin((node_6615.g * _Flicker_Speed)) + 2.0) * 0.5 * _Intensity)); float3...
来源: Laya_社区 发布时间: 20171211
...法释放内存 Laya.stage.frameLoop(1, this, ZX);function ZX():void{ var tex:Texture=new Texture(sp.drawToCanvas(sp.width,sp.height,0,0)) sp.graphics.clear() sp.graphics.destroy() tex.destroy() tex.disp...
来源: Laya_社区 发布时间: 20190120
微信头像显示错误 Uncaught TypeError: tex.once is not a function at Graphics.__proto.drawTexture (GameStart.max.js:9996) at Image.__proto.rebuild (GameStart.max.js:36588) at TimerHandler.__proto.run (GameStart.max.js:18041) at Timer.__proto._update (GameStart.max.js:17798) at Stage.__proto.r...
来源: Laya_社区 发布时间: 20180114
... if(success) { let tex:any = Laya.Loader.getRes("res/FGUIMain/Common_atlas0.png"); let x = tex.bitmap.getPixels(); console.log("------------------------",x); ...
来源: Laya_社区 发布时间: 20210618
使用fairygui加载网络图片资源时,laya.core.js中的drawTexture会报错 异常栈如上图,因为fairygui依赖laya.core.js,所以最后会调用到laya.core.js中, if (!tex.loaded){ tex.once(/*laya.events.Event.LOADED*/"loaded",this,this._textureLoaded,[tex,args]); }执行到这段...
来源: Laya_社区 发布时间: 20180724