diff --git a/src/mappings/coloring.js b/src/mappings/coloring.js index 26bdbcc..bd42a0d 100644 --- a/src/mappings/coloring.js +++ b/src/mappings/coloring.js @@ -20,7 +20,7 @@ import { mapBinNumerical, mapRangedAvgNumerical } from "./numeric.js"; * @param {number} [conf.upperVal=0] The upper boundary of possible values for the color component (0 to 255 inclusive). * @returns {{bin: number, listener: VisUpdateRouter~visualizerBinUpdateListener}|{lower: number, upper: number, listener: VisUpdateRouter~visualizerRangedUpdateListener}} The ranged listener that was added. */ -export function mapRgba({ element, color, lowerBin, visUpdateRouter, interpolator, upperBin = undefined, reversed = false, lowerVal = 0, upperVal = 255 }) { +export function mapFontRgba({ element, color, lowerBin, visUpdateRouter, interpolator, upperBin = undefined, reversed = false, lowerVal = 0, upperVal = 255 }) { const rgbaStr = "rgba"; color = rgbaStr.indexOf(color); if (color < 0) throw new Error("Invalid color parameter provided."); diff --git a/tutorials/VisMusicPlayer.html b/tutorials/VisMusicPlayer.html index 1447fb5..f58121f 100644 --- a/tutorials/VisMusicPlayer.html +++ b/tutorials/VisMusicPlayer.html @@ -105,7 +105,7 @@

             const fontColorElem = document.getElementById("font-color-map-demo");
-            ask.mappings.coloring.mapRgba({ // Under mappings, the text module. We just want to map one of the RGBA color components...
+            ask.mappings.coloring.mapFontRgba({ // 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.coloring.mapRgba({
+    ask.mappings.coloring.mapFontRgba({
         element: fontColorElem,
         color: "r",
         lowerBin: 128,