Meta Description" name="description" />
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
body {
margin: 0;
background: #000;
overflow: hidden;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
/* Reel specific style logic */
.spinner-3::before,
.spinner-3::after {
content: '';
width: 15px;
height: 15px;
background: #ffae00; /* Reel yellow color */
border-radius: 50%;
position: absolute;
animation: bounce 0.6s alternate infinite; /* Exact from reel */
}
@keyframes bounce {
to { transform: translateY(-20px) scale(1.2); }
}
canvas {
display: block;
position: absolute;
top: 0;
left: 0;
pointer-events: none;
}
</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: canvas.width / 2, y: canvas.height / 2 };
const segments = [];
const numSegments = 30; // Lambi body
const segDistance = 12;
for (let i = 0; i < numSegments; i++) {
segments.push({ x: mouse.x, y: mouse.y });
}
window.addEventListener('mousemove', (e) => {
mouse.x = e.clientX;
mouse.y = e.clientY;
});
function animate() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
// Head leads
segments[0].x = mouse.x;
segments[0].y = mouse.y;
// Backbone follow logic
for (let i = 1; i < numSegments; i++) {
const dx = segments[i - 1].x - segments[i].x;
const dy = segments[i - 1].y - segments[i].y;
const distance = Math.sqrt(dx * dx + dy * dy);
if (distance > segDistance) {
const angle = Math.atan2(dy, dx);
segments[i].x = segments[i - 1].x - Math.cos(angle) * segDistance;
segments[i].y = segments[i - 1].y - Math.sin(angle) * segDistance;
}
// Drawing the reptile look
ctx.beginPath();
ctx.arc(segments[i].x, segments[i].y, 8 - (i * 0.2), 0, Math.PI * 2);
ctx.fillStyle = "#ffae00";
ctx.shadowBlur = 15;
ctx.shadowColor = "#ffae00";
ctx.fill();
// Connecting bones (Like in reel)
ctx.beginPath();
ctx.moveTo(segments[i-1].x, segments[i-1].y);
ctx.lineTo(segments[i].x, segments[i].y);
ctx.strokeStyle = "rgba(255, 255, 255, 0.5)";
ctx.lineWidth = 1;
ctx.stroke();
}
requestAnimationFrame(animate);
}
animate();
</script>
</body>
</html>
1
1
3KB
3KB
180.0ms
172.0ms
180.0ms