大约有 368 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0041 秒)
Laya_社区(167) Laya3.0_api(64) Laya2.0_api(59) laya_api(55) Laya2.0_文档(12) Laya2.0_示例(6) Laya3.0_文档(3) Laya_示例(2)
...ture(sharedCanvas); var sp2 = new Laya.Sprite(); sp2.x = 300; sp2.graphics.drawTexture(_texture,0,0,100,100); Laya.stage.addChild(sp2); 文档说好像可以 报错了。 this.bitmap.activeResource is not a function 有其他的方法将一个canvas的内容绘制到另外一个canvas吗 附件 :...
来源: Laya_社区 发布时间: 20171113
..."comp/image.png"); var ape1 = new Laya.Sprite(); ape1.graphics.drawTexture(t, 0, 0); Laya.stage.addChild(ape1); //面板 var panel = new laya.ui.Panel(); panel.width = 500; panel.height = 500; panel.x = 200; var label = new laya.ui.Label(); ...
来源: Laya_社区 发布时间: 20170401
...his, onLoadCom)); 加载成功一个纹理后,用一个Sprite graphics.drawTexture(e); 在加载成功方法里面写Loader.clearRes(mapBit, true); 会立刻清掉了纹理,Sprite上面也没有了。 如果在加载成功后加一个延时1秒,调用Loader.clearRes就清理不掉了? 2016...
来源: Laya_社区 发布时间: 20161230
...; var texture:Laya.Texture = new Laya.Texture(sharedCanvas); this.graphics.drawTexture(texture, 0, 0, sharedCanvas.width, sharedCanvas.height) 目前性能很差,所以我想请教一下,有没有更优秀的方案? 2018-04-16 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到...
来源: Laya_社区 发布时间: 20180416
...,除了绘制矩形区域还可以绘制一个图片当做背景,调用drawtexture。 2017-12-20 0 3 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 woody1720596907 相关问题 看了其他引擎才发现 LAYA 真的太太太太好用了...
来源: Laya_社区 发布时间: 20171220
... { img = new Sprite(); //获取图片资源,绘制到画布 img.graphics.drawTexture(Laya.loader.getRes(Res),150,50); //添加到舞台 Laya.stage.addChild(img); } } } ``` 编译运行效果如图2所示: (图2) ### 2.2 创建一个圆形的遮罩区域 用代码创建一...
来源: Laya2.0_文档 发布时间: 20210714
... Texture.createFromTexture(tex, posObj.x, posObj.y, posObj.w, posObj.h); g.drawTexture(t, 0, 0); oriDBArr[i] = g; } private function onClear():void { console.log(Laya.loader.getRes(_url)); Loader.clearRes(_url,true); console.log(Laya.loader.getRes(_url)); } 将一个大图截成多个小图纹...
来源: Laya_社区 发布时间: 20170224
...graphicsImg() { //临时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.h...
来源: Laya_社区 发布时间: 20180413
...ite添加texture后,sprite无法触发点击事件? this.item.graphics.drawTexture(Laya.loader.getRes(IMG_RES[this.name])); Laya.stage.addChild(this.item); this.item.on(Laya.Event.CLICK, this, () => { this.item.destroy(); }); 2017-08-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 ...
来源: Laya_社区 发布时间: 20170826
...200);//创建精灵并把它放倒200位置 * sp.graphics.drawTexture(texture);//把截图绘制到精灵上 * Laya.stage.addChild(sp);//把精灵显示到舞台 * * <p>也可以获取原始图片数据,分享到网上,从...
来源: Laya_社区 发布时间: 20180626