Path: blob/main/files/en-us/web/svg/element/fespotlight/index.md
6565 views
------{{SVGRef}}
The <feSpotLight> SVG filter primitive defines a light source that can be used to create a spotlight effect. It is used within a lighting filter primitive: {{SVGElement("feDiffuseLighting")}} or {{SVGElement("feSpecularLighting")}}.
Usage context
{{svginfo}}
Attributes
Global attributes
Specific attributes
{{SVGAttr("x")}}
{{SVGAttr("y")}}
{{SVGAttr("z")}}
{{SVGAttr("pointsAtX")}}
{{SVGAttr("pointsAtY")}}
{{SVGAttr("pointsAtZ")}}
{{SVGAttr("specularExponent")}}
{{SVGAttr("limitingConeAngle")}}
DOM Interface
This element implements the {{domxref("SVGFESpotLightElement")}} interface.
Example
HTML Content
Result
{{EmbedLiveSample("Example", 200, 200)}}
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}
See also
{{SVGElement("filter")}}
{{SVGElement("animate")}}
{{SVGElement("set")}}
{{SVGElement("feDiffuseLighting")}}
{{SVGElement("feSpecularLighting")}}
{{SVGElement("feDistantLight")}}
{{SVGElement("fePointLight")}}