Creates a HemisphericLight object in the scene according to the passed direction (Vector3). The HemisphericLight simulates the ambient environment light, so the passed direction is the light reflection direction, not the incoming direction. The HemisphericLight can't cast shadows. Documentation : https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction
Gets a list of Animations associated with the node
Diffuse gives the basic color to an object.
The light reflection direction, not the incoming direction.
Defines the falloff type for this light. This lets overriding how punctual light are falling off base on range or angle. This can be set to any values in Light.FALLOFF_x.
Note: This is only useful for PBR Materials at the moment. This could be extended if required to other types of materials.
The groundColor is the light in the opposite direction to the one specified during creation. You can think of the diffuse and specular light as coming from the centre of the object in the given direction and the groundColor light in the opposite direction.
Gets or sets the id of the node
List of inspectable custom properties (used by the Inspector)
https://doc.babylonjs.com/toolsAndResources/inspector#extensibility
Strength of the light. Note: By default it is define in the framework own unit. Note: In PBR materials the intensityMode can be use to chose what unit the intensity is defined in.
Gets or sets an object used to store user defined information for the node
Gets or sets the name of the node
An event triggered when the mesh is disposed
Callback raised when the node is ready to be used
Defines the rendering priority of the lights. It can help in case of fallback or number of lights exceeding the number allowed of the materials.
For internal use only. Please do not use.
Specular produces a highlight color on an object. Note: This is not affecting PBR materials.
Gets or sets a string used to store user defined state for the node
Gets or sets the unique id of the node
Static
Readonly
FALLOFF_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_Falloff gltf: light is falling off as described in the gltf moving to PBR document to enhance interoperability with other engines.
Static
Readonly
FALLOFF_Falloff Physical: light is falling off following the inverse squared distance law.
Static
Readonly
FALLOFF_Falloff Standard: light is falling off like in the standard material to enhance interoperability with other materials.
Static
Readonly
INTENSITYMODE_Each light type uses the default quantity according to its type: point/spot lights use luminous intensity directional lights use illuminance
Static
Readonly
INTENSITYMODE_lux (lm/m^2)
Static
Readonly
INTENSITYMODE_nit (cd/m^2)
Static
Readonly
INTENSITYMODE_candela (lm/sr)
Static
Readonly
INTENSITYMODE_lumen (lm)
Static
Readonly
LIGHTMAP_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_material.lightmapTexture as only lighting no light calculation from this light only adds dynamic shadows from this light
Static
Readonly
LIGHTMAP_material.lightmapTexture as only diffuse lighting from this light adds only specular lighting from this light adds dynamic shadows
Static
Readonly
LIGHTTYPEID_Light type const id of the directional light.
Static
Readonly
LIGHTTYPEID_Light type const id of the hemispheric light.
Static
Readonly
LIGHTTYPEID_Light type const id of the point light.
Static
Readonly
LIGHTTYPEID_Light type const id of the spot light.
Gets or sets the accessibility tag to describe the node for accessibility purpose.
Gets or sets the animation properties override
Gets the list of attached behaviors
https://doc.babylonjs.com/features/featuresDeepDive/behaviors
Gets or sets a boolean used to define if the node must be serialized
Gets the layer id use to find what meshes are not impacted by the light. Inactive if 0
Sets the layer id use to find what meshes are not impacted by the light. Inactive if 0
Gets the meshes not impacted by this light.
Sets the meshes not impacted by this light.
Gets the layer id use to find what meshes are impacted by the light. Inactive if 0
Sets the layer id use to find what meshes are impacted by the light. Inactive if 0
Gets the only meshes impacted by this light.
Sets the only meshes impacted by this 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 lightmap mode of this light (should be one of the constants defined by Light.LIGHTMAP_x)
Sets the lightmap mode of this light (should be one of the constants defined by Light.LIGHTMAP_x)
Sets a callback that will be raised when the node will be disposed
An event triggered when the enabled state of the node changes
Gets or sets the parent of the node (without keeping the current position in the scene)
https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/parent_pivot/parent
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 how far from the source the light is impacting in scene units. Note: Unused in PBR material as the distance light falloff is defined following the inverse squared falloff.
Defines how far from the source the light is impacting in scene units. Note: Unused in PBR material as the distance light falloff is defined following the inverse squared falloff.
Gets whether or not the shadows are enabled for this light. This can help turning off/on shadow without detaching the current shadow generator.
Sets whether or not the shadows are enabled for this light. This can help turning off/on shadow without detaching the current shadow generator.
Returns directly the latest state of the mesh World matrix. A Matrix is returned.
Binds the lights information from the scene to the effect for the given mesh.
Light index
The scene where the light belongs to
The effect we are binding the data to
Defines if specular is supported
Optional
receiveShadows: booleanDefines if the effect (mesh) we bind the light for receives shadows
Attach a behavior to the node
https://doc.babylonjs.com/features/featuresDeepDive/behaviors
the current Node
defines the behavior to attach
Optional
attachImmediately: booleandefines that the behavior must be attached even if the scene is still loading
Will start the animation sequence
the object created for this animation. If range does not exist, it will return null
defines the range frames for animation sequence
Optional
loop: booleandefines if the animation should loop (false by default)
Optional
speedRatio: numberdefines the speed factor in which to run the animation (1 by default)
Optional
onAnimationEnd: (() => void)defines a function to be executed when the animation ended (undefined by default)
Specifies if the light will affect the passed mesh.
true the mesh is affected otherwise, false.
The mesh to test against the light
Returns a new Light object, named "name", from the current one.
the new created light
The name of the cloned light
Optional
newParent: Nullable<Node>The parent of this light, if it has one
Releases resources associated with this node.
Optional
doNotRecurse: booleanSet to true to not recurse into each children (recurse into each children by default)
Optional
disposeMaterialAndTextures: booleanSet to true to also dispose referenced materials and textures (false by default)
Get an animation by name
null if not found else the requested animation
defines the name of the animation to look for
Gets an attached behavior by name
https://doc.babylonjs.com/features/featuresDeepDive/behaviors
null if behavior was not found else the requested behavior
defines the name of the behavior to look for
Get all child-meshes of this node
an array of AbstractMesh
Optional
directDescendantsOnly: booleandefines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: false)
Optional
predicate: ((node: Node) => node is T)defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
Get all child-meshes of this node
an array of AbstractMesh
Optional
directDescendantsOnly: booleandefines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: false)
Optional
predicate: ((node: Node) => boolean)defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
Get all direct children of this node
an array of Node
Optional
predicate: ((node: Node) => node is T)defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
Optional
directDescendantsOnly: booleandefines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: true)
Get all direct children of this node
an array of Node
Optional
predicate: ((node: Node) => boolean)defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
Optional
directDescendantsOnly: booleandefines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: true)
Will return all nodes that have this node as ascendant
all children nodes of all types
Optional
directDescendantsOnly: booleandefines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered
Optional
predicate: ((node: Node) => node is T)defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
Will return all nodes that have this node as ascendant
all children nodes of all types
Optional
directDescendantsOnly: booleandefines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered
Optional
predicate: ((node: Node) => boolean)defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
Return the minimum and maximum world vectors of the entire hierarchy under current node
the new bounding vectors
Optional
includeDescendants: booleanInclude bounding info from descendants as well (true by default)
Optional
predicate: Nullable<((abstractMesh: AbstractMesh) => boolean)>defines a callback function that can be customize to filter what meshes should be included in the list used to compute the bounding vectors
Is this node a descendant of the given node? The function will iterate up the hierarchy until the ancestor was found or no more parents defined
a boolean indicating if this node is a descendant of the given node
defines the parent node to inspect
Is this node enabled? If the node has a parent, all ancestors will be checked and false will be returned if any are false (not enabled), otherwise will return true
whether this node (and its parent) is enabled
Optional
checkAncestors: booleanindicates if this method should check the ancestors. The default is to check the ancestors. If set to false, the method will return the value of this node without checking ancestors
Remove an attached behavior
https://doc.babylonjs.com/features/featuresDeepDive/behaviors
the current Node
defines the behavior to attach
Sets the passed Effect object with the HemisphericLight normalized direction and color and the passed name (string).
The hemispheric light
The effect to update
The index of the light in the effect to update
Static
AddStatic
ConstructReturns a node constructor based on type name
the new constructor or null
defines the type name
defines the new node name
defines the hosting scene
Optional
options: anydefines optional options to transmit to constructors
Static
GetCreates 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.
the constructor function
Type according to the types available in Light.LIGHTTYPEID_x
The friendly name of the light
The scene the new light will belong to
Static
ParseParses the passed "parsedLight" and returns a new instanced Light from this parsing.
the created light after parsing
The JSON representation of the light
The scene to create the parsed light in
Static
ParseGenerated using TypeDoc
The HemisphericLight simulates the ambient environment light, so the passed direction is the light reflection direction, not the incoming direction.