Added options for bounds on text color mapping values.

Refactored how mapping functions were organized.
This commit is contained in:
2022-04-21 01:46:44 -05:00
parent 13f73132eb
commit 5dcbef2b63
5 changed files with 96 additions and 93 deletions

View File

@@ -105,7 +105,7 @@
</div>
<pre><code class="language-js">
const fontColorElem = document.getElementById("font-color-map-demo");
ask.mappings.text.mapRgba({ // Under mappings, the text module. We just want to map one of the RGBA color components...
ask.mappings.coloring.mapRgba({ // Under mappings, the text module. We just want to map one of the RGBA color components...
element: fontColorElem, // The element to map (same as above examples).
color: "r", // Choose the red component.
lowerBin: 128, // All other values are what we've seen above.
@@ -173,7 +173,7 @@
ask.mappings.dimensions.mapHeight(squareElemConf);
const fontColorElem = document.getElementById("font-color-map-demo");
ask.mappings.text.mapRgba({
ask.mappings.coloring.mapRgba({
element: fontColorElem,
color: "r",
lowerBin: 128,