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

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

481. 3D物理系统 · LayaAir3.3 · 引擎文档 · LAYABOX [ 22%]

...例 */ export default class TSDemo extends Laya.Script3D { constructor() { super(); } } 2D脚本与3D脚本不要混用,如果是用IDE创建的脚本模板,需要将继承的2D脚本类(Laya.Script)改为3D脚本类(Laya.Script3D), 添加物理脚本 只有为节点添加了我们自...

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

482. 开放数据域组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 21%]

...ipt extends Laya.Script { //declare owner : Laya.Sprite3D; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { let opendata = new Laya.OpenDataContextView(); Laya.stage.addChild(opendata); opendata....

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

483. 使用3D摄像机 · LayaAir3.3 · 引擎文档 · LAYABOX [ 20%]

...blic curpos: Laya.Vector3; private delatpos: Laya.Vector3; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 * 此方法为虚方法,使用时重写覆盖即可 */ onAwake(): void { this.curpos = new Laya.Vector3();...

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

484. 一篇上手LayaAir的3D物理引擎(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 20%]

...例 */ export default class TSDemo extends Laya.Script3D { constructor() { super(); } } ``` > 2D脚本与3D脚本不要混用,如果是用IDE创建的脚本模板,需要将继承的2D脚本类(Laya.Script)改为3D脚本类(Laya.Script3D), ###### 添加物理脚本 只有为节点添加...

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

485. laya.ui.Dialog_API3.0 [ 20%]

... laya.utils.Handler.create(this, loadComplete));//加载资源 (function (_super) {//新建一个类Dialog_Instance继承自laya.ui.Dialog。 function Dialog_Instance() { Dialog_Instance.__super.call(this);//初始化父类 var bg = new laya.ui.Image("resource/ui/bg.png");//新建一个 Image 类的...

来源: Laya3.0_api 发布时间: 20231115

486. 实体组件系统 · LayaAir3.3 · 引擎文档 · LAYABOX [ 20%]

...gClass() export default class Bullet extends Laya.Script { constructor() { super(); } onEnable(): void { //设置初始速度 let rig: Laya.RigidBody = this.owner.getComponent(Laya.RigidBody); rig.setVelocity({ x: 0, y: -10 }); } onTriggerEnter(other: any, self: any, contact: any): void { //如果...

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

487. laya.ui.List_API3.0 [ 20%]

...属性值。 label.size(100, 20); addChild(label); } } example (function (_super){ function Item(){ Item.__super.call(this);//初始化父类 this.graphics.drawRect(0, 0, 100, 20, "#ff0000"); var label = new laya.ui.Label();//创建一个 Label 类的实例对象 label 。 label.text = "100000";//...

来源: Laya3.0_api 发布时间: 20231115

488. 时间轴动画 · LayaAir3.3 · 引擎文档 · LAYABOX [ 19%]

...ipt extends Laya.Script { //declare owner : Laya.Sprite3D; constructor() { super(); } event1(p1:any, p2:any): void { console.log("event1",p1,p2); } } 在脚本中创建event1的方法和接收两个参数,最后我们来运行动画,看看运行结果: (图9-4) Copyright ©Layabox 2025 all...

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

489. 3D粒子 · LayaAir3.3 · 引擎文档 · LAYABOX [ 19%]

...enParticleSystem: Array<ShurikenParticleSystem>= []; constructor() { super(); } //通过传入粒子特效的路径,创建一个粒子特效,从对象池里拿一个 static Create(path: string): Particle3D { var ret:Particle3D = Pool.getInstance().getItemByClass("Particle3D@" + path, Parti...

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

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

...enParticleSystem: Array<ShurikenParticleSystem>= []; constructor() { super(); } //通过传入粒子特效的路径,创建一个粒子特效,从对象池里拿一个 static Create(path: string): Particle3D { var ret:Particle3D = Pool.getInstance().getItemByClass("Particle3D@" + path, Parti...

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