GLTFLight
Inherits:Resource<RefCounted<Object
Represents a glTF light.
Description
Represents a light as defined by theKHR_lights_punctual
glTF extension.
Tutorials
Properties
| ||
| ||
| ||
| ||
| ||
|
Methods
from_dictionary(dictionary:Dictionary)static | |
get_additional_data(extension_name:StringName) | |
set_additional_data(extension_name:StringName, additional_data:Variant) | |
Property Descriptions
Colorget_color()
TheColor of the light. Defaults to white. A black color causes the light to have no effect.
floatget_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 GodotSpotLight3D, the ratio between the inner and outer cone angles is used to calculate the attenuation of the light.
floatget_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.
Stringget_light_type()
The type of the light. The values accepted by Godot are "point", "spot", and "directional", which correspond to Godot'sOmniLight3D,SpotLight3D, andDirectionalLight3D respectively.
floatouter_cone_angle =0.785398
🔗
floatget_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 GodotSpotLight3D, the outer cone angle is used as the angle of the spotlight.
floatget_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.
Method Descriptions
GLTFLightfrom_dictionary(dictionary:Dictionary)static🔗
Creates a new GLTFLight instance by parsing the givenDictionary.
GLTFLightfrom_node(light_node:Light3D)static🔗
Create a new GLTFLight instance from the given GodotLight3D node.
Variantget_additional_data(extension_name:StringName)🔗
There is currently no description for this method. Please help us bycontributing one!
voidset_additional_data(extension_name:StringName, additional_data:Variant)🔗
There is currently no description for this method. Please help us bycontributing one!
Dictionaryto_dictionary()const🔗
Serializes this GLTFLight instance into aDictionary.
Converts this GLTFLight instance into a GodotLight3D node.