大约有 17 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0029 秒)
graphics.drawRect过多会导致程序奔溃 实现了个粉笔的效果, 思路是在一条线上(graphics.drawLine)绘制随机绘制背景颜色的矩形(graphics.drawRect); 但是画一会就会出现明显的性能克顿, 再持续画下去就直接奔溃了; canvas中每画完一笔...
来源: Laya_社区 发布时间: 20170719
... 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
...ing888 • 2017-03-30 11:20 var containr = new Sprite(); containr.graphics.drawRect(0,0,200,200,'#ff0000') containr.size(200,200); containr.pivot(100,100); containr.x = 200 containr.y = 200 senceLayer.addChild(containr); var rect = new Rectangle(0,0,200,200); containr.scrollRect = rect; var itemCont...
来源: Laya_社区 发布时间: 20170329
...vate var testPan:Sprite; public function MainUi() { super(); this.graphics.drawRect(0,0,500,500,"#fff0cc"); testPan = new Sprite(); testPan.name = "testPan"; this.addChild( testPan ); testPan.pos( 300,300); testPan.graphics.drawRect(0,0,90,100,"#faaff0"); testPan.on(Event.CLICK,this,onMouseClick); t...
来源: Laya_社区 发布时间: 20161124
... var spr:Sprite = new Sprite(); spr.x = 30+i*17; spr.y = 300; spr.graphics.drawRect(-10, -40, 20, 80,colors[i%2]); spr.skewX = i * 6; spr.scaleY = 1 / Math.cos(Utils.toRadian(spr.skewX)); Laya.stage.addChild(spr); } for (i = 0; i < 31; i++ ) { var spr:Sprite = new Sprite(); spr.x = 30+i*17; spr.y...
来源: Laya_社区 发布时间: 20180323
...案一: var s:Sprite = new Sprite(); s.graphics.setAlpha(0.3); s.graphics.drawRect(0,0,300,300,"#ffffff"); s.graphics.setAlpha(1); addChild(s); var img:Image = new Image("a.png"); s.addChild(img); //方案二: var s:Sprite = new Sprite(); s.graphics.alpha(0.3); s.graphics.drawRec...
来源: Laya_社区 发布时间: 20180209
... let sp = new Laya.Sprite(); sp.graphics.drawRect(0,0,Laya.stage.width,Laya.stage.height,"#FFFFFF"); Laya.stage.addChild(sp); let guideView = new MazeGuideView(); guideView.zOrder = MazeC...
来源: Laya_社区 发布时间: 20200119
...Texture(texture); a.graphics.clear(true); a.destroy(); a = b; } a.graphics.drawRect(10*i, 10*j, 10, 10, "#ff0000"); count++; } } 2018-11-13 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Laya_Aaron 赞同来自: ...
来源: Laya_社区 发布时间: 20181113
...private function test():void { var sp1:Sprite = new Sprite(); sp1.graphics.drawRect(0,0,300,200,"#ff0000"); var htmlCanvas:HTMLCanvas = sp1.drawToCanvas(300,200,0,0); Laya.timer.once(1000,this,function():void{ var texture:Texture = new Texture(htmlCanvas); var sp2:Sprite = new Sprite(); sp2.graphics...
来源: Laya_社区 发布时间: 20181121
...liblayaair.so 貌似一个引擎的bug,导致引擎卡死奔溃 graphics.drawRect过多会导致程序奔溃 liblayaair.so在android8.0版本奔溃比其他android版本明显要多 LayaNative 原生发布 APK Oppo R15 奔溃 其他正常 LAYA2.0 native 美图手机打开奔溃 Layabox 打包安...
来源: Laya_社区 发布时间: 20191106