- 最后登录
- 2017-5-15
- 注册时间
- 2012-3-1
- 阅读权限
- 90
- 积分
- 32973
  
- 纳金币
- 32806
- 精华
- 12
|
// Pulse light's intensity over time
//随时间改变光照强度
var duration : float= 1.0;
function Update() {
// argument for cosine
//余弦理论
var phi : float = Time.time / duration * 2 * Mathf.PI;
// get cosine and transform from -1..1 to 0..1 range
//获取余弦,并将范围从-1~1变为0~1
var amplitude : float = Mathf.Cos( phi ) * 0.5 + 0.5;
// set light color
//设置灯光颜色
light.intensity = amplitude;
} 请问下,调节灯光强度为什么要用余玄理论呢 |
|