dingbat diashow.                       terug naar de inleiding       naar de diashow in fullscreen

Een diashow met  dingbat fonts van Manfred Klein

Toetsfuncties
1) LAURN
2) Batzbats
3) CavebatsThree
4) CavePopart
5) ArtMonsters
6) 20thCenturyArt01
7) VectorPaintings
8) VisualOpsession
9) BauhausReminisce
#) reset
$) downloaden van een, deels transparante png, afbeelding
 
De schets maakt ook gebruik van de class "Text" met fontkeuze mogelijkheid en de superclass "Vormen"
 
 
 //argumenten van de constructor: 1) tekst string, 2) lettergrootte, 3) draaipunt,
//4) x  positie, 5) y positie, 6) hoek, 7) font 1 t/m 6, 8) letterkleur
//9) lijn dikte, 10) lijnkleur
let font1, font2, font3, font4, font5, font6, font7, font8, font9;
 
laurnArray = []; batzbatsArray = []; cavebatsArray = []; cavepopArray = [];
artMonstersArray = []; century20Array = []; vectPaintArray = [];
 
let n; let toets;
function setup() {
createCanvas(windowWidth, windowHeight);
const x = width/2;
const y = height/2;
const n = height/25;
key = "1";
 
font0 = new Text("",2*n,1,x-24*n,y-10*n,0,3,
color(200,0,250,150),3,color(-0,255,255,150));
//constructor     1    2    3  4   5     6  7           8           9            10
font1 = new Text("A", 16*n, 0, x, y-2*n, 0, 2,color(200,0,250,200),3*n,color(0,255,255,200));
font2 = new Text("A", 16*n, 0, x, y-2*n, 0, 4,color(255,0,0,200),  3*n,color(0,255,0,200));
font3 = new Text("@", 16*n, 0, x, y-2*n, 0, 5,color(0,0,255,200),  3*n,color(255,102,102,200));
font4 = new Text("!", 16*n, 0, x, y-2*n, 0, 6,color(250,25,194,200),3*n,color(215,237,55,200));
font5 = new Text("!", 16*n, 0, x, y-2*n, 0, 7,color(15,19,250,150),3*n,color(232,210,84,250));
font6 = new Text("0", 16*n, 0, x, y-2*n, 0, 9,color(250,13,44,200),3*n,color(49,204,211,200));
font7 = new Text("!", 16*n, 0, x, y-2*n, 0, 10,color(200,0,250,200),3*n,color(0,255,255,150));
font8 = new Text("A", 16*n, 0, x, y-2*n, 0, 11,color(0,0,250,200),3*n,color(255,0,0,150));
font9 = new Text("@", 16*n, 0, x, y-2*n, 0, 8,color(241,15,18,200), 3*n,color(0,255,0,150));
 
laurnArray = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T",
              "U","V","W","X","Y","Z","[","]","^","a","b","c","d","e","f","g","h","i","j",
              "k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~"];
 
batzbatsArray= ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T",
               "U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n",
               "o","p","q","r","s","t","u","v","w","x","y","z"];
 
cavebatsArray= ["@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S",
                "T","U","V","W","X","Y","Z","[","]","a","b","c","d","e","f","g","h","i","j","k",
                "l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"];
 
cavepopArray = ["!",'"',"#","$","%","/","0","2","3","4","5","6","7","8","9","A","B","C","D","E",
                "F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y",
                "Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s",
                "t","u","v","w","x","y","z"];
 
artMonstersArray= ["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/","0","2","3","4","5"
                 ,"6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P"
                 ,"Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j"
                 ,"k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"];
 
century20Array=  ["0","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K"
                 ,"L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e"
                 ,"f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y"
                 ,"z"];
 
vectPaintArray = ["!",'"',"#","$","%","&","'","0","2","3","4","5","6","7","8","9","A","B","C","D"
                 ,"E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X"
                 ,"Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r"
                 ,"s","t","u","v","w","x","y","z"];
}
 
function draw() {
  background(230,251,255);
  font0.display();
   if (key < "9" ||key == "0"||key == "." ||key == "/"
  ||key == ","||key == "'" || key == "-") {key = toets;}

  if (key =='1') {slideFont(font1,60,laurnArray);   font0.text = "1) LAURN";   toets = 1;}
  if (key =='2') {slideFont(font2,52,batzbatsArray);font0.text = "2) Batzbats";toets = 2;}
  if (key =='3') {slideFont(font3,55,cavebatsArray);font0.text = "3) CavebatsThree"; toets = 3;}
  if (key =='4') {slideFont(font4,67,cavepopArray); font0.text = "4) CavePopart";    toets = 4;}
  if (key =='5') {slideFont(font5,76,artMonstersArray);font0.text = "5) ArtMonsters"; toets = 5;}
  if (key =='6') {slideFont(font6,61,century20Array);font0.text = "6) 20thCenturyArt01";toets = 6;}
  if (key =='7') {slideFont(font7,68,vectPaintArray);font0.text = "7) VectorPaintings"; toets = 7;}
  if (key =='8') {slideFont(font8,57,laurnArray);font0.text = "8) VisualObsessions.";   toets = 8;}
  if (key =='9') {slideFont(font9,76,artMonstersArray);font0.text = "9) BauhausReminisce.";toets = 9;}
}
 
function windowResized() {
  resizeCanvas(windowWidth, windowHeight);
}
 
function slideFont(font,n,fontarray) {
  for (let i = 0; i < n; i = i + 1) {
    if (frameCount > i*100+100 && frameCount < i*100+200) {
      font.text = fontarray[i];
      font.display();
    }
    if (frameCount < n*99) {frameCount = 0;}
  }
}
 
function keyPressed() {
  if (key == '#') {setup();}
  if (key == '$') {save('dingbats.png');}
}