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

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

511. 1.7.13版本以上的的截屏功能有问题 请测试下 [ 64%]

...从1.7.13之后 截屏功能就跪了  this.road.drawToCanvas(this.road.width,this.road.picHeight,0,0); 要改成 this.road.drawToCanvas(this.road.width,this.road.picHeight);或者 this.road.drawToCanvas(this.road.width,this.road.picHeight,this.road.x,this.road.y);这样才能在1.7.13以上的...

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

512. 【laya2.0】加载并且显示图片,并且让该图片居于舞台中央,怎么写? [ 64%]

...ler.create(this, function(){ console.log("complete!!"); logo.x= Laya.stage.width/2-logo.width/2; logo.y= Laya.stage.height/2-logo.height/2; //logo.pos(Laya.stage.width/2-logo.width/2,Laya.stage.height/2-logo.height/2); })); 2018-10-10 0 1 分享 微博 QZONE 微信 hj 赞同来自: 你用这个方...

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

513. 分享:销毁龙骨动画! [ 64%]

...ure:Skeleton; public function ASDemo() { WebGL.enable(); Laya.init(Browser.width, Browser.height); Laya.stage.bgColor = "#ffffff"; Stat.show(); var DesBtn:Sprite = createButton("销毁动画"); DesBtn.x = 50; DesBtn.y = 50; Laya.stage.addChild(DesBtn); //创建一个Sprite充当音乐播放按钮 va...

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

514. Laya 绑定显示内容到骨骼动画 [ 64%]

...Laya.stage.addChild(this.__bind);         this.__bind.x=Laya.stage.width*0.5;         this.__bind.y=Laya.stage.height*0.5;          this.__bind.load(GamePath.single.getSpinePath("tank_blue.sk"),Laya.Handler.create(this,this.testLoadComplete));   }      private __bind:...

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

515. 树状列表组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 64%]

...ee.xml = new Laya.XML(treeData); tree.size(300, 300); tree.x = (Laya.stage.width - tree.width) / 2; tree.y = (Laya.stage.height - tree.height) / 2; tree.bgColor = "#d25454"; this.owner.addChild(tree); } } class Item extends Laya.Box { constructor() { super(); this.right = 0; this.left = 0; var selec...

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

516. 按钮组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 63%]

...I_Button extends Laya.Script { private COLUMNS: number = 2; private BUTTON_WIDTH: number = 147; private BUTTON_HEIGHT: number = 165 / 3; private HORIZONTAL_SPACING: number = 200; private VERTICAL_SPACING: number = 100; private xOffset: number; private yOffset: number; private skins: any[]; //组件...

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

517. 龙骨skeleton鼠标点击区域的设置 [ 63%]

...置龙骨动画的点击区域 首先通过getBounds获取龙骨动画的width和height(可以通过延迟timer来获取) 然后这是龙骨的hitArea(-width,-height,width,height) 参考示例: mArmature = mFactory.buildArmature(1); mArmature.play(0,true); Laya.stage.addChild(mArmatu...

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

518. laya2.0 截图功能分享,直接截取屏幕上所有对象 [ 63%]

...tatic tempTexture: Laya.Texture; /**截图 */ public static drawScreenshot(width, height, x, y) { if (!SwitchHelper.screenDraw) { return null; }  if (!this.tempTexture2D) { this.tempTexture2D = new Laya.Texture2D(system.width, system.height); } if (!this.tempTexture) { this.tempTexture = new Laya.T...

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

519. 源码List的一次代码错误 [ 63%]

...X, numY) { var box = this._content; var cell = this._getOneCell(); var cellWidth = cell.width + this._spaceX; var cellHeight = cell.height + this._spaceY; if (this.cacheContent) { var cacheBox = new Box(); cacheBox.cacheAsBitmap = true; cacheBox.pos((this._isVertical ? 0 : startY) * cellWidth, (this...

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

520. 骨骼动画-多纹理 [ 63%]

...ya.Stat; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#ffffff"; Stat.show(); this.startFun(); } ...

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