SVG stands for Scalable Vector Graphic. It can be used to make graphics and animations like in HTML canvas.
The
<feSpotLight> SVG defines a light source which results in a spotlight effect. It defines a spotlight whose light is directed at a specific point and it only lights a limited area.
Syntax:
<feSpotLight x="" y="" z="" pointsAtX="" pointsAtY=""
pointsAtZ="" specularExponent="" limitingConeAngle="" />
Attributes:
- x, y, z:It tells the corresponding x, y, z in co-ordinate system.
- pointsAtX, pointsAtY, pointsAtZ: X, Y, Z location of the point where the light is shining on.
- specularExponent: It tells the focus of light on a single point. Default value is 1.
- limitingConeAngle: It tells the angle in degrees between two lines i.e. spot light axis and spot light cone.
Example 1:
Output:
👁 Image
Example 2:
Output:
👁 Image