Types/LightDefinition: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
table of intensity, size, and (optionally) color
== Basics ==
Specifies the light source


{| class="wikitable"
== Properties ==
|-
=== intensity ===
! name !! meaning !! type
'''Type''':[[Types/float]]
|-
 
| intensity || brightness of light || [[Types/float|float]]
Brightness of the light in the range [0, 1] where 0 is no light and 1 is the maximum light.
|-
    intensity = 0.5
| size || area affected || [[Types/float|float]]
=== size ===
|-
'''Type''':[[Types/float]]
| color || [optional] color of light || [[Types/color|color]]
 
|}
The radius of the light in tiles.
Note, that the light gets darker near the edges, so the effective size of the light seems to be smaller.
    size = 15 -- big light source
=== color ===
'''Type''':[[Types/color]]
'''Default''': Light has no color
 
Color of the light.
 
== Example ==
The light of the orange state of the rail signal.
    orange_light = {intensity = 0.2, size = 4, color={r=1, g=0.5}}

Revision as of 15:28, 14 November 2013

Basics

Specifies the light source

Properties

intensity

Type:Types/float

Brightness of the light in the range [0, 1] where 0 is no light and 1 is the maximum light.

   intensity = 0.5

size

Type:Types/float

The radius of the light in tiles. Note, that the light gets darker near the edges, so the effective size of the light seems to be smaller.

   size = 15 -- big light source

color

Type:Types/color Default: Light has no color

Color of the light.

Example

The light of the orange state of the rail signal.

   orange_light = {intensity = 0.2, size = 4, color={r=1, g=0.5}}