The renderer now accepts a density parameter, that multiplies the columns.

Glyph depth now impacts brightness.
Raindrops now move forward at a steady speed.
This commit is contained in:
Rezmason
2021-09-05 21:58:00 -07:00
parent 7973a11fd7
commit 4add0c3324
2 changed files with 46 additions and 27 deletions

View File

@@ -18,6 +18,7 @@ const fonts = {
const defaults = {
animationSpeed: 1,
forwardSpeed: 0.25,
bloomStrength: 1,
bloomSize: 1,
highPassThreshold: 0.3,
@@ -39,6 +40,7 @@ const defaults = {
rippleScale: 30,
rippleSpeed: 0.2,
numColumns: 80,
density: 1,
paletteEntries: [
{ rgb: [0.0, 0.0, 0.0], at: 0.0 },
{ rgb: [0.09, 0.33, 0.04], at: 0.25 },
@@ -131,11 +133,17 @@ const paramMapping = {
version: { key: "version", parser: s => s },
effect: { key: "effect", parser: s => s },
width: { key: "numColumns", parser: s => nullNaN(parseInt(s)) },
numColumns: { key: "numColumns", parser: s => nullNaN(parseInt(s)) },
density: { key: "density", parser: s => nullNaN(range(parseFloat(s), 0)) },
resolution: { key: "resolution", parser: s => nullNaN(parseFloat(s)) },
animationSpeed: {
key: "animationSpeed",
parser: s => nullNaN(parseFloat(s))
},
forwardSpeed: {
key: "forwardSpeed",
parser: s => nullNaN(parseFloat(s))
},
cycleSpeed: { key: "cycleSpeed", parser: s => nullNaN(parseFloat(s)) },
fallSpeed: { key: "fallSpeed", parser: s => nullNaN(parseFloat(s)) },
raindropLength: {