首页 > 其他 > 详细

layabox 3d 入手

时间:2018-09-01 23:19:20      阅读:322      评论:0      收藏:0      [点我收藏+]

最近受到打击了,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 入手

原文:https://www.cnblogs.com/honghong87/p/9571798.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!