Show me something
- User
Show me something
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Show me something
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
I'll create an engaging particle animation that responds to mouse movement with colorful visual effects.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Interactive Particle Animation</title>
<style>
body {
margin: 0;
padding: 0;
background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
background-size: 400% 400%;
animation: gradientBG 15s ease infinite;
overflow: hidden;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
@keyframes gradientBG {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
.container {
position: relative;
width: 100%;
height: 100vh;
overflow: hidden;
}
canvas {
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
.content {
position: relative;
z-index: 2;
text-align: center;
color: white;
padding: 2rem;
max-width: 800px;
background: rgba(0, 0, 0, 0.6);
border-radius: 20px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
backdrop-filter: blur(10px);
}
h1 {
font-size: 3.5rem;
margin-bottom: 1rem;
text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
background: linear-gradient(45deg, #ff8a00, #e52e71, #22c1c3);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
animation: hueRotate 5s infinite linear;
}
@keyframes hueRotate {
0% { filter: hue-rotate(0deg); }
100% { filter: hue-rotate(360deg); }
}
p {
font-size: 1.2rem;
line-height: 1.6;
margin-bottom: 2rem;
}
.instructions {
background: rgba(255, 255, 255, 0.1);
padding: 1rem;
border-radius: 10px;
margin: 1rem 0;
font-size: 0.9rem;
}
.buttons {
display: flex;
justify-content: center;
gap: 1rem;
margin-top: 1.5rem;
}
.btn {
padding: 12px 30px;
border: none;
border-radius: 50px;
font-size: 1rem;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease;
background: linear-gradient(45deg, #ff8a00, #e52e71);
color: white;
box-shadow: 0 4px 15px rgba(229, 46, 113, 0.4);
}
.btn:hover {
transform: translateY(-5px);
box-shadow: 0 8px 20px rgba(229, 46, 113, 0.6);
}
.btn:active {
transform: translateY(0);
}
.particle-count {
margin-top: 1.5rem;
font-size: 0.9rem;
opacity: 0.8;
}
@media (max-width: 768px) {
.content {
padding: 1.5rem;
margin: 1rem;
}
h1 {
font-size: 2.5rem;
}
p {
font-size: 1rem;
}
}
</style>
</head>
<body>
<div class="container">
<canvas id="particleCanvas"></canvas>
<div class="content">
<h1>Interactive Particle Animation</h1>
<p>Experience a mesmerizing display of physics and color! Move your cursor around the screen to influence the particles. The faster you move, the stronger the effect.</p>
<div class="instructions">
<p>✨ <strong>Tip:</strong> Move your mouse quickly to create particle explosions</p>
<p>🌈 <strong>Tip:</strong> Click and hold to create a temporary black hole effect</p>
</div>
<div class="buttons">
<button class="btn" id="moreParticles">More Particles</button>
<button class="btn" id="changeColor">Change Colors</button>
<button class="btn" id="reset">Reset</button>
</div>
<div class="particle-count">Particles: <span id="count">500</span></div>
</div>
</div>
<script>
// Canvas setup
const canvas = document.getElementById('particleCanvas');
const ctx = canvas.getContext('2d');
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
// Particle count display
const particleCountDisplay = document.getElementById('count');
// Configuration
let particleCount = 500;
particleCountDisplay.textContent = particleCount;
const colors = [
'#FF5252', '#FF4081', '#E040FB', '#7C4DFF',
'#536DFE', '#448AFF', '#40C4FF', '#18FFFF',
'#64FFDA', '#69F0AE', '#B2FF59', '#EEFF41'
];
let currentColors = [...colors];
// Mouse position
const mouse = {
x: canvas.width / 2,
y: canvas.height / 2,
radius: 100,
down: false
};
// Event listeners
window.addEventListener('mousemove', (e) => {
mouse.x = e.x;
mouse.y = e.y;
});
window.addEventListener('mousedown', () => {
mouse.down = true;
});
window.addEventListener('mouseup', () => {
mouse.down = false;
});
window.addEventListener('touchmove', (e) => {
mouse.x = e.touches[0].clientX;
mouse.y = e.touches[0].clientY;
});
window.addEventListener('resize', () => {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
init();
});
// Buttons
document.getElementById('moreParticles').addEventListener('click', () => {
particleCount += 200;
if (particleCount > 2000) particleCount = 500;
particleCountDisplay.textContent = particleCount;
init();
});
document.getElementById('changeColor').addEventListener('click', () => {
// Rotate colors
currentColors = [...currentColors.slice(3), ...currentColors.slice(0, 3)];
});
document.getElementById('reset').addEventListener('click', () => {
particleCount = 500;
particleCountDisplay.textContent = particleCount;
currentColors = [...colors];
init();
});
// Particle class
class Particle {
constructor() {
this.x = Math.random() * canvas.width;
this.y = Math.random() * canvas.height;
this.size = Math.random() * 5 + 1;
this.weight = Math.random() * 2 + 1;
this.directionX = (Math.random() * 2) - 1;
this.color = currentColors[Math.floor(Math.random() * currentColors.length)];
this.originalSize = this.size;
}
update() {
// Distance from particle to mouse
const dx = mouse.x - this.x;
const dy = mouse.y - this.y;
const distance = Math.sqrt(dx * dx + dy * dy);
// Mouse interaction
if (distance < mouse.radius * 2) {
const force = (mouse.radius * 2 - distance) / (mouse.radius * 2);
const angle = Math.atan2(dy, dx);
const moveForce = mouse.down ? force * 5 : -force * 3;
this.x += Math.cos(angle) * moveForce;
this.y += Math.sin(angle) * moveForce;
// Increase size when near mouse
this.size = this.originalSize + force * 10;
} else {
// Reset size
this.size = Math.max(this.originalSize, this.size - 0.1);
}
// Boundary checks
if (this.y > canvas.height) {
this.y = 0;
this.x = Math.random() * canvas.width;
}
if (this.x < 0) {
this.x = canvas.width;
} else if (this.x > canvas.width) {
this.x = 0;
}
}
draw() {
ctx.beginPath();
ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);
ctx.closePath();
ctx.fillStyle = this.color;
ctx.fill();
}
}
let particles = [];
function init() {
particles = [];
for (let i = 0; i < particleCount; i++) {
particles.push(new Particle());
}
}
// Animation loop
function animate() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
// Draw glow effect behind particles
ctx.fillStyle = 'rgba(0, 0, 0, 0.05)';
ctx.fillRect(0, 0, canvas.width, canvas.height);
// Update and draw particles
for (let i = 0; i < particles.length; i++) {
particles[i].update();
particles[i].draw();
// Draw connections between particles
for (let j = i; j < particles.length; j++) {
const dx = particles[i].x - particles[j].x;
const dy = particles[i].y - particles[j].y;
const distance = Math.sqrt(dx * dx + dy * dy);
if (distance < 100) {
const alpha = 1 - distance / 100;
ctx.beginPath();
ctx.strokeStyle = `rgba(255, 255, 255, ${alpha * 0.2})`;
ctx.lineWidth = 0.5;
ctx.moveTo(particles[i].x, particles[i].y);
ctx.lineTo(particles[j].x, particles[j].y);
ctx.stroke();
}
}
}
// Draw mouse effect
if (mouse.down) {
ctx.beginPath();
ctx.arc(mouse.x, mouse.y, mouse.radius, 0, Math.PI * 2);
ctx.fillStyle = 'rgba(0, 0, 0, 0.1)';
ctx.fill();
ctx.beginPath();
ctx.arc(mouse.x, mouse.y, mouse.radius * 0.7, 0, Math.PI * 2);
ctx.strokeStyle = 'rgba(255, 255, 255, 0.3)';
ctx.lineWidth = 2;
ctx.stroke();
}
requestAnimationFrame(animate);
}
init();
animate();
</script>
</body>
</html>
Interactive Particle System: 500 colorful particles that respond to your mouse movements
Physics Simulation: Particles are affected by gravity and mouse interactions
Multiple Interaction Modes:
Visual Effects:
Controls:
The animation is fully responsive and works on both desktop and mobile devices. Simply move your cursor around the screen to interact with the particles!