From 491325f53af45320a5e6df83ccbc44935d896ed4 Mon Sep 17 00:00:00 2001 From: estelle Date: Fri, 20 Dec 2024 14:41:36 -0800 Subject: [PATCH 1/2] New pages: SVGFEDiffuseLightingElement API --- .../height/index.md | 41 +++++++++++++++++ .../result/index.md | 44 +++++++++++++++++++ .../width/index.md | 41 +++++++++++++++++ .../svgfediffuselightingelement/x/index.md | 41 +++++++++++++++++ .../svgfediffuselightingelement/y/index.md | 41 +++++++++++++++++ 5 files changed, 208 insertions(+) create mode 100644 files/en-us/web/api/svgfediffuselightingelement/height/index.md create mode 100644 files/en-us/web/api/svgfediffuselightingelement/result/index.md create mode 100644 files/en-us/web/api/svgfediffuselightingelement/width/index.md create mode 100644 files/en-us/web/api/svgfediffuselightingelement/x/index.md create mode 100644 files/en-us/web/api/svgfediffuselightingelement/y/index.md diff --git a/files/en-us/web/api/svgfediffuselightingelement/height/index.md b/files/en-us/web/api/svgfediffuselightingelement/height/index.md new file mode 100644 index 000000000000000..112048d3bcd378e --- /dev/null +++ b/files/en-us/web/api/svgfediffuselightingelement/height/index.md @@ -0,0 +1,41 @@ +--- +title: "SVGFEDiffuseLightingElement: height property" +short-title: height +slug: Web/API/SVGFEDiffuseLightingElement/height +page-type: web-api-instance-property +browser-compat: api.SVGFEDiffuseLightingElement.height +--- + +{{APIRef("SVG")}} + +The **`height`** read-only property of the {{domxref("SVGFEDiffuseLightingElement")}} interface describes the vertical size of an SVG filter primitive as a {{domxref("SVGAnimatedLength")}}. + +It reflects the {{SVGElement("feDiffuseLighting")}} element's {{SVGAttr("height")}} filter primitive attribute. The filter lights an image using the alpha channel as a bump map. The attributeis a [``](/en-US/docs/Web/SVG/Content_type#length) or a [``](/en-US/docs/Web/SVG/Content_type#percentage) relative to the height of the filter region. The default value is `100%`. The property value is a length in user coordinate system units. + +## Value + +An {{domxref("SVGAnimatedLength")}}. + +## Example + +```js +const feDiffuseLighting = document.querySelector("feDiffuseLighting"); +const verticalSize = feDiffuseLighting.height; +console.log(verticalSize.baseVal.value); // the `height` value +``` + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- {{domxref("SVGFEDiffuseLightingElement.width")}} +- {{domxref("SVGFESpecularLightingElement")}} +- {{SVGElement("feSpecularLighting")}} +- CSS {{cssxref("blend-mode")}} data type +- CSS {{cssxref("mix-blend-mode")}} property diff --git a/files/en-us/web/api/svgfediffuselightingelement/result/index.md b/files/en-us/web/api/svgfediffuselightingelement/result/index.md new file mode 100644 index 000000000000000..7bfdd6e6af4f4f6 --- /dev/null +++ b/files/en-us/web/api/svgfediffuselightingelement/result/index.md @@ -0,0 +1,44 @@ +--- +title: "SVGFEDiffuseLightingElement: result property" +short-title: result +slug: Web/API/SVGFEDiffuseLightingElement/result +page-type: web-api-instance-property +browser-compat: api.SVGFEDiffuseLightingElement.result +--- + +{{APIRef("SVG")}} + +The **`result`** read-only property of the {{domxref("SVGFEDiffuseLightingElement")}} interface describes the assigned name of an SVG filter primitive as a {{domxref("SVGAnimatedString")}}. + +It reflects the {{SVGElement("feDiffuseLighting")}} element's {{SVGAttr("result")}} attribute. The filter lights an image using the alpha channel as a bump map. The attributevalue is a {{cssxref("custom-ident")}}. If supplied, then graphics that result from processing this filter primitive can be referenced by an {{SVGAttr("in")}} attribute on a subsequent filter primitive within the same {{SVGElement("filter")}} element. + +If no `result` attribute is defined, the filter's `result.baseVal` and `result.animVal` are empty strings, and the output of the `` filter will only be available for re-use as the implicit input into the next filter primitive if that filter primitive provides no value for its `in` attribute. + +## Value + +An {{domxref("SVGAnimatedString")}}. + +## Example + +```js +const feDiffuseLightingElement = document.querySelector("feDiffuseLighting"); +const filterName = feDiffuseLightingElement.result; +console.log(filterName.baseVa); // the filter's assigned name +``` + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- {{domxref("SVGFEDiffuseLightingElement.in1")}} +- {{cssxref("custom-ident")}} data type +- {{domxref("SVGFESpecularLightingElement")}} +- {{SVGElement("feSpecularLighting")}} +- CSS {{cssxref("blend-mode")}} data type +- CSS {{cssxref("mix-blend-mode")}} property diff --git a/files/en-us/web/api/svgfediffuselightingelement/width/index.md b/files/en-us/web/api/svgfediffuselightingelement/width/index.md new file mode 100644 index 000000000000000..5aac186d9033b7a --- /dev/null +++ b/files/en-us/web/api/svgfediffuselightingelement/width/index.md @@ -0,0 +1,41 @@ +--- +title: "SVGFEDiffuseLightingElement: width property" +short-title: width +slug: Web/API/SVGFEDiffuseLightingElement/width +page-type: web-api-instance-property +browser-compat: api.SVGFEDiffuseLightingElement.width +--- + +{{APIRef("SVG")}} + +The **`width`** read-only property of the {{domxref("SVGFEDiffuseLightingElement")}} interface describes the horizontal size of an SVG filter primitive as a {{domxref("SVGAnimatedLength")}}. + +It reflects the {{SVGElement("feDiffuseLighting")}} element's {{SVGAttr("width")}} filter primitive attribute. The filter lights an image using the alpha channel as a bump map. The attributeis a [``](/en-US/docs/Web/SVG/Content_type#length) or a [``](/en-US/docs/Web/SVG/Content_type#percentage) relative to the width of the filter region. The default value is `100%`. The property value is a length in user coordinate system units. + +## Value + +An {{domxref("SVGAnimatedLength")}}. + +## Example + +```js +const feDiffuseLighting = document.querySelector("feDiffuseLighting"); +const horizontalSize = feDiffuseLighting.width; +console.log(horizontalSize.baseVal.value); // the `width` value +``` + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- {{domxref("SVGFEDiffuseLightingElement.height")}} +- {{domxref("SVGFESpecularLightingElement")}} +- {{SVGElement("feSpecularLighting")}} +- CSS {{cssxref("blend-mode")}} data type +- CSS {{cssxref("mix-blend-mode")}} property diff --git a/files/en-us/web/api/svgfediffuselightingelement/x/index.md b/files/en-us/web/api/svgfediffuselightingelement/x/index.md new file mode 100644 index 000000000000000..14ad21c80c78e42 --- /dev/null +++ b/files/en-us/web/api/svgfediffuselightingelement/x/index.md @@ -0,0 +1,41 @@ +--- +title: "SVGFEDiffuseLightingElement: x property" +short-title: x +slug: Web/API/SVGFEDiffuseLightingElement/x +page-type: web-api-instance-property +browser-compat: api.SVGFEDiffuseLightingElement.x +--- + +{{APIRef("SVG")}} + +The **`x`** read-only property of the {{domxref("SVGFEDiffuseLightingElement")}} interface describes the horizontal coordinate of the position of an SVG filter primitive as a {{domxref("SVGAnimatedLength")}}. + +It reflects the {{SVGElement("feDiffuseLighting")}} element's {{SVGAttr("x")}} filter primitive attribute value. The filter lights an image using the alpha channel as a bump map. The attributeis a [``](/en-US/docs/Web/SVG/Content_type#length) or [``](/en-US/docs/Web/SVG/Content_type#percentage). The `` is a length in the user coordinate system that is the given distance from the origin of the user coordinate system along the x-axis. If the `x` attribute is a percent value, the property value is relative to the width of the filter region in user coordinate system units. The default value is `0`. + +## Value + +An {{domxref("SVGAnimatedLength")}}. + +## Example + +```js +const feDiffuseLighting = document.querySelector("feDiffuseLighting"); +const leftPosition = feDiffuseLighting.x; +console.log(leftPosition.baseVal.value); // the `x` value +``` + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- {{domxref("SVGFEDiffuseLightingElement.y")}} +- {{domxref("SVGFESpecularLightingElement")}} +- {{SVGElement("feSpecularLighting")}} +- CSS {{cssxref("blend-mode")}} data type +- CSS {{cssxref("mix-blend-mode")}} property diff --git a/files/en-us/web/api/svgfediffuselightingelement/y/index.md b/files/en-us/web/api/svgfediffuselightingelement/y/index.md new file mode 100644 index 000000000000000..4ff5b4a43a17de0 --- /dev/null +++ b/files/en-us/web/api/svgfediffuselightingelement/y/index.md @@ -0,0 +1,41 @@ +--- +title: "SVGFEDiffuseLightingElement: y property" +short-title: "y" +slug: Web/API/SVGFEDiffuseLightingElement/y +page-type: web-api-instance-property +browser-compat: api.SVGFEDiffuseLightingElement.y +--- + +{{APIRef("SVG")}} + +The **`y`** read-only property of the {{domxref("SVGFEDiffuseLightingElement")}} interface describes the vertical coordinate of the position of an SVG filter primitive as a {{domxref("SVGAnimatedLength")}}. + +It reflects the {{SVGElement("feDiffuseLighting")}} element's {{SVGAttr("y")}} filter primitive attribute value. The filter lights an image using the alpha channel as a bump map. The attributeis a [``](/en-US/docs/Web/SVG/Content_type#length) or [``](/en-US/docs/Web/SVG/Content_type#percentage). The `` is a length in the user coordinate system that is the given distance from the origin of the filter along the y-axis. If the `y` attribute is a percent value, the property value is a relative to the height of the filter region in user coordinate system units. The default value is `0`. + +## Value + +An {{domxref("SVGAnimatedLength")}}. + +## Example + +```js +const feDiffuseLighting = document.querySelector("feDiffuseLighting"); +const topPosition = feDiffuseLighting.y; +console.log(topPosition.baseVal.value); // the `y` value +``` + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- {{domxref("SVGFEDiffuseLightingElement.x")}} +- {{domxref("SVGFESpecularLightingElement")}} +- {{SVGElement("feSpecularLighting")}} +- CSS {{cssxref("blend-mode")}} data type +- CSS {{cssxref("mix-blend-mode")}} property From 636bba1e4a18cebcc188f868d1652adefc11d569 Mon Sep 17 00:00:00 2001 From: sideshowbarker Date: Tue, 7 Jan 2025 19:43:21 +0900 Subject: [PATCH 2/2] Apply suggestions from code review --- files/en-us/web/api/svgfediffuselightingelement/height/index.md | 2 +- files/en-us/web/api/svgfediffuselightingelement/result/index.md | 2 +- files/en-us/web/api/svgfediffuselightingelement/width/index.md | 2 +- files/en-us/web/api/svgfediffuselightingelement/x/index.md | 2 +- files/en-us/web/api/svgfediffuselightingelement/y/index.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/files/en-us/web/api/svgfediffuselightingelement/height/index.md b/files/en-us/web/api/svgfediffuselightingelement/height/index.md index 112048d3bcd378e..16d2cdcfe38261f 100644 --- a/files/en-us/web/api/svgfediffuselightingelement/height/index.md +++ b/files/en-us/web/api/svgfediffuselightingelement/height/index.md @@ -10,7 +10,7 @@ browser-compat: api.SVGFEDiffuseLightingElement.height The **`height`** read-only property of the {{domxref("SVGFEDiffuseLightingElement")}} interface describes the vertical size of an SVG filter primitive as a {{domxref("SVGAnimatedLength")}}. -It reflects the {{SVGElement("feDiffuseLighting")}} element's {{SVGAttr("height")}} filter primitive attribute. The filter lights an image using the alpha channel as a bump map. The attributeis a [``](/en-US/docs/Web/SVG/Content_type#length) or a [``](/en-US/docs/Web/SVG/Content_type#percentage) relative to the height of the filter region. The default value is `100%`. The property value is a length in user coordinate system units. +It reflects the {{SVGElement("feDiffuseLighting")}} element's {{SVGAttr("height")}} filter primitive attribute. The filter lights an image using the alpha channel as a bump map. The attribute is a [``](/en-US/docs/Web/SVG/Content_type#length) or a [``](/en-US/docs/Web/SVG/Content_type#percentage) relative to the height of the filter region. The default value is `100%`. The property value is a length in user coordinate system units. ## Value diff --git a/files/en-us/web/api/svgfediffuselightingelement/result/index.md b/files/en-us/web/api/svgfediffuselightingelement/result/index.md index 7bfdd6e6af4f4f6..971b4dfcde8009b 100644 --- a/files/en-us/web/api/svgfediffuselightingelement/result/index.md +++ b/files/en-us/web/api/svgfediffuselightingelement/result/index.md @@ -10,7 +10,7 @@ browser-compat: api.SVGFEDiffuseLightingElement.result The **`result`** read-only property of the {{domxref("SVGFEDiffuseLightingElement")}} interface describes the assigned name of an SVG filter primitive as a {{domxref("SVGAnimatedString")}}. -It reflects the {{SVGElement("feDiffuseLighting")}} element's {{SVGAttr("result")}} attribute. The filter lights an image using the alpha channel as a bump map. The attributevalue is a {{cssxref("custom-ident")}}. If supplied, then graphics that result from processing this filter primitive can be referenced by an {{SVGAttr("in")}} attribute on a subsequent filter primitive within the same {{SVGElement("filter")}} element. +It reflects the {{SVGElement("feDiffuseLighting")}} element's {{SVGAttr("result")}} attribute. The filter lights an image using the alpha channel as a bump map. The attribute value is a {{cssxref("custom-ident")}}. If supplied, then graphics that result from processing this filter primitive can be referenced by an {{SVGAttr("in")}} attribute on a subsequent filter primitive within the same {{SVGElement("filter")}} element. If no `result` attribute is defined, the filter's `result.baseVal` and `result.animVal` are empty strings, and the output of the `` filter will only be available for re-use as the implicit input into the next filter primitive if that filter primitive provides no value for its `in` attribute. diff --git a/files/en-us/web/api/svgfediffuselightingelement/width/index.md b/files/en-us/web/api/svgfediffuselightingelement/width/index.md index 5aac186d9033b7a..931670b8b6f512b 100644 --- a/files/en-us/web/api/svgfediffuselightingelement/width/index.md +++ b/files/en-us/web/api/svgfediffuselightingelement/width/index.md @@ -10,7 +10,7 @@ browser-compat: api.SVGFEDiffuseLightingElement.width The **`width`** read-only property of the {{domxref("SVGFEDiffuseLightingElement")}} interface describes the horizontal size of an SVG filter primitive as a {{domxref("SVGAnimatedLength")}}. -It reflects the {{SVGElement("feDiffuseLighting")}} element's {{SVGAttr("width")}} filter primitive attribute. The filter lights an image using the alpha channel as a bump map. The attributeis a [``](/en-US/docs/Web/SVG/Content_type#length) or a [``](/en-US/docs/Web/SVG/Content_type#percentage) relative to the width of the filter region. The default value is `100%`. The property value is a length in user coordinate system units. +It reflects the {{SVGElement("feDiffuseLighting")}} element's {{SVGAttr("width")}} filter primitive attribute. The filter lights an image using the alpha channel as a bump map. The attribute is a [``](/en-US/docs/Web/SVG/Content_type#length) or a [``](/en-US/docs/Web/SVG/Content_type#percentage) relative to the width of the filter region. The default value is `100%`. The property value is a length in user coordinate system units. ## Value diff --git a/files/en-us/web/api/svgfediffuselightingelement/x/index.md b/files/en-us/web/api/svgfediffuselightingelement/x/index.md index 14ad21c80c78e42..b7f6f4e9a3e9e11 100644 --- a/files/en-us/web/api/svgfediffuselightingelement/x/index.md +++ b/files/en-us/web/api/svgfediffuselightingelement/x/index.md @@ -10,7 +10,7 @@ browser-compat: api.SVGFEDiffuseLightingElement.x The **`x`** read-only property of the {{domxref("SVGFEDiffuseLightingElement")}} interface describes the horizontal coordinate of the position of an SVG filter primitive as a {{domxref("SVGAnimatedLength")}}. -It reflects the {{SVGElement("feDiffuseLighting")}} element's {{SVGAttr("x")}} filter primitive attribute value. The filter lights an image using the alpha channel as a bump map. The attributeis a [``](/en-US/docs/Web/SVG/Content_type#length) or [``](/en-US/docs/Web/SVG/Content_type#percentage). The `` is a length in the user coordinate system that is the given distance from the origin of the user coordinate system along the x-axis. If the `x` attribute is a percent value, the property value is relative to the width of the filter region in user coordinate system units. The default value is `0`. +It reflects the {{SVGElement("feDiffuseLighting")}} element's {{SVGAttr("x")}} filter primitive attribute value. The filter lights an image using the alpha channel as a bump map. The attribute is a [``](/en-US/docs/Web/SVG/Content_type#length) or [``](/en-US/docs/Web/SVG/Content_type#percentage). The `` is a length in the user coordinate system that is the given distance from the origin of the user coordinate system along the x-axis. If the `x` attribute is a percent value, the property value is relative to the width of the filter region in user coordinate system units. The default value is `0`. ## Value diff --git a/files/en-us/web/api/svgfediffuselightingelement/y/index.md b/files/en-us/web/api/svgfediffuselightingelement/y/index.md index 4ff5b4a43a17de0..6ad9d4ba321d15d 100644 --- a/files/en-us/web/api/svgfediffuselightingelement/y/index.md +++ b/files/en-us/web/api/svgfediffuselightingelement/y/index.md @@ -10,7 +10,7 @@ browser-compat: api.SVGFEDiffuseLightingElement.y The **`y`** read-only property of the {{domxref("SVGFEDiffuseLightingElement")}} interface describes the vertical coordinate of the position of an SVG filter primitive as a {{domxref("SVGAnimatedLength")}}. -It reflects the {{SVGElement("feDiffuseLighting")}} element's {{SVGAttr("y")}} filter primitive attribute value. The filter lights an image using the alpha channel as a bump map. The attributeis a [``](/en-US/docs/Web/SVG/Content_type#length) or [``](/en-US/docs/Web/SVG/Content_type#percentage). The `` is a length in the user coordinate system that is the given distance from the origin of the filter along the y-axis. If the `y` attribute is a percent value, the property value is a relative to the height of the filter region in user coordinate system units. The default value is `0`. +It reflects the {{SVGElement("feDiffuseLighting")}} element's {{SVGAttr("y")}} filter primitive attribute value. The filter lights an image using the alpha channel as a bump map. The attribute is a [``](/en-US/docs/Web/SVG/Content_type#length) or [``](/en-US/docs/Web/SVG/Content_type#percentage). The `` is a length in the user coordinate system that is the given distance from the origin of the filter along the y-axis. If the `y` attribute is a percent value, the property value is a relative to the height of the filter region in user coordinate system units. The default value is `0`. ## Value