Options
All
  • Public
  • Public/Protected
  • All
Menu

Defines the cross module constantsused by lights to avoid circular dependencies

Hierarchy

  • LightConstants

Index

Constructors

Properties

FALLOFF_DEFAULT: 0 = 0

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.

FALLOFF_GLTF: 2 = 2

Falloff gltf: light is falling off as described in the gltf moving to PBR document to enhance interoperability with other engines.

FALLOFF_PHYSICAL: 1 = 1

Falloff Physical: light is falling off following the inverse squared distance law.

FALLOFF_STANDARD: 3 = 3

Falloff Standard: light is falling off like in the standard material to enhance interoperability with other materials.

INTENSITYMODE_AUTOMATIC: 0 = 0

Each light type uses the default quantity according to its type: point/spot lights use luminous intensity directional lights use illuminance

INTENSITYMODE_ILLUMINANCE: 3 = 3

lux (lm/m^2)

INTENSITYMODE_LUMINANCE: 4 = 4

nit (cd/m^2)

INTENSITYMODE_LUMINOUSINTENSITY: 2 = 2

candela (lm/sr)

INTENSITYMODE_LUMINOUSPOWER: 1 = 1

lumen (lm)

LIGHTMAP_DEFAULT: 0 = 0

If every light affecting the material is in this lightmapMode, material.lightmapTexture adds or multiplies (depends on material.useLightmapAsShadowmap) after every other light calculations.

LIGHTMAP_SHADOWSONLY: 2 = 2

material.lightmapTexture as only lighting no light calculation from this light only adds dynamic shadows from this light

LIGHTMAP_SPECULAR: 1 = 1

material.lightmapTexture as only diffuse lighting from this light adds only specular lighting from this light adds dynamic shadows

LIGHTTYPEID_DIRECTIONALLIGHT: 1 = 1

Light type var id of the directional light.

LIGHTTYPEID_HEMISPHERICLIGHT: 3 = 3

Light type var id of the hemispheric light.

LIGHTTYPEID_POINTLIGHT: 0 = 0

Light type var id of the point light.

LIGHTTYPEID_SPOTLIGHT: 2 = 2

Light type var id of the spot light.

Methods

  • Sort function to order lights for rendering.

    Parameters

    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.

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Static property
  • Static method
  • Inherited constructor

Settings

Theme