Meta Description" name="description" />
<!DOCTYPE html>
<html lang="en">
<head>
<style>
body {
margin: 0;
background-color: #000;
overflow: hidden;
}
canvas {
display: block;
}
</style>
</head>
<body>
<canvas id="canvas"></canvas>
<script>
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
let mouse = { x: 0, y: 0 };
let segments = [];
const numSegments = 25; // Reel structure length
const segLength = 18;
for (let i = 0; i < numSegments; i++) {
segments.push({ x: 0, y: 0, angle: 0 });
}
window.addEventListener('mousemove', (e) => {
mouse.x = e.clientX;
mouse.y = e.clientY;
});
function drawSegment(x, y, angle, i) {
ctx.save();
ctx.translate(x, y);
ctx.rotate(angle);
// Reel Style: Skeleton/Legs
ctx.beginPath();
ctx.strokeStyle = '#ffae00'; // Exact Yellow from Reel
ctx.lineWidth = 2;
// Central bone
ctx.moveTo(0, 0);
ctx.lineTo(-segLength, 0);
// Cross legs (Reptile look)
ctx.moveTo(-segLength/2, -15);
ctx.lineTo(-segLength/2, 15);
ctx.stroke();
ctx.restore();
}
function animate() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
let targetX = mouse.x;
let targetY = mouse.y;
segments.forEach((seg, i) => {
const dx = targetX - seg.x;
const dy = targetY - seg.y;
seg.angle = Math.atan2(dy, dx);
seg.x = targetX - Math.cos(seg.angle) * segLength;
seg.y = targetY - Math.sin(seg.angle) * segLength;
drawSegment(seg.x, seg.y, seg.angle, i);
targetX = seg.x;
targetY = seg.y;
});
requestAnimationFrame(animate);
}
animate();
</script>
</body>
</html>1
1
3KB
3KB
110.0ms
128.0ms
110.0ms