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

大约有 175 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0036 秒)

21. 骨骼动画-Spine事件 [ 85%]

...lSprite); mLabelSprite.x = mStartX; mLabelSprite.y = mStartY; mLabelSprite.graphics.clear(); mLabelSprite.graphics.fillText(tEventData.name, 0, 0, "20px Arial", "#ff0000", "center"); Tween.to(mLabelSprite, { y:mStartY - 200 }, 1000, null,Handler.create(this,playEnd)) } function playEnd() { mLabelSpr...

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

22. 关于动态绘制圆弧问题 [ 84%]

...如果我当前要制作一个转圈的圆弧, 我只能 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

23. graphics持续绘制扇形问题 [ 84%]

graphics持续绘制扇形问题 private function onLoaded():void { //实例UI界面 var testView:TestPageUI = new TestPageUI(); Laya.stage.addChild(testView);   pie = new Sprite(); Laya.stage.addChild(pie); Laya.timer.frameLoop(1,this,onLoop); }   private var curAngle:Number = 0; private functio...

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

24. 如何清除graphics绘制的矢量图 [ 83%]

如何清除graphics绘制的矢量图             let count1 = 1;             Laya.timer.loop(3000, this, function () {                 sp.graphics.clear();                 if (count1 == 0) {                     sp.graphic...

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

25. 点击区域问题 [ 82%]

...te = new 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:nu...

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

26. Sprite loadImage 的时候出现多张图片同时显示 [ 82%]

Sprite loadImage 的时候出现多张图片同时显示 this.img.graphics.clear(); var imgUrl = (this.flag = !this.flag)? this.imgUrl1 :this.imgUrl2; this.img.loadImage(imgUrl,100,50); 简单的点击sprite切换图片,结果会出现两张图片同时显示的情况 附件 : --> 2018-04-04 添...

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

27. 微信小游戏渲染开放域卡顿处理 [ 82%]

...面基本都是大同小异,就是将sharedCanvas转成纹理再绘制到graphics上,这里推荐看下http://ask.layabox.com/question/15195这个文档,写的还算全面(虽说我不用,题外话) 二、如何有效的控制开放域界面的开关: 官方推荐的就是对上述的...

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

28. 混合模式-Lighter [ 82%]

...esult; } onTweenComplete() { this.evalBgColor(); } 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...

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

29. Sprite-屏幕截图 [ 82%]

...dth/2,Browser.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.monkey...

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

30. 混合模式-Lighter [ 82%]

...tion onTweenComplete() { evalBgColor(); } function renderBg() { Laya.stage.graphics.clear(); Laya.stage.graphics.drawRect( 0, 0, phoenixWidth, phoenixHeight, getHexColorString()); } function getHexColorString() { bgColorChannels.r = Math.floor(bgColorChannels.r); // 绿色通道使用0 bgColorChanne...

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