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

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

131. Cannot read property 'rayCast' of undefined [ 74%]

...ene extends Laya.Script { constructor(){ super(); this.rotation = new Laya.Vector3(0, 0.01, 0); this.point = new Laya.Vector2(); this.ray = new Laya.Ray(new Laya.Vector3(),new Laya.Vector3()); //1.开启第四个参数 let config3D = new Laya.Config3D(); config3D.isAlpha = true; Laya3D.init(0, 0, co...

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

132. SpotLight介绍(TypeScript-3D基础(TS)-LayaAir3D之灯光) [ 74%]

...t()) as Laya.SpotLight; //设置聚光灯颜色 spotLight.color = new Laya.Vector3(1, 1, 0); //设置聚光灯位置 spotLight.transform.position = new Laya.Vector3(0.0, 1.2, 0.0); //设置聚光灯方向 var mat = spotLight.transform.worldMatrix; mat.setForward(new Laya.Vector3(0.15, -1.0, 0.0)); s...

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

133. 物理碰撞脚本和触发器脚本(ActionScript-3D基础(AS3)-LayaAir3D之物理系统) [ 74%]

...te3D).meshRenderer.sharedMaterial as BlinnPhongMaterial).albedoColor = new Vector4(0.0, 1.0, 0.0, 1.0); } /** * 当其他碰撞器进入绑定物体碰撞器后逐帧触发(子弹在物品内时) * 注:如相对移动速度过快,可能直接越过 */ override public function onTriggerStay(o...

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

134. 如何修改场景的全局光照 [ 74%]

...要修改场景中所有精灵材质的反射率颜色为 albedo = new  Vector4(0.0,0.0,0.0,1.0);  方法二:可以给场景中添加方向光,把方向光的环境光颜色ambientColor = new Vector3(0.0, 0.0, 0.0); 2017-06-14 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被...

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

135. laya.d3.core.light.LightSprite [ 74%]

...chy : Boolean[read-only] 获取在场景中是否激活。 Node  color : Vector3 灯光颜色。 LightSprite destroyed : Boolean = false[只读]是否已经销毁。对象销毁后不能再使用。Node  diffuseColor : Vector3 获取灯光的漫反射颜色。 LightSprite displayedInStage : Bo...

来源: Laya2.0_api 发布时间: 20190513

136. SpotLight介绍(JavaScript-3D基础(JS)-LayaAir3D之灯光) [ 74%]

...Laya.SpotLight()); //设置聚光灯颜色 this.spotLight.color = new Laya.Vector3(1, 1, 0); //设置聚光灯位置 this.spotLight.transform.position = new Laya.Vector3(0.0, 1.2, 0.0); //设置聚光灯方向 var mat = this.spotLight.transform.worldMatrix; mat.setForward(new Laya.Vector3(0.15, -1.0...

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

137. SpotLight介绍(ActionScript-3D基础(AS3)-LayaAir3D之灯光) [ 74%]

...w SpotLight()) as SpotLight; //设置聚光灯颜色 spotLight.color = new Vector3(1, 1, 0); //设置聚光灯位置 spotLight.transform.position = new Vector3(0.0, 1.2, 0.0); //设置聚光灯的方向 var mat:Matrix4x4 = spotLight.transform.worldMatrix; mat.setForward(new Vector3(0.15, -1.0, 0.0))...

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

138. laya3d物体碰撞与触发检测的问题 [ 74%]

...dChild(new Laya.Camera(0, 0.1, 100))); camera.transform.translate(new Laya.Vector3(0, 3, 3)); camera.transform.rotate(new Laya.Vector3(-30, 0, 0), true, false); camera.clearColor = null; //添加方向光 var directionLight = scene.addChild(new Laya.DirectionLight()); directionLight.color = new Laya...

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

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

...试着改一改就OK啦。。import Transform3D = Laya.Transform3D; import Vector3 = laya.d3.math.Vector3; import Quaternion = laya.d3.math.Quaternion; /* 用法: //初始化照相机 var camera = this.newScene.addChild(new Laya.Camera(0, 0.1, 100)) as Laya.Camera; camera.transform.rotationEuler =...

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

140. 官方技术文档中的问题 [ 74%]

...dChild(new Laya.Camera(0, 0.1, 100))); camera.transform.translate(new Laya.Vector3(0, 3, 3)); camera.transform.rotate(new Laya.Vector3(-30, 0, 0), true, false); camera.clearColor = null;  //添加方向光 var directionLight = scene.addChild(new Laya.DirectionLight()); directionLight.color = new La...

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