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

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

251. Sprite-根据数据绘制路径 [ 75%]

...30); path.push(-55, 32); path.push(-137, -30); path.push(-33, -33); canvas.graphics.drawPoly(Laya.stage.width / 2, Laya.stage.height / 2, path, "#FF7F50"); } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export cl...

来源: Laya_示例 发布时间: 20251209

252. 滤镜问题,有复现demo [ 75%]

...tn.fitlers = null,这时舞台绘画的消失了???? */ Laya.stage.graphics.drawRect(200, 200, Laya.stage.width / 2, Laya.stage.height / 2, "#ffff00"); var btn:Sprite = new Sprite(); btn.size(200, 100); btn.graphics.drawRect(0, 0, btn.width, btn.height, "#ff00ff"); Laya.stage.addChild(btn); ...

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

253. Sprite-根据数据绘制路径 [ 75%]

...30); path.push(-55, 32); path.push(-137, -30); path.push(-33, -33); canvas.graphics.drawPoly(Laya.stage.width / 2, Laya.stage.height / 2, path, "#FF7F50"); } } new Sprite_DrawPath();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Browser = Laya.Browser; import WebGL = La...

来源: Laya2.0_示例 发布时间: 20251209

254. 设置遮罩(TypeScript-LayaAir基础篇(TS)-位图) [ 75%]

...并添加到舞台 Laya.loader.load(this.Res,Laya.Handler.create(this,this.graphicsImg)); } private graphicsImg():void{ this.img = new Laya.Sprite(); //获取图片资源,绘制到画布 this.img.graphics.drawTexture(Laya.loader.getRes(this.Res),150,50); //添加到舞台 Laya.stage.addChild(this....

来源: Laya2.0_文档 发布时间: 20210715

255. 关于动态绘制圆弧问题 [ 75%]

...如果我当前要制作一个转圈的圆弧, 我只能 this.sprite_gra.graphics.clear(); this.sprite_gra.graphics.drawPie(this.width / 2, this.height / 2, this.width, SkillIcon.START_NUM, this.end, "#000000"); 在定时器里,每次都擦除后再重新绘制一个圆弧吗? 没有一种思...

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

256. hBox使用问题 [ 75%]

...th/4) },1500,Ease.sineOut); var bl:Number=texture.width/texture.height ape.graphics.drawTexture(texture,0,0,stageWidth/4,stageWidth/4/bl); apesCtn.addChild(ape); } } 这种方法HBox布局不管用,是不是不能用graphics.drawTexture方法,如果用addChild方法加载Loader.getRes(picAy[i])...

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

257. 关于mouseThrough设计原理问题? [ 74%]

...果的,这样设计是不是有问题?var a:Sprite = new Sprite(); a.graphics.drawRect(0,0,200, 200, "#00ff00"); a.size(200, 200); a.pos(0, 0); a.on(Event.CLICK, null, function(e:Event):void{ trace("click a"); }) Laya.stage.addChild(a); var b:Sprite = new Sprite(); b.graphics.drawRect(0,0,200, 2...

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

258. 关于drawPie 的效率问题,性能不够好的手机怎么优化? [ 74%]

关于drawPie 的效率问题,性能不够好的手机怎么优化? graphics.drawPie 做环形倒计时,比如每50毫秒执行一次,在许多配置不是很高的手机上,出现卡顿延迟的现象,有办法优化吗 2018-03-08 添加评论 免费帖 --> 分享 微博 QZONE 微信 ...

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

259. 关于Laya.loader.load和getRes的问题 [ 74%]

...es("../../../../res/apes/monkey2.png"); var ape:Sprite = new Sprite(); ape.graphics.drawTexture(t,0,0); Laya.stage.addChild(ape); ape.pos(200, 0); })); 这可以正常运行,但是我把外面的 load 函数去掉,将第二个参数中的函数内容独立后却不能显示图片:var t:Textur...

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

260. laya中的截屏在WebGL下为什么无效呢? [ 74%]

...照特效 this._shapeSnapEffect = new egret.Shape; this._shapeSnapEffect.graphics.beginFill( 0xFFFFFF ); this._shapeSnapEffect.graphics.drawRect( 0, 0, L.W_CLIP, L.H_CLIP ); this._shapeSnapEffect.graphics.endFill(); this._shapeSnapEffect.cacheAsBitmap = true; this._shapeSnapEffect.x = this._bmpSnap....

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