GLTFLight

Inherits: Resource < Reference < Object

Properties

Color

color

Color( 1, 1, 1, 1 )

float

inner_cone_angle

0.0

float

intensity

1.0

float

outer_cone_angle

0.785398

float

range

inf

String

type

""

Property Descriptions

Default

Color( 1, 1, 1, 1 )

Setter

set_color(value)

Getter

get_color()

The Color of the light. Defaults to white. A black color causes the light to have no effect.


Default

0.0

Setter

set_inner_cone_angle(value)

Getter

get_inner_cone_angle()

The inner angle of the cone in a spotlight. Must be less than or equal to the outer cone angle.

Within this angle, the light is at full brightness. Between the inner and outer cone angles, there is a transition from full brightness to zero brightness. When creating a Godot SpotLight, the ratio between the inner and outer cone angles is used to calculate the attenuation of the light.


Default

1.0

Setter

set_intensity(value)

Getter

get_intensity()

The intensity of the light. This is expressed in candelas (lumens per steradian) for point and spot lights, and lux (lumens per m²) for directional lights. When creating a Godot light, this value is converted to a unitless multiplier.


Default

0.785398

Setter

set_outer_cone_angle(value)

Getter

get_outer_cone_angle()

The outer angle of the cone in a spotlight. Must be greater than or equal to the inner angle.

At this angle, the light drops off to zero brightness. Between the inner and outer cone angles, there is a transition from full brightness to zero brightness. If this angle is a half turn, then the spotlight emits in all directions. When creating a Godot SpotLight, the outer cone angle is used as the angle of the spotlight.


Default

inf

Setter

set_range(value)

Getter

get_range()

The range of the light, beyond which the light has no effect. GLTF lights with no range defined behave like physical lights (which have infinite range). When creating a Godot light, the range is clamped to 4096.


Default

""

Setter

set_type(value)

Getter

get_type()

The type of the light. The values accepted by Godot are "point", "spot", and "directional", which correspond to Godot's OmniLight, SpotLight, and DirectionalLight respectively.