Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Pages: SVGFEDistantLightElement #37427

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions files/en-us/web/api/svgfedistantlightelement/azimuth/index.md
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 files/en-us/web/api/svgfedistantlightelement/elevation/index.md
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")}}
Loading