Free Website JS Animation & Visual Effects Generator
Add eye-catching JavaScript animations like Snowfall, Rain, Mouse Torch Spotlight, Sparkle Trail, Party Balloons, Confetti, and Fireworks to any website. Customize colors & speed on a live demo page, then copy one clean script for WordPress, Squarespace, Shopify, Wix, or Custom HTML.
See How Snowfall Effect Looks on a Real Website
This sample page demonstrates how the animation floats cleanly over your headings, paragraphs, and buttons. Because the canvas uses pointer-events: none, visitors can still click links, read text, and submit forms normally.
Works on Every Platform
Paste one clean JavaScript snippet into WordPress, Squarespace, Shopify, Wix, Webflow, or any custom HTML file.
Lightweight & Zero External Calls
Powered by pure HTML5 Canvas + Vanilla JS. No bloated libraries, no external CDN failures, and auto-pauses when the browser tab is hidden.
Copy JavaScript Code for Snowfall Effect
Paste this self-contained snippet right before the closing </body> tag in your website footer. Works instantly with zero external CDN or plugin dependencies.
<!-- Snowfall Effect from farazsiyal.com -->
<!-- Paste right before the closing </body> tag (WordPress Footer, Squarespace Code Injection Footer, Shopify theme.liquid, Wix Custom Code, or Custom HTML) -->
<script>
/* Snowfall Effect — Zero-Dependency JS Animation generated from farazsiyal.com */
(function () {
if (window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;
var CFG = {
color: "#ffffff",
palette: ["#ffffff"],
density: 55,
speed: 4,
size: 5,
opacity: 90,
zIndex: 9999
};
var RGB = '255,255,255';
var alphaMul = Math.max(0.1, Math.min(1, CFG.opacity / 100));
var speedMul = Math.max(0.25, CFG.speed / 5);
var sizeMul = Math.max(0.4, CFG.size / 5);
var densityRatio = Math.max(0.15, CFG.density / 50);
var pick = function () { return CFG.palette[Math.floor(Math.random() * CFG.palette.length)]; };
var canvas = document.createElement('canvas');
canvas.setAttribute('aria-hidden', 'true');
canvas.style.cssText = 'position:fixed;inset:0;width:100vw;height:100vh;pointer-events:none;z-index:' + CFG.zIndex + ';';
document.body.appendChild(canvas);
var ctx = canvas.getContext('2d');
if (!ctx) return;
var w = window.innerWidth, h = window.innerHeight, dpr = Math.min(window.devicePixelRatio || 1, 2);
function resize() {
w = window.innerWidth; h = window.innerHeight;
canvas.width = Math.floor(w * dpr); canvas.height = Math.floor(h * dpr);
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
}
resize();
window.addEventListener('resize', resize, { passive: true });
var items = [], bursts = [], last = 0, running = true;
var count = Math.round(70 * densityRatio);
for (var i = 0; i < count; i++) {
items.push({ x: Math.random() * w, y: Math.random() * h, r: (1.5 + Math.random() * 3.5) * sizeMul, vy: (0.6 + Math.random() * 1.4) * speedMul, vx: (Math.random() - 0.5) * 0.6, phase: Math.random() * 6.28, op: 0.45 + Math.random() * 0.55 });
}
document.addEventListener('visibilitychange', function () { running = !document.hidden; if (running) { last = 0; requestAnimationFrame(loop); } });
function loop(now) {
if (!running) return;
var dt = last ? Math.min(2.2, (now - last) / 16.67) : 1;
last = now;
ctx.save();
ctx.clearRect(0, 0, w, h);
for (var i = 0; i < items.length; i++) {
var p = items[i];
p.phase += 0.02 * dt; p.y += p.vy * dt; p.x += (Math.sin(p.phase) * 0.6 + p.vx) * dt;
if (p.y > h + 10) { p.y = -10; p.x = Math.random() * w; }
if (p.x > w + 10) p.x = -10; if (p.x < -10) p.x = w + 10;
ctx.globalAlpha = p.op * alphaMul; ctx.fillStyle = CFG.color;
ctx.beginPath(); ctx.arc(p.x, p.y, p.r, 0, Math.PI * 2); ctx.fill();
}
ctx.restore();
requestAnimationFrame(loop);
}
requestAnimationFrame(loop);
})();
</script>Frequently Asked Questions
How do I add these JavaScript animations to WordPress, Squarespace, Shopify, or Wix?
Pick your animation, customize its colors, speed, and density in the live preview, then copy the code from '1. All-in-One Footer Code (<script>)' and paste it before the closing </body> tag in your platform's Footer Code Injection (e.g. WPCode on WordPress, Code Injection → Footer on Squarespace, layout/theme.liquid on Shopify, or Custom Code → Body End on Wix).
Will these animations block visitors from clicking buttons or reading text?
No! Every generated effect renders inside a transparent fixed HTML5 <canvas> with pointer-events: none. Visitors can click links, submit forms, highlight text, and scroll normally on both desktop and mobile devices.
Do I need to install an external JavaScript library or CDN link?
No external library or CDN is required! Every generated snippet is 100% self-contained pure Vanilla JavaScript, which means faster page load speeds, zero broken third-party CDN links, and compatibility with strict Content Security Policies.
Do interactive effects like Torch Light and Sparkle Trail work on mobile touch screens?
Yes. All interactive cursor effects (Torch Spotlight, Sparkle Trail, Glowing Cursor Halo, Click Burst, and Constellation Web) use modern Pointer Events, so they smoothly respond to both desktop mouse movement and mobile finger touch.
Will these animations slow down my website or drain visitor battery?
The generated scripts are lightweight (< 3 KB), run at smooth 60fps via requestAnimationFrame, automatically pause whenever the browser tab is hidden (visibilitychange), and respect the visitor's OS 'prefers-reduced-motion' accessibility setting by default.
Can I use an animation on only one specific page instead of the entire website?
Yes! Instead of pasting the code into your global site footer, paste the <script> block into a Custom HTML block on that single WordPress/Elementor page, or inside that specific page's Advanced Code Injection in Squarespace.