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

大约有 107 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0030 秒)

51. 关于webGL下遮罩效率问题 [ 64%]

...面的例子 代码如下: var spr:Sprite = new Sprite(); spr.graphics.drawCircle(0,0,100,"#ff0000"); spr.mask = new Sprite(); Laya.stage.frameLoop(1, null, drawMask); var index:int = 0; function drawMask():void { index++; if(index > 72) index = index-72; var angle:int = index*5; spr.mask.graph...

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

52. 圆不跟谁 sprite 一起缩放? [ 63%]

...tSp.graphics.drawLine(0, 0, 100, 100, "#ffffff", 5); this.firstSp.graphics.drawCircle(100, 100, 20, null, "ffffff"); Laya.stage.on(Laya.Event.MOUSE_WHEEL, this, this.MouseWheel);  this._rootSp.hitArea = new Laya.Rectangle(0, 0, 10000, 10000) this._rootSp.addChild(this.firstSp); Laya.stage.addChild(...

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

53. 关于removeChildren、 destroy和destroyChildren的疑惑 [ 63%]

...adSprite() { SightBead.super(this); this.name = 'sightBead'; this.graphics.drawCircle(0,0,40,null,'#ff0000',1); this.graphics.drawLine(-45,0,45,0,'#ff0000',1); this.graphics.drawLine(0,45,0,-45,'#ff0000',1); this.alpha = 0; Laya.stage.addChild(this); // this.pos(440,640); } Laya.class(sightBeadSprit...

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

54. 设置pivot后,精灵位置显示位置不正确 [ 62%]

...s.sp.pivot(Math.round(width / 2), Math.round(height / 2)) this.sp.graphics.drawCircle(0, 0, 5, "#000000") this.sp.graphics.drawRect(-this.sp.pivotX, -this.sp.pivotY, width, height, undefined, "#00ff00", 1) this.sp.pos(500, 500) Laya.stage.addChild(this.sp); } } new GameMain();这是运行截图,...

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

55. 关于graphics.drawPath手机端和PC端不一致的问题 [ 62%]

...了,我改一下 189*****192 • 2017-04-25 11:45 @cyqcyqcyq: 圆建议 drawCircle 我用你的代码 在ios手机上绘制 也是圆的.你的版本是多少? cyqcyqcyq • 2017-04-25 11:50 1.7.2.因为我并不是要画整个圆,而是想画出问题中的第一张图的效果,所以既需...

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

56. pos会影响精灵缩放效果的问题 [ 62%]

...prite(); img2.graphics.drawTexture(texture, 0, 0, 200, 200); img2.graphics.drawCircle(100, 100, 20, "#ffff00"); img2.scale(2, 2); img2.pos(0, 0); img2.pivot(0, 0);效果如图所示,正常,圆圈在螃蟹的中间。   但是,当我改变了img2的位置,即把 img2.pos(0, 0);改成 img2.po...

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

57. matterjs渲染laya的ui [ 62%]

...Sprite.anchorX = layaSprite.anchorY = 0.5; //背景色 layaSprite.graphics.drawCircle(120, 120, 120, '#ffffff'); ball.layaSprite = layaSprite; 2018-04-23 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 4 个回复 Laya_XS 赞...

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

58. 这个圆形遮罩问题怎么解决 [ 61%]

...); this.addChild(sp);         this.img = new Sprite(); sp.graphics.drawCircle(0,0,50,"transparent");         this.addChild(this.img); this.img.mark = sp;   我看被人也都是这样写的不知道为什么我的达不到效果 2018-03-15 添加评论 免费帖 --> 分享 微博 QZ...

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

59. 怎么对graphics画出来的图片进行鼠标点击拖动??? [ 61%]

...pe.y = Laya.stage.height / 2; //这里是我加的代码 this.ape.graphics.drawCircle(50, 50, 30, "#ff0000"); this.ape.on(Event.MOUSE_DOWN, this, this.onStartDrag); } private showDragRegion(): void { //拖动限制区域 var dragWidthLimit: number = 350; var dragHeightLimit: number = 200; this.dragR...

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

60. laya中怎么实现拓印 [ 61%]

laya中怎么实现拓印 画笔可以添加纹理吗?用 graphics.drawCircle(this.zz.mouseX,this.zz.mouseY, this.radius, "#00ffff");这种方法,画出来的只能是纯色或者渐变色,怎么设置纹理或者透明度? 附件 : --> 2020-02-14 添加评论 已悬赏50元 --> 分享 微...

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