(function() {
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
Object.assign(canvas.style, {
position: 'fixed', top: '0', left: '0',
pointerEvents: 'none', zIndex: '10000'
});
document.body.appendChild(canvas);
let w, h;
const resize = () => { w = canvas.width = window.innerWidth; h = canvas.height = window.innerHeight; };
window.addEventListener('resize', resize);
resize();
const points = [];
const segCount = 25; // Daha uzun ve esnek bir ip
const segLen = 12;
const mouse = { x: w / 2, y: h / 2, down: false };
for (let i = 0; i < segCount; i++) {
points.push({ x: w / 2, y: i * segLen, oldX: w / 2, oldY: i * segLen });
}
// Ses Motoru
const audioCtx = new (window.AudioContext || window.webkitAudioContext)();
const playWhipEffect = () => {
if (audioCtx.state === 'suspended') audioCtx.resume();
// Keskin Şaklama Sesi
const osc = audioCtx.createOscillator();
const gain = audioCtx.createGain();
osc.type = 'square';
osc.frequency.setValueAtTime(1200, audioCtx.currentTime);
osc.frequency.exponentialRampToValueAtTime(50, audioCtx.currentTime + 0.08);
gain.gain.setValueAtTime(0.4, audioCtx.currentTime);
gain.gain.exponentialRampToValueAtTime(0.01, audioCtx.currentTime + 0.08);
osc.connect(gain);
gain.connect(audioCtx.destination);
osc.start();
osc.stop(audioCtx.currentTime + 0.1);
// Tepki Sesi
const utt = new SpeechSynthesisUtterance("Ah!");
utt.pitch = 1.6;
utt.rate = 1.3;
window.speechSynthesis.speak(utt);
};
window.addEventListener('mousemove', e => { mouse.x = e.clientX; mouse.y = e.clientY; });
window.addEventListener('mousedown', () => {
mouse.down = true;
playWhipEffect();
// Kamçı ucu patlaması
const last = points[segCount - 1];
last.x += (last.x - points[segCount - 2].x) * 20;
last.y += (last.y - points[segCount - 2].y) * 20;
});
window.addEventListener('mouseup', () => mouse.down = false);
function update() {
ctx.clearRect(0, 0, w, h);
// Fiziği Güncelle
points[0].x = mouse.x;
points[0].y = mouse.y;
for (let i = 1; i < segCount; i++) {
const p = points[i];
const vx = (p.x - p.oldX) * 0.92;
const vy = (p.y - p.oldY) * 0.92 + 0.6; // Yerçekimi
p.oldX = p.x; p.oldY = p.y;
p.x += vx; p.y += vy;
}
for (let j = 0; j < 10; j++) { // Hassasiyet
for (let i = 0; i < segCount - 1; i++) {
const p1 = points[i], p2 = points[i+1];
const dx = p2.x - p1.x, dy = p2.y - p1.y;
const dist = Math.sqrt(dx*dx + dy*dy);
const diff = (segLen - dist) / dist * 0.5;
p1.x -= dx * diff; p1.y -= dy * diff;
p2.x += dx * diff; p2.y += dy * diff;
points[0].x = mouse.x; points[0].y = mouse.y; // Sapı sabitle
}
}
// İpi Çiz
ctx.lineCap = 'round';
for (let i = 0; i < segCount - 1; i++) {
ctx.beginPath();
// İp uca doğru incelir
ctx.lineWidth = Math.max(1, 8 * (1 - i / segCount));
ctx.strokeStyle = i > segCount - 4 ? '#d11' : '#3d2b1f'; // Ucu kırmızımtırak
ctx.moveTo(points[i].x, points[i].y);
ctx.lineTo(points[i+1].x, points[i+1].y);
ctx.stroke();
}
if (mouse.down) {
ctx.beginPath();
ctx.arc(points[segCount-1].x, points[segCount-1].y, 15, 0, Math.PI*2);
ctx.fillStyle = 'rgba(255, 0, 0, 0.2)';
ctx.fill();
}
requestAnimationFrame(update);
}
update();
console.log("%c 🔥 ULTRA KIRBAÇ AKTİF ", "color: red; font-weight: bold; font-size: 20px;");
})();
Abi bunu denesene