Skip to content
Related Articles

Related Articles

SVG FESpotLightElement.pointsAtZ Property

Improve Article
Save Article
Like Article
  • Last Updated : 30 Mar, 2022

The SVG FESpotLightElement.pointsAtZ property returns the SVGAnimatedNumber object corresponding to the pointsAtZ attribute of the FESpotLightElement.pointsAtZ element.


var a = FESpotLightElement.pointsAtZ

Return value: This property returns the SVGAnimatedNumber object corresponding to the pointsAtZ attribute of the FESpotLightElement.pointsAtZ element.

Example 1: 


<!DOCTYPE html> 
    <div style="color: green;"
        <svg viewBox="0 0 1120 350"
            <filter id="Geek" width="100%"
                <feDiffuseLighting in="SourceGraphic"
                    <feSpotLight x="120" y="120"
                        z="50" pointsAtZ="5" pointsAtX="5"
                        pointsAtY="5" id="Geek2"/> 
            <rect width="300" height="300"
                style="filter: url(#Geek);"/>
                <text x="50" y="60">GeeksForGeeks</text>
            <script type="text/javascript">
                var g = document.getElementById("Geek2");
                console.log("pointAtZ value of feSpotLight "+
                "element is: "+g.pointsAtZ.baseVal)


Example 2: 


<!DOCTYPE html> 
    <svg width="200" height="200"
            <filter id="spotlight"
                <feSpecularLighting result="spec3"
                    in="blur3" specularConstant="1.2"
                    <feSpotLight x="400" y="400"
                        z="900" pointsAtZ="5" pointsAtX="5"
                        pointsAtY="5" limitingConeAngle="9"
                        specularExponent="10" id="gfg"/> 
                <feComposite in="SourceGraphic"
                    in2="spotlight" operator="out"
                    k1="0" k2="1" k3="1" k4="0" /> 
        <rect x="40" y="40" width="150" height="100"
            style="stroke: #000000; 
                fill: green; 
                filter: url(#spotlight);" /> 
        <g fill="#FFFFFF" stroke="black" font-size="10"
            <text x="50" y="90">GeeksForGeeks</text
        <script type="text/javascript">
            var g = document.getElementById("gfg");
            console.log("pointsAtZ value of feSpotLight "+
                        "element is: "+g.pointsAtZ.baseVal)


Supported Browsers:

  • Google Chrome
  • Edge
  • Firefox
  • Safari
  • Opera
  • Internet Explorer

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!