wiki.sine.space | sinespace

Difference between revisions of "Scripting/SLight"

From wiki.sine.space
Jump to: navigation, search
(Created page with "Light sources within the Space scene. =Properties= {{ScriptFunction|bool|Enabled|{ get; set;}|Enable/Disable this light.}} {{ScriptFunction|float|Range|{ get; set;}|Get/Set t...")
 
Line 2: Line 2:
  
 
=Properties=
 
=Properties=
{{ScriptFunction|bool|Enabled|{ get; set;}|Enable/Disable this light.}}
+
{{ScriptFunction|bool|Enabled|{ get; set;}|Enable/Disable this light.|5=-- Disable this object's Light Source --<br>Space.Host.ExecutingObject.Light.Enabled = false;}}
{{ScriptFunction|float|Range|{ get; set;}|Get/Set the effective range of the light source.}}
+
{{ScriptFunction|float|Range|{ get; set;}|Get/Set the effective range of the light source.|5=-- Change the range of the Light --<br>Space.Host.ExecutingObject.Light.Range = 8.0;}}
{{ScriptFunction|float|Intensity|{ get; set;}|Get/Set the intensity of the light source. (Multiplied with the light color)}}
+
{{ScriptFunction|float|Intensity|{ get; set;}|Get/Set the intensity of the light source. (Multiplied with the light color)|5=-- Get the intensity of the Light --<br>Space.Log("Intensity: " .. Space.Host.ExecutingObject.Light.Intensity);}}
 
{{ScriptFunction|SVector|Color|{ get; set;}|Get/Set the color of the light.}}
 
{{ScriptFunction|SVector|Color|{ get; set;}|Get/Set the color of the light.}}
 
{{ScriptFunction|SLightType|Type|{ get; set;}|Get/Set the type of light this source is.}}
 
{{ScriptFunction|SLightType|Type|{ get; set;}|Get/Set the type of light this source is.}}

Revision as of 12:16, 20 April 2017

Light sources within the Space scene.

Properties

Enabled

bool Enabled { get; set;}

Enable/Disable this light.

-- Disable this object's Light Source --
Space.Host.ExecutingObject.Light.Enabled = false;


Range

float Range { get; set;}

Get/Set the effective range of the light source.

-- Change the range of the Light --
Space.Host.ExecutingObject.Light.Range = 8.0;


Intensity

float Intensity { get; set;}

Get/Set the intensity of the light source. (Multiplied with the light color)

-- Get the intensity of the Light --
Space.Log("Intensity: " .. Space.Host.ExecutingObject.Light.Intensity);


Color

SVector Color { get; set;}

Get/Set the color of the light.

No example provided yet


Type

SLightType Type { get; set;}

Get/Set the type of light this source is.

No example provided yet