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

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

561. UI-Dialog [ 92%]

...L; Laya.stage.bgColor = "#232628"; Laya.loader.load(assets, Handler.create(this, this.onSkinLoadComplete)); } onSkinLoadComplete() { const Dialog = Laya.Dialog, Image = Laya.Image, Button = Laya.Button; let dialog = new Dialog(); let bg = new Image(assets[0]); dialog.addChild(bg); let button = new B...

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

562. 分享:DrawToCanvas内存释放问题! [ 92%]

...命令按钮 var btnDraw:Sprite=CreateBtn(100,400); btnDraw.on(Event.CLICK,this,onClickBtnDraw); } //创建按钮 private function CreateBtn(xx:int,yy:int):Sprite { var btn:Sprite=new Sprite(); btn.graphics.drawRect(0,0,200,50,"#FF0000"); btn.pos(100,400); var text:Text=new Text(); text.text="Draw";...

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

563. Node.prototype._activeHierarchy存在的bug或者说是onEnable和onAwake的坑 [ 92%]

... __proto._activeHierarchy=function(activeChangeScripts){         this._setBit(/*laya.Const.ACTIVE_INHIERARCHY*/0x02,true);         if (this._components){             for (var i=0,n=this._components.length;i < n;i++){                 var comp=this._comp...

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

564. 3D场景脚本继承问题 (LayaAir 2.0.0) [ 92%]

...为Laya.Scene3D ,不能得到继承类BattleScene的实例 代码如下   this.resArray= [ { url : "LayaScene_CompleteMainScene_test/Conventional/CompleteMainScene_test.ls", clas:BattleScene} ];  //预加载 Laya.loader.create ( this.resArray, Laya.Handler.create(this,this.onPreLoadComplete), Laya...

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

565. 创建动画时画布的width和height与 实例化后的ani.size(width, height) 有什么区别 [ 92%]

...40x240的动画,代码如下_proto_.onAnimation_BirdSing = function () { this.aniBirdSing = new Laya.Animation(); this.aniBirdSing.loadAtlas("res/atlas/birdsing.json"); this.aniBirdSing.interval = 35; // 设置播放间隔(单位:毫秒) this.aniBirdSing.index = 0; // 当前播放索引 this...

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

566. 关于3d项目中component的问题 [ 92%]

...nslate = new Laya.Vector3(0, 0, 0); function CmpScript() { CmpScript.super(this); this.x = 0; } Laya.class(CmpScript, "CmpScript", Laya.Script) CmpScript.prototype._initialize = function (owner) { var _this = this; CmpScript.__super.prototype._initialize.call(this, owner); } CmpScript.prototype._upd...

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

567. Laya.loader加载BUG [ 92%]

...图片的时候,源码里这一步会的url为“”的时候,会执行this.onLoaded(null)这一步_ _proto.load=function(url,type,cache,group,ignoreCache,useWorkerLoader){         (cache===void 0)&& (cache=true);         (ignoreCache===void 0)&& (ignoreCache=fals...

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

568. LoginView.super(this);这样调用的父类的构造函数的方法,不能用吗 [ 92%]

LoginView.super(this);这样调用的父类的构造函数的方法,不能用吗 LoginView.super(this);这是在教学视频里用的方法,好像不能用了。 这些layaair中特别的语法规则在哪里统一可以找到 var LoginView = function () {     LoginView.super(this);     t...

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

569. 1.7.18beta下转换3D坐标不正确 [ 92%]

....stage.screenMode = Laya.Stage.SCREEN_NONE; private animate(): void {    this._position.x = Math.sin(this.scaleDelta += 0.01);    this.layaMonkey3D.transform.position = this._position;    this.camera.viewport.project(this.layaMonkey3D.transform.position, this.camera.projectionViewMatrix, this....

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

570. 高级应用-渲染纹理 [ 92%]

.../res/threeDimen/staticModel/LayaPlane/LayaPlane.lh" ], Laya.Handler.create(this, onComplete)); function onComplete() { setMaterials(scene.getChildByName("scene")); layaPlane.transform.localPosition = new Laya.Vector3(0, 0.5, -1); Laya.loader.load(["../../res/threeDimen/ui/button.png"], Laya.Handler....

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