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

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

1. 内置骨骼动画 · LayaAir3.3 · 引擎文档 · LAYABOX [ 100%]

...en((templet: Laya.Templet) => { //创建模式为1,可以启用换装 this.mArmature = templet.buildArmature(0); this.mArmature.x = 300; this.mArmature.y = 350; this.mArmature.scale(0.5, 0.5); this.owner.addChild(this.mArmature); //设置动画播放完成后,调用completeHandler继续播放...

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

2. Spine渲染器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 88%]

...der.SPINE).then(() => { // 添加Spine渲染器组件到精灵节点上 this.spine = this.owner.addComponent(Laya.Spine2DRenderNode); this.spine.source = "girl2/mix-and-match-pro.json"; // 设置Spine动画数据源 this.spine.skinName = "full-skins/girl"; // 设置皮肤名称 this.spine.play("i...

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

3. 动画状态机 · LayaAir3.3 · 引擎文档 · LAYABOX [ 84%]

...index: number, playstate: Laya.AnimatorState | Laya.AnimatorState2D) { ... this.model = animator.owner as Laya.Sprite3D;//得到Cube节点 } ... /** * 动画状态退出时执行。 */ onStateExit(): void { console.log("动画退出了"); //平移操作 let position = new Vector3(1, 1, 1); this.mode...

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

4. 3D粒子 · LayaAir3.3 · 引擎文档 · LAYABOX [ 84%]

... ret; } //粒子特效初始化 private Init(file_path:string): void { if (this._isInited) { return; } this._filePath = file_path; console.log("Particle3D"); //从拿到的粒子系统克隆一个 var res = Laya.loader.getRes(file_path); var particle = res.clone(); this._particle = particle; //获...

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

5. 3D粒子编辑模块 · LayaAir3文档 · LAYABOX [ 84%]

... ret; } //粒子特效初始化 private Init(file_path:string): void { if (this._isInited) { return; } this._filePath = file_path; console.log("Particle3D"); //从拿到的粒子系统克隆一个 var res = Laya.loader.getRes(file_path); var particle = res.clone(); this._particle = particle; //获...

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

6. 模型与动画的导入使用 · LayaAir3.3 · 引擎文档 · LAYABOX [ 81%]

...("girl/girl.lh").then(res => { let girl : Laya.Sprite3D = res.create(); this.scene3D.addChild(girl); //获得Animator this._animator = girl.getComponent<Laya.Animator>(Laya.Animator); }); this.on( Laya.Event.MOUSE_DOWN, this, this.switchAni ); } switchAni(): void { if (this._isRun) { //播...

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

7. WebXR · LayaAir3.3 · 引擎文档 · LAYABOX [ 81%]

...览器是否支持VR模式,有三种模式immersive-vr\immersive-ar\inline this.changeActionButton.visible = await WebXRExperienceHelper.supportXR("immersive-vr"); immersive-vr就是VR模式的参数,如果是AR模式,参数换成immersive-ar即可。本篇文档只介绍VR模式。 如果检测...

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

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

...代码如下: 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

9. 使用3D UI · LayaAir3.3 · 引擎文档 · LAYABOX [ 77%]

...@regClass() export class BloodBar extends BloodBarBase { onAwake(): void { this.bar.value = 1; this.value.visible = false; Laya.stage.on(Laya.Event.CLICK, this, this.onHurt); } onHurt(): void { this.bar.value = this.bar.value - 0.9; this.value.y = 35; this.value.visible = true; Main.instance.animato...

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

10. 音频 · LayaAir3.3 · 引擎文档 · LAYABOX [ 72%]

...去舞台焦点(切出游戏)的处理 Laya.stage.on(Laya.Event.BLUR, this, () => { _sound.stop(); }); //获得舞台焦点(切回游戏)的处理 Laya.stage.on(Laya.Event.FOCUS, this, () => { _sound.play(0); }); …… Copyright ©Layabox 2025 all right reserved,powered by LayaAir E...

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