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

大约有 30 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0053 秒)

21. 通过AnimatorState为Animator添加多个播放状态islooping属性会被覆盖 [ 60%]

... /**获取动画 */ public getAni(): void { this.ani = this.owner.sprite3d.getComponent(Laya.Animator); let all = 486; let arr = ["3,21,run,true", "29,59,wolk,true", "70,120,cheer,true", "125,380,dance,true", "393,440,forerake,false", "443,485,backward,true"]; let state: Laya.AnimatorState; console....

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

22. 物理系统之FixedConstraint(JavaScript-3D基础(JS)-LayaAir3D之物理系统) [ 58%]

...的breakForce ```typescript onStart() { this.fixedConstraint = this.owner.getComponent(FixedConstraint); //设置打破约束的力的阈值 this.fixedConstraint.breakForce = 1000; } onUpdate() { if(this.fixedConstraint) { var mass = this.fixedConstraint.connectedBody.mass; this.fixedConstraint.conn...

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

23. 物理系统之FixedConstraint(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 58%]

...的breakForce ```typescript onStart() { this.fixedConstraint = this.owner.getComponent(FixedConstraint); //设置打破约束的力的阈值 this.fixedConstraint.breakForce = 1000; } onUpdate() { if(this.fixedConstraint) { var mass = this.fixedConstraint.connectedBody.mass; this.fixedConstraint.conn...

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

24. rigidBody.applyForce 物体不会移动 [ 57%]

...is.character = littleGirl; //獲取動畫組建 this.animator = littleGirl.getComponent(Laya.Animator) as Laya.Animator; this.playIdle(); this.rigidBody = this.character.getComponent(Laya.Rigidbody3D); Laya.timer.frameLoop(1, this, this.onKeyDown); //獲取照相機 var camera: Laya.Camera = littleG...

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

25. 物理系统之FixedConstraint(ActionScript-3D基础(AS3)-LayaAir3D之物理系统) [ 57%]

...ipt override public function onStart() { this.fixedConstraint = this.owner.getComponent(FixedConstraint); //设置打破约束的力的阈值 this.fixedConstraint.breakForce = 1000; } override public function onUpdate() { if(this.fixedConstraint) { var mass = this.fixedConstraint.connectedBody.mass;...

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

26. box2d 弹性异常 [ 56%]

...any, self: any, contact: any): void { let rig: Laya.RigidBody = this.owner.getComponent(Laya.RigidBody) as Laya.RigidBody; let velocity = rig.linearVelocity; console.log(velocity) } 你把初始弹射改成一个球,你就会发现,这个球,他的水平速度x 小于一定值后就变成0了...

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

27. 3D物理编辑 · LayaAir3.0文档 · LAYABOX [ 53%]

...略若干代码 */ //获取物理刚体组件 this.rigidbody1 = this.cube1.getComponent(Laya.Rigidbody3D) as Laya.Rigidbody3D; this.rigidbody2 = this.cube2.getComponent(Laya.Rigidbody3D) as Laya.Rigidbody3D; //设置rigidbody1为触发器,取消物理反馈 this.rigidbody1.isTrigger = true; this.rig...

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

28. 动画状态机详解 · LayaAir3.0文档 · LAYABOX [ 48%]

...,如图3-4所示。 (图3-4) LayaAir 3D引擎的Sprite3D类提供了 getComponent() 方法来获取模型上的组件。带动画的模型在加载创建时引擎默认赋予了Animator(动画状态机)动画组件,因此我们可以这样获取: //获得状态机 this.animator = this....

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

29. 使用3D摄像机 · LayaAir3.0文档 · LAYABOX [ 44%]

...每帧更新时执行,尽量不要在这里写大循环逻辑或者使用getComponent方法 * 此方法为虚方法,使用时重写覆盖即可 */ onUpdate(): void { if (!this.target || !this.camera) return; this.target.transform.position.vsub(this.curpos, this.delatpos); this.camera.transform.p...

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

30. 插件开发说明 · LayaAir3.0文档 · LAYABOX [ 43%]

...修改组件属性,场景里的对象会自动同步,无需手动 node.getComponent("MeshRenderer").props.enabled = false; 2、调用节点/组件的一个方法,并返回值。例如: //下面是UI进程代码 //获取选中的节点 let node = Editor.scene.getSelection()[0]; //调用MyScri...

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