Creates a Light object in the scene.
Documentation : http://doc.babylonjs.com/tutorials/lights
Name | Type | Description | |
---|---|---|---|
name | string | ||
scene | Scene |
If every light affecting the material is in this lightmapMode,
material.lightmapTexture adds or multiplies
(depends on material.useLightmapAsShadowmap)
after every other light calculations.
material.lightmapTexture as only diffuse lighting from this light
adds pnly specular lighting from this light
adds dynamic shadows
material.lightmapTexture as only lighting
no light calculation from this light
only adds dynamic shadows from this light
Each light type uses the default quantity according to its type:
point/spot lights use luminous intensity
directional lights use illuminance
lumen (lm)
candela (lm/sr)
lux (lm/m^2)
nit (cd/m^2)
Light type const id of the point light.
Light type const id of the directional light.
Light type const id of the spot light.
Light type const id of the hemispheric light.
Gets the photometric scale used to interpret the intensity.
This is only relevant with PBR Materials where the light intensity can be defined in a physical way.
Sets the photometric scale used to interpret the intensity.
This is only relevant with PBR Materials where the light intensity can be defined in a physical way.
Gets the light radius used by PBR Materials to simulate soft area lights.
sets the light radius used by PBR Materials to simulate soft area lights.
Defines wether or not the shadows are enabled for this light. This can help turning off/on shadow without detaching
the current shadow generator.
Returns the string "Light".
Name | Type | Description | |
---|---|---|---|
optional | fullDetails | boolean |
Set the enabled state of this node.
@see isEnabled
Name | Type | Description | |
---|---|---|---|
value | boolean |
Returns the Light associated shadow generator.
Returns a Vector3, the absolute light position in the World.
Name | Type | Description | |
---|---|---|---|
effect | Effect | ||
lightIndex | string |
Boolean : True if the light will affect the passed mesh.
Name | Type | Description | |
---|---|---|---|
mesh | AbstractMesh |
Returns the light World matrix.
Sort function to order lights for rendering.
@return -1 to reduce's a's index relative to be, 0 for no change, 1 to increase a's index relative to b.
Name | Type | Description | |
---|---|---|---|
a | Light | First Light object to compare to second. | |
b | Light | Second Light object to compare first. |
Disposes the light.
Returns the light type ID (integer).
Returns the intensity scaled by the Photometric Scale according to the light type and intensity mode.
Returns a new Light object, named "name", from the current one.
Name | Type | Description | |
---|---|---|---|
name | string |
Serializes the current light into a Serialization object.
Returns the serialized object.
Creates a new typed light from the passed type (integer) : point light = 0, directional light = 1, spot light = 2, hemispheric light = 3.
This new light is named "name" and added to the passed scene.
Name | Type | Description | |
---|---|---|---|
type | number | ||
name | string | ||
scene | Scene |
Parses the passed "parsedLight" and returns a new instanced Light from this parsing.
Name | Type | Description | |
---|---|---|---|
parsedLight | any | ||
scene | Scene |