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

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

591. 用ide打包后的图片,Texture显示不出来? [ 74%]

...aded)); function onLoaded(){     var aa = new Sprite();     Laya.stage.addChild(aa);     var texture = new Laya.Texture();     texture.load('comp/zzw.png' );     setTimeout( function(){         aa.graphics.drawTexture(texture,0,0);     }, 1000 ) } 3Q 2017-12-26 添加评论 免费...

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

592. ani动画问题,cannot read property '_tf' of null [ 74%]

...           if (!panel.contains(this)) {                 panel.addChild(this);                 this.pos(0,110);             }             let i = 1;             this.ani1.play(0, false);//出错了             this.ani1.on(Laya.Event.COMPLETE, this, () =&g...

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

593. img点击事件。点击图片外,也触发了事件。请问怎么解决 [ 74%]

...reate(this,load)); function load(){ let ctn2=new Laya.Sprite(); Laya.stage.addChild(ctn2); var gq=new Laya.Sprite(); gq.loadImage("res/img/m1.jpg",100,100,100,100);   ctn2.addChild(gq); gq.on(Laya.Event.CLICK,this,Is);   }  function Is(){ console.log(1); } 2018-08-06 0 0 分享 微博 QZONE 微...

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

594. 百度小游戏 内存不断增大的情况 [ 74%]

...Open){ return; } this.isOpen=true; var testView=new TestView(); Laya.stage.addChild(testView); Laya.timer.once(200,this,this.removeUi,[testView]); } __proto.removeUi=function(ui){ if(ui!=null){ ui.destroy(); this.isOpen=false; } }  代码主要是做了重复打开关闭一个界面,调用界面...

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

595. 求助,屏幕旋转后滚动条没有跟随旋转 [ 74%]

...(638, 527); panel.vScrollBarSkin = "CommDialog/vscroll.png"; this.sp_wanfa.addChild(panel); let t = new Laya.Label(); t.width = 638; t.fontSize = 25; t.wordWrap = true; t.color = "#976A4F"; t.overflow = "scroll" t.leading = 20; t.text =WanF.xinxi; panel.addChild(t); } public static xinxi = ` 信息...

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

596. spine动画放大后,遮罩显示不正常 [ 73%]

...    let mArmature = mFactory.buildArmature(1);         parent.addChild(mArmature);         mArmature.pos(parent.x+parent.width/2, parent.y+parent.height/2);         mArmature.scale(3, 3);         mArmature.on(Laya.Event.STOPPED, this, this.completeHandler);    ...

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

597. 移动Sprite时,边缘闪烁 [ 73%]

... this.graphics.drawRect(0, 0, 90, 90, '#aabbcc', '#bbccdd', 1); Laya.stage.addChild(this); var lastTimestamp = 0; var count = 0; var totale = 0; Laya.timer.frameLoop(1, this, function test() { var deltaTime = new Date().getTime() - lastTimestamp; lastTimestamp = new Date().getTime(); count++; totale...

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

598. Laya3.0正式版spine3.8的动画资源不能正常显示 [ 73%]

...keleton = new SpineSkeleton(); this.skeleton.templet = templet; this.owner.addChild(this.skeleton); this.skeleton.pos( this.pageWidth / 2, this.pageHeight / 2 + 100); this.skeleton.scale(0.4, 0.4); this.skeleton.on(Laya.Event.STOPPED, this, this.play); this.play(); }); } private play(): void { if (+...

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

599. 场景切换造成的FPS下降的优化思路请教 [ 73%]

...化思路请教 现在不同场景都是继承的Sprite,原来是通过addChild和removeChild直接管控不同场景的显示和隐藏的,但是发现发布到手机后FPS会瞬间掉到个位数,然后再恢复到原来一样。今天想到能否使用visible直接控制显示隐藏,发现...

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

600. 用raycast选取实体,hitresult始终是false [ 73%]

...lt:", outHitResult); var lineSprite: Laya.PixelLineSprite3D = this.myScene.addChild(new Laya.PixelLineSprite3D(5)) as Laya.PixelLineSprite3D; lineSprite.addLine(ray.origin, ray.direction, Laya.Color.BLUE, Laya.Color.RED); this.lineSprite.addChild(lineSprite); if (outHitResult.succeeded) { //删除...

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