Extends
Members Show Inherited
Name | Type | Default | Description |
---|---|---|---|
isDirectionalLight
|
boolean | true | |
className
|
string | DirectionalLight | |
lightShadow
|
LightShadow | null |
光源阴影 |
direction
|
Vector3 | new Vector3(0, 0, 1) |
光方向 |
amount
|
Number | 1 |
inherited
光强度 |
enabled
|
Boolean | true |
inherited
是否开启灯光 |
constantAttenuation
|
Number | 1 |
inherited
光常量衰减值, PointLight 和 SpotLight 时生效 |
linearAttenuation
|
Number | 0 |
inherited
光线性衰减值, PointLight 和 SpotLight 时生效 |
quadraticAttenuation
|
Number | 0 |
inherited
光二次衰减值, PointLight 和 SpotLight 时生效 |
range
|
Number | 0 |
inherited
光照范围, PointLight 和 SpotLight 时生效, 0 时代表光照范围无限大。 |
shadow
|
object | null |
inherited
阴影生成参数,默认不生成阴影 |
isDirty
|
Boolean | false |
inherited
是否光照信息变化 |
color
|
Color | new Color(1, 1, 1) |
inherited
灯光颜色 |
Methods Show Inherited
-
getViewDirection(camera){Vector3}
-
获取相机空间方向
Name Type Description camera
Camera Returns:
Type Description Vector3 -
inherited toInfoArray(out, offset)
-
获取光范围信息, PointLight 和 SpotLight 时生效
Name Type Description out
Array 信息接受数组
offset
Number 偏移值
-
inherited createShadowMap(renderer, camera)
-
生成阴影贴图,支持阴影的子类需要重写
Name Type Description renderer
WebGLRenderer camera
Camera