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

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

391. 屏幕适配-缩放-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_示例 发布时间: 20240930

392. 屏幕适配-缩放-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_示例 发布时间: 20240930

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

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

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

394. 关于Sprite回收 [ 78%]

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

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

395. 圆不跟谁 sprite 一起缩放? [ 78%]

...otSp = new Laya.Sprite();  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, ...

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

396. 关于removeChildren、 destroy和destroyChildren的疑惑 [ 78%]

...n sightBeadSprite() { SightBead.super(this); this.name = 'sightBead'; this.graphics.drawCircle(0,0,40,null,'#ff0000',1); this.graphics.drawLine(-45,0,45,0,'#ff0000',1); this.graphics.drawLine(0,45,0,-45,'#ff0000',1); this.alpha = 0; Laya.stage.addChild(this); // this.pos(440,640); } Laya.class(sight...

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

397. Laya1.6.2发布flash版本 [ 78%]

...9() at Function/http://adobe.com/AS3/2006/builtin::call() at laya.display::Graphics/_renderOne() at laya.renders::RenderSprite/_graphics() at laya.display::Sprite/render() at laya.renders::RenderSprite/_childs() at Function/http://adobe.com/AS3/2006/builtin::call() at laya.renders::RenderSprite/_gra...

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

398. LayaAir 2.0 微信排行榜 离屏画布不能直接附加到组件纹理上 [ 78%]

...件纹理上 A:let texture = new Laya.Texture(sharedCanvas); backImage.graphics.drawTexture(texture)   B:backImage.texture = texture     1.7版本可以直接把共享画布赋值给组件纹理,2.0不行(A,B两种方法) 报如下错误:   value._addReference is not a function ...

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

399. 代码创建精灵监听不到事件? [ 78%]

...var box = new Laya.Sprite(); var texture = Laya.loader.getRes(boxstr); box.graphics.drawTexture(texture); var arr = {data: StorageRoom.map_storageData[0][0],tag:0}; box.on(Laya.Event.MOUSE_UP,this,this.onclick,[arr]);   var _proto = StorageUILayer.prototype;   _proto.onclick = function(params){ co...

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

400. Laya对骨骼插槽添加滤镜 [ 78%]

...的渲染中,会遍历所有的插槽,调用BoneSlot中的draw方法(graphics.drawTexture和graphics.drawSkin) ,将插槽中的纹理通过封装cmd的形式通过方法加入_cmd的队列中,通过_renderAll遍历执行所有_cmd队列中的指令进行渲染从而更新画面 。可以...

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