Class LightConstants
Hierarchy
- LightConstants
Index
Properties
- FALLOFF_
DEFAULT - FALLOFF_
GLTF - FALLOFF_
PHYSICAL - FALLOFF_
STANDARD - INTENSITYMODE_
AUTOMATIC - INTENSITYMODE_
ILLUMINANCE - INTENSITYMODE_
LUMINANCE - INTENSITYMODE_
LUMINOUSINTENSITY - INTENSITYMODE_
LUMINOUSPOWER - LIGHTMAP_
DEFAULT - LIGHTMAP_
SHADOWSONLY - LIGHTMAP_
SPECULAR - LIGHTTYPEID_
DIRECTIONALLIGHT - LIGHTTYPEID_
HEMISPHERICLIGHT - LIGHTTYPEID_
POINTLIGHT - LIGHTTYPEID_
SPOTLIGHT
Methods
Properties
Static Readonly FALLOFF_ DEFAULTSearch playground for FALLOFF_DEFAULT
Falloff Default: light is falling off following the material specification: standard material is using standard falloff whereas pbr material can request special falloff per materials.
Static Readonly FALLOFF_ GLTFSearch playground for FALLOFF_GLTF
Falloff gltf: light is falling off as described in the gltf moving to PBR document to enhance interoperability with other engines.
Static Readonly FALLOFF_ PHYSICALSearch playground for FALLOFF_PHYSICAL
Falloff Physical: light is falling off following the inverse squared distance law.
Static Readonly FALLOFF_ STANDARDSearch playground for FALLOFF_STANDARD
Falloff Standard: light is falling off like in the standard material to enhance interoperability with other materials.
Static Readonly INTENSITYMODE_ AUTOMATICSearch playground for INTENSITYMODE_AUTOMATIC
Each light type uses the default quantity according to its type: point/spot lights use luminous intensity directional lights use illuminance
Static Readonly INTENSITYMODE_ ILLUMINANCESearch playground for INTENSITYMODE_ILLUMINANCE
lux (lm/m^2)
Static Readonly INTENSITYMODE_ LUMINANCESearch playground for INTENSITYMODE_LUMINANCE
nit (cd/m^2)
Static Readonly INTENSITYMODE_ LUMINOUSINTENSITYSearch playground for INTENSITYMODE_LUMINOUSINTENSITY
candela (lm/sr)
Static Readonly INTENSITYMODE_ LUMINOUSPOWERSearch playground for INTENSITYMODE_LUMINOUSPOWER
lumen (lm)
Static Readonly LIGHTMAP_ DEFAULTSearch playground for LIGHTMAP_DEFAULT
If every light affecting the material is in this lightmapMode, material.lightmapTexture adds or multiplies (depends on material.useLightmapAsShadowmap) after every other light calculations.
Static Readonly LIGHTMAP_ SHADOWSONLYSearch playground for LIGHTMAP_SHADOWSONLY
material.lightmapTexture as only lighting no light calculation from this light only adds dynamic shadows from this light
Static Readonly LIGHTMAP_ SPECULARSearch playground for LIGHTMAP_SPECULAR
material.lightmapTexture as only diffuse lighting from this light adds only specular lighting from this light adds dynamic shadows
Static Readonly LIGHTTYPEID_ DIRECTIONALLIGHTSearch playground for LIGHTTYPEID_DIRECTIONALLIGHT
Light type const id of the directional light.
Static Readonly LIGHTTYPEID_ HEMISPHERICLIGHTSearch playground for LIGHTTYPEID_HEMISPHERICLIGHT
Light type const id of the hemispheric light.
Static Readonly LIGHTTYPEID_ POINTLIGHTSearch playground for LIGHTTYPEID_POINTLIGHT
Light type const id of the point light.
Static Readonly LIGHTTYPEID_ SPOTLIGHTSearch playground for LIGHTTYPEID_SPOTLIGHT
Light type const id of the spot light.
Methods
Static Compare Lights PrioritySearch playground for CompareLightsPriority
-
Sort function to order lights for rendering.
Parameters
-
a: ISortableLight
First Light object to compare to second.
-
b: ISortableLight
Second Light object to compare first.
Returns number
-1 to reduce's a's index relative to be, 0 for no change, 1 to increase a's index relative to b.
-
Defines the cross module constantsused by lights to avoid circular dependencies