#Lines _starting_ with # are comments #These values are evaluated only once and don't need to be defined (default values will be used otherwise) #These are integers width=value #canvas width, with gradients doesn't actually need to be big and can be like 2 or 4 if you only have 4 stops etc height=value #canvas height, with gradients doesn't actually need to be big and can be like 2 or 4 if you only have 4 stops etc stops=value #How many gradient stops there are, spaced evenly #These are floats scale=value #How fast time moves time=value #When time starts smooth=value #How far away from absolute smooth we are, between 0 and 1 #These values are evaluated all the time and are floats #Channels r red channel g green channel b blue channel User defined channels are somewhat supported, ie. a s 0.3 r + a works #Variables t current time s current total stops i current stop index, from 0 to stops-1 #Operators #All operator partners must be separated by space #Results are always assigned back to x, value of x is used in some calculations but not all #Results for channels rgb are clamped to between 0 and 255 x = v //assign value v to channel x x + v //add v to x and assing to x x - v //subtract v from x and assing to x x * v //multiply x by v x / v //divide x by v x ^ v //raise x to the power of v x % v //x mod v x ! v //x is !v, 1 or 0 x | v //or x with v x & v //and x with v x x v //xor x with v x e v //if x is equal to v, set x to 1, otherwise 0 x > v //greater than -> 1|0 x < v //less than -> 1|0 x s v //sin of v to x x c v //cos of v x t v //tan of v x f v //floor of v x=r|g|b|a|b|...c v=t|i|n #Try for example width=1024 height=128 stops=8 scale=1.5 #Base colours g = 128 b = 196 #Dynamically changing stuff r = i r / 2 r + t r s r r s r r + 1 r / 2 r * 256 a s t a * 64 b + a #Which is the same as r=256*((sin(sin(i/2+t))+1)/2), g=128, b=196+64*sin(t)