Files
p5js/loader.html
Jürg Hallenbarter 9a9080c155 added more algorithms
Co-authored-by: Copilot <copilot@github.com>
2026-04-27 17:08:24 +00:00

31 lines
737 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<script src="js/p5.js"></script>
</head>
<body style="background-color: beige; margin: 0;">
<script id="sketch"></script>
<script>
const params = new URLSearchParams(window.location.search);
let sketchName = "sketches/" + params.get('sketch');
if (sketchName == "sketches/") {
sketchName = "sketches/" + params.get('sketches');
}
if (sketchName) {
console.log(sketchName+" found");
if (!sketchName.endsWith('.js')) {
sketchName += '.js';
}
const script = document.getElementById('sketch');
script.src = sketchName;
}
</script>
</body>
<style>
body {
margin: 0;
overflow: hidden;
}
</style>
</html>