大约有 344 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0038 秒)
...怎么控制动画的播放呢? LayaAir 3D引擎的Sprite3D类提供了 `getComponent()` 方法来获取模型上的组件。带动画的模型在加载创建时引擎默认赋予了Animator动画组件,因此我们可以获取它,参考以下代码。 ```typescript //获取角色动画组件 ...
来源: Laya2.0_文档 发布时间: 20210715
...Prafab加了.SphereCollider 和rigidbody,但是在laya里我只能获取到getComponent(Laya.Rigidbody3D);而getComponent(Laya.SphereColliderShape)却是空值。咋回事呢 2020-12-17 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接...
来源: Laya_社区 发布时间: 20201217
...on(Event.MOUSE_OUT, this, this.mouseUp); // let rigidbody = this.curTarget.getComponent(RigidBody); // rigidbody.type = "kinematic"; } mouseMove(e) { let movementX = e.nativeEvent.movementX; let movementY = e.nativeEvent.movementY; this.preMovementX = movementX; this.preMovementY = movementY; this.c...
来源: Laya2.0_示例 发布时间: 20251130
...scale TS项目使用matter.js库无智能提示 使用3D时候,Property 'getComponentByType' does not exist on type 'Node'. 微信小游戏:HTMLDivElement的使用 LayaAirIDE下如何使用mask? 微信小游戏如何使用ttf字体? 请问2.0的版本开始,我用ts编写的相关内容,...
来源: Laya_社区 发布时间: 20181125
...:PhysicsCollider = this.basketballCourt.getChildByName("BasketballCourt1").getComponent(PhysicsCollider); collision.restitution = 0.1; this.ball = this.scene3D.getChildByName("Ball") as Sprite3D; this.ball.addComponent(BallScript2) BallScript2 onAwake this.ball = this.owner as Sprite3D; thi...
来源: Laya_社区 发布时间: 20200512
...Children event frameLoop frameOnce getChildAt getChildByName getChildIndex getComponent getComponents hasHideFlag hasListener isAncestorOf off offAll offAllCaller on onAfterDeserialize onAwake onDestroy onDisable onEnable once removeChild removeChildAt removeChildByName removeChildren removeSelf rep...
来源: Laya3.0_api 发布时间: 20231115
...每帧更新时执行,尽量不要在这里写大循环逻辑或者使用getComponent方法 onLateUpdate 每帧更新时执行,在onUpdate之后执行,尽量不要在这里写大循环逻辑或者使用getComponent方法 onPreRender 渲染之前执行 onPostRender 渲染之后执行 onDisable ...
来源: Laya3.0_文档 发布时间: 20251010
...here(new Laya.Vector3(0, 3, 0),1); let boxARigid = this.boxA.getComponent(Laya.Rigidbody3D); let boxB = this.addRigidBodyBox(new Laya.Vector3(0, 1, 0),1); let boxBRigid = boxB.getComponent(Laya.Rigidbody3D); let configurableConstraint = th...
来源: Laya_社区 发布时间: 20210103
...Children event frameLoop frameOnce getChildAt getChildByName getChildIndex getComponent getComponents hasHideFlag hasListener isAncestorOf off offAll offAllCaller on onAfterDeserialize onAwake onDestroy onDisable onEnable once removeChild removeChildAt removeChildByName removeChildren removeSelf rep...
来源: Laya3.0_api 发布时间: 20231115
...this.spriteLight.pos(100,350); let spritelightComponent = this.spriteLight.getComponent(Laya.SpriteLight2D); spritelightComponent.color = new Laya.Color(1, 1, 1); spritelightComponent.intensity = 0.5; let tex = Laya.loader.getRes("resources/spritelight.png"); spritelightComponent.spriteTexture = tex...
来源: Laya3.0_文档 发布时间: 20251010