From dfd8eb3fe56e82ced0d4fb1701d0cde17250eb64 Mon Sep 17 00:00:00 2001 From: *anna* Date: Mon, 26 Oct 2020 12:27:56 +0100 Subject: [PATCH] a --- 2_letters+code/sketch.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/2_letters+code/sketch.js b/2_letters+code/sketch.js index 746ec9d..920d2f6 100644 --- a/2_letters+code/sketch.js +++ b/2_letters+code/sketch.js @@ -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;