added loader file

This commit is contained in:
Jürg Hallenbarter
2026-04-14 11:23:15 +00:00
parent 5259410d77
commit f13cc6b27d
6 changed files with 22 additions and 11 deletions

View File

@@ -21,7 +21,7 @@ liberary.innerHTML += "<div class='item'></div>";
} }
var fileName = ""; 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"]; 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", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
for (var i = 0; i < alphabet.length*15; i++){ for (var i = 0; i < alphabet.length*15; i++){
fileName = ""; fileName = "";
for (var i = 0; i < i/alphabet.length; i++){ for (var i = 0; i < i/alphabet.length; i++){

View File

@@ -1,9 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.3.1/p5.min.js"></script>
</head>
<body>
<script src="sketches/imageNoice.js"></script>
</body>
</html>

17
loader.html Normal file
View File

@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.3.1/p5.min.js"></script>
</head>
<body>
<script id="sketch"></script>
<script>
const params = new URLSearchParams(window.location.search);
const sketchName = "sketches/" + params.get('sketch');
if (sketchName) {
const script = document.getElementById('sketch');
script.src = sketchName;
}
</script>
</body>
</html>

View File

@@ -1,5 +1,5 @@
function preload() { function preload() {
img1 = loadImage('assets/wallpaper/elphantJap.jpg'); img1 = loadImage('assets/wallpaper/Space-Nebula.png');
} }
function setup() { function setup() {

2
sketches/sketchList.txt Normal file
View File

@@ -0,0 +1,2 @@
2images.js, calmCircles.js, Cubes.js, image.js, imageNoice.js, labyrinth.js,
RecursiveCubes.js

1
sketches/sketchListGen.sh Executable file
View File

@@ -0,0 +1 @@
ls -F *.js -m | tee sketchList.txt