specularExponent
specularExponent 属性は光源の集中度を制御します。値が大きいほど光は明るくなります。
この属性は、次の SVG 要素で使用できます。
feSpecularLighting
<feSpecularLighting> において、specularExponent は鏡面反射項の指数値を定義します。
| 値 | <number> |
|---|---|
| デフォルト値 | 1 |
| アニメーション | 可 |
feSpotLight
<feSpotLight> において、specularExponent は光源の集中度を制御する指数値を定義します。
| 値 | <number> |
|---|---|
| デフォルト値 | 1 |
| アニメーション | 可 |
例
html
<svg viewBox="0 0 420 200" xmlns="http://www.w3.org/2000/svg">
<filter id="diffuseLighting1" x="0" y="0" width="100%" height="100%">
<feSpecularLighting in="SourceGraphic" specularExponent="1">
<fePointLight x="60" y="60" z="20" />
</feSpecularLighting>
</filter>
<filter id="diffuseLighting2" x="0" y="0" width="100%" height="100%">
<feSpecularLighting in="SourceGraphic" specularExponent="5">
<fePointLight x="60" y="60" z="20" />
</feSpecularLighting>
</filter>
<rect x="0" y="0" width="200" height="200" filter="url(#diffuseLighting1)" />
<rect
x="220"
y="0"
width="200"
height="200"
filter="url(#diffuseLighting2)" />
</svg>
仕様書
| 仕様書 |
|---|
| Filter Effects Module Level 1> # element-attrdef-fespecularlighting-specularexponent> |
| Filter Effects Module Level 1> # element-attrdef-fespotlight-specularexponent> |