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

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

391. 为什么Laya.Panel的子节点在(0,0)位置会不显示呢? [ 78%]

... = 0; // 用下面这组数据是可显示的 // sp.y = 1; // sp.x = 1; sp.graphics.drawRect(0, 0, 200, 200, "#00FF00"); Laya.stage.addChild(panel);   这个是我的代码,sp是一个精灵,放在panel的0,0点后确实是不显示,往右下移一个像素后就能显示出来了 2017-02-20 0 0 ...

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

392. 混合模式-Lighter [ 78%]

...tion onTweenComplete() { evalBgColor(); } function renderBg() { Laya.stage.graphics.clear(); Laya.stage.graphics.drawRect( 0, 0, phoenixWidth, phoenixHeight, getHexColorString()); } function getHexColorString() { bgColorChannels.r = Math.floor(bgColorChannels.r); // 绿色通道使用0 bgColorChanne...

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

393. poly组件是各种坑 [ 78%]

...child数量居然是0,我这张image下有17个poly,然后去image下的graphic下看只发现有一个为cmd的数组里面存的都是坐标不知道是不是记录的poly也刚好是17个,然后完全没有记录这些poly我给它的命名这叫人怎么知道点击的是哪一个poly? 附...

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

394. 屏幕适配-缩放-No Border [ 78%]

...alRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rect.y = Laya.stage.height / 2; } } new SmartScale_Scale_NOBO...

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

395. 屏幕适配-缩放-No Scale [ 78%]

...alRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rect.y = Laya.stage.height / 2; } } new SmartScale_Scale_NOSC...

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

396. 混合模式-Lighter [ 78%]

...esult; } onTweenComplete() { this.evalBgColor(); } renderBg() { Laya.stage.graphics.clear(); Laya.stage.graphics.drawRect( 0, 0, phoenixWidth, phoenixHeight, this.getHexColorString()); } getHexColorString() { bgColorChannels.r = Math.floor(bgColorChannels.r); // 绿色通道使用0 bgColorChannels.g...

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

397. 屏幕适配-缩放-Extract Fit [ 78%]

...alRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rect.y = Laya.stage.height / 2; } } new SmartScale_Scale_EXTR...

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

398. 屏幕适配-缩放-Show All [ 78%]

...alRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rect.y = Laya.stage.height / 2; } } new SmartScale_Scale_SHOW...

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

399. 根据已知系列点绘制平滑曲线,不是贝塞尔曲线,是没有任何规则的平滑曲线,比如3个点,这3个点都要在曲线上绘制的平滑曲线 [ 78%]

...ts:Array, lineColor:*, lineWidth:Number = 1):void 绘制一系列曲线。 Graphic.drawTextures,第二个参数 pos:Array — 绘制次数和坐标,怎么写啊, 小游戏开放数据域下使用Laya.List绘制了排行榜,但是触摸没有滚动响应 如何给Sprite的graphics绘制的线...

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

400. 关于Sprite回收 [ 78%]

...            Pool.recover("item", item);                 item.graphics.clear();             }    item的父容器是通过回收池获取的,父容器带有原来的item,现在希望删掉原来的item,添加新的item,使用上面的代码去达不到效果,结果是...

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