This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const p = r.place; | |
const colors = [ | |
{ r: 255, g: 255, b: 255, v: 0 }, | |
{ r: 228, g: 228, b: 228, v: 1 }, | |
{ r: 136, g: 136, b: 136, v: 2 }, | |
{ r: 34, g: 34, b: 34, v: 3 }, | |
{ r: 255, g: 167, b: 209, v: 4 }, | |
{ r: 229, g: 0, b: 0, v: 5 }, | |
{ r: 229, g: 149, b: 0, v: 6 }, | |
{ r: 160, g: 106, b: 66, v: 7 }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const modhash = window.reddit.modhash; | |
const width = 82; | |
const height = 13; | |
var sec = 0, index = Math.floor(Math.random() * 10) * 100;//Math.floor(Math.random() * (width * height)); | |
const getPrevColor = (x, y) => r.place.state[x + (y * 1000)]; | |
setInterval(() => console.log("Drawing in " + (sec--) + " seconds"), 1e3); | |
const draw = seconds => { | |
index++ | |
index = index % (width * height); |