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

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

11. 帮忙看看Texture类getPixels内存泄漏的问题。 [ 91%]

...e; import laya.events.Event; import laya.maths.Point; import laya.resource.HTMLCanvas; import laya.resource.Texture; import laya.utils.Handler; import laya.utils.Stat; import laya.webgl.WebGL; public class Main { private var _tex:Texture; private var _htmlCanvas:HTMLCanvas; private var _colorSpr:Spr...

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

12. drawToCanvas无法截取到有子元素。 [ 90%]

...adImage('bet/cheer_1_4.png'); sp1.addChild(sp2); this.addChild(sp1); const htmlCanvas = sp1.drawToCanvas(640, 200, 0, 0); const canvas = htmlCanvas.getCanvas(); trace(canvas.toDataURL('image/png')); const texture = new Laya.Texture(htmlCanvas); const sp = new Sprite(); sp.graphics.drawTexture(textur...

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

13. drawTexture 画出来的数据会有以前的数据 [ 90%]

...来的数据会有以前的数据 private var iconSpr:Sprite; private var htmlCanvas:HTMLCanvas; private var texture:Texture; private var xNum:int = 0; private var yNum:int = 0; private var img:Image; public function TestView() { img = new Image("comp/lhjicon_5.png"); img.x = 640; img.y = 320; iconS...

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

14. 为什么显示不了 [ 89%]

....drawRect(this.mouse_x, this.mouse_y, 10, 10, "#ff0000"); //var htmlC:Laya.HTMLCanvas = sp.drawToCanvas(375,440,0,0).getCanvas().toDataURL(); var htmlCanvas:Laya.HTMLCanvas = sp.drawToCanvas(375,440,0,0); var texture:Laya.Texture = new Laya.Texture(htmlCanvas); var sps:Laya.Sprite = new Laya.Sprite(...

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

15. image.drawToCanvas方法获取的一直是空的png [ 89%]

...mport laya.display.Sprite; import laya.display.Stage; import laya.resource.HTMLCanvas; import laya.resource.Texture; import laya.ui.Image; import laya.utils.Handler; import laya.webgl.WebGL; public class LayaAirDemo { private var img:Image; public function LayaAirDemo() { Laya.init(800, 600, WebGL);...

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

16. 分享:截屏! [ 88%]

...splay.Sprite;     import laya.events.Event;     import laya.resource.HTMLCanvas;     import laya.resource.Texture;     import laya.utils.Browser;     import laya.webgl.WebGL;          public class LayaAirDemo {         private var sp:Sprite ;         public function ...

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

17. app 截屏分享功能问题 [ 87%]

...发送数据到微信 api.sendReq(req) ; } 传过去的是bitmap: var htmlCanvas:HTMLCanvas; var texture:Texture; htmlCanvas = Laya.stage.drawToCanvas(Laya.stage.width,Laya.stage.height,0,0); texture = new Texture(htmlCanvas); texture.bitmap; 2018-03-29 添加评论 免费帖 --> 分享 微博 Q...

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

18. 关于内存释放问题 [ 84%]

关于内存释放问题 var htmlCanvas: Laya.HTMLCanvas = sp.drawToCanvas(x,x, 0, 0);(sp是drawRect出来的精灵) var texture: Laya.Texture = new Laya.Texture(htmlCanvas); 使用这个函数,drawToCanvas越多占用的内存越多,用了clear 和clearRes和destroy都没有减少。有什...

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

19. laya.resource.HTMLCanvas_API3.0 [ 84%]

...rotected All Inherited Externals Only exported Menu Globals "laya/resource/HTMLCanvas" HTMLCanvas Class HTMLCanvas HTMLCanvas 是 Html Canvas 的代理类,封装了 Canvas 的属性和方法。 Hierarchy Resource HTMLCanvas Index Constructors constructor Properties _id destroyedImmediately lock na...

来源: Laya3.0_api 发布时间: 20231115

20. 安卓机截图变成黑块,ios和pc没问题 [ 83%]

...1:Sprite = new Sprite(); sp1.graphics.drawRect(0,0,300,200,"#ff0000"); var htmlCanvas:HTMLCanvas = sp1.drawToCanvas(300,200,0,0); Laya.timer.once(1000,this,function():void{ var texture:Texture = new Texture(htmlCanvas); var sp2:Sprite = new Sprite(); sp2.graphics.drawTexture(texture); Laya.stage.add...

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