help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • Blog
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
ganesh-chaturthi
/
assets
RSK World
ganesh-chaturthi
Ganesh Chaturthi Celebration - HTML5 Canvas + 3D Aarti + Modern UI + Glassmorphism Design
assets
  • flower_particle.jpg650.8 KB
  • ganesha_hero.jpg1 MB
  • ganesha_layer.jpg710.9 KB
  • kailash_bg.jpg986.2 KB
  • modak_layer.jpg550.1 KB
  • mouse_layer.jpg659.7 KB
  • unified_bg.jpg1.1 MB
script.jsstyle.cssmouse_layer.jpgmodak_layer.jpgunified_bg.jpgganesha_layer.jpgkailash_bg.jpg
script.js
Raw Download
Find: Go to:
// Next Ganesh Chaturthi Date (approximate for demonstration)
const chaturthiDate = new Date('September 14, 2026 00:00:00').getTime();

// Countdown Timer
function updateCountdown() {
    const now = new Date().getTime();
    const distance = chaturthiDate - now;

    if (distance < 0) {
        document.getElementById('countdown').innerHTML = "<h2>Happy Ganesh Chaturthi!</h2>";
        return;
    }

    const days = Math.floor(distance / (1000 * 60 * 60 * 24));
    const hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
    const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
    const seconds = Math.floor((distance % (1000 * 60)) / 1000);

    document.getElementById('days').innerText = String(days).padStart(2, '0');
    document.getElementById('hours').innerText = String(hours).padStart(2, '0');
    document.getElementById('minutes').innerText = String(minutes).padStart(2, '0');
    document.getElementById('seconds').innerText = String(seconds).padStart(2, '0');
}

setInterval(updateCountdown, 1000);
updateCountdown();

// Copy Wish Function
function copyWish(elementId) {
    const textToCopy = document.getElementById(elementId).innerText;
    
    navigator.clipboard.writeText(textToCopy).then(() => {
        // Find the button that was clicked and temporarily change its text
        const btns = document.querySelectorAll('.copy-btn');
        btns.forEach(btn => {
            if (btn.getAttribute('onclick') === `copyWish('${elementId}')`) {
                const originalText = btn.innerText;
                btn.innerText = "Copied!";
                btn.style.backgroundColor = 'var(--primary-color)';
                btn.style.color = '#fff';
                
                setTimeout(() => {
                    btn.innerText = originalText;
                    btn.style.backgroundColor = 'transparent';
                    btn.style.color = 'var(--primary-color)';
                }, 2000);
            }
        });
    }).catch(err => {
        console.error('Failed to copy text: ', err);
    });
}

// --- Three.js Realistic 3D Background ---
const container = document.getElementById('three-container');

// Scene Setup
const scene = new THREE.Scene();
scene.background = new THREE.Color(0x050403);
scene.fog = new THREE.FogExp2(0x050403, 0.015);

// Camera Setup
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
camera.position.z = 5;

// Renderer Setup
const renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.setPixelRatio(window.devicePixelRatio);
container.appendChild(renderer.domElement);

// Handle Resize
window.addEventListener('resize', () => {
    renderer.setSize(window.innerWidth, window.innerHeight);
    camera.aspect = window.innerWidth / window.innerHeight;
    camera.updateProjectionMatrix();
});

// Texture Loader
const textureLoader = new THREE.TextureLoader();

// Unified Photorealistic Background
const bgTexture = textureLoader.load('assets/unified_bg.jpg');
const bgMaterial = new THREE.MeshBasicMaterial({ 
    map: bgTexture, 
    transparent: true,
    depthWrite: false
});
// Make the plane large enough to cover the screen and allow for parallax
const bgPlane = new THREE.Mesh(new THREE.PlaneGeometry(28, 28), bgMaterial);
bgPlane.position.z = -5; // Behind the UI
scene.add(bgPlane);

// Lighting 
const ambientLight = new THREE.AmbientLight(0xffffff, 0.5); 
scene.add(ambientLight);

const pointLight = new THREE.PointLight(0xff8c00, 1.5, 30); 
pointLight.position.set(0, 0, 3);
scene.add(pointLight);

// Real Flower Particles System
const particlesGeometry = new THREE.BufferGeometry();
const particlesCount = 0; 
const posArray = new Float32Array(particlesCount * 3);
particlesGeometry.setAttribute('position', new THREE.BufferAttribute(posArray, 3));

const flowerTexture = textureLoader.load('assets/flower_particle.jpg');
const particleMaterial = new THREE.PointsMaterial({
    size: 1.0, // Larger size for detailed flower
    map: flowerTexture,
    transparent: true,
    opacity: 0.9,
    blending: THREE.AdditiveBlending,
    depthWrite: false
});

let particlesMesh = new THREE.Points(particlesGeometry, particleMaterial);
scene.add(particlesMesh);

let fallingParticles = [];

// Interactions
document.getElementById('ring-bell-btn').addEventListener('click', () => {
    const originalIntensity = pointLight.intensity;
    pointLight.intensity = 15;
    
    // Subtle background zoom
    bgPlane.scale.set(1.02, 1.02, 1.02);

    setTimeout(() => {
        pointLight.intensity = originalIntensity;
        bgPlane.scale.set(1, 1, 1);
    }, 200);
});

document.getElementById('shower-flowers-btn').addEventListener('click', () => {
    for(let i=0; i<80; i++) {
        fallingParticles.push({
            x: (Math.random() - 0.5) * 20,
            y: 8 + Math.random() * 8,
            z: (Math.random() - 0.5) * 5 + 2, // Bring flowers closer to camera
            vy: -0.03 - Math.random() * 0.04,
            vx: (Math.random() - 0.5) * 0.02
        });
    }
});

// Mouse & Scroll Parallax Effect
let mouseX = 0;
let mouseY = 0;
let scrollY = window.scrollY;

window.addEventListener('mousemove', (event) => {
    mouseX = (event.clientX / window.innerWidth) * 2 - 1;
    mouseY = -(event.clientY / window.innerHeight) * 2 + 1;
});

window.addEventListener('scroll', () => {
    scrollY = window.scrollY;
});

// Animation Loop
const clock = new THREE.Clock();

function animate() {
    requestAnimationFrame(animate);
    const elapsedTime = clock.getElapsedTime();

    const scrollOffset = scrollY * 0.005;

    // Subtle, elegant background parallax
    bgPlane.position.x = mouseX * 0.2;
    bgPlane.position.y = mouseY * 0.2 + scrollOffset * 0.5;
    
    // Camera Parallax (Overall scene movement)
    camera.position.x += (mouseX * 0.5 - camera.position.x) * 0.05;
    camera.position.y += (mouseY * 0.5 - camera.position.y - scrollOffset * 0.2) * 0.05;
    camera.lookAt(scene.position);

    // Update Particles
    if (fallingParticles.length > 0) {
        const currentPositions = new Float32Array(fallingParticles.length * 3);
        
        for(let i = fallingParticles.length - 1; i >= 0; i--) {
            let p = fallingParticles[i];
            p.y += p.vy;
            p.x += p.vx;
            
            if(p.y < -10) {
                fallingParticles.splice(i, 1);
                continue;
            }
            
            currentPositions[i*3] = p.x;
            currentPositions[i*3+1] = p.y;
            currentPositions[i*3+2] = p.z;
        }
        
        particlesMesh.geometry.setAttribute('position', new THREE.BufferAttribute(currentPositions, 3));
    } else {
        particlesMesh.geometry.setAttribute('position', new THREE.BufferAttribute(new Float32Array(0), 3));
    }

    pointLight.intensity = 1.5 + Math.sin(elapsedTime * 10) * 0.2;

    renderer.render(scene, camera);
}
animate();
210 lines•6.9 KB
javascript
style.css
Raw Download
Find: Go to:
:root {
    --primary-color: #ffd700; /* Refined Gold */
    --secondary-color: #ffffff;
    --bg-dark: #050403;
    --text-light: #fdfbf7;
    --card-bg: rgba(20, 20, 20, 0.4);
    --glass-border: rgba(255, 255, 255, 0.15);
    --blur: blur(24px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Full-Page 3D Background */
#three-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: #000;
}

/* Sections */
.hero, .aarti-section, .wishes-section {
    position: relative;
    z-index: 1;
    background: transparent;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(5, 4, 3, 0.2), rgba(5, 4, 3, 0.9));
    z-index: 1;
}

.content {
    position: relative;
    z-index: 2;
    padding: 40px;
}

.glow-text {
    font-size: 5rem;
    font-weight: 800;
    color: var(--secondary-color);
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.4);
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 1.3rem;
    margin-bottom: 50px;
    color: #e0e0e0;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Countdown */
.countdown-container {
    background: var(--card-bg);
    backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 50px;
    display: inline-block;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.countdown-container h2 {
    margin-bottom: 25px;
    font-weight: 400;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.countdown {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 90px;
}

.time-box span {
    font-size: 3rem;
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1;
}

.time-box p {
    margin-top: 10px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #aaa;
}

.btn-primary {
    display: inline-block;
    padding: 16px 45px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: #fff;
    text-decoration: none;
    font-weight: 400;
    letter-spacing: 1px;
    border-radius: 40px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.btn-primary:hover {
    background: #fff;
    color: #000;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
}

/* Aarti Section */
.aarti-section {
    padding: 120px 0;
    text-align: center;
}

.section-title {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.section-desc {
    color: #bbb;
    margin-bottom: 60px;
    font-size: 1.1rem;
    font-weight: 300;
}

.aarti-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.action-btn {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-light);
    padding: 18px 40px;
    border-radius: 40px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    transition: all 0.4s ease;
    backdrop-filter: var(--blur);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

/* Wishes Section */
.wishes-section {
    padding: 80px 0 140px;
}

.wishes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.wish-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 50px 40px;
    border-radius: 24px;
    text-align: left;
    backdrop-filter: var(--blur);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.wish-card:hover {
    transform: translateY(-10px);
    background: rgba(30, 30, 30, 0.5);
    border-color: rgba(255,255,255,0.3);
}

.wish-text {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 35px;
    line-height: 1.8;
    color: #eaeaea;
}

.copy-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--secondary-color);
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.3s;
    align-self: flex-start;
}

.copy-btn:hover {
    background: #fff;
    color: #000;
}

/* Footer */
.dev-footer {
    background: #000;
    padding: 80px 0 40px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.dev-info h3 {
    color: #fff;
    font-size: 1.8rem;
    margin-bottom: 8px;
    font-weight: 300;
}

.dev-info strong {
    font-weight: 600;
}

.org {
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 3px;
    margin-bottom: 30px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.contact-links a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 300;
}

.contact-links a:hover {
    color: #fff;
}

.yt-link {
    color: #fff !important;
    border-bottom: 1px solid #fff;
    padding-bottom: 2px;
}

.yt-link:hover {
    color: var(--primary-color) !important;
    border-color: var(--primary-color);
}

.copyright {
    color: #555;
    font-size: 0.9rem;
    width: 100%;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@media (max-width: 768px) {
    .glow-text {
        font-size: 3rem;
    }
    .countdown {
        gap: 15px;
    }
    .time-box span {
        font-size: 2rem;
    }
}
351 lines•6.4 KB
css
assets/mouse_layer.jpg
Open Download
mouse_layer.jpg

mouse_layer.jpg

Size: 659.7 KB

assets/modak_layer.jpg
Open Download
modak_layer.jpg

modak_layer.jpg

Size: 550.1 KB

assets/unified_bg.jpg
Open Download
unified_bg.jpg

unified_bg.jpg

Size: 1.1 MB

assets/ganesha_layer.jpg
Open Download
ganesha_layer.jpg

ganesha_layer.jpg

Size: 710.9 KB

assets/kailash_bg.jpg
Open Download
kailash_bg.jpg

kailash_bg.jpg

Size: 986.2 KB

🚀 Support RSK World

Subscribe to our YouTube channel for latest tutorials & updates!



Click subscribe & support our work ❤️

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer