光原始场景的设置调整照明。它是一个实体,属性映射到光组件的属性 light component.。
例子
<!-- Red directional light shining from the top left. -->
<a-light color="red" position="-1 1 0"></a-light>
<!-- Blue point light, 5 meters in the air. -->
<a-light type="point" color="blue" position="0 5 0"></a-light>
<!-- Dim ambient lighting. -->
<a-light type="ambient" color="#222"></a-light>
属性
属性 | 组件映射 | 默认值 |
---|---|---|
angle(角度) | light.angle | 60 |
color | light.color | #fff |
decay(衰减) | light.decay | 1 |
distance(距离) | light.distance | 0.0 |
exponent | light.exponent | 10.0 |
ground-color | light.groundColor | #fff |
intensity(强度) | light.intensity | 1.0 |
type | light.type | directional |
使用默认灯光的差异Differences with the Default Lighting
当我们添加一个光,人字形会删除默认的照明设置(即。,一个从左上的方向灯,和一个小环境光)。