diff --git a/Cubes.js b/Cubes.js deleted file mode 100644 index e2aa251..0000000 --- a/Cubes.js +++ /dev/null @@ -1,18 +0,0 @@ - - -function setup() { - createCanvas(500, 500); - background(255,255,255) - noFill(); - for (i = 0; i < 30; i++){ - circle(width/2 +random(-width/10, width/10), height/2 +random(-height/10, height/10), random(15)*i); - } -} - - -function draw() { - -} - -function mousePressed(){ -} \ No newline at end of file diff --git a/assets/wallpaper b/assets/wallpaper new file mode 120000 index 0000000..2fd6ef9 --- /dev/null +++ b/assets/wallpaper @@ -0,0 +1 @@ +/home/jgh/Dokumente/wallpaper/ \ No newline at end of file diff --git a/devSide.html b/devSide.html new file mode 100644 index 0000000..ebed64e --- /dev/null +++ b/devSide.html @@ -0,0 +1,144 @@ + + +
+ + +title
"; + +liberary.innerHTML += ""; + +// Source - https://stackoverflow.com/a/72205254 +// Posted by Mohammad Ali Rony +// Retrieved 2026-04-01, License - CC BY-SA 4.0 + + function UrlExists(url) + { + var http = new XMLHttpRequest(); + http.open('HEAD', url, false); + http.send(); + return http.status!=404; + } + +var fileName = ""; +var alphabet = ["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"]; +for (var i = 0; i < alphabet.length*15; i++){ + fileName = ""; + for (var i = 0; i < i/alphabet.length; i++){ + fileName += alphabet[i]; + } + fileName = alphabet[i] + ".js"; + if (UrlExists("sketches/"+fileName)){ + console.log(fileName); + } +} + diff --git a/index2.html b/index2.html new file mode 100644 index 0000000..30713dd --- /dev/null +++ b/index2.html @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/sketches/2images.js b/sketches/2images.js new file mode 100644 index 0000000..3dfc2db --- /dev/null +++ b/sketches/2images.js @@ -0,0 +1,41 @@ +function preload() { + img1 = loadImage('assets/wallpaper/dear.png'); + img2 = loadImage('assets/wallpaper/elphantJap.jpg'); +} + +function setup() { + createCanvas(img1.width, img1.height); + background(255,255,255) + + //image(img1, 0, 0); + + for (let col = 0; col < img1.width; col += 1) { + for (let row = 0; row < img1.height; row += 1) { + let c = img1.get(col, row); + if (col%2 == 0){ + stroke(color(c)); + strokeWeight(1); + point(col, row); + } + } + } + for (let col = 0; col < img2.width; col += 1) { + for (let row = 0; row < img2.height; row += 1) { + let c = img2.get(col, row); + if (col%2 == 1){ + stroke(color(c)); + strokeWeight(1); + point(col, row); + } + } + } +} + + +function draw() { + +} + +function mousePressed(){ + +} \ No newline at end of file diff --git a/sketches/Cubes.js b/sketches/Cubes.js new file mode 100644 index 0000000..53fd42d --- /dev/null +++ b/sketches/Cubes.js @@ -0,0 +1,29 @@ +var size = 0 +var randomX = 0 +var randomY = 0 +var mouseIndex = 0 + +function setup() { + createCanvas(500, 500); + background(255,255,255) + noFill(); + for (i = 0; i < 30; i++){ + size = random(0, 15)*i; + randomX = random(-width/10, width/10); + randomY = random(-height/10, height/10); + square(width/2 +randomX - size/2, height/2 +randomY- size/2, size); + } +} + + +function draw() { + +} + +function mousePressed(){ + mouseIndex++ + size = random(0, 15)*i; + randomX = random(-width/10, width/10); + randomY = random(-height/10, height/10); + square(width/2 +randomX - size/2, height/2 +randomY- size/2, size); +} \ No newline at end of file diff --git a/RecursiveCubes.js b/sketches/RecursiveCubes.js similarity index 100% rename from RecursiveCubes.js rename to sketches/RecursiveCubes.js diff --git a/calmCircles.js b/sketches/calmCircles.js similarity index 96% rename from calmCircles.js rename to sketches/calmCircles.js index e3170cc..8ca5de0 100644 --- a/calmCircles.js +++ b/sketches/calmCircles.js @@ -1,5 +1,5 @@ function setup() { - createCanvas(1000, 1000); + createCanvas(500, 500); } function draw() { diff --git a/sketches/image.js b/sketches/image.js new file mode 100644 index 0000000..e767937 --- /dev/null +++ b/sketches/image.js @@ -0,0 +1,30 @@ +function preload() { + img1 = loadImage('assets/wallpaper/dear.png'); + img2 = loadImage('assets/wallpaper/elphantJap.jpg'); +} + +function setup() { + createCanvas(img1.width, img1.height); + background(255,255,255) + + //image(img1, 0, 0); + var glithes= random(3, 10); + + for (let col = 0; col < img1.width; col += 1) { + for (let row = 0; row < img1.height; row += 1) { + let c = img1.get(col, row); + stroke(color(c)); + strokeWeight(1); + point(col, row); + } + } +} + + +function draw() { + +} + +function mousePressed(){ + +} \ No newline at end of file diff --git a/sketches/imageNoice.js b/sketches/imageNoice.js new file mode 100644 index 0000000..28bdeca --- /dev/null +++ b/sketches/imageNoice.js @@ -0,0 +1,38 @@ +function preload() { + img1 = loadImage('assets/wallpaper/elphantJap.jpg'); +} + +function setup() { + createCanvas(img1.width, img1.height); + background(255,255,55) + + //image(img1, 0, 0); + + for (let col = 0; col < img1.width; col += 1) { + for (let row = 0; row < img1.height; row += 1) { + let c = img1.get(col, row); + + if (c[0] + c[1] + c[2] < random(0, 255)*3) { + c[0] = 0; + c[1] = 0; + c[2] = 0; + }else{ + c[0] = 255; + c[1] = 255; + c[2] = 255; + } + stroke(color(c)); + strokeWeight(1); + point(col, row); + } + } +} + + +function draw() { + +} + +function mousePressed(){ + +} \ No newline at end of file diff --git a/labyrinth.js b/sketches/labyrinth.js similarity index 100% rename from labyrinth.js rename to sketches/labyrinth.js