Cocos Creator
Light Component Reference
The light component defines the type of light, color, intensity, and type of shadow produced, and adding lights to the scene makes the model render more stereoscopic. Please refer to Lighting for details.
Click the Add Component button at the bottom of the Properties panel and select Light from Renderer Component. Then you can add the Light component to the node.
Light Properties
property | Description |
---|---|
Type | Light type. Including DIRECTIONAL, POINT, SPOT, AMBIENT four types. Please refer to Lighting for details. |
Color | Light color. |
Intensity | Light intensity, the greater the value, the brighter the light. |
Range | Light radius. Only takes effect when the Type is set to POINT and SPOT. |
Spot Angle | Light angle. Only takes effect when the Type is set to SPOT. |
Spot Exp | The greater the value, the softer the edge of the light. Only takes effect when the Type is set to SPOT. |
Shadow Type | Shadow type produced by the light. Including NONE and HARD two types. |
Shadow Resolution | Shadow resolution, the greater the value, the clearer the shadow. Only takes effect when the Shadow Type is not NONE. |
Shadow Darkness | Shadow Darkness, the greater the value, the darker the shadow. Only takes effect when the Shadow Type is not NONE. |
Shadow Min Depth | The minimum distance that the light produces shadows. Shadows do not occur if the distance between the object and the light is less than the minimum distance. Only takes effect when the Shadow Type is not NONE. |
Shadow Max Depth | The maximum distance that the light produces shadows. Shadows do not occur if the dostance between the object and the light is less than the maximun distance. Only takes effect when the Shadow Type is not NONE. |
Shadow Depth Scale | Light depth scale, the greater the value, the darker the shadow. Only takes effect when the Shadow Type is not NONE. |
Shadow Frustum Size | Frustum size in the directional light, determines the range of the shadow generated by the directional light. Only takes effect when the Shadow Type is not NONE and Type is DIRECTIONAL. |