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

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

691. 循环监听按钮,如何进行传参和接受参数 [ 71%]

... console.log('onClickLevel > ' + b.skin); this.removeSelf(); Laya.stage.addChild(new GameMainView());      } 我要怎么从点击的时候传参,然后在点击后的舞台上接受参数进行操作呢 2019-08-02 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结...

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

692. 取色器组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 71%]

...er = new Laya.Handler(this, this.onChangeColor, [colorPicker]); this.owner.addChild(colorPicker); this.onChangeColor(colorPicker); } private onChangeColor(colorPicker: Laya.ColorPicker, e: any = null): void { console.log(colorPicker.selectedColor); } } 运行效果如下动图所示: (动图2-1...

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

693. 舞台上有个label,我能通过截图保存成图片么 [ 71%]

....fontSize=60; label.text="666"; label.bold=true; label.color="#000000"; sp.addChild(label); sp.size(200,200); Laya.stage.addChild(sp); Laya.timer.frameLoop(60,this,function():void{ var htmlC:HTMLCanvas=sp.drawToCanvas(200,200,0,0); var texture:Texture=new Texture(htmlC); var sp2:Sprite=new Sprite();...

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

694. TypeError: Cannot set property 'material' of undefined [ 71%]

...D = Laya.Loader.getRes("Unity/Unit.lh") as Laya.MeshSprite3D; this.scene3D.addChild(this.unit3D);         this.unit3D.transform.localScale = new Laya.Vector3(1, 1, 1); this.unit3D.transform.translate(new Laya.Vector3(0, 0, 0));          var material:Laya.UnlitMaterial = Laya.Loader....

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

695. 在开启webgl模式下,每次运行texture类的getPixels方法内存都会增加 [ 71%]

...,绘制到画布 this.img.skin = this.Res //添加到舞台 Laya.stage.addChild(this.img); } private cacheCanvas: Laya.HTMLCanvas private cacheTexture: Laya.Texture init(){ let rect = this.img.getSelfBounds() this.img.pivot(Math.round(rect.width / 2), Math.round(rect.height / 2)) let bound = this....

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

696. Laya Label text不显示 [ 71%]

...omponentIntance(self.nigrop); self.nativeGroup.zOrder = 999998; Laya.stage.addChild(self.nativeGroup); self.nativeGroup.left = 0; self.nativeGroup.right = 0; self.nativeGroup.bottom = 0; })); }   Label中 "bgColor":"orange"显示出来了,但是text没有显示出来,辛苦看一下是什么...

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

697. List修改datasource数据的时候出现部分数据不能被修改 [ 71%]

...nUI.list.renderHandler = new Laya.Handler(this, this.onRender); Laya.stage.addChild(this.mainUI); }; GameMain.prototype.onRender = function (cell, index) { if(index <0 || index >= dataSource.length) return; var data = dataSource[index]; var chBox = cell.getChildByName('chBox'); var img = cell....

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

698. 绘制图形的BUG [ 71%]

...ff00"); _shape=new Sprite(); _shape.graphics.drawCircle(0,0,20,"#ff0000"); addChild(_shape); //加上这句正常,反之则异常 //_shape.cacheAsBitmap=true; pos(300,300); Tween.to(this,{rotation:360},3000); } override public function get width():Number{ return _shape.width; } override public fun...

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

699. Spine适配版(JavaScript-LayaAir基础篇(JS)-动画基础) [ 71%]

...omplete(): void { this.skeleton = this.templet.buildArmature(); Laya.stage.addChild(this.skeleton); this.skeleton.pos(Browser.width / 2, Browser.height / 2 + 100); this.skeleton.scale(0.5, 0.5); this.skeleton.on(Event.STOPPED, this, this.play) this.play(); } private onError(): void{ console.log("par...

来源: Laya2.0_文档 发布时间: 20210715

700. [LayaAirIDE3]skel骨骼动画播放失败,编辑器预览没问题 [ 71%]

...his.skeleton["_renderType"] !== undefined) {         this.spr_xiaoshan.addChild(this.skeleton);         this.skeleton.pos(0, 0);         this.skeleton.scale(0.3, 0.3);         this.skeleton.play(0, true);     } else {         console.warn("无效的 skeleton, 跳过添加:", te...

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