大约有 304 项符合查询结果, 库内数据总量为 30,786 项。 (搜索耗时: 0.0033 秒)
... console.log("点击"); var htmlCanvas:Laya.HTMLCanvas = Laya.stage.drawToCanvas(1334, 750, 0, 0);//把精灵绘制到canvas上面 var sp:Laya.Sprite = new Laya.Sprite();//创建精灵 sp.g...
来源: Laya_社区 发布时间: 20190816
...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
...片数据,分享到网上,从而实现截图效果,示例: * * var htmlCanvas:HTMLCanvas = sprite.drawToCanvas(100, 100, 0, 0);//把精灵绘制到canvas上面 * var canvas:* = htmlCanvas.getCanvas();//获取原生的canvas对象 * trace(canvas.toDataURL("image/png"));//打印图片base64信...
来源: Laya_社区 发布时间: 20170510
....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
...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
...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
drawToCanvas在百度小游戏无法获得图像 * var htmlCanvas:HTMLCanvas = sprite.drawToCanvas(100, 100, 0, 0);//把精灵绘制到canvas上面 * var sp:Sprite = new Sprite();//创建精灵 * sp.graphics.drawTexture(htmlCanvas.getTexture());//把截图绘制到精灵上 * Laya.stage.addChild(sp...
来源: Laya_社区 发布时间: 20190527
...!)2.0引擎的修改也没给开发者一个友好的提示啊~~~ var htmlCanvas:HTMLCanvas = p6_work.drawToCanvas(575, 1023, 0, 0); htmlCanvas.toBase64("image/png", 0.9, function(base64){ //trace(base64); if (!testTf){ __JS__('setWork(base64)'); } }); 2018-10-29 0 0 分享 微博 QZONE 微信 ...
来源: Laya_社区 发布时间: 20181011
2.0里Texture方法有改变吗? var htmlCanvas:HTMLCanvas = play_panel.drawToCanvas(575, 1500, 0, 0); var _texture:Texture = new Texture(htmlCanvas); txt_ct.graphics.drawTexture(_texture, -2, -2, 575, 1500); p6_work.addChild(txt_ct);为什么1.0这样写没问题,2.0就会报错?RenderTextur...
来源: Laya_社区 发布时间: 20181029
...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