From bb139a3d85c7caa2202d61a50e029cd1440fe7d7 Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Sun, 17 Apr 2022 20:22:43 -0500 Subject: [PATCH] Refactored file structure. --- src/audioshowkitlib.js | 3 ++- src/mapping/dimensions.js | 2 +- src/mapping/mappings.js | 6 ++---- src/mapping/{generic.js => numeric.js} | 0 src/mapping/text.js | 4 ++-- src/{mapping => support}/colors.js | 0 src/{mapping => support}/easings.js | 0 src/support/support.js | 4 ++++ 8 files changed, 11 insertions(+), 8 deletions(-) rename src/mapping/{generic.js => numeric.js} (100%) rename src/{mapping => support}/colors.js (100%) rename src/{mapping => support}/easings.js (100%) create mode 100644 src/support/support.js diff --git a/src/audioshowkitlib.js b/src/audioshowkitlib.js index f3ec308..0db8475 100644 --- a/src/audioshowkitlib.js +++ b/src/audioshowkitlib.js @@ -8,5 +8,6 @@ import * as mappings from "./mapping/mappings.js"; import * as player from "./player/player.js"; import * as visualization from "./visualization/visualization.js"; +import * as support from "./support/support.js"; -export { mappings, player, visualization }; \ No newline at end of file +export { mappings, player, visualization, support }; \ No newline at end of file diff --git a/src/mapping/dimensions.js b/src/mapping/dimensions.js index 683e27c..519ffaa 100644 --- a/src/mapping/dimensions.js +++ b/src/mapping/dimensions.js @@ -1,5 +1,5 @@ import VisualizerUpdateManager from "../visualization/VisualizerUpdateManager.js"; -import { mapBinNumerical, mapRangedAvgNumerical } from "./generic.js"; +import { mapBinNumerical, mapRangedAvgNumerical } from "./numeric.js"; /** * Maps the width of an element to frequency bin(s). diff --git a/src/mapping/mappings.js b/src/mapping/mappings.js index 2033d88..799072c 100644 --- a/src/mapping/mappings.js +++ b/src/mapping/mappings.js @@ -1,6 +1,4 @@ -import * as colors from "./colors.js"; import * as dimensions from "./dimensions.js"; -import * as easings from "./easings.js"; -import * as generic from "./generic.js"; +import * as numeric from "./numeric.js"; -export { colors, dimensions, easings, generic }; \ No newline at end of file +export { dimensions, numeric }; \ No newline at end of file diff --git a/src/mapping/generic.js b/src/mapping/numeric.js similarity index 100% rename from src/mapping/generic.js rename to src/mapping/numeric.js diff --git a/src/mapping/text.js b/src/mapping/text.js index ed1e2d1..fd0c1f4 100644 --- a/src/mapping/text.js +++ b/src/mapping/text.js @@ -1,6 +1,6 @@ -import { parseColor, rgbaToHexRgba } from "./colors.js"; +import { parseColor, rgbaToHexRgba } from "../support/colors.js"; import VisualizerUpdateManager from "../visualization/VisualizerUpdateManager.js"; -import { mapBinNumerical, mapRangedAvgNumerical } from "./generic.js"; +import { mapBinNumerical, mapRangedAvgNumerical } from "./numeric.js"; /** diff --git a/src/mapping/colors.js b/src/support/colors.js similarity index 100% rename from src/mapping/colors.js rename to src/support/colors.js diff --git a/src/mapping/easings.js b/src/support/easings.js similarity index 100% rename from src/mapping/easings.js rename to src/support/easings.js diff --git a/src/support/support.js b/src/support/support.js new file mode 100644 index 0000000..32df7c9 --- /dev/null +++ b/src/support/support.js @@ -0,0 +1,4 @@ +import * as colors from "./colors.js"; +import * as easings from "./easings.js"; + +export { colors, easings }; \ No newline at end of file