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

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

11. Camera.viewportToRay中origin与direction相等问题 [ 74%]

...ce.mainCamera.viewportPointToRay(this._rayPt, this._ray); let scene = this.owner.scene as Laya.Scene3D; scene.physicsSimulation.rayCast(this._ray, this._raycastHit); console.log(this._raycastHit.succeeded); if(this._raycastHit.succeeded) console.log(this._raycastHit.collider.owner.name); } GameManag...

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

12. Laya3.0 图片拼合缩放会导致两张图片之间有一条横线[已解决] [ 73%]

...ZONE 微信 biubiubiu 赞同来自: 以下是测试代码         this.owner.scene.scale(1.25, 1.25) //使用缩放后 图片拼合会多一条线 2.0中没有此问题         Laya.loader.load("http://103.219.177.59:63344/%2 ... ot%3B, Laya.Loader.TEXTURE2D).then((texture: Laya.Texture2D) =...

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

13. 开放数据域组件 · LayaAir3.0文档 · LAYABOX [ 72%]

...= Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.OpenDataContextView }) public opendata: Laya.OpenDataContextView; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此...

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

14. UI运行时 · LayaAir3.0文档 · LAYABOX [ 71%]

... RuntimeScript; onStart() { // 获得场景的Runtime对象 this.ui = this.owner.scene as RuntimeScript; // Button添加鼠标事件,让Image不显示 this.ui.Button.on( Laya.Event.MOUSE_DOWN, null, ()=>{ this.ui.Image.visible = false; }); } } ui 属性直接从脚本中通过 this.owner.scene ...

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

15. 音频节点 · LayaAir3.0文档 · LAYABOX [ 71%]

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

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

16. 射线检测报错,outHitInfo.sprite3D=null; [ 70%]

...D; private camera : Laya.Camera; private scene: Laya.Scene;  public _load(owner : any):void{ this.scene = owner; this.camera = this.scene.scene.getChildByName("Main Camera") as Laya.Camera; console.log("当前摄像机的名字是:" + this.camera.name); }  public _start(state:Laya.RenderState):v...

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

17. 2.0版本可用的CameraMoveScript.ts [ 70%]

.../ onAwake(): void {         this.camera = (<Laya.Camera>this.owner);     }          /**          * @inheritDoc          */         /*override*/ onUpdate(): void {         var elapsedTime: number = Laya.timer.delta;         if (!isNaN...

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

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

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

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

19. 事件管理 · LayaAir3.0文档 · LAYABOX [ 69%]

...如下代码: onAwake(): void { //侦听自定义的事件"Click" this.owner.on("Click",this,()=>{ console.log("侦听到自定义的“Click”事件"); }) } //鼠标点击后执行,发送Click事件。 onMouseClick(evt: Laya.Event): void { //自定义的事件 this.owner.event("Click"); } ...

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

20. 给3D场景scene添加鼠标事件无效 [ 68%]

...e。结果是无反应。 4、绑定鼠标事件之前,是使用 scene = owner.scene 获取到当前scene对象的。并且该scene对象不为空。   如下图:   原本目标是希望在3D场景上覆盖一层2D Sprite,这些2D Sprite是需要拖拉和划屏操作的,同时又需要对 ...

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