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

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

141. 报错:找不到基类,按照laya社区的解答做了,但是导致了另外一个类和接口出现一样的错 [ 67%]

...       txt.text = "HelloLayaBox";             txt.color = "#ff0000";             txt.fontSize = 66;             txt.bold = true;                          txt.stroke = 5;//字体描边             txt.strokeColor = "#ffffff";          ...

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

142. 绘制矩形与圆角矩形(TypeScript-LayaAir基础篇(TS)-矢量图) [ 67%]

...             this.sp.graphics.drawRect(20, 20, 100, 50, "#ffff00");         }     } } new laya.Sprite_DrawShapes(); ``` 代码运行效果: ​ ![blob.png](img/2.png) ​ (图2) 示例中的“20,20”是矩形起始点坐标,100是向右的宽度,如果是...

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

143. 加载-销毁Texture使用的图片资源 [ 67%]

..."销毁"; this.txt.pos(75, 15); this.txt.fontSize = 25; this.txt.color = "#FF0000"; this.btn.addChild(this.txt); this.btn.pos(20, 160); Laya.stage.addChild(this.btn); //添加侦听 this.btn.on(Event.MOUSE_UP, this, this.onMouseUp); }; /** * 鼠标事件响应函数 * @param evt */ GameMain.prototyp...

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

144. webGL模式下 graphic画线涂鸦,一直不停画会出现线条异常 [ 66%]

...is.bmp.graphics.drawLine(this.pos0.x,this.pos0.y,this.pos1.x,this.pos1.y,"#ff0000",5); this.pos0.x=this.bmp.mouseX; this.pos0.y=this.bmp.mouseY; } } __mouseUp(e:Event){ this.bmp.off(Laya.Event.MOUSE_MOVE, this, this.__mouseMove); this.bmp.off(Laya.Event.MOUSE_UP, this, this.__mouseUp); this.bmp.grap...

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

145. 按钮组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 66%]

...Stroke = 3; //文本标签字体描边宽度 this.btn.labelStrokeColor = "#ffffff"; //描边颜色 this.btn.strokeColors = "#000000, #c6ff00, #001aff"; //各状态下的描边颜色 this.btn.labelColors = "#0100ff, #16fa0e, #ff0000"; //各状态下的文本颜色 // this.btn.toggle = true; //是否...

来源: Laya3.0_文档 发布时间: 20251010

146. 滤镜的集中实现 [ 66%]

...nit(1110, 1110,Laya.WebGL); //设置舞台背景色 Laya.stage.bgColor = "#ffffff"; //原始位图 createImg(200,50); //红色滤镜 creteRedFilter(); //创建发光滤镜位图**/ createGlowFilter(); //创建阴影滤镜位图 createShadeFilter(); //创建糊滤滤镜位图 createBlurFilter();   ...

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

147. 加载TiledMap 不显示 [ 66%]

.../ Math.PI * 30) * radiusX;         var color: string = "#FF7F50";          this.sprite = new Sprite();         this.sprite.graphics.drawLine(0, 0, -radiusX, radiusY, color);         this.sprite.graphics.drawLine(0, 0, radiusX, radiusY, color);  ...

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

148. 鼠标交互-滑动 [ 66%]

...onst h = 30; button = new Sprite(); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.pivot(w / 2, h / 2); //设置宽高(要接收鼠标事件必须设置宽高,否则不会被命中) button.size(w, h); button.x = (Laya.stage.width - TrackLength) / 2; button.y = Laya.stage.height / 2; b...

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

149. 鼠标交互-滑动 [ 65%]

...0; this.button = new Sprite(); this.button.graphics.drawRect(0, 0, w, h, "#FF7F50"); this.button.pivot(w / 2, h / 2); //设置宽高(要接收鼠标事件必须设置宽高,否则不会被命中) this.button.size(w, h); this.button.x = (Laya.stage.width - TrackLength) / 2; this.button.y = Laya...

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

150. 绘制曲线(JavaScript-LayaAir基础篇(JS)-矢量图) [ 65%]

...    sp.graphics.drawCurves(10, 58, [0, 0, 19, -100, 39, 0], "#ff0000", 3);     } })(); ``` 发布后如下图所示,我们成功的绘制了一条简单的曲线。 ​ ![blob.png](img/4.png) ​ (图9) 通过增加drawCurves的第三位points点集合的参数,我们可以...

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