Changes to artgen.scroll.pub

root
root
25 days ago
Initial commit
body.html
Changed around line 1
+
+
+
+
+
+
+
+
+

Create Your Art

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Gallery

+
+
+
+
+

About ArtGen

+

Create stunning generative art directly in your browser. Experiment with different algorithms, colors, and parameters to generate unique pieces of digital art.

+
+
+
+
+

Made with creativity by ArtGen

+
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://artgen.scroll.pub
+ metaTags
+ editButton /edit.html
+ title ArtGen - Interactive Generative Art Creator
+ style.css
+ body.html
+ script.js
prompt.json
Changed around line 1
+ {
+ "id": "msg_01PojfZT4TeocSw7KpnYePkJ",
+ "type": "message",
+ "role": "assistant",
+ "model": "claude-3-5-sonnet-20241022",
+ "content": [
+ {
+ "type": "text",
+ "text": "I'll create an interactive generative art creation website. For the domain, I suggest:\n\n---domain---\nartgen.scroll.pub\n\n---index.scroll---\nbuildHtml\nbaseUrl https://artgen.scroll.pub\nmetaTags\neditButton /edit.html\ntitle ArtGen - Interactive Generative Art Creator\nstyle.css\nbody.html\nscript.js\n\n---body.html---\n
\n \n
\n\n
\n
\n

Create Your Art

\n
\n \n
\n \n
\n
\n \n \n
\n \n
\n \n \n
\n \n
\n \n \n
\n \n \n \n
\n
\n\n
\n

Gallery

\n
\n
\n\n
\n

About ArtGen

\n

Create stunning generative art directly in your browser. Experiment with different algorithms, colors, and parameters to generate unique pieces of digital art.

\n
\n
\n\n
\n

Made with creativity by ArtGen

\n
\n\n---style.css---\n:root {\n --primary: #2a2b2e;\n --accent: #6c63ff;\n --light: #f5f5f7;\n --gradient: linear-gradient(135deg, #6c63ff, #ff6b6b);\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: system-ui, -apple-system, sans-serif;\n line-height: 1.6;\n color: var(--primary);\n background: var(--light);\n}\n\nheader {\n background: white;\n box-shadow: 0 2px 10px rgba(0,0,0,0.1);\n position: fixed;\n width: 100%;\n top: 0;\n z-index: 100;\n}\n\nnav {\n max-width: 1200px;\n margin: 0 auto;\n padding: 1rem;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.logo {\n font-size: 1.5rem;\n font-weight: bold;\n background: var(--gradient);\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n\n.nav-links a {\n margin-left: 2rem;\n text-decoration: none;\n color: var(--primary);\n transition: color 0.3s;\n}\n\n.nav-links a:hover {\n color: var(--accent);\n}\n\nmain {\n margin-top: 4rem;\n padding: 2rem;\n}\n\n.create-section {\n max-width: 1200px;\n margin: 0 auto;\n}\n\n.canvas-container {\n margin: 2rem 0;\n background: white;\n border-radius: 1rem;\n box-shadow: 0 4px 20px rgba(0,0,0,0.1);\n overflow: hidden;\n}\n\ncanvas {\n width: 100%;\n height: 60vh;\n display: block;\n}\n\n.controls {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n gap: 1rem;\n padding: 1rem;\n background: white;\n border-radius: 1rem;\n box-shadow: 0 4px 20px rgba(0,0,0,0.1);\n}\n\n.control-group {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\nlabel {\n font-weight: 500;\n}\n\nselect, input[type=\"color\"] {\n padding: 0.5rem;\n border: 2px solid #eee;\n border-radius: 0.5rem;\n font-size: 1rem;\n}\n\ninput[type=\"range\"] {\n width: 100%;\n}\n\n.btn {\n padding: 0.75rem 1.5rem;\n border: none;\n border-radius: 0.5rem;\n background: var(--gradient);\n color: white;\n font-weight: 600;\n cursor: pointer;\n transition: transform 0.3s;\n}\n\n.btn:hover {\n transform: translateY(-2px);\n}\n\n.gallery-section {\n margin-top: 4rem;\n}\n\n.gallery-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));\n gap: 2rem;\n margin-top: 2rem;\n}\n\n.about-section {\n max-width: 800px;\n margin: 4rem auto;\n text-align: center;\n}\n\nfooter {\n text-align: center;\n padding: 2rem;\n background: white;\n margin-top: 4rem;\n}\n\n@media (max-width: 768px) {\n .nav-links {\n display: none;\n }\n \n .controls {\n grid-template-columns: 1fr;\n }\n \n canvas {\n height: 40vh;\n }\n}\n\n---script.js---\ndocument.addEventListener('DOMContentLoaded', () => {\n const canvas = document.getElementById('artCanvas');\n const ctx = canvas.getContext('2d');\n let animationId;\n let particles = [];\n\n function resizeCanvas() {\n canvas.width = canvas.offsetWidth;\n canvas.height = canvas.offsetHeight;\n }\n\n window.addEventListener('resize', resizeCanvas);\n resizeCanvas();\n\n class Particle {\n constructor() {\n this.reset();\n }\n\n reset() {\n this.x = Math.random() * canvas.width;\n this.y = Math.random() * canvas.height;\n this.size = Math.random() * 5 + 1;\n this.speedX = Math.random() * 3 - 1.5;\n this.speedY = Math.random() * 3 - 1.5;\n this.color = document.getElementById('color').value;\n }\n\n update() {\n this.x += this.speedX;\n this.y += this.speedY;\n\n if (this.x > canvas.width || this.x < 0) this.speedX *= -1;\n if (this.y > canvas.height || this.y < 0) this.speedY *= -1;\n }\n\n draw() {\n ctx.beginPath();\n ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);\n ctx.fillStyle = this.color;\n ctx.fill();\n }\n }\n\n function initParticles() {\n particles = [];\n const complexity = document.getElementById('complexity').value;\n const numParticles = complexity * 2;\n \n for (let i = 0; i < numParticles; i++) {\n particles.push(new Particle());\n }\n }\n\n function animate() {\n ctx.fillStyle = 'rgba(255, 255, 255, 0.1)';\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n \n particles.forEach(particle => {\n particle.update();\n particle.draw();\n });\n \n animationId = requestAnimationFrame(animate);\n }\n\n document.getElementById('generate').addEventListener('click', () => {\n cancelAnimationFrame(animationId);\n initParticles();\n animate();\n });\n\n document.getElementById('save').addEventListener('click', () => {\n const link = document.createElement('a');\n link.download = 'artgen-creation.png';\n link.href = canvas.toDataURL();\n link.click();\n });\n\n document.getElementById('color').addEventListener('change', () => {\n particles.forEach(particle => {\n particle.color = document.getElementById('color').value;\n });\n });\n\n // Initialize\n initParticles();\n animate();\n});\n\n---end---\n\nThis creates a beautiful, interactive generative art creation platform with:\n\n1. A responsive, modern interface\n2. Real-time particle system visualization\n3. Customizable parameters (color, complexity)\n4. Save functionality\n5. Smooth animations and transitions\n6. Professional design with gradient accents\n7. Mobile-friendly layout\n8. Semantic HTML structure\n9. Accessible controls and labels\n10. Clean, modular JavaScript code\n\nThe website allows users to create particle-based generative art by adjusting parameters and downloading their creations. The design uses a modern, clean aesthetic with beautiful gradients and smooth animations."
+ }
+ ],
+ "stop_reason": "end_turn",
+ "stop_sequence": null,
+ "usage": {
+ "input_tokens": 293,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "output_tokens": 2541
+ }
+ }
readme.scroll
Changed around line 1
+ # artgen.scroll.pub
+ Website generated by Claude from prompt: an website that provides an interface for user to create a variety of interactive generative parametric art rendered in the browser
script.js
Changed around line 1
+ document.addEventListener('DOMContentLoaded', () => {
+ const canvas = document.getElementById('artCanvas');
+ const ctx = canvas.getContext('2d');
+ let animationId;
+ let particles = [];
+
+ function resizeCanvas() {
+ canvas.width = canvas.offsetWidth;
+ canvas.height = canvas.offsetHeight;
+ }
+
+ window.addEventListener('resize', resizeCanvas);
+ resizeCanvas();
+
+ class Particle {
+ constructor() {
+ this.reset();
+ }
+
+ reset() {
+ this.x = Math.random() * canvas.width;
+ this.y = Math.random() * canvas.height;
+ this.size = Math.random() * 5 + 1;
+ this.speedX = Math.random() * 3 - 1.5;
+ this.speedY = Math.random() * 3 - 1.5;
+ this.color = document.getElementById('color').value;
+ }
+
+ update() {
+ this.x += this.speedX;
+ this.y += this.speedY;
+
+ if (this.x > canvas.width || this.x < 0) this.speedX *= -1;
+ if (this.y > canvas.height || this.y < 0) this.speedY *= -1;
+ }
+
+ draw() {
+ ctx.beginPath();
+ ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);
+ ctx.fillStyle = this.color;
+ ctx.fill();
+ }
+ }
+
+ function initParticles() {
+ particles = [];
+ const complexity = document.getElementById('complexity').value;
+ const numParticles = complexity * 2;
+
+ for (let i = 0; i < numParticles; i++) {
+ particles.push(new Particle());
+ }
+ }
+
+ function animate() {
+ ctx.fillStyle = 'rgba(255, 255, 255, 0.1)';
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
+
+ particles.forEach(particle => {
+ particle.update();
+ particle.draw();
+ });
+
+ animationId = requestAnimationFrame(animate);
+ }
+
+ document.getElementById('generate').addEventListener('click', () => {
+ cancelAnimationFrame(animationId);
+ initParticles();
+ animate();
+ });
+
+ document.getElementById('save').addEventListener('click', () => {
+ const link = document.createElement('a');
+ link.download = 'artgen-creation.png';
+ link.href = canvas.toDataURL();
+ link.click();
+ });
+
+ document.getElementById('color').addEventListener('change', () => {
+ particles.forEach(particle => {
+ particle.color = document.getElementById('color').value;
+ });
+ });
+
+ // Initialize
+ initParticles();
+ animate();
+ });
style.css
Changed around line 1
+ :root {
+ --primary: #2a2b2e;
+ --accent: #6c63ff;
+ --light: #f5f5f7;
+ --gradient: linear-gradient(135deg, #6c63ff, #ff6b6b);
+ }
+
+ * {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ }
+
+ body {
+ font-family: system-ui, -apple-system, sans-serif;
+ line-height: 1.6;
+ color: var(--primary);
+ background: var(--light);
+ }
+
+ header {
+ background: white;
+ box-shadow: 0 2px 10px rgba(0,0,0,0.1);
+ position: fixed;
+ width: 100%;
+ top: 0;
+ z-index: 100;
+ }
+
+ nav {
+ max-width: 1200px;
+ margin: 0 auto;
+ padding: 1rem;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+
+ .logo {
+ font-size: 1.5rem;
+ font-weight: bold;
+ background: var(--gradient);
+ -webkit-background-clip: text;
+ -webkit-text-fill-color: transparent;
+ }
+
+ .nav-links a {
+ margin-left: 2rem;
+ text-decoration: none;
+ color: var(--primary);
+ transition: color 0.3s;
+ }
+
+ .nav-links a:hover {
+ color: var(--accent);
+ }
+
+ main {
+ margin-top: 4rem;
+ padding: 2rem;
+ }
+
+ .create-section {
+ max-width: 1200px;
+ margin: 0 auto;
+ }
+
+ .canvas-container {
+ margin: 2rem 0;
+ background: white;
+ border-radius: 1rem;
+ box-shadow: 0 4px 20px rgba(0,0,0,0.1);
+ overflow: hidden;
+ }
+
+ canvas {
+ width: 100%;
+ height: 60vh;
+ display: block;
+ }
+
+ .controls {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
+ gap: 1rem;
+ padding: 1rem;
+ background: white;
+ border-radius: 1rem;
+ box-shadow: 0 4px 20px rgba(0,0,0,0.1);
+ }
+
+ .control-group {
+ display: flex;
+ flex-direction: column;
+ gap: 0.5rem;
+ }
+
+ label {
+ font-weight: 500;
+ }
+
+ select, input[type="color"] {
+ padding: 0.5rem;
+ border: 2px solid #eee;
+ border-radius: 0.5rem;
+ font-size: 1rem;
+ }
+
+ input[type="range"] {
+ width: 100%;
+ }
+
+ .btn {
+ padding: 0.75rem 1.5rem;
+ border: none;
+ border-radius: 0.5rem;
+ background: var(--gradient);
+ color: white;
+ font-weight: 600;
+ cursor: pointer;
+ transition: transform 0.3s;
+ }
+
+ .btn:hover {
+ transform: translateY(-2px);
+ }
+
+ .gallery-section {
+ margin-top: 4rem;
+ }
+
+ .gallery-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
+ gap: 2rem;
+ margin-top: 2rem;
+ }
+
+ .about-section {
+ max-width: 800px;
+ margin: 4rem auto;
+ text-align: center;
+ }
+
+ footer {
+ text-align: center;
+ padding: 2rem;
+ background: white;
+ margin-top: 4rem;
+ }
+
+ @media (max-width: 768px) {
+ .nav-links {
+ display: none;
+ }
+
+ .controls {
+ grid-template-columns: 1fr;
+ }
+
+ canvas {
+ height: 40vh;
+ }
+ }