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

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

241. Sprite-根据数据绘制路径 [ 73%]

...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

242. 请问一下,怎么将下面这段AS3代码翻译成LayaAir的API [ 73%]

...ix()); var matrix:Matrix = new Matrix(); matrix.rotate(Math.PI/4); sprite_.graphics.beginBitmapFill(bitmap_, matrix, true); sprite_.graphics.drawRect(100, 50, 200, 90); sprite_.graphics.endFill(); addChild(sprite_); 2017-04-14 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关...

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

243. Laya截图3D场景相关模型,导致模型透视! [ 73%]

...ra.transform.rotate(new Laya.Vector3(0, 180, 0), true, false); camera.orthographic = true; camera.orthographicVerticalSize = 5; this.effRes = Laya.Sprite3D.load(resUrl); this.effRes.on(Laya.Event.HIERARCHY_LOADED, this, function(){ this.eff1 = scene.addChild( Laya.Sprite3D.instantiate(this.effRes));...

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

244. 这个圆形遮罩问题怎么解决 [ 73%]

...w Sprite(); this.addChild(sp);         this.img = new Sprite(); sp.graphics.drawCircle(0,0,50,"transparent");         this.addChild(this.img); this.img.mark = sp;   我看被人也都是这样写的不知道为什么我的达不到效果 2018-03-15 添加评论 免费帖 --> 分享 ...

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

245. 请教文档中Graphic.drawTextures方法第二个参数的具体参数格式 [ 73%]

请教文档中Graphic.drawTextures方法第二个参数的具体参数格式 Graphic  drawTextures () method  public function drawTextures(tex:Texture, pos:Array):void批量绘制同样纹理。 Parameters tex:Texture — 纹理。   pos:Array — 绘制次数和坐标。   请教第二个...

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

246. 关于大量绘制 draw的性能优化问题 [ 73%]

...nt.MOUSE_MOVE, this, mousemove); function  mousemove(e) {     drawLayer.graphics.drawCircle(e.target.mouseX,e.target.mouseY,20,"#ffffff")     drawLayer.cacheAsBitmap; }   我的思路是每一次move都把对应的圆形区域绘制到一个容器上,这样一来drawcall就不会一直增加...

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

247. 请问老师为什么我按照官网的实例播放音频没反应呢? [ 73%]

... w = 110; var h = 40; var button = new Sprite(); button.size(w, h); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.graphics.fillText(label, w / 2, 8, "25px SimHei", "#FFFFFF", "center"); Laya.stage.addChild(button); return button; } function onPlayMusic(e) { console.log("播放音乐"); Sou...

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

248. 分享:Skeleton下Event.LABLE('label')事件的使用 [ 73%]

...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)) if(tEventData.name=="'fall'") { ...

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

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

...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

250. 对象mask的区域改变问题! [ 73%]

... private addedToStage():void{ this.__mask = new Laya.Sprite(); this.__mask.graphics.drawRect(0,0,this.img_bar.width,this.img_bar.height,"#000000"); this.setValue(0); } private setValue(v:number):void{ this.__mask.scaleX = v; this.img_bar.mask = null;//第二次设置mask的时候必须给原对象...

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