Types/LightDefinition: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(0.16)
(Removed old prototype docs)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Basics ==
<div class="stub"><p>'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/types/LightDefinition.html https://lua-api.factorio.com/latest/types/LightDefinition.html]
Specifies the light source


== Properties ==
</p><p>This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums].</p></div>
=== intensity ===
'''Type''': [[Types/float]]
 
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 ===
'''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.
<syntaxhighlight lang="lua">size = 15 -- big light source</syntaxhighlight>
=== 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.
<syntaxhighlight lang="lua">orange_light = {intensity = 0.2, size = 4, color={r=1, g=0.5}}</syntaxhighlight>

Latest revision as of 14:32, 25 October 2024

The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/types/LightDefinition.html

This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.