Skip to content

Commit

Permalink
New pages: SVGFEPointLightElement (#37423)
Browse files Browse the repository at this point in the history
* New pages: SVGFEPointLightElement

* api main page

* remove files

* New pages: SVGFEPointLightElement

* Update files/en-us/web/api/svgfepointlightelement/x/index.md

* Update files/en-us/web/api/svgfepointlightelement/y/index.md

---------

Co-authored-by: wbamberg <[email protected]>
  • Loading branch information
estelle and wbamberg authored Jan 22, 2025
1 parent 9d9ec23 commit 1c8ca24
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 0 deletions.
40 changes: 40 additions & 0 deletions files/en-us/web/api/svgfepointlightelement/x/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: "SVGFEPointLightElement: x property"
short-title: x
slug: Web/API/SVGFEPointLightElement/x
page-type: web-api-instance-property
browser-compat: api.SVGFEPointLightElement.x
---

{{APIRef("SVG")}}

The **`x`** read-only property of the {{domxref("SVGFEPointLightElement")}} interface describes the horizontal coordinate of the position of an SVG filter primitive as a {{domxref("SVGAnimatedNumber")}}.

It reflects the {{SVGAttr("x")}} attribute of the {{SVGElement("fePointLight")}} element, which can be used to define the light source in a point light effect. The attribute is a [`<number>`](/en-US/docs/Web/SVG/Content_type#number). The default value is `0`.

## Value

An {{domxref("SVGAnimatedNumber")}}.

## Example

```js
const fePointLight = document.querySelector("fePointLight");
const leftPosition = fePointLight.x;
console.log(leftPosition.baseVal.value); // the `x` value
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("SVGFEPointLightElement.y")}}
- {{domxref("SVGFEPointLightElement.z")}}
- {{domxref("SVGFEDistantLightElement")}}
- {{domxref("SVGFESpotLightElement")}}
40 changes: 40 additions & 0 deletions files/en-us/web/api/svgfepointlightelement/y/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: "SVGFEPointLightElement: y property"
short-title: "y"
slug: Web/API/SVGFEPointLightElement/y
page-type: web-api-instance-property
browser-compat: api.SVGFEPointLightElement.y
---

{{APIRef("SVG")}}

The **`y`** read-only property of the {{domxref("SVGFEPointLightElement")}} interface describes the vertical coordinate of the position of an SVG filter primitive as a {{domxref("SVGAnimatedNumber")}}.

It reflects the {{SVGAttr("y")}} attribute of the {{SVGElement("fePointLight")}} element, which can be used to define the light source in a point light effect. The attribute is a [`<number>`](/en-US/docs/Web/SVG/Content_type#number). The default value is `0`.

## Value

An {{domxref("SVGAnimatedNumber")}}.

## Example

```js
const fePointLight = document.querySelector("fePointLight");
const topPosition = fePointLight.y;
console.log(topPosition.baseVal.value); // the `y` value
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("SVGFEPointLightElement.x")}}
- {{domxref("SVGFEPointLightElement.z")}}
- {{domxref("SVGFEDistantLightElement")}}
- {{domxref("SVGFESpotLightElement")}}
40 changes: 40 additions & 0 deletions files/en-us/web/api/svgfepointlightelement/z/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: "SVGFEPointLightElement: z property"
short-title: z
slug: Web/API/SVGFEPointLightElement/z
page-type: web-api-instance-property
browser-compat: api.SVGFEPointLightElement.z
---

{{APIRef("SVG")}}

The **`z`** read-only property of the {{domxref("SVGFEPointLightElement")}} interface describes the z-axis value of the position of an SVG filter primitive as a {{domxref("SVGAnimatedNumber")}}. A positive Z-axis comes out towards the person viewing the content.

It reflects the {{SVGAttr("z")}} attribute of the {{SVGElement("fePointLight")}} element, which can be used to define the light source in a point light effect. The attribute is a [`<number>`](/en-US/docs/Web/SVG/Content_type#number). The default value is `0`.

## Value

An {{domxref("SVGAnimatedNumber")}}.

## Example

```js
const fePointLight = document.querySelector("fePointLight");
const zVal = fePointLight.z;
console.log(zVal.baseVal.value); // the `z` value
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("SVGFEPointLightElement.x")}}
- {{domxref("SVGFEPointLightElement.y")}}
- {{domxref("SVGFEDistantLightElement")}}
- {{domxref("SVGFESpotLightElement")}}

0 comments on commit 1c8ca24

Please sign in to comment.