Titania X3D Editor

Bring Colours to Your Life.

Titania v4.0.1

Bring Colours to Your Life.

X3D Reference

SpotLight

SpotLight

SpotLight is a light source that illuminates geometry within a conical beam. Light illuminates all geometry and is normally scoped to illuminate peers and children nodes within the scene graph hierarchy Lights have no visible shape themselves and shine through occluding geometry.

The SpotLight node belongs to the Lighting component and its container field is children. It is available since X3D version 3.0 or later.

Hierarchy

Fields

SFNode [in, out] metadata NULL [X3DMetadataObject]

Metadata are not part of the X3D world and not interpreted by the X3D browser, but they can be accessed via the ECMAScript interface.

SFBool [in, out] global TRUE

Global lights illuminate all objects within their volume of lighting influence. Scoped lights only illuminate objects within the same transformation hierarchy.

SFBool [in, out] on TRUE

Enables/disables this light source.

SFFloat [in, out] intensity 1 [0,1]

Brightness of direct emission from the light.

SFFloat [in, out] ambientIntensity [0,1]

Brightness of ambient (nondirectional background) emission from the light.

SFVec3f [in, out] attenuation 1 0 0 [0,∞)

Constant, linear-distance and squared-distance dropoff factors.

SFVec3f [in, out] location 0 0 0 (-∞,∞)

Position of light relative to local coordinate system.

SFVec3f [in, out] direction 0 0 -1 (-∞,∞)

Orientation vector of light relative to local coordinate system.

SFFloat [in, out] radius 100 [0,∞)

Maximum effective distance of light relative to local light position, affected by ancestor scaling.

SFFloat [in, out] beamWidth 0.7854 (0,π/2]

Inner conical solid angle (in radians) where light source has uniform full intensity.

Hint

BeamWidth is inner angle of full intensity, cutOffAngle is outer angle of zero intensity. Therefore set beamWidth <= cutOffAngle.

Warning

If beamWidth > cutOffAngle, then beamWidth reset to equal cutOffAngle.

SFFloat [in, out] cutOffAngle 1.5708 (0,π/2]

Outer conical solid angle (in radians) where light source intensity becomes zero.

Hint

BeamWidth is inner angle of full intensity, cutOffAngle is outer angle of zero intensity. Therefore set beamWidth <= cutOffAngle.

Warning

If beamWidth > cutOffAngle, then beamWidth reset to equal cutOffAngle.

SFColor [in, out] shadowColor 0 0 0

Input/Output field shadowColor.

SFFloat [in, out] shadowIntensity

Input/Output field shadowIntensity.

SFFloat [in, out] shadowDiffusion

Input/Output field shadowDiffusion.

SFInt32 [ ] shadowMapSize 1024

Field shadowMapSize.

Description

Hint

  • HeadLight enabled on/off is controlled by NavigationInfo.

Browser Compatibility

Titania X_ITE
yes yes

External Links