大约有 229 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0039 秒)
Laya_社区(174) Laya2.0_示例(20) Laya_示例(18) Laya2.0_文档(9) Laya3.0_api(3) Laya3.0_文档(3) laya_api(1) Laya2.0_api(1)
...w Laya.Sprite(); this.firstSp = new Laya.Sprite(); this.firstSp.graphics.drawRect(0, -100, 200, 200, null, "#ffffff"); this.firstSp.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.Mous...
来源: Laya_社区 发布时间: 20190314
...00, 117, 0, 136, 100, 156, 0], "#ff0000", 5); //画矩形 this.sp.graphics.drawRect(10, 166, 166, 90, "#ffff00"); //画多边形 this.sp.graphics.drawPoly(264, 166, [0, 0, 60, 0, 78.48, 57, 30, 93.48, -18.48, 57], "#ffff00"); //画三角形 this.sp.graphics.drawPoly(400, 166, [0, 100, 50, 0, 100, 10...
来源: Laya_社区 发布时间: 20180115
...BgColor(); } renderBg() { Laya.stage.graphics.clear(); Laya.stage.graphics.drawRect( 0, 0, phoenixWidth, phoenixHeight, this.getHexColorString()); } getHexColorString() { bgColorChannels.r = Math.floor(bgColorChannels.r); // 绿色通道使用0 bgColorChannels.g = 0; //obj.g = Math.floor(obj.g); bgC...
来源: Laya2.0_示例 发布时间: 20251130
...); //创建按钮 this.btn = new Sprite().size(205, 55); this.btn.graphics.drawRect(0, 0, this.btn.width, this.btn.height, "#057AFB"); this.txt = new Text(); this.txt.text = "销毁"; this.txt.pos(75, 15); this.txt.fontSize = 25; this.txt.color = "#FF0000"; this.btn.addChild(this.txt); this.btn.pos(...
来源: Laya_示例 发布时间: 20251130
...var Wall_TL = new Sprite(); Laya.stage.addChild(Wall_TL); Wall_TL.graphics.drawRect(0, 0, 400, 32, "#ffff00"); Wall_TL.pivot(200, 16); var Collision_Wall_TL:any = Matter.Bodies.rectangle(200, 400, 400, 32, { layaSprite:Wall_TL,isStatic: true }) Matter.World.add(this.engine.world, [ Collision_Wa...
来源: Laya_社区 发布时间: 20180529
...GL ); 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-02-16 添加评论 免费帖 -...
来源: Laya_社区 发布时间: 20170216
为什么显示不了 var sp = new Laya.Sprite(); sp.graphics.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 La...
来源: Laya_社区 发布时间: 20180412
...s/ getGraphicBounds。 ```typescript var sp=new Laya.Sprite(); sp.graphics.drawRect(0,0,100,100,"#FF0000"); var bounds:Laya.Rectangle=sp.getGraphicBounds(); Laya.stage.addChild(sp); ``` getBounds可以满足多数多数需求,但由于其需要计算边界,不适合频繁调用。 1. 设置容...
来源: Laya2.0_文档 发布时间: 20210714
...367261我测试过了 只要调用fillText绘制就增加接近16M,使用drawRect等几乎不增加,这是什么原因? w1114367261 • 2018-04-25 14:29 这个是laya的大图集功能没有办法去掉哦!你第一次绘制fillText会创建出laya的大图集所以增大, AllenYT • 2018...
来源: Laya_社区 发布时间: 20180425
...eColor:* = null, lineWidth:Number = 1):void 绘制多边形。 Graphics drawRect(x:Number, y:Number, width:Number, height:Number, fillColor:*, lineColor:* = null, lineWidth:Number = 1):void 绘制矩形。 Graphics drawTexture(tex:Texture, x:Number = 0, y:Number = 0, width:Number = 0, height:N...
来源: laya_api 发布时间: 20170929