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

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

361. Laya.loader.load 教程代码出错 [ 80%]

...x.toString() +".bmp";                          img.graphics.clear();             var txture:Texture = Laya.loader.getRes(url);             img.graphics.drawTexture(txture);             img.size(txture.width,txture.height);         }...

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

362. batch draw 减少draw call [ 80%]

...l里面呢?   sp = new Sprite(); Laya.stage.addChild(sp);  //画线 sp.graphics.drawLine(10, 58, 146, 58, "#ff0000", 3); //画连续直线 sp.graphics.drawLines(176, 58, [0, 0, 39, -50, 78, 0, 117, 50, 156, 0], "#ff0000", 5); //画曲线 sp.graphics.drawCurves(352, 58, [0, 0, 19, -100, 39, 0, 58...

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

363. skin 大于512 的释放问题 [ 80%]

...ight); } showFight(num: number): void { if (this._sprFight) this._sprFight.graphics.clear(); this._sprFight = bigao.utils.TextrueUtils.getNumberByUrl(resourcesCenter.ResourcesPathStr.FIGHT_NUMBER_PATH_PNG, num.toString()); this._sprFight.x = 600; this._sprFight.y = 150; this.addChild(this._sprFight)...

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

364. 组件库(ActionScript-IDE篇(AS3)-设计模式基础) [ 80%]

...组件库里存放着IDE自带的常用组件。分别为2D基础组件、Graphics矢量组件、UI常用组件几大类。如图1、图2、图3所示。 ![图1](img/1.png) (图1)2D基础组件 ![图2](img/2.png) (图2)Graphics矢量组件 ![图3](img/3.png) (图3)UI常用组件 ### 2、组件库与...

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

365. 关于切换图片的问题 [ 80%]

...; this.img.loadImage(this.plane1); Laya.stage.addChild(this.img); this.img.graphics.clear(); this.img.loadImage(this.plane2); Laya.stage.addChild(this.img) } } new Main(); 出来的结果是两张图合并到了一起, 于是我再尝试 constructor() { Laya.init(1000,800); this.img = new Laya.Spr...

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

366. 动态创建img 或 sprite [ 80%]

LayaAir引擎 动态创建img 或 sprite let dd = new Laya.Sprite(); dd.graphics.drawTexture(this.img.texture, 0, 0, 750, 1334); dd.x = 50; dd.y = 50; this.addChild(dd);   this.img 绝对不为空,我想用一个sprite来画它,请问什么画(不是拷贝)?   2018-01-24 添加评论 ...

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

367. 关于customRender函数不执行的问题 [ 80%]

... // 保证customRender必定执行 this.frameLoop(1, this, () => { this.graphics.clear(); this.graphics.drawLine(0, 0, 1, 0, '#000'); }); this.customRenderEnable = true; this.customRender = (context: Laya.RenderContext, x: number, y: number) => { let webGLContext = context.ctx as Laya.WebGLCon...

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

368. 不规则热区的实现 [ 80%]

...击其中一个ape,进入到ape内部,然后从左侧的组件面板的Graphics文件夹中拖出来一个Poly(不规则多边形),这个就相当于我们在代码中的Graphics实例。 步骤三:   通过在Poly右侧属性面板中添加更多的points坐标点,来得到一个多...

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

369. 【简单跑酷--JS版】---Lv.3 添加地板 [ 80%]

...ader.getRes("res/floor.png"); this.bg = new laya.display.Sprite(); this.bg.graphics.clear(); //将当前的坐标向上移动32 方便后面处理人物的位置 this.bg.y = -32; this.addChild(this.bg); } this.bg.graphics.drawTexture(this.bgTexture, 0, 0, 960, 96); //创建一个帧循环处理函...

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

370. 在Laya2上 getGraphicBounds获取失败 [ 80%]

在Laya2上 getGraphicBounds获取失败 =10.5pt看4张图就知道了,图片是有加载显示成功,但是在handler里面返回的参数为undefined,getGraphicBounds内容始终为0   附件 : --> 2018-11-17 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀...

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