class PointLight extends ShadowLight
Creates a PointLight object from the passed name and position (Vector3) and adds it in the scene.
A PointLight emits the light in every direction.
It can cast shadows.
If the scene camera is already defined and you want to set your PointLight at the camera position, just set it :
var pointLight = new BABYLON.[PointLight](/classes/3.1/PointLight)("pl", camera.position, scene);
Documentation : http://doc.babylonjs.com/tutorials/lights
Name | Type | Description | |
---|---|---|---|
name | string | ||
position | Vector3 | ||
scene | Scene |
Getter: In case of direction provided, the shadow will not use a cube texture but simulate a spot shadow as a fallback
This specifies what angle the shadow will use to be created.
* It default to 90 degrees to work nicely with the cube texture generation for point lights shadow maps.
Setter: In case of direction provided, the shadow will not use a cube texture but simulate a spot shadow as a fallback
This specifies what angle the shadow will use to be created.
* It default to 90 degrees to work nicely with the cube texture generation for point lights shadow maps.
In case of direction provided, the shadow will not use a cube texture but simulate a spot shadow as a fallback
Returns the string "PointLight"
Returns the integer 0.
Specifies wether or not the shadowmap should be a cube texture.
Returns a new Vector3 aligned with the PointLight cube system according to the passed cube face index (integer).
Name | Type | Description | |
---|---|---|---|
optional | faceIndex | number |
Sets the passed Effect "effect" with the PointLight transformed position (or position, if none) and passed name (string).
Returns the PointLight.
Name | Type | Description | |
---|---|---|---|
effect | Effect | ||
lightIndex | string |