MCPcopy Create free account
hub / github.com/pollinations/pollinations / startCatAnimation

Function startCatAnimation

apps/catgpt/script.js:181–193  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

179// ── Animations ───────────────────────────────────────────────────────────────
180
181function startCatAnimation() {
182 catAnimInterval = setInterval(() => {
183 const cat = document.createElement("div");
184 cat.style.cssText = `
185 position: fixed; font-size: ${2 + Math.random() * 2}rem; z-index: 999;
186 pointer-events: none; top: ${Math.random() * 100}vh; left: -100px;
187 animation: catSlide ${3 + Math.random() * 2}s linear forwards;
188 `;
189 cat.textContent = pick(CAT_EMOJIS);
190 document.body.appendChild(cat);
191 setTimeout(() => cat.parentNode && cat.remove(), 6000);
192 }, 400);
193}
194
195function stopCatAnimation() {
196 clearInterval(catAnimInterval);

Callers 1

setButtonLoadingFunction · 0.85

Calls 2

pickFunction · 0.85
removeMethod · 0.65

Tested by

no test coverage detected