Light
Note: This class is incompatible with Legacy Drawing.
Function | Description |
---|---|
Light.new() | Creates a default light |
Light.new(Vector3D position , Vector3D rotation , Vector4D color ) |
Creates a light at position with rotation and color |
Light.new(Vector3D position , Vector3D rotation , Vector4D color , Vector2D shadowPrecision , float fieldOfView , bool directional ) |
Creates a light with full configuration including shadow precision and directionality |
Property | Type | Description |
---|---|---|
.position | Vector3D | Light position |
.rotation | Vector3D | Light rotation |
.color | Vector4D | Light color |
.debug | bool | Show debug data |
.precisionPlanes | Vector2D | Shadow depth precision — closer values yield better results |
.fieldOfView | float | Field of view angle (affects light projection) |
.directional | bool | Whether the light is directional |
.active | bool | Whether the light is active in rendering |
Function | Returns | Description |
---|---|---|
:destroy() | Destroys the object | |
:setParent(3DObject other ) |
Parents this light to another 3D object | |
:getAbsolutePosition() | Vector3D | Returns world position |
:getAbsoluteRotation() | Vector3D | Returns world rotation |
:getAbsoluteScale() | Vector3D | Returns world scale |
:updateAbsolutePosition() | Updates world transform (non-recursive) |