-
Notifications
You must be signed in to change notification settings - Fork 22.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New Pages: SVGFEDistantLightElement (#37427)
- Loading branch information
1 parent
9cbd720
commit 44ae1cf
Showing
2 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
files/en-us/web/api/svgfedistantlightelement/azimuth/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
title: "SVGFEDistantLightElement: azimuth property" | ||
short-title: azimuth | ||
slug: Web/API/SVGFEDistantLightElement/azimuth | ||
page-type: web-api-instance-property | ||
browser-compat: api.SVGFEDistantLightElement.azimuth | ||
--- | ||
|
||
{{APIRef("SVG")}} | ||
|
||
The **`azimuth`** read-only property of the {{domxref("SVGFEDistantLightElement")}} interface reflects the {{SVGAttr("azimuth")}} attribute of the given {{SVGElement("feDistantLight")}} element. | ||
|
||
## Value | ||
|
||
An {{domxref("SVGAnimatedNumber")}} object. | ||
|
||
## Examples | ||
|
||
### Accessing the `azimuth` Property | ||
|
||
```html | ||
<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> | ||
<defs> | ||
<filter id="lightingFilter"> | ||
<feDistantLight azimuth="45" elevation="30" /> | ||
<feDiffuseLighting result="light" lighting-color="white" surfaceScale="2"> | ||
<feDistantLight azimuth="45" elevation="30" /> | ||
</feDiffuseLighting> | ||
</filter> | ||
</defs> | ||
<rect | ||
x="50" | ||
y="50" | ||
width="100" | ||
height="100" | ||
style="fill:yellow;" | ||
filter="url(#lightingFilter)" /> | ||
</svg> | ||
``` | ||
|
||
```js | ||
const distantLight = document.querySelector("feDistantLight"); | ||
|
||
console.log(distantLight.azimuth.baseVal); // Output: 45 | ||
``` | ||
|
||
## Specifications | ||
|
||
{{Specifications}} | ||
|
||
## Browser compatibility | ||
|
||
{{Compat}} | ||
|
||
## See also | ||
|
||
- {{domxref("SVGAnimatedNumber")}} |
57 changes: 57 additions & 0 deletions
57
files/en-us/web/api/svgfedistantlightelement/elevation/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
title: "SVGFEDistantLightElement: elevation property" | ||
short-title: elevation | ||
slug: Web/API/SVGFEDistantLightElement/elevation | ||
page-type: web-api-instance-property | ||
browser-compat: api.SVGFEDistantLightElement.elevation | ||
--- | ||
|
||
{{APIRef("SVG")}} | ||
|
||
The **`elevation`** read-only property of the {{domxref("SVGFEDistantLightElement")}} interface reflects the {{SVGAttr("elevation")}} attribute of the given {{SVGElement("feDistantLight")}} element. | ||
|
||
## Value | ||
|
||
An {{domxref("SVGAnimatedNumber")}} object. | ||
|
||
## Examples | ||
|
||
### Accessing the `elevation` Property | ||
|
||
```html | ||
<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> | ||
<defs> | ||
<filter id="lightingFilter"> | ||
<feDistantLight azimuth="45" elevation="30" /> | ||
<feDiffuseLighting result="light" lighting-color="white" surfaceScale="2"> | ||
<feDistantLight azimuth="45" elevation="30" /> | ||
</feDiffuseLighting> | ||
</filter> | ||
</defs> | ||
<rect | ||
x="50" | ||
y="50" | ||
width="100" | ||
height="100" | ||
style="fill:yellow;" | ||
filter="url(#lightingFilter)" /> | ||
</svg> | ||
``` | ||
|
||
```js | ||
const distantLight = document.querySelector("feDistantLight"); | ||
|
||
console.log(distantLight.elevation.baseVal); // Output: 30 | ||
``` | ||
|
||
## Specifications | ||
|
||
{{Specifications}} | ||
|
||
## Browser compatibility | ||
|
||
{{Compat}} | ||
|
||
## See also | ||
|
||
- {{domxref("SVGAnimatedNumber")}} |