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

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

61. 循环添加一组按钮事件无法正常使用 [ 82%]

...gHole"+[eggLoc[i][0]+eggLoc[i][1]);                 b.graphics.drawTexture(Laya.loader.getRes(Res),tx-45,ty-45);                 b.size(92,96);                 b.name = "egg"+i;                 Laya.stage.addChild(b);                 b.on(E...

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

62. 动态创建img 或 sprite [ 82%]

...r引擎 动态创建img 或 sprite let dd = new Laya.Sprite(); dd.graphics.drawTexture(this.img.texture, 0, 0, 750, 1334); dd.x = 50; dd.y = 50; this.addChild(dd);   this.img 绝对不为空,我想用一个sprite来画它,请问什么画(不是拷贝)?   2018-01-24 添加评论 免费帖...

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

63. getimagedata直接调用无法获取有效像素问题 [ 82%]

...Browser.canvas.size(width,height); Browser.canvas.clear(); Browser.context.drawTexture(this,-x,-y,this.width,this.height,0,0); var info=Browser.context.getImageData(0,0,width,height); } return info.data; }上面是 getpixels 的实现, 问题1: 为什么直接调用 Browser.context.getImageData ...

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

64. graphics使用matrix的异常情况 [ 81%]

...getRes("../../res/apes/monkey2.png"); var ape = new Sprite(); ape.graphics.drawTexture(t, 0, 0); ape.graphics.scale(1.01, 1) Laya.stage.addChild(ape); ape.pos(200, 0); })); 上面这段代码并没有得到图片缩放的效果,看到的现象是图片一直在往左移动 2017-06-09 添加评论 ...

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

65. 为什么移动的时候,有时候会有一条的透明图片在闪屏 [ 80%]

...点不流畅(及时绘制),这个我也上传了 2:不能同时用drawTexture   附件 : --> myLaya4.rar myLaya5.rar 2017-12-15 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Laya_XS 赞同来自: 下载...

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

66. 关于大量绘制 draw的性能优化问题 [ 80%]

...发者自行取舍 建议:你可以将graphics.drawCircle使用graphics.drawTexture的方式实现,避免矢量绘制 2016-07-25 0 0 分享 微博 QZONE 微信 lu632375951 赞同来自: graphics.drawTexture可以绘制圆形的纹理区域吗 2016-07-28 0 1 分享 微博 QZONE 微信 为什么...

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

67. 代码创建精灵监听不到事件? [ 79%]

... new Laya.Sprite(); var texture = Laya.loader.getRes(boxstr); box.graphics.drawTexture(texture); var arr = {data: StorageRoom.map_storageData[0][0],tag:0}; box.on(Laya.Event.MOUSE_UP,this,this.onclick,[arr]);   var _proto = StorageUILayer.prototype;   _proto.onclick = function(params){ console.log...

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

68. 在父sprite中添加子sprite ,移动父Sprite 子sprite为什么不动? [ 79%]

...l].y, data.angel[angelLel].w , data.angel[angelLel].h); this.ball.graphics.drawTexture(tBall, 0,0,548,305); this.tower.graphics.drawTexture(tTower, 0, 0, data.tower[towerLel].w , data.tower[towerLel].h); this.aeroboat.graphics.drawTexture(tAeroboat,0,0, data.aeroboat.w, data.aeroboat.h); this.mounta...

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

69. 分享:改变图片皮肤,保持图片原样宽高显示 [ 79%]

...nction onClick():void { image.skin="bg.jpg"; } } }方法2:使用graphics.drawTexture的方式】 package { import laya.display.Sprite; import laya.events.Event; import laya.net.Loader; import laya.resource.Texture; import laya.utils.Handler; public class LayaAirDemo { private var sp:Sprite; public...

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

70. laya.ani.GraphicsAni_API3.0 [ 78%]

...rawEllipse drawImage drawLine drawLines drawPath drawPie drawPoly drawRect drawTexture drawTextures drawTriangles fillBorderText fillText fillTexture getBounds loadImage removeCmd restore rotate save scale strokeText transform translate create recycle Constructors constructor new GraphicsAni(): Grap...

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