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

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

41. 动画节点 · LayaAir3.3 · 引擎文档 · LAYABOX [ 74%]

...= Laya; @regClass() export class Animation extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Animation }) //在IDE面板中显示属性 ani: Laya.Animation; constructor() { super(); } //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法...

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

42. 显示文本组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 74%]

...aya; @regClass() export class LabelControl extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type : Laya.Label } ) public lab: Laya.Label; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake...

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

43. 摄像机的viewportPointToRay报错 [ 74%]

...a); PanelMgr.mainCamera.viewportPointToRay(this.pointRay, this.ray); (this.owner as Laya.Scene3D).physicsSimulation.rayCast(this.ray,this.hitresult); console.log(Laya.MouseManager.instance.mouseX + " -=----------" + Laya.MouseManager.instance.mouseY); if (this.hitresult.succeeded) { console.log(this...

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

44. 向stage下的scene里添加物体时报错 [ 74%]

...QZONE 微信 时光123 赞同来自: 使用Laya.stage.addchild. 或。this.owner.addChild 一样的错 2022-08-09 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定, 无法添加新回复 发起人 时光123 相关问题 缓动Tween能用在3D物...

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

45. 如何对3D精灵进行鼠标检测(JavaScript-3D基础(JS)-LayaAir3D之鼠标交互) [ 73%]

...到的物体 this.text.text = "碰撞到了" + this.outHitResult.collider.owner.name ; console.log("碰撞到物体!!") } } ``` ![](img/2.gif)(图2)

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

46. 如何对3D精灵进行鼠标检测(TypeScript-3D基础(TS)-LayaAir3D之鼠标交互) [ 73%]

...到的物体 this.text.text = "碰撞到了" + this.outHitResult.collider.owner.name ; console.log("碰撞到物体!!") } } ``` ![](img/2.gif)(图2)

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

47. Sprite3D添加组件或脚本(TypeScript-3D基础(TS)-LayaAir3D之精灵) [ 73%]

...log("onAwake"); } onStart() { console.log("onStart"); } onUpdate() { (this.owner as Laya.Sprite3D).transform.rotate(this.rotation, false); } onLateUpdate() { console.log("onLateUpdate"); } } ``` 这样脚本就添加完成了,我们可以看下运行之后的效果: ![](img/2.gif)(图2)

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

48. 2D光遮挡器与阴影 · LayaAir3.3 · 引擎文档 · LAYABOX [ 73%]

...器 createLightOccluder(): void { this.lightOccluder.pos(233, 265); this.owner.addChild(this.lightOccluder); let lightOccluderComponent = this.lightOccluder.addComponent(Laya.LightOccluder2D); lightOccluderComponent.canInLight = true; lightOccluderComponent.outside = true; let poly: Laya.PolygonPoin...

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

49. Uncaught 无法实例class PhysicsCollider extends PhysicsTriggerComponent [ 73%]

...s = bt.btCollisionObject_getCollisionFlags(btColObj);         if (this.owner.isStatic) {             if ((flags & PhysicsComponent.COLLISIONFLAGS_KINEMATIC_OBJECT) > 0)                 flags = flags ^ PhysicsComponent.COLLISIONFLAGS_KINEMATIC_OBJECT;             flags ...

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

50. 如何通过代码控制prefab上面的时间轴动画animation? [ 72%]

...作。 ... ani_show:Laya.FrameAnimation; onAwake(){ this.ani_show = this.owner["play"] as Laya.FrameAnimation; // 在onAwake中添加播放完成事件,基于某些原因,可能在onDisable的时候被移除,如果发现异常,可以选择在onEnable里面添加事件 this.ani_show.on(Laya.E...

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