*anna* 4 years ago
parent aca26b8d7e
commit dfd8eb3fe5

@ -21,19 +21,19 @@ var counters = [];
var posX;
var posY;
var drawAlpha = true;
var drawAlpha = true; // var that controls the opacity
function preload() {
joinedText = loadStrings('data/library_babel_extract1.txt');
}
function setup() {
createCanvas(1920, windowHeight);
createCanvas(1000, windowHeight);
noStroke();
textFont('monospace', 30);
joinedText = joinedText.join(' ');
joinedText = joinedText.join(' '); //.join returns the array as a string-in parentesis u can put the separator u want
// use the following command, to collect all characters in the text automatically
// alphabet = getUniqCharacters();
@ -98,6 +98,8 @@ function getUniqCharacters() {
return uniqCharsArray.join('');
}
//prints a png put of the result
function keyReleased() {
if (key == 's' || key == 'S') saveCanvas(gd.timestamp(), 'png');
if (key == 'a' || key == 'A') drawAlpha = !drawAlpha;

Loading…
Cancel
Save