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

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

171. 多重遮罩显示异常 [ 71%]

...d(this.panel); let line = new Laya.Sprite(); line.size(1000, 20); line.pos(200, 200); line.graphics.drawRect(0, 0, 1000, 20, '#ccc'); line.rotation = 45; line.scrollRect = new Laya.Rectangle(0, 0, 800, 20); this.panel.addChild(line); } }此时线条没有被panel裁切,完全显示出来,拖动p...

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

172. 圆不跟谁 sprite 一起缩放? [ 71%]

... this.firstSp = new Laya.Sprite(); this.firstSp.graphics.drawRect(0, -100, 200, 200, null, "#ffffff"); this.firstSp.graphics.drawLine(0, 0, 100, 100, "#ffffff", 5); this.firstSp.graphics.drawCircle(100, 100, 20, null, "ffffff"); Laya.stage.on(Laya.Event.MOUSE_WHEEL, this, this.MouseWheel);  this._r...

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

173. js设置点击事件,点击时有时会有效,有时没有效果,有时一次点击会重复多次操作 [ 71%]

...,在bgggame下写一遍即可) function bggame() { create(); tip.pos(200,200); tip.size(400,100); bg.loadImage("../laya/assets/img/134.png"); Laya.stage.addChild(bg); t = setInterval(time++,1000); }    2017-08-30 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复...

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

174. 屏幕像素宽度,如何转成3D的坐标宽度啊 [ 71%]

...位置是向左移了2,那就是说相当于BOX1.X到左边的宽度是200米,右边是800-200=600米? 也就是说在这个时候,BOX1.position.x如果+1,就相当于加了100米?!

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

175. Graphics实现透明度显示 [ 70%]

...ew Graphics(); graphics.save(); graphics.alpha(0.5); graphics.drawRect(0,0,200,100,"#FF0000"); graphics.restore(); sp.graphics=graphics; Laya.stage.addChild(sp);实现graphics填充透明,请先对graphics进行save(),然后设置填充透明度值,其次绘制矢量图形,最后执行下resto...

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

176. textInput的单行输入&多行输入(JavaScript-LayaAir基础篇(JS)-文本) [ 70%]

... textInput.width = 300;//设置 textInput 的宽度。 textInput.height = 200;//设置 textInput 的高度。 textInput.bgColor = "#aabbcc"; Laya.stage.addChild(textInput);//将 textInput 添加到显示列表。 } function Text_InputMultiline(){ var textInput = new Laya.TextInput("多行输入");//...

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

177. 在Unity中设置动画事件(ActionScript-3D基础(AS3)-LayaAir3D之Animator动画) [ 70%]

... "test"; _lab.height = 100; _lab.width = 100; _lab.fontSize = 40; _lab.pos(200,200); Laya.stage.addChild(_lab); //给脚本的加强表现用方法赋值 _script.showMsgFunc = function ():void { text = "ShowMsg"; color = "red"; }.bind(_lab); })); ``` 最后了来看下效果,如图2。 ![](img/2.g...

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

178. 关于图片加载路径的问题 [ 70%]

... Laya.Image(); fireIcon.loadImage("laya/assets/res/image/fireIcon.png",0,0,200,200,new Laya.Handler(this,onloadImage)); function onloadImage(){ console.log('图片加载结束'); Laya.stage.addChild(fireIcon); }   资源的结构为: |-.laya |-bin |-laya   |-assets     |-res       |-image   ...

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

179. 关于适配有点疑惑 [ 70%]

...ateCantralRect() { rect = new Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(rect); var rect1 = new Sprite(); rect1.graphics.drawRect(Laya.stage.width / 3 * 2 , Laya.stage.height / 3 * 2 - 65, 100, 100, "blue"); // rect1.graphics.drawRect(Laya.stage.width / 2 , L...

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

180. 鼠标交互-拖动 [ 70%]

...n() { //拖动限制区域 var dragWidthLimit = 350; var dragHeightLimit = 200; dragRegion = new Rectangle(Laya.stage.width - dragWidthLimit >> 1, Laya.stage.height - dragHeightLimit >> 1, dragWidthLimit, dragHeightLimit); //画出拖动限制区域 Laya.stage.graphics.drawRect( dragRegion.x, dragRe...

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