This is really cool! Can you explain how you factored the velocity and also how the backend works here?
The time it takes to earn one dollar at that wage is the time it takes for one dollar to scroll off the screen.
$7.25 an hour means you earn a dollar every 8 minutes, so it takes about 8 mintues for one dollar on the top row to disappear off the side.
If you look at the code for the site, it's not obfuscated, so you can see all the math:
speed={this.perHour(7.25)}
....
perHour(amount) {
return amount / 60 / 60;
}
....
let offset = (1/dollarsPerRow * dollarWidth * speed * Date.now()/1000) % dollarWidth;
Those are the key bits.Also, there is no backend. It's all written in frontend react. Again, it's not obfuscated, you can poke around easily enough.
I can’t wait for the web to be an archive of torrented Git-versioned repositories à la Ceptr.org.