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: SVGFEPointLightElement #37423

Merged
merged 7 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from 6 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
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`.
wbamberg marked this conversation as resolved.
Show resolved Hide resolved

## 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")}}
Loading