deepseek-v3-0324· DeepSeek LMArena Human Preference 140K
bitte erstelle mir eine HTML anwendung, welche sehr dynamische, faszinierende Anmiation…
- User
bitte erstelle mir eine HTML anwendung, welche sehr dynamische, faszinierende Anmiation beim öffen startet.
- Assistant
Hier ist eine faszinierende, dynamische HTML-Anwendung mit einer beeindruckenden Animation beim Start. Sie verwendet Canvas-Animationen, Partikeleffekte und Farbverläufe für ein visuell ansprechendes Erlebnis:
<!DOCTYPE html> <html lang="de"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Hypnotische Partikel-Explosion</title> <style> body { margin: 0; overflow: hidden; background: linear-gradient(135deg, #0f0c29, #302b63, #24243e); height: 100vh; display: flex; justify-content: center; align-items: center; font-family: 'Arial', sans-serif; color: white; } canvas { position: fixed; top: 0; left: 0; z-index: 1; } .title { position: relative; z-index: 2; text-align: center; opacity: 0; transform: scale(0.5); animation: fadeIn 2s forwards 1s; } h1 { font-size: 4rem; margin-bottom: 0.5rem; text-shadow: 0 0 20px rgba(255, 255, 255, 0.7); } p { font-size: 1.5rem; margin-top: 0; } @keyframes fadeIn { to { opacity: 1; transform: scale(1); } } </style> </head> <body> <canvas id="particles"></canvas> <div class="title"> <h1>Willkommen!</h1> <p>Eine hypnotische Visualisierung</p> </div> <script> const canvas = document.getElementById('particles'); const ctx = canvas.getContext('2d'); // Canvas auf Fenstergröße setzen canvas.width = window.innerWidth; canvas.height = window.innerHeight; // Partikel-Array const particles = []; const particleCount = 150; // Farbpalette const colors = [ 'rgba(255, 0, 255, 0.7)', 'rgba(0, 255, 255, 0.7)', 'rgba(255, 255, 0, 0.7)', 'rgba(0, 255, 0, 0.7)', 'rgba(255, 0, 0, 0.7)' ]; // Initiale Explosion function init() { for (let i = 0; i < particleCount; i++) { const size = Math.random() * 8 + 2; particles.push({ x: canvas.width / 2, y: canvas.height / 2, size: size, color: colors[Math.floor(Math.random() * colors.length)], speedX: Math.random() * 10 - 5, speedY: Math.random() * 10 - 5, life: 100, maxLife: 100, angle: Math.random() * Math.PI * 2, rotationSpeed: Math.random() * 0.1 - 0.05 }); } // Zweite Explosion nach Verzögerung setTimeout(() => { for (let i = 0; i < particleCount; i++) { const size = Math.random() * 5 + 1; particles.push({ x: canvas.width / 2, y: canvas.height / 2, size: size, color: colors[Math.floor(Math.random() * colors.length)], speedX: Math.random() * 15 - 7.5, speedY: Math.random() * 15 - 7.5, life: 150, maxLife: 150, angle: Math.random() * Math.PI * 2, rotationSpeed: Math.random() * 0.2 - 0.1 }); } }, 500); } // Animation function animate() { // Hintergrund mit Transparenz für Schweif-Effekt ctx.fillStyle = 'rgba(15, 12, 41, 0.1)'; ctx.fillRect(0, 0, canvas.width, canvas.height); for (let i = 0; i < particles.length; i++) { const p = particles[i]; // Bewegung p.x += p.speedX; p.y += p.speedY; // Rotation p.angle += p.rotationSpeed; // Lebensdauer verringern p.life--; // Partikel entfernen wenn Lebensdauer abgelaufen if (p.life <= 0) { particles.splice(i, 1); i--; continue; } // Zeichnen mit aktueller Transparenz basierend auf Lebensdauer const opacity = (p.life / p.maxLife) * 0.7; ctx.save(); ctx.translate(p.x, p.y); ctx.rotate(p.angle); // Farbverlauf für komplexere Partikel const gradient = ctx.createRadialGradient(0, 0, 0, 0, 0, p.size); gradient.addColorStop(0, p.color); gradient.addColorStop(1, `rgba(255, 255, 255, ${opacity})`); ctx.fillStyle = gradient; ctx.beginPath(); ctx.arc(0, 0, p.size, 0, Math.PI * 2); ctx.fill(); ctx.restore(); } // Zusätzliche Effekte nach der ersten Explosion if (particles.length < particleCount * 0.3) { for (let i = 0; i < 2; i++) { if (Math.random() > 0.7) { const size = Math.random() * 3 + 1; particles.push({ x: Math.random() * canvas.width, y: Math.random() * canvas.height, size: size, color: colors[Math.floor(Math.random() * colors.length)], speedX: Math.random() * 2 - 1, speedY: Math.random() * 2 - 1, life: Math.random() * 100 + 50, maxLife: 100, angle: Math.random() * Math.PI * 2, rotationSpeed: Math.random() * 0.05 - 0.025 }); } } } requestAnimationFrame(animate); } // Fenstergröße anpassen window.addEventListener('resize', () => { canvas.width = window.innerWidth; canvas.height = window.innerHeight; }); // Start init(); animate(); // Klick-Interaktion für zusätzliche Explosionen window.addEventListener('click', (e) => { for (let i = 0; i < particleCount / 2; i++) { const size = Math.random() * 6 + 2; particles.push({ x: e.clientX, y: e.clientY, size: size, color: colors[Math.floor(Math.random() * colors.length)], speedX: Math.random() * 8 - 4, speedY: Math.random() * 8 - 4, life: 120, maxLife: 120, angle: Math.random() * Math.PI * 2, rotationSpeed: Math.random() * 0.1 - 0.05 }); } }); </script> </body> </html>Besonderheiten dieser Animation:
- Dynamische Partikelexplosion beim Laden der Seite
- Mehrere Explosionswellen mit unterschiedlichen Eigenschaften
- Farbverläufe und Rotation für jedes Partikel
- Lebensdauer-System mit sanftem Ausblenden
- Interaktive Elemente - Klicken erzeugt weitere Explosionen
- Responsives Design passt sich der Bildschirmgröße an
- Textanimation mit Verzögerung für dramatischen Effekt
Du kannst den Code einfach in eine HTML-Datei kopieren und im Browser öffnen. Für noch mehr Effekte könntest du WebGL-Bibliotheken wie Three.js hinzufügen.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.