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

47 lines
1.2 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
<style>
body {
margin: 0;
}
iframe {
margin: 0;
margin: 10px;
padding: 0;
border-width: 5px;
border-color: rgb(67, 0, 67);
border-style:groove;
border-radius: 10%;
box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.75);
}
</style>
<script>
const params = new URLSearchParams(window.location.search);
const sketchList = params.get('sketches'); // e.g. liberay.html?sketches=2images.js,calmCircles.js
const sketchSize = params.get('size'); // e.g. liberay.html?size=500
if (sketchList) {
const sketches = sketchList.split(',');
for (let sketch of sketches) {
const iframe = document.createElement('iframe');
iframe.src = `loader.html?sketch=${encodeURIComponent(sketch)}`;
// Apply size if provided
if (sketchSize) {
iframe.style.width = sketchSize + 'px';
iframe.style.height = sketchSize + 'px';
} else {
iframe.style.width = '500px';
iframe.style.height = '500px';
}
document.body.appendChild(iframe);
}
}
</script>
</html>