virtualx-engine/modules/gltf/doc_classes/GLTFLight.xml

52 lines
3.4 KiB
XML
Raw Normal View History

2021-03-03 05:20:20 +01:00
<?xml version="1.0" encoding="UTF-8" ?>
<class name="GLTFLight" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
2021-03-03 05:20:20 +01:00
<brief_description>
Represents a GLTF light.
2021-03-03 05:20:20 +01:00
</brief_description>
<description>
Represents a light as defined by the [code]KHR_lights_punctual[/code] GLTF extension.
[b]Note:[/b] This class is only compiled in editor builds. Run-time glTF loading and saving is [i]not[/i] available in exported projects. References to [GLTFLight] within a script will cause an error in an exported project.
2021-03-03 05:20:20 +01:00
</description>
<tutorials>
<link title="KHR_lights_punctual GLTF extension spec">https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_lights_punctual</link>
2021-03-03 05:20:20 +01:00
</tutorials>
<methods>
<method name="to_dictionary" qualifiers="const">
<return type="Dictionary" />
<description>
Serializes this GLTFLight instance into a [Dictionary].
</description>
</method>
<method name="to_node" qualifiers="const">
<return type="Light" />
<description>
Converts this GLTFLight instance into a Godot [Light] node.
</description>
</method>
2021-03-03 05:20:20 +01:00
</methods>
<members>
2021-09-26 22:56:35 +02:00
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )">
The [Color] of the light. Defaults to white. A black color causes the light to have no effect.
2021-03-03 05:20:20 +01:00
</member>
<member name="inner_cone_angle" type="float" setter="set_inner_cone_angle" getter="get_inner_cone_angle" default="0.0">
2021-09-26 22:56:35 +02:00
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.
2021-03-03 05:20:20 +01:00
</member>
2021-09-26 22:56:35 +02:00
<member name="intensity" type="float" setter="set_intensity" getter="get_intensity" default="1.0">
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.
2021-03-03 05:20:20 +01:00
</member>
2021-09-26 22:56:35 +02:00
<member name="outer_cone_angle" type="float" setter="set_outer_cone_angle" getter="get_outer_cone_angle" default="0.785398">
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.
2021-03-03 05:20:20 +01:00
</member>
2021-09-26 22:56:35 +02:00
<member name="range" type="float" setter="set_range" getter="get_range" default="inf">
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.
2021-03-03 05:20:20 +01:00
</member>
<member name="type" type="String" setter="set_type" getter="get_type" default="&quot;&quot;">
2021-09-26 22:56:35 +02:00
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.
2021-03-03 05:20:20 +01:00
</member>
</members>
<constants>
</constants>
</class>