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

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

31. laya.utils.ClassUtils [ 70%]

...me":"item1", "scale":[2,2] }, "child":[ { "type":"Text", "props":{ "text":"this is a test", "var":"label", "rumtime":"" } } ] } ClassUtils  getClass(className:String):*[static] 根据名字返回类对象。 ClassUtils  getInstance(className:String):*[static] 根据名称创建 Class 实例。 C...

来源: Laya2.0_api 发布时间: 20190513

32. 使用二进制图片 · LayaAir3.0文档 · LAYABOX [ 69%]

...", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = function (e) { window.URL.revokeObjectURL(img.src); // 清除释放; }; img.src = window...

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

33. zip更新 · LayaAir3.3 · 引擎文档 · LAYABOX [ 68%]

...h(async entry => { if (entry.entryName == 'head.json') { } else { await this.addObject(entry.entryName, entry.getData()) } }) //写head。zip中可能没有head.json,例如只是某个目录,这时候就不要更新root了 try { let buf = zip.getEntry('head.json'); await this._frw.write('head...

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

34. 使用3D精灵 · LayaAir3.3 · 引擎文档 · LAYABOX [ 68%]

... 节点对象。 */ getChildByName(name: string): Node { for (let child of this._children) { if (child && child.name === name) return child; } return null; } 当我们找到子节点时,也可以对节点做一些基础操作,比如删除掉自己方法 removeSelf() /** * 从父容器删...

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

35. 位图切片组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 68%]

...和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.clip.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); // 位置 this.clip.skin = "atlas/comp/clip_num.png"; // 皮肤 this.clip.interval = 1000; // 切片动画的播放时间间隔1000毫秒 this.clip.clipX...

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

36. ViewStack属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 68%]

...ed回调方法 Laya.loader.load("res/atlas/comp.atlas",Laya.Handler.create(this,this.onLoaded)); } private onLoaded():void{ //创建一个UI实例 this.comp = new ui.ComponentDemoUI(); //添加到舞台上显示 Laya.stage.addChild(this.comp); //点击Tab选择按钮的处理 this.comp.tab.selectHan...

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

37. 输入文本组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 68%]

...组件均已创建完毕,此方法只执行一次 */ onAwake(): void { this.txtin.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置 this.txtin.size(500, 60); //大小 this.txtin.pivot(this.txtin.width/2, this.txtin.height/2); //轴心点 this.txtin.font = "宋体"; //字体 ...

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

38. 关于实例化 动画特效.efc 文件的问题 [ 67%]

...错: 具体是layaUI.max.all.js里的这一行:effect01UI.__super.call(this); TypeError: Cannot read property 'call' of undefined   请问我应该怎么实例化 effectAnimation.efc 这种模板?   2018-01-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已...

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

39. ViewStack属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 67%]

...ed回调方法 Laya.loader.load("res/atlas/comp.atlas",Laya.Handler.create(this,onLoaded)); function onLoaded(){ //创建一个UI实例 this.comp = new ui.ComponentDemoUI(); //添加到舞台上显示 Laya.stage.addChild(this.comp); //点击Tab选择按钮的处理 this.comp.tab.selectHandler = new ...

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

40. 和原生Dom交互 · LayaAir3.3 · 引擎文档 · LAYABOX [ 67%]

...代码如下: var div:any = Laya.Browser.document.createElement("div"); this.qrcode = new Laya.Browser.window.QRCode(div,{ width:100, height:100 }); var url:string = "http://layabox.com/"; this.qrcode.makeCode(url); Laya.stage.once("click",this,this.clickHandler); this.qrcodeSp = new Laya.Sprite()...

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