Added backgroundColor support and improved stripe colors handling in config.

This commit is contained in:
Rezmason
2021-09-12 00:50:51 -07:00
parent 51f1b6ebf5
commit 7910ca0553
3 changed files with 16 additions and 5 deletions

View File

@@ -17,6 +17,7 @@ const fonts = {
};
const defaults = {
backgroundColor: [0, 0, 0],
volumetric: false,
animationSpeed: 1,
forwardSpeed: 0.25,
@@ -160,11 +161,13 @@ const paramMapping = {
parser: s => nullNaN(range(parseFloat(s), 0, 1))
},
url: { key: "bgURL", parser: s => s },
colors: { key: "stripeColors", parser: s => s },
stripeColors: { key: "stripeColors", parser: s => s },
backgroundColor: { key: "backgroundColor", parser: s => s.split(",").map(parseFloat) },
volumetric: { key: "volumetric", parser: s => s.toLowerCase().includes("true") }
};
paramMapping.dropLength = paramMapping.raindropLength;
paramMapping.angle = paramMapping.slant;
paramMapping.colors = paramMapping.stripeColors;
export default (searchString, make1DTexture) => {
const urlParams = Object.fromEntries(