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

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

81. 垂直滚动条组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 44%]

...ar.png", "atlas/comp/vscroll$down.png", "atlas/comp/vscroll$up.png"); Laya.loader.load(skins).then(() => { // 创建滚动条 var vs: Laya.VScrollBar = new Laya.VScrollBar(); vs.skin = "atlas/comp/vscroll.png"; vs.height = 300; vs.pos(300, 300); vs.min = 0; vs.max = 100; vs.changeHandler = new La...

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

82. 字体切片组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 43%]

...组件均已创建完毕,此方法只执行一次 onAwake(): void { Laya.loader.load([this.TestClipNum, this.TestFontClip, this._ClipNum, this._FontClip, this._ClipNum1]).then( ()=>{ this.ShowContent(); } ); } private ShowContent(): void { var clipnum: Laya.FontClip = new Laya.FontClip(this._Cl...

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

83. 3D基础显示对象 · LayaAir3.4 · 引擎文档 · LAYABOX [ 43%]

...预加载纹理资源 let resource: string = "resources/layabox.png"; Laya.loader.load(resource).then(() => { //为材质加载纹理 let tex = Laya.Loader.getTexture2D(resource); //设置贴图 boxMaterial.albedoTexture = tex; }); boxRender.sharedMaterial = boxMaterial; 运行时效果如下: ...

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

84. 多线程Worker · LayaAir3.4 · 引擎文档 · LAYABOX [ 42%]

....init(600,400,Laya.WebGL); //设置Laya提供的worker.js路径 Laya.WorkerLoader.workerPath = "libs/worker.js"; //开启worker线程 Laya.WorkerLoader.enable = true; //加载引擎需要的资源 Laya.loader.load("../atlas/comp.atlas",Laya.Handler.create(this,this.onLoaded)); } private onLoaded():v...

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

85. 示例打地鼠发布打包后提示TypeError: this.preinitialize is not a function [ 41%]

...ackground looper Looper (main, tid 1) {4a7bba70} I/chromium: [INFO:library_loader_hooks.cc(112)] Chromium logging enabled: level = 0, default verbosity = 0 I/BrowserProcessMain: Initializing chromium process, renderers=0 W/chromium: [WARNING:proxy_service.cc(888)] PAC support disabled because there ...

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

86. 自动图集配置 · LayaAir3.4 · 引擎文档 · LAYABOX [ 41%]

...在构建发布配置项里手动添加为始终包含的资源目录 Laya.loader.load("resources/aaa/test.atlas").then(() => {//更多资源加载方式,可查看《资源加载》文档 this.owner.skin = "resources/aaa/image.png"; //将图集路径+名称视为小图的资源目录,小图...

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

87. 3D场景环境设置 · LayaAir3.4 · 引擎文档 · LAYABOX [ 40%]

....create(null, function (res:any){ Laya.stage.addChild(res); })); //用Laya.loader的方式加载,加载后根节点是Scene2D Laya.loader.load('scene/Game.ls', Laya.Handler.create(this, this.onLoaded), Laya.Handler.create(this, this.onLoading)).then( (res)=>{ let scene = res.create(); //scene.s...

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

88. 输入文本组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 40%]

... "resources/res/ui/input (3).png", "resources/res/ui/input (4).png"]; Laya.loader.load(this.skins).then( ()=>{ this.onLoadComplete(); } ); } private onLoadComplete(): void { for (var i: number = 0; i < this.skins.length; ++i) { var input: Laya.TextInput = this.createInput(this.skins[i]); input...

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

89. 单选框组容器组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 39%]

...res/ui/radioButton (2).png", "resources/res/ui/radioButton (3).png"]; Laya.loader.load(this.skins).then(() => { this.onLoadComplete(); }); } private onLoadComplete(e: any = null): void { for (let i: number = 0; i < this.skins.length; ++i) { let rg: Laya.RadioGroup = this.createRadioGroup(this....

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

90. 按钮组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 38%]

...G * (this.skins.length / this.COLUMNS - 1) - this.BUTTON_HEIGHT) / 2; Laya.loader.load(this.skins).then(() => { this.onUIAssetsLoaded(); }); } private onUIAssetsLoaded(e: any = null): void { for (var i: number = 0, len: number = this.skins.length; i < len; ++i) { var btn: Laya.Button = this.cr...

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