最近受到打击了,3d效果远比2d效果好。
问题 laya3d 有正交相机没有?
Laya.Sprite3D.load(XX.lh); 克隆Laya.Sprite3D.instantiate
Laya.Mesh.load(XXX.lm);
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);
var pointLight = scene.addChild(new Laya.PointLight());
pointLight.color = new Laya.Vector3(0.1189446, 0.5907708, 0.7352941);
pointLight.transform.position = new Laya.Vector3(0.4, 0.4, 0.0);
pointLight.attenuation = new Laya.Vector3(0.0, 0.0, 3.0);
pointLight.range = 3.0;
//聚光灯
var spotLight = scene.addChild(new Laya.SpotLight());
spotLight.color = new Laya.Vector3(1, 1, 0);
spotLight.transform.position = new Laya.Vector3(0.0, 1.2, 0.0);
spotLight.direction = new Laya.Vector3(0.15, -1.0, 0.0);
spotLight.attenuation = new Laya.Vector3(0.0, 0.0, 0.8);
spotLight.range = 6.0;
spotLight.spot = 32;