Types/LightDefinition: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(0.16) |
||
Line 4: | Line 4: | ||
== Properties == | == Properties == | ||
=== intensity === | === intensity === | ||
'''Type''':[[Types/float]] | '''Type''': [[Types/float]] | ||
Brightness of the light in the range [0, 1] where 0 is no light and 1 is the maximum light. | Brightness of the light in the range [0, 1] where 0 is no light and 1 is the maximum light. | ||
<syntaxhighlight lang="lua">intensity = 0.5</syntaxhighlight> | |||
=== size === | === size === | ||
'''Type''':[[Types/float]] | '''Type''': [[Types/float]] | ||
The radius of the light in tiles. | 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. | Note, that the light gets darker near the edges, so the effective size of the light seems to be smaller. | ||
<syntaxhighlight lang="lua">size = 15 -- big light source</syntaxhighlight> | |||
=== color === | === color === | ||
'''Type''':[[Types/color]] | '''Type''': [[Types/color]] | ||
'''Default''': Light has no color | '''Default''': Light has no color | ||
Color of the light. | Color of the light. | ||
=== add_perspective === | |||
'''Type''': [[Types/bool]] | |||
'''Default''': false | |||
=== shift === | |||
'''Type''': [[Types/vector]] | |||
=== minimum_darkness === | |||
'''Type''': [[Types/float]] | |||
'''Default''': 0 | |||
== Example == | == Example == | ||
The light of the orange state of the rail signal. | The light of the orange state of the rail signal. | ||
<syntaxhighlight lang="lua">orange_light = {intensity = 0.2, size = 4, color={r=1, g=0.5}}</syntaxhighlight> |
Revision as of 13:06, 26 January 2018
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.
add_perspective
Type: Types/bool
Default: false
shift
Type: Types/vector
minimum_darkness
Type: Types/float
Default: 0
Example
The light of the orange state of the rail signal.
orange_light = {intensity = 0.2, size = 4, color={r=1, g=0.5}}