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

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

161. layaAir真的没办法做涂鸦板? [ 86%]

layaAir真的没办法做涂鸦板? 我用sp.graphics.drawLines方法做了个鼠标画线,确实是连续画的时间长了,就会很卡,在平板上尤其明显,画两三条线之后就不行了,没办法解决吗?用JS原生的画线方法怎么能加载我的内容上呢,我是...

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

162. 关于环形进度条,进度不能重置问题 [ 85%]

...is.box); this.draw = new Sprite(); this.box.addChild(this.draw); this.draw.graphics.drawPie(this.say.width/2, this.say.height/2, this.say.width/2+9,0,this.angle, "#ffffff"); this.circle = new Sprite(); this.circle.graphics.drawCircle(this.say.width/2, this.say.height/2, this.say.width/2, "#00ffff");...

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

163. WebGL下透明度的问题 [ 85%]

WebGL下透明度的问题 我在WebGL模式下的一个View里用Graphics画了黑色的底色 然后上面有一张图片 对View设置了alpha为0.9,这时graphics绘的底色透明度生效了,可以隐约看见背后的内容,但是图片完全没有透明值,请问下是什么原因...

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

164. 半透明的矩形鼠标穿透问题 [ 85%]

...鼠标穿透问题 //画矩形 this.addLabel = new Sprite(); this.addLabel.graphics.drawRect(0, 730, 1440, 170, "#000000"); this.addLabel.alpha = 0.6; this.addLabel.mousethrough = false; this.addLabel.mouseEnabled = true; sp.addChild(this.addLabel); 仍然能够点击下面的按钮.这个要怎么...

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

165. hitArea用法问题 [ 85%]

...,点击则可正常关闭); 请指教!  // 写法一 let g:Laya.Graphics = new Laya.Graphics(); g.drawRect(this.closeBtn.x-10,this.closeBtn.y-10,this.closeBtn.width+20,this.closeBtn.height+20,"#FF0000"); let hitA:Laya.HitArea = new Laya.HitArea(); hitA.hit = g; this.closeBtn.hitArea = hitA;...

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

166. 龙骨动画-拖拽-点击区域HitArea设置问题 [ 85%]

...); rectangle = skeleton.getBounds(); var hitArea = new Laya.HitArea(); var graphic = new Laya.Graphics(); graphic.drawRect(-rectangle.x, -rectangle.y, rectangle.width, rectangle.height); hitArea.hit = graphic; skeleton.hitArea = hitArea; Laya.stage.graphics.drawRect(-rectangle.x, -rectangle.y, recta...

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

167. sprite添加click监听事件反应迟钝 [ 84%]

...sprite添加click监听事件反应迟钝 代码如下,如果用drawyuan.graphics.drawCircle(0,0,50,"#232628");则会点击反应非常迟钝,如果用loadimg的话,反应很快; function drawCirle() { var drawyuan = new Laya.Sprite(); // drawyuan.graphics.drawCircle(0,0,50,"#232628");//反...

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

168. 被遮罩的显示对象的子显示对象再添加遮罩,则子显示对象显示不正确 [ 84%]

...ask则正常显示。 let bigMask:Laya.Sprite = new Laya.Sprite(); bigMask.graphics.drawRect(0, 0, 300, 200, "#ffffff"); this.mask = bigMask; // let imgMask:Laya.Sprite = new Laya.Sprite(); imgMask.graphics.drawRect(0, 0, 100, 300, "#ffffff"); this.img.mask = imgMask; Laya.Tween.to(this.img, {x:100}...

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

169. 鼠标交互-修正交互区域 [ 84%]

...n); } function 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); coralRec...

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

170. 小图集内存较大,且不能清理掉 [ 84%]

...图集能清除掉么? private function onLoad(tex:Texture):void { var g:Graphics = new Graphics(); g.drawTexture(tex, 0, 0); _s.graphics = g;        Laya.timer.once(2000, this, onClear); } private function onClear():void { _s.graphics.clear(); _s.destroy(true); _s.removeSelf(); _s...

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