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

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

191. texture可以加载一个canvas吗 [ 60%]

...canvas吗 var share = sharedCanvas.getContext('2d'); share.fillStyle="#0000ff"; share.fillRect(20,20,150,100); var _texture = new Laya.Texture(sharedCanvas); var sp2 = new Laya.Sprite(); sp2.x = 300; sp2.graphics.drawTexture(_texture,0,0,100,100); Laya.stage.addChild(sp2);   文档说好像可以 ...

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

192. 射线检测-放置物体 [ 60%]

...sh(6, 6, 10, 10))); var planeMat = new Laya.StandardMaterial(); planeMat.diffuseTexture = Laya.Texture2D.load("../../res/threeDimen/texture/layabox.png"); planeMat.albedo = new Laya.Vector4(0.9, 0.9, 0.9, 1); plane.meshRender.material = planeMat; var meshCollider = plane.addComponent(Laya.MeshCollid...

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

193. Socket连接不上(已解决) [ 60%]

...      txt.text = "This is a demo";             txt.color = "#FF0000";             txt.fontSize = 50;             txt.stroke = 3;             txt.strokeColor = "#FFFFFF";             txt.pos(50, 100);             Laya.stage.addChild(txt);   ...

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

194. 怎么做到第二次点击color的时候lable背景颜色变回原来的颜色 [ 59%]

...olor的时候lable背景颜色变回原来的颜色 this.label.bgColor = "#ff0400"; start(): void { this.color_btn.on(Laya.Event.CLICK, this, this.onTipClick); } if(tipBtn == this.color_btn){ this.label.bgColor = "#ffffff";   2019-07-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有...

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

195. WebGL 绘制图形报错 [ 59%]

...ve(); mask.graphics.drawRect( 0, 0, Laya.stage.width, Laya.stage.height, 0xff0000 ); mask.graphics.restore(); mask.x = 0; mask.y = 0; Laya.stage.addChild( mask ); 麻烦看下是什么问题。   附件 : --> 2017-02-16 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 ...

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

196. 改变位置后,点击区域不生效了 [ 59%]

...prite = new Sprite(); sp.autoSize=true; sp.graphics.drawRect(0,0,100,100,"#ff0000"); sp.on(Event.CLICK,this,onClick); Laya.stage.addChild(sp); } private function onClick(event:Event):void{ Render._mainCanvas.source.style.left = "100px"; Render._mainCanvas.source.style.top = "100px"; trace("onClick")...

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

197. 子容器的事件问题 [ 59%]

...     super();         this.graphics.drawRect(0, 0, 1500, 1500, "#0000ff");         this.on(Laya.Event.CLICK, this, this.onclickTest);     }     onclickTest(): void {         console.log("单击也没有效果, why !");     } }   2017-08-22 添加评论 免费帖 --> 分享 ...

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

198. UI组件对齐方式奇奇怪怪 [ 59%]

...怪 var _parent = new Box(); _parent.graphics.drawRect(0, 0, 500, 500, '#ff0000'); Laya.stage.addChild(_parent); var _child = new Box(); _child.graphics.drawRect(0, 0, 50, 50, '#336699'); _child.bottom = 0 _parent.addChild(_child); 按理说 我设置了额child的bottom为0 应该是 靠底部对...

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

199. TimeLine运行的小问题 [ 59%]

...同来自: //初始化引擎 Laya.init(600, 400); Laya.stage.bgColor="#eeffcc"; var sp:Sprite=new Sprite(); sp.graphics.drawRect(0,0,200,200,"#FF0000"); Laya.stage.addChild(sp); var timeLine:TimeLine=new TimeLine(); timeLine.on(Event.LABEL,this,onLabel); timeLine.addLabel("A",0).to(sp,{rotation:360}...

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

200. graphics绘制扇形,角度设置一定数值时候,遮罩形状不对 [ 59%]

...成: 66,270。 ( this.mask.graphics.drawPie(100, 50, 50, 66, 270, '#ff0000') )   遮罩形状就跟第一个一样显示错误。   附件 : --> test.rar 2019-11-15 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 ...

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