大约有 164 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0054 秒)
...算了,偏复杂。 另一个是sprite.mouseThrough = true;加上sprite.graphics.drawRect。但是遇到个问题是sprite.graphics多了好像我的小米2s会掉帧(十几个150*100的矩形就掉到55以下)。 那么问题来了,有什么简单的确实可行的方案能让负坐标能...
来源: Laya_社区 发布时间: 20170105
... y+=this._charSize.height; this._graphics.drawLine(x,y,x+lineWidth,y,this.underlineColor || this.color,1); } y 如果 y+=this._charSize.height/2; 就是中划线 可以自己加个变量 控制 例如 linethrough 如果是 true...
来源: Laya_社区 发布时间: 20171019
...ader.getRes("res/floor.png"); this.bg = new laya.display.Sprite(); this.bg.graphics.clear(); //将当前的坐标向上移动32 方便后面处理人物的位置 this.bg.y = -32; this.addChild(this.bg); } this.bg.graphics.drawTexture(this.bgTexture, 0, 0, 960, 96); //创建一个帧循环处理函...
来源: Laya_社区 发布时间: 20160728
...博 QZONE 微信 mrchenx 赞同来自: var _parent = new Sprite(); _parent.graphics.drawRect(0, 0, 500, 500, '#ff0000'); Laya.stage.addChild(_parent); var _child = new Sprite(); _child.graphics.drawRect(0, 0, 50, 50, '#336699'); _parent.addChild(_child);就像上面那样,我需要在addChild的...
来源: Laya_社区 发布时间: 20170222
...下: Laya.init(1136, 640, WebGL ); var mask :Sprite = new Sprite(); mask.graphics.save(); mask.graphics.drawRect( 0, 0, Laya.stage.width, Laya.stage.height, 0xff0000 ); mask.graphics.restore(); mask.x = 0; mask.y = 0; Laya.stage.addChild( mask ); 麻烦看下是什么问题。 附件 : --> 2017...
来源: Laya_社区 发布时间: 20170216
...); rectangle = skeleton.getBounds(); var hitArea = new Laya.HitArea(); var graphic = new Laya.Graphics(); graphic.drawRect(-rectangle.x, -rectangle.y, rectangle.width, rectangle.height); hitArea.hit = graphic; skeleton.hitArea = hitArea; Laya.stage.graphics.drawRect(-rectangle.x, -rectangle.y, recta...
来源: Laya_社区 发布时间: 20171114
... //使用Sprite对象的绘制纹理方式 a.graphics.drawTexture(texture1, 0, 0); this.owner.addChild(a) }); Laya.loader.load("http://103.219.177.59:63344/%2 ... ot%3B, Laya.Loader.TEXTURE2D).then((texture: Laya.Texture2D) =&...
来源: Laya_社区 发布时间: 20230316
...x.toString() +".bmp"; img.graphics.clear(); var txture:Texture = Laya.loader.getRes(url); img.graphics.drawTexture(txture); img.size(txture.width,txture.height); }...
来源: Laya_社区 发布时间: 20170918
...二次贝塞尔曲线,开发者可以在API文档中搜索laya.display.Graphics类可以查看到“drawCurves();”曲线绘制方法。该方法的详细说明如下图所示:  (图8) 下面我们用LayaAir引擎绘制矢量曲线,示例代码如下: ```ty...
来源: Laya2.0_文档 发布时间: 20210715
...er.getRes("res/bar.png"); var w = size, h = size/5; sp.pivot(w/2, h/2); sp.graphics.fillTexture(text, 0, 0, w, h); partA = Matter.Bodies.rectangle(x, y, w, h, { isStatic:true, layaSprite:sp, }); sp = new Laya.Sprite(); w = size/5, h=size; sp.pivot(w/2, h/2); sp.graphics.fillTexture(text, 0, 0, w, ...
来源: Laya_社区 发布时间: 20180625