大约有 154 项符合查询结果, 库内数据总量为 30,786 项。 (搜索耗时: 0.0033 秒)
...记 camera.clearFlag = Laya.BaseCamera.CLEARFLAG_SKY; //添加光照 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, 0)); })); ``` 查看加载后的效果(图1)。 !...
来源: Laya2.0_文档 发布时间: 20210715
多重材质的问题 物件贴上多重材质,打开光照阴影(directionLight.shadowMode = Laya.ShadowMode.SoftLow;),模型渲染会出错,模型的点会飞。 不打开阴影如下图: 打开阴影入下图 附件 : --> demo.zip 2020-12-30 添加评论 免费帖 --> 分享 微...
来源: Laya_社区 发布时间: 20201230
...a.BaseCamera.CLEARFLAG_SOLIDCOLOR; //方向光 let directionLight = this.scene.addChild(new Laya.DirectionLight()); directionLight.color = new Laya.Vector3(0.6, 0.6, 0.6); let mat = directionLight.transform.worldMatrix; mat.setForward(new L...
来源: Laya_社区 发布时间: 20201127
Laya2.3.0 阴影BUG Laya2.3.0 阴影有如下几个问题 1.DirectionLight先设置shadow=true,再添加到场景,阴影不会出现,如下。反之是可以出现阴影的。(目前仅限2.3.0) //灯光开启阴影 directionLight.shadow = true this.addChild(directionLight)2.可产生...
来源: Laya_社区 发布时间: 20191129
... 0, 0), true, false); this.camera.clearColor = null; //添加方向光 var directionLight: Laya.DirectionLight = this.scene.addChild(new Laya.DirectionLight()) as Laya.DirectionLight; directionLight.color = new Laya.Vector3(0.6, 0.6, 0.6); directionLight.direction = new Laya.Vector3(1, -1, 0); //添...
来源: Laya_社区 发布时间: 20180307
...rmalizedViewport = new Viewport(0.5, 0.0, 0.5, 0.5); //添加平行光 var directionLight:DirectionLight = scene.addChild(new DirectionLight()) as DirectionLight; //加载模型 Sprite3D.load("res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh", Handler.create(null, function(sp:Sprite3D):void { //将...
来源: Laya2.0_文档 发布时间: 20210715
...的demo地址: 灯光方面的设置: ```typescript // Use soft shadow. directionLight.shadowMode = Laya.ShadowMode.SoftLow; // Set shadow max distance from camera. directionLight.shadowDistance = 3; // Set shadow resolution. directionLight.shadowResolution = 1024; // Set shadow cascade mode. dire...
来源: Laya2.0_文档 发布时间: 20210715
...ue; camera.orthographicVerticalSize = 15; this.mainCamera = camera; // var directionLight = scene.addChild(new Laya.DirectionLight()); // directionLight.color = new Laya.Vector3(0.7, 0.6, 0.6); // directionLight.direction = new Laya.Vector3(0, -1.0, -1.0); scene.ambientColor = new Laya.Vector3(0.0, ...
来源: Laya_社区 发布时间: 20180126
...的demo地址: 灯光方面的设置: ```typescript // Use soft shadow. directionLight.shadowMode = Laya.ShadowMode.SoftLow; // Set shadow max distance from camera. directionLight.shadowDistance = 3; // Set shadow resolution. directionLight.shadowResolution = 1024; // Set shadow cascade mode. dire...
来源: Laya2.0_文档 发布时间: 20210715
...ector3(-15, 0, 0), true, false); camera.clearColor = null; //方向光 var directionLight = scene.addChild(new Laya.DirectionLight()); directionLight.color = new Laya.Vector3(0.6, 0.6, 0.4); directionLight.direction = new Laya.Vector3(1, -1, -1); Laya.Stat.show(0,30) var box = scene.addChild(new Lay...
来源: Laya_社区 发布时间: 20180104