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

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

81. 微信小游戏运行导出项目的时候报错:Scene: the .lh file root type must be Scene [ 36%]

...etChildByName("Main Camera") as Laya.Camera; camera.addComponent(CameraMoveScript); var tiger:Laya.Sprite3D = this._scene.getChildByName("tiger_idle") as Laya.Sprite3D; console.log(tiger); var animator:Laya.Animator = tiger.getComponentByIndex(0) as Laya.Animator; animator.play(&...

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

82. 自定义shader-地形shader [ 35%]

...sform.translate(new Laya.Vector3(-5, 20, -30), false); camera.addComponent(CameraMoveScript); scene.once(Laya.Event.HIERARCHY_LOADED, this, function () { setCustomMaterial(scene.getChildAt(2)); }); function setCustomMaterial(spirit3D) { if (spirit3D instanceof Laya.MeshSprite3D) { var meshSprite3D =...

来源: Laya_示例 发布时间: 20241001

83. 3D中摄像机绕物体旋转该如何实现? [ 35%]

...,物体位置创建一个名为cameraroot 的sprit3D,给它添加一个cameraMoveScript脚本组件,然后​cameraroot.addchild创建一个摄像机,设置好摄像机的默认位置角度使其朝向物体就行了 2017-07-14 1 1 分享 微博 QZONE 微信 183*****755 赞同来自: 需要...

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

84. 使用3D精灵 · LayaAir3.0文档 · LAYABOX [ 32%]

...代码为: const { regClass, property } = Laya; @regClass() export class CameraMoveScript extends Laya.Script3D { /** @private */ protected _tempVector3: Laya.Vector3 = new Laya.Vector3(); protected lastMouseX: number = 0; protected lastMouseY: number = 0; protected yawPitchRoll: Laya.Vector3 = ne...

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

85. 资源加载(JavaScript-3D基础(JS)-LayaAir3D之资源加载) [ 32%]

... 0), false, false); //相机视角控制组件(脚本) camera.addComponent(CameraMoveScript); //添加光照 var directionLight = _scene.addChild(new Laya.DirectionLight()); //光照颜色 directionLight.color = new Laya.Vector3(1, 1, 1); directionLight.transform.rotate(new Laya.Vector3(-3.14 / 3, 0...

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

86. 资源加载(TypeScript-3D基础(TS)-LayaAir3D之资源加载) [ 32%]

... 0), false, false); //相机视角控制组件(脚本) camera.addComponent(CameraMoveScript); //添加光照 var directionLight = _scene.addChild(new Laya.DirectionLight()); //光照颜色 directionLight.color = new Laya.Vector3(1, 1, 1); directionLight.transform.rotate(new Laya.Vector3(-3.14 / 3, 0...

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

87. 资源加载(ActionScript-3D基础(AS3)-LayaAir3D之资源加载) [ 31%]

... 0), false, false); //相机视角控制组件(脚本) camera.addComponent(CameraMoveScript); //添加光照 var directionLight:DirectionLight = _scene.addChild(new DirectionLight()) as DirectionLight; //光照颜色 directionLight.color = new Vector3(1, 1, 1); directionLight.transform.rotate(new Ve...

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

88. LayaAir3D 坐标系统与矩阵变换 [ 27%]

...ransform.rotate(new Vector3( -45, 0, 0), true, false); camera.addComponent(CameraMoveScript); //生成平面,其实是一个box,只不过高度很小,可看成一个平面 var plane:MeshSprite3D = scene.addChild(new MeshSprite3D(new BoxMesh(4,4,0.001))) as MeshSprite3D; var material:StandardMa...

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

89. 官方案例里摄像机绕物体旋转脚本的问题 [ 26%]

官方案例里摄像机绕物体旋转脚本的问题 官方案例里的CameraMoveScripts在2.0版本下有很多接口,属性不存在。比如this.camera.moveForward、 super._initialize(owner)、super._update(state)等,放在1.7版本里是有的。是不是LayaAir.d.ts有修改。现在有...

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

90. 3D寻路 · LayaAir3.0文档 · LAYABOX [ 18%]

...era.transform.rotate(this._rotation, true, false); moveCamera.addComponent(CameraMoveScript); //设置鼠标弹起事件响应 Laya.stage.on(Event.MOUSE_UP, this, function (): void { this.index = 0; //获取每次生成路径 this.getGridIndex(this.path[this.curPathIndex % this.pointCount].x, this.p...

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