Class LightPunctual
glTF light
Inherited Members
Namespace: GLTFast.Schema
Syntax
[Serializable]
public class LightPunctual
Fields
intensity
Brightness of light in. The units that this is defined in depend on the type of light. point and spot lights use luminous intensity in candela (lm/sr) while directional lights use illuminance in lux (lm/m2)
Declaration
public float intensity
Field Value
Type | Description |
---|---|
Single |
name
Name of the light
Declaration
public string name
Field Value
Type | Description |
---|---|
String |
range
Hint defining a distance cutoff at which the light's intensity may be considered to have reached zero. Supported only for point and spot lights. Must be > 0. When undefined, range is assumed to be infinite.
Declaration
public float range
Field Value
Type | Description |
---|---|
Single |
spot
Spot light properties (only set on spot lights).
Declaration
public SpotLight spot
Field Value
Type | Description |
---|---|
SpotLight |
Properties
LightColor
Light's color in linear space
Declaration
public Color LightColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
Methods
GetLightType()
Returns the type of the light It converts the GLTFast.Schema.LightPunctual.type string and caches it.
Declaration
public LightPunctual.Type GetLightType()
Returns
Type | Description |
---|---|
LightPunctual.Type | Light type, if it was retrieved correctly. Unknown otherwise |
SetLightType(LightPunctual.Type)
Sets the type of the light
Declaration
public void SetLightType(LightPunctual.Type type)
Parameters
Type | Name | Description |
---|---|---|
LightPunctual.Type | type | Light type |