limitingConeAngle
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Das Attribut limitingConeAngle
stellt den Winkel in Grad zwischen der Spotlicht-Achse (d.h. der Achse zwischen der Lichtquelle und dem Punkt, auf den sie zeigt) und dem Spotlicht-Kegel dar. Es definiert somit einen begrenzenden Kegel, der den Bereich einschränkt, in dem das Licht projiziert wird. Außerhalb des Kegels wird kein Licht projiziert.
Dieses Attribut kann mit den folgenden SVG-Elementen verwendet werden:
Beispiel
<svg viewBox="0 0 480 200" xmlns="http://www.w3.org/2000/svg">
<filter id="spotLight1" x="0" y="0" width="100%" height="100%">
<feDiffuseLighting diffuseConstant="2">
<feSpotLight
x="10"
y="10"
z="50"
pointsAtX="100"
pointsAtY="100"
limitingConeAngle="10" />
</feDiffuseLighting>
</filter>
<filter id="spotLight2" x="0" y="0" width="100%" height="100%">
<feDiffuseLighting diffuseConstant="2">
<feSpotLight
x="10"
y="10"
z="50"
pointsAtX="100"
pointsAtY="100"
limitingConeAngle="40" />
</feDiffuseLighting>
</filter>
<rect
x="0"
y="0"
width="200"
height="200"
style="filter: url(#spotLight1);" />
<rect
x="0"
y="0"
width="200"
height="200"
style="filter: url(#spotLight2); transform: translateX(220px);" />
</svg>
Nutzungshinweise
Wert | <number> |
---|---|
Standardwert | 0 |
Animierbar | Ja |
Spezifikationen
Specification |
---|
Filter Effects Module Level 1 # element-attrdef-fespotlight-limitingconeangle |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
limitingConeAngle |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support