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

大约有 4,034 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0081 秒)

381. 屏幕适配-缩放-No Scale [ 94%]

...aya.stage.scaleMode = Stage.SCALE_NOSCALE; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } createCantralRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } update...

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

382. AnimationBase和MovieClip removeLabel问题反馈 [ 94%]

...除所有帧标签! */ __proto.removeLabel=function(label){ if (!label)this._labels=null; else if (this._labels){ for (var name in this._labels){ this._removeLabelFromList(this._labels[name],label); if(this._labels[name].length == 0){ delete this._labels[name]; } } } } ----------------------------...

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

383. 性能测试-虫子(慎入) [ 94%]

....stage.height + padding * 2); Laya.loader.load(texturePath, Handler.create(this, onTextureLoaded)); })(); function onTextureLoaded() { maggotTexture = Laya.loader.getRes(texturePath); initMaggots(); Laya.timer.frameLoop(1, this, animate); } function initMaggots() { var maggotContainer; for (var i = ...

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

384. 加载的时候动画会卡 [ 94%]

...时候动画会卡 上代码: _pro.startLoad = function() {         this.loadLayer = new Lload();         this.big.addChild(this.loadLayer);         var imgArr = ;         imgArr.push({url:"cont/cpf1.jpg",type:Loader.IMAGE});         imgArr.push({url:"cont/cpr1.jpg",type:Loade...

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

385. Native下http请求,Error事件中的error对象错误码全都是404 [ 94%]

...西在原生不应该会有这个问题才是的 比如说这个代码: this.hr.once(Event.COMPLETE, this, onHrCompleteHandler); this.hr.once(Event.ERROR , this ,onHrErrorHandler); this.hr.send($url, $data, $method, $responseType, $headers); private function onHrCompleteHandler():void { if(this.co...

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

386. 使用官方文档中qrcode生成二维码的代码,打包APP后无效 [ 94%]

...te initCode() { var div: any = Laya.Browser.document.createElement("div"); this.qrcode = new Laya.Browser.window.QRCode(div, { width: 100, height: 100 }); var url: string = this.URL; this.qrcode.makeCode(url); Laya.stage.once("click", this, this.clickHandler); this.qrcodeSp = new Laya.Sprite(); Laya...

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

387. 基本效果已经实现,想用for批量绑定事件 [ 94%]

...简下,如下 //向上滑动效果 _pro.shang = function (){ var self = this; num++; if(num==1){ Haha(this.loadnew1,-1030,300,0,100,0); Haha(this.loadnew2,0,300,1,500); Haha(this.loadnew3,1030,300,0,500); } if(num==2){ Haha(this.loadnew1,-2060,300,0,100); Haha(this.loadnew2,-1030,300,0,500); Haha(...

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

388. 屏幕适配-缩放-Extract Fit [ 94%]

...ya.stage.scaleMode = Stage.SCALE_EXACTFIT; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } createCantralRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } update...

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

389. 屏幕适配-缩放-Show All [ 94%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } createCantralRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } update...

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

390. 天理何在,一个轴心点位中心的addChild到一个父容器,父容器的轴线点也是中心 [ 94%]

...器,父容器的轴线点也是中心 constructor(skin:Box) { super(); this.mc = skin; this._name = this.mc.name; this.addChild(this.mc); var xx:number = this.mc.x; var yy:number = this.mc.y; this.x = xx; this.y = yy; //一个轴心点中心的addChild到另一个轴线点位中心的 this.size(77...

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