layabox 3d 入手
Posted honghong87
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了layabox 3d 入手相关的知识,希望对你有一定的参考价值。
最近受到打击了,3d效果远比2d效果好。
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;
以上是关于layabox 3d 入手的主要内容,如果未能解决你的问题,请参考以下文章