大约有 185 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0036 秒)
...new Sprite(); redBox.pos(250,200); redBox.autoSize = true; redBox.graphics.drawRect(0,0,100,100,'#ff0000'); Laya.stage.addChild(redBox); redBox.on("click",this,function(){ trace("click redbox"); }); redBox.on("mouseover",this,function(){ redBox.graphics.clear(); redBox.graphics.drawRect(0,0,100,100,...
来源: Laya_社区 发布时间: 20170710
...黄色区域 this.graphics.save(); this.graphics.alpha(0.5); this.graphics.drawRect(-40, -110, 80, 110, "#ffcc00"); this.graphics.restore(); //再画一个红色小半透明区域 this.graphics.save(); this.graphics.alpha(0.7); this.graphics.drawRect(40, -110, 80, 110, "#ff0000"); this.graphics.rest...
来源: Laya_社区 发布时间: 20161228
... var sp:Sprite=new Sprite(); sp.graphics.beginFill(0xFFFF00); sp.graphics.drawRect(0,0,200,200); sp.graphics.endFill(); addChild(sp); var mask:Sprite=new Sprite(); mask.graphics.beginFill(0xFF0000); mask.graphics.drawCircle(0,0,50); mask.graphics.endFill(); sp.mask=mask2、动态遮罩 var sp:Sprite...
来源: Laya_社区 发布时间: 20170207
...ction createCoralRect() { var coralRect = new Sprite(); coralRect.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height / 2, "#FF7F50"); //设置名称 coralRect.name = "珊瑚色容器"; coralRect.size(Laya.stage.width, Laya.stage.height / 2); Laya.stage.addChild(coralRect); coralRect.on(Even...
来源: Laya_示例 发布时间: 20241118
...rite, Event = Laya.Event; let coralRect = new Sprite(); coralRect.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height / 2, "#FF7F50"); //设置名称 coralRect.name = "珊瑚色容器"; coralRect.size(Laya.stage.width, Laya.stage.height / 2); Laya.stage.addChild(coralRect); coralRect.on(Even...
来源: Laya2.0_示例 发布时间: 20241118
...graphics 绘制线条粗细一样 canvas 正常 版本最新 this.graphics.drawRect(0,0,100,100,null,"#000000",2) 效果: 代码: var sp:Sprite = new Sprite(); this.addChild(sp); sp.pos(200, 200); sp.graphics.d...
来源: Laya_社区 发布时间: 20180510
...wser.clientHeight/2); Laya.stage.addChild(this.aimSp); this.aimSp.graphics.drawRect(0,0,this.aimSp.width,this.aimSp.height,"#333333"); this.monkeyTexture = Laya.loader.getRes("res/apes/monkey3.png"); this.aimSp.graphics.drawTexture(this.monkeyTexture,0,0,this.monkeyTexture.width,this.monkeyTexture.h...
来源: Laya2.0_示例 发布时间: 20241118
...景 var maskArea = new Sprite(); maskArea.alpha = 0.5; maskArea.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); guideContainer.addChild(maskArea); //绘制一个圆形区域,利用叠加模式,从遮罩区域抠出可交互区 interactionArea = new Sprite(); //设置叠...
来源: Laya_示例 发布时间: 20241118
...guideContainer.addChild(maskArea); maskArea.alpha = 0.5; maskArea.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000"); // 绘制一个圆形区域,利用叠加模式,从遮罩区域抠出可交互区 interactionArea = new Sprite(); guideContainer.addChild(interactionArea); // ...
来源: Laya2.0_示例 发布时间: 20241118
...laya.display.Sprite; con.addChild(sp); sp.x = 250; sp.y = 300; sp.graphics.drawRect(-50,-100,100,100,"#ff0000"); sp.hitArea = new laya.maths.Rectangle(-50,-100,100,100); sp.on(laya.events.Event.CLICK,this,this.spHandler); function spHandler() { sp.graphics.clear(); var rc:number = Ma...
来源: Laya_社区 发布时间: 20180106