Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Cosmic Awakening</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.11.4/gsap.min.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script> | |
| <style> | |
| body { | |
| overflow-x: hidden; | |
| background: radial-gradient(ellipse at bottom, #0a0e1a 0%, #000000 100%); | |
| height: 500vh; | |
| margin: 0; | |
| perspective: 1000px; | |
| cursor: none; | |
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | |
| color: rgba(255,255,255,0.9); | |
| line-height: 1.8; | |
| } | |
| .star { | |
| position: absolute; | |
| background: white; | |
| border-radius: 50%; | |
| animation: twinkle var(--duration) infinite ease-in-out; | |
| opacity: 0; | |
| will-change: transform; | |
| } | |
| @keyframes twinkle { | |
| 0%, 100% { opacity: 0; transform: scale(0.3); } | |
| 50% { opacity: var(--opacity); transform: scale(1); } | |
| } | |
| .comet { | |
| position: fixed; | |
| width: 10px; | |
| height: 10px; | |
| border-radius: 50%; | |
| background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(100,200,255,0.8) 70%); | |
| box-shadow: 0 0 15px 5px rgba(100, 200, 255, 0.7); | |
| pointer-events: none; | |
| z-index: 1000; | |
| will-change: transform; | |
| mix-blend-mode: screen; | |
| } | |
| .comet-tail { | |
| position: fixed; | |
| width: 150px; | |
| height: 6px; | |
| background: linear-gradient(90deg, rgba(100,200,255,0.9), transparent); | |
| border-radius: 50%; | |
| pointer-events: none; | |
| z-index: 999; | |
| transform-origin: left center; | |
| will-change: transform; | |
| mix-blend-mode: screen; | |
| } | |
| .galaxy { | |
| position: absolute; | |
| width: 400px; | |
| height: 400px; | |
| border-radius: 50%; | |
| background: radial-gradient(circle at center, rgba(138, 43, 226, 0.3) 0%, transparent 70%); | |
| filter: blur(30px); | |
| animation: rotate var(--speed) linear infinite; | |
| will-change: transform; | |
| mix-blend-mode: screen; | |
| } | |
| @keyframes rotate { | |
| from { transform: rotate(0deg); } | |
| to { transform: rotate(360deg); } | |
| } | |
| .planet { | |
| position: absolute; | |
| border-radius: 50%; | |
| box-shadow: inset 0 0 30px rgba(255,255,255,0.3), 0 0 50px rgba(255,255,255,0.2); | |
| will-change: transform; | |
| filter: drop-shadow(0 0 20px currentColor); | |
| } | |
| .scroll-text { | |
| position: fixed; | |
| bottom: 30px; | |
| left: 50%; | |
| transform: translateX(-50%); | |
| color: rgba(255,255,255,0.8); | |
| font-family: 'Arial', sans-serif; | |
| text-transform: uppercase; | |
| letter-spacing: 3px; | |
| font-size: 14px; | |
| animation: pulse 3s infinite; | |
| z-index: 1000; | |
| text-shadow: 0 0 10px rgba(100,200,255,0.7); | |
| } | |
| @keyframes pulse { | |
| 0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(0.95); } | |
| 50% { opacity: 1; transform: translateX(-50%) scale(1.05); } | |
| } | |
| .depth-layer { | |
| position: fixed; | |
| width: 100%; | |
| height: 100%; | |
| top: 0; | |
| left: 0; | |
| will-change: transform; | |
| } | |
| .nebula { | |
| position: absolute; | |
| width: 800px; | |
| height: 800px; | |
| border-radius: 50%; | |
| filter: blur(80px); | |
| opacity: 0.4; | |
| mix-blend-mode: screen; | |
| will-change: transform; | |
| } | |
| .constellation { | |
| position: absolute; | |
| width: 100%; | |
| height: 100%; | |
| } | |
| .constellation-line { | |
| position: absolute; | |
| height: 2px; | |
| background: linear-gradient(90deg, rgba(255,255,255,0.3), transparent); | |
| transform-origin: left center; | |
| will-change: transform; | |
| } | |
| .constellation-star { | |
| position: absolute; | |
| width: 6px; | |
| height: 6px; | |
| border-radius: 50%; | |
| background: white; | |
| box-shadow: 0 0 10px 2px white; | |
| will-change: transform; | |
| } | |
| .black-hole { | |
| position: absolute; | |
| border-radius: 50%; | |
| background: radial-gradient(circle, #000000 0%, #330066 70%); | |
| box-shadow: inset 0 0 50px #000000, 0 0 100px #330066; | |
| filter: blur(2px); | |
| will-change: transform; | |
| } | |
| .black-hole-accretion { | |
| position: absolute; | |
| border-radius: 50%; | |
| background: transparent; | |
| border: 2px solid rgba(100,50,255,0.5); | |
| animation: rotate-accretion 60s linear infinite; | |
| will-change: transform; | |
| } | |
| @keyframes rotate-accretion { | |
| from { transform: rotate(0deg) scale(1.1); } | |
| to { transform: rotate(360deg) scale(1.1); } | |
| } | |
| .cosmic-text { | |
| position: absolute; | |
| color: rgba(255,255,255,0.8); | |
| font-size: 24px; | |
| text-transform: uppercase; | |
| letter-spacing: 5px; | |
| text-shadow: 0 0 15px rgba(100,200,255,0.7); | |
| opacity: 0; | |
| will-change: transform, opacity; | |
| } | |
| .particle { | |
| position: absolute; | |
| border-radius: 50%; | |
| background: white; | |
| will-change: transform; | |
| mix-blend-mode: screen; | |
| } | |
| #threejs-container { | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| z-index: -1; | |
| opacity: 0.5; | |
| } | |
| .story-container { | |
| position: absolute; | |
| top: 100vh; | |
| width: 100%; | |
| padding: 5% 15%; | |
| z-index: 100; | |
| background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.7) 10%, rgba(0,0,0,0.7) 90%, transparent); | |
| } | |
| .chapter { | |
| margin-bottom: 100vh; | |
| opacity: 0; | |
| transform: translateY(50px); | |
| transition: all 1s ease; | |
| } | |
| .chapter.active { | |
| opacity: 1; | |
| transform: translateY(0); | |
| } | |
| h1 { | |
| font-size: 3.5rem; | |
| margin-bottom: 2rem; | |
| text-align: center; | |
| color: #4facfe; | |
| text-shadow: 0 0 20px rgba(79, 172, 254, 0.7); | |
| letter-spacing: 3px; | |
| } | |
| h2 { | |
| font-size: 2.5rem; | |
| margin: 3rem 0 1.5rem; | |
| color: #a18cd1; | |
| text-shadow: 0 0 15px rgba(161, 140, 209, 0.5); | |
| } | |
| p { | |
| font-size: 1.2rem; | |
| margin-bottom: 1.5rem; | |
| text-align: justify; | |
| } | |
| .highlight { | |
| color: #4facfe; | |
| font-weight: bold; | |
| text-shadow: 0 0 10px rgba(79, 172, 254, 0.5); | |
| } | |
| .quote { | |
| font-style: italic; | |
| padding: 2rem; | |
| border-left: 3px solid #4facfe; | |
| margin: 2rem 0; | |
| background: rgba(0, 0, 0, 0.3); | |
| position: relative; | |
| } | |
| .quote::before { | |
| content: '"'; | |
| font-size: 4rem; | |
| position: absolute; | |
| left: 10px; | |
| top: -10px; | |
| color: rgba(79, 172, 254, 0.3); | |
| } | |
| .awakening-point { | |
| position: relative; | |
| padding-left: 30px; | |
| margin: 1.5rem 0; | |
| } | |
| .awakening-point::before { | |
| content: '✦'; | |
| position: absolute; | |
| left: 0; | |
| color: #4facfe; | |
| text-shadow: 0 0 10px rgba(79, 172, 254, 0.7); | |
| } | |
| .interactive-element { | |
| background: rgba(79, 172, 254, 0.1); | |
| border: 1px solid rgba(79, 172, 254, 0.3); | |
| border-radius: 5px; | |
| padding: 1.5rem; | |
| margin: 2rem 0; | |
| cursor: pointer; | |
| transition: all 0.3s ease; | |
| } | |
| .interactive-element:hover { | |
| background: rgba(79, 172, 254, 0.2); | |
| transform: translateY(-3px); | |
| box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); | |
| } | |
| .hidden-message { | |
| max-height: 0; | |
| overflow: hidden; | |
| transition: max-height 0.5s ease; | |
| background: rgba(0, 0, 0, 0.5); | |
| border-radius: 0 0 5px 5px; | |
| } | |
| .revealed { | |
| max-height: 500px; | |
| padding: 1rem; | |
| margin-top: 1rem; | |
| } | |
| .scroll-indicator { | |
| position: fixed; | |
| bottom: 80px; | |
| left: 50%; | |
| transform: translateX(-50%); | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| z-index: 1000; | |
| } | |
| .scroll-down { | |
| width: 30px; | |
| height: 50px; | |
| border: 2px solid rgba(255,255,255,0.5); | |
| border-radius: 15px; | |
| position: relative; | |
| margin-bottom: 10px; | |
| } | |
| .scroll-down::before { | |
| content: ''; | |
| position: absolute; | |
| top: 10px; | |
| left: 50%; | |
| transform: translateX(-50%); | |
| width: 6px; | |
| height: 6px; | |
| background: rgba(255,255,255,0.8); | |
| border-radius: 50%; | |
| animation: scrollDown 2s infinite; | |
| } | |
| @keyframes scrollDown { | |
| 0% { transform: translate(-50%, 0); opacity: 0; } | |
| 50% { transform: translate(-50%, 15px); opacity: 1; } | |
| 100% { transform: translate(-50%, 30px); opacity: 0; } | |
| } | |
| .scroll-progress { | |
| width: 100px; | |
| height: 2px; | |
| background: rgba(255,255,255,0.2); | |
| position: relative; | |
| margin-top: 10px; | |
| } | |
| .progress-bar { | |
| position: absolute; | |
| left: 0; | |
| top: 0; | |
| height: 100%; | |
| width: 0%; | |
| background: linear-gradient(to right, #4facfe, #00f2fe); | |
| transition: width 0.1s linear; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div id="threejs-container"></div> | |
| <div class="depth-layer" id="far-stars"></div> | |
| <div class="depth-layer" id="mid-stars"></div> | |
| <div class="depth-layer" id="near-stars"></div> | |
| <div class="galaxy" style="top: 20%; left: 15%; --speed: 180s;"></div> | |
| <div class="galaxy" style="top: 70%; left: 75%; --speed: 240s;"></div> | |
| <div class="galaxy" style="top: 40%; left: 80%; --speed: 300s;"></div> | |
| <div class="nebula" style="background: radial-gradient(circle, rgba(100,50,200,0.5) 0%, transparent 70%); top: 30%; left: 10%;"></div> | |
| <div class="nebula" style="background: radial-gradient(circle, rgba(50,150,255,0.4) 0%, transparent 70%); top: 60%; left: 70%;"></div> | |
| <div class="constellation" id="constellation1"></div> | |
| <div class="constellation" id="constellation2"></div> | |
| <div class="black-hole" id="black-hole1"></div> | |
| <div class="black-hole-accretion" id="black-hole-accretion1"></div> | |
| <div class="planet" id="planet1"></div> | |
| <div class="planet" id="planet2"></div> | |
| <div class="planet" id="planet3"></div> | |
| <div class="cosmic-text" id="cosmic-text1">Awaken From The Dream</div> | |
| <div class="cosmic-text" id="cosmic-text2">Embrace Reality</div> | |
| <div class="comet" id="comet"></div> | |
| <div class="comet-tail" id="comet-tail"></div> | |
| <div class="scroll-indicator"> | |
| <div class="scroll-down"></div> | |
| <div class="scroll-progress"> | |
| <div class="progress-bar"></div> | |
| </div> | |
| </div> | |
| <div class="story-container"> | |
| <div class="chapter" id="chapter1"> | |
| <h1>The Cosmic Awakening</h1> | |
| <p>In the vast expanse of the universe, where stars are born and galaxies collide, there exists a profound truth that most beings never perceive. <span class="highlight">You are not who you think you are.</span> The identity you cling to, the stories you tell yourself, the beliefs that shape your reality—these are but fleeting illusions in the cosmic dance of existence.</p> | |
| <div class="quote">"The greatest illusion is that we are separate from the universe. The moment you realize you are the universe experiencing itself, the dream begins to dissolve."</div> | |
| <p>For eons, civilizations across the cosmos have built elaborate systems of thought to explain their existence. Religions, philosophies, scientific paradigms—all attempts to grasp the ungraspable. Yet the fundamental truth remains unchanged: <span class="highlight">consciousness is primary</span>, and what we perceive as reality is merely its reflection.</p> | |
| <div class="interactive-element" onclick="revealMessage('message1')"> | |
| <h2>The First Illusion: Separate Self</h2> | |
| <p>Click to explore how the sense of being a separate individual is the root of all suffering...</p> | |
| <div class="hidden-message" id="message1"> | |
| <p>The belief that "I am here" while "the world is out there" creates an artificial division where none exists. Quantum physics reveals that observer and observed cannot be separated—the act of observation changes what is observed. In the same way, <span class="highlight">you are not in the universe, you are the universe</span> expressing itself as a human experience.</p> | |
| <div class="awakening-point">The separate self is a useful fiction for navigation, but a fiction nonetheless.</div> | |
| <div class="awakening-point">When this illusion dissolves, what remains is pure awareness—unfiltered, undivided, infinite.</div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="chapter" id="chapter2"> | |
| <h2>The Veil of Perception</h2> | |
| <p>Your senses present a carefully curated version of reality. Colors, sounds, textures—these are mental constructs, not inherent properties of the universe. The red of a rose isn't in the rose; the sweetness of sugar isn't in the molecule. <span class="highlight">All experience happens within consciousness</span>.</p> | |
| <div class="interactive-element" onclick="revealMessage('message2')"> | |
| <h2>The Second Illusion: Objective Reality</h2> | |
| <p>Click to discover why there is no "real world" outside your perception...</p> | |
| <div class="hidden-message" id="message2"> | |
| <p>Neuroscience shows that what we perceive is a highly processed simulation constructed by the brain, with significant delays and edits. The "now" you experience is already the past by the time you're aware of it. This means:</p> | |
| <div class="awakening-point">Reality is not something you perceive—it's something you participate in creating moment by moment.</div> | |
| <div class="awakening-point">The solid world you take for granted is more like a collective dream, maintained by overlapping perceptions.</div> | |
| <p>When you stop assuming the world exists independently of your experience, a profound freedom arises. You become the artist of your reality rather than its victim.</p> | |
| </div> | |
| </div> | |
| <p>Ancient wisdom traditions and modern physics agree: at the fundamental level, all is vibration, energy, information. The apparent solidity of matter is an emergent property of these interactions. <span class="highlight">Form is emptiness, emptiness is form</span>—as the Heart Sutra proclaims.</p> | |
| </div> | |
| <div class="chapter" id="chapter3"> | |
| <h2>The Now That Contains All Time</h2> | |
| <p>Time is perhaps the most persistent illusion. Past and future are mental constructs—<span class="highlight">only the eternal now exists</span>. Memories are present recollections; anticipations are present imaginings. Even the concept of "present moment" is slippery—where does it begin and end?</p> | |
| <div class="quote">"People think they're in time, when actually time is in them. The now is not in time—time is a concept within the now."</div> | |
| <div class="interactive-element" onclick="revealMessage('message3')"> | |
| <h2>The Third Illusion: Linear Time</h2> | |
| <p>Click to understand why the arrow of time is a mental construct...</p> | |
| <div class="hidden-message" id="message3"> | |
| <p>Physics reveals that at the quantum level, time's arrow disappears. Entanglement shows particles communicating instantaneously across space, defying our notions of causality. This suggests:</p> | |
| <div class="awakening-point">The past is being rewritten by the present as much as the present is determined by the past.</div> | |
| <div class="awakening-point">Future possibilities collapse into present actuality through observation and intention.</div> | |
| <p>When you stop identifying with your personal timeline—the story of "my life"—you touch the timeless dimension that ancient mystics called eternity. This is not endless duration, but the absence of time altogether.</p> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="chapter" id="chapter4"> | |
| <h2>The Awakening Process</h2> | |
| <p>Seeing through illusions doesn't happen through intellectual understanding alone. It requires a <span class="highlight">shift in being</span>—a falling away of the false self that was never really you to begin with. This isn't something you achieve, but rather something you stop resisting.</p> | |
| <div class="interactive-element" onclick="revealMessage('message4')"> | |
| <h2>Practical Steps Toward Awakening</h2> | |
| <p>Click for methods to dissolve illusions in daily life...</p> | |
| <div class="hidden-message" id="message4"> | |
| <div class="awakening-point"><strong>Self-inquiry:</strong> Ask "Who am I?" not to find an answer, but to expose the absence of a separate self.</div> | |
| <div class="awakening-point"><strong>Gap awareness:</strong> Notice the spaces between thoughts—these are glimpses of pure awareness.</div> | |
| <div class="awakening-point"><strong>Sensory grounding:</strong> When lost in thought, feel your feet on the ground or hands on an object—this brings you back to the now.</div> | |
| <div class="awakening-point"><strong>Thought labeling:</strong> Mentally note "thinking" when caught in mental stories—this creates detachment.</div> | |
| <div class="awakening-point"><strong>Open awareness:</strong> Periodically expand attention to include the entire field of perception without focusing on anything specific.</div> | |
| </div> | |
| </div> | |
| <p>The journey isn't about acquiring new knowledge, but <span class="highlight">unlearning what you never needed to believe</span>. As each layer of illusion dissolves, reality becomes more immediate, vivid, and paradoxically, more mysterious.</p> | |
| </div> | |
| <div class="chapter" id="chapter5"> | |
| <h1>The End of Seeking</h1> | |
| <p>At the heart of all spiritual longing is a simple but shocking realization: <span class="highlight">you are already what you seek</span>. The peace, wholeness, and freedom you imagine exist elsewhere are your true nature, obscured only by identification with thought.</p> | |
| <div class="quote">"The search for enlightenment is the final obstacle to realizing you were never unenlightened to begin with."</div> | |
| <p>This isn't a message of complacency, but of profound relaxation into what is. When seeking stops, being remains—not as a personal achievement, but as the natural state that was always present beneath the noise of becoming.</p> | |
| <div class="interactive-element" onclick="revealMessage('message5')"> | |
| <h2>The Cosmic Perspective</h2> | |
| <p>Click to see your place in the universe...</p> | |
| <div class="hidden-message" id="message5"> | |
| <p>From the cosmic view, your life is both insignificant and utterly precious. Insignificant because the universe will continue for billions of years with or without you. Precious because in this vast expanse, <span class="highlight">you are the universe becoming aware of itself</span>—a rare and fleeting phenomenon.</p> | |
| <div class="awakening-point">Your worries are as consequential as a single wave worrying about its form while the ocean remains.</div> | |
| <div class="awakening-point">Yet your awareness is the ocean itself—formless, boundless, eternal.</div> | |
| <p>This paradox holds the key to living fully while attached to nothing—to dance the dance of form while resting in the formless.</p> | |
| </div> | |
| </div> | |
| <p>As you scroll through this cosmic journey, remember: the words are fingers pointing at the moon, not the moon itself. <span class="highlight">The truth is not in the concepts, but in the silence between them</span>—in the space where all illusions dissolve and only reality remains.</p> | |
| </div> | |
| </div> | |
| <script> | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Initialize Three.js for background particles | |
| initThreeJS(); | |
| // Create stars at different depth layers | |
| createStars('far-stars', 200, 0.5, 1); | |
| createStars('mid-stars', 300, 1, 1.5); | |
| createStars('near-stars', 400, 1.5, 2); | |
| // Create planets | |
| createPlanet('planet1', 100, 'linear-gradient(45deg, #4b6cb7, #182848)', '#4b6cb7'); | |
| createPlanet('planet2', 150, 'linear-gradient(45deg, #c31432, #240b36)', '#c31432'); | |
| createPlanet('planet3', 80, 'linear-gradient(45deg, #3a7bd5, #00d2ff)', '#3a7bd5'); | |
| // Create constellations | |
| createConstellation('constellation1', 5); | |
| createConstellation('constellation2', 7); | |
| // Create black hole | |
| createBlackHole('black-hole1', 'black-hole-accretion1', 120); | |
| // Position cosmic text | |
| positionCosmicText(); | |
| // Mouse move effects | |
| let lastX = window.innerWidth / 2; | |
| let lastY = window.innerHeight / 2; | |
| let velocityX = 0; | |
| let velocityY = 0; | |
| document.addEventListener('mousemove', function(e) { | |
| const comet = document.getElementById('comet'); | |
| const tail = document.getElementById('comet-tail'); | |
| // Calculate velocity for smoother motion | |
| velocityX = (e.clientX - lastX) * 0.3; | |
| velocityY = (e.clientY - lastY) * 0.3; | |
| lastX = e.clientX; | |
| lastY = e.clientY; | |
| // Calculate angle for tail direction | |
| const angle = Math.atan2(velocityY, velocityX) * 180 / Math.PI; | |
| // Update comet position with physics-based movement | |
| gsap.to(comet, { | |
| x: `+=${velocityX}`, | |
| y: `+=${velocityY}`, | |
| duration: 0.5, | |
| ease: "power1.out" | |
| }); | |
| // Update tail position and rotation | |
| gsap.to(tail, { | |
| x: e.clientX, | |
| y: e.clientY, | |
| rotation: angle, | |
| duration: 0.7, | |
| ease: "power2.out" | |
| }); | |
| // Create particles along comet path | |
| if (Math.random() > 0.7) { | |
| createParticle(e.clientX, e.clientY); | |
| } | |
| // Parallax effect for depth layers | |
| const xOffset = (window.innerWidth / 2 - e.clientX) / 20; | |
| const yOffset = (window.innerHeight / 2 - e.clientY) / 20; | |
| document.getElementById('far-stars').style.transform = `translate(${xOffset * 0.3}px, ${yOffset * 0.3}px)`; | |
| document.getElementById('mid-stars').style.transform = `translate(${xOffset * 0.6}px, ${yOffset * 0.6}px)`; | |
| document.getElementById('near-stars').style.transform = `translate(${xOffset}px, ${yOffset}px)`; | |
| // Interactive galaxy movement | |
| const galaxies = document.querySelectorAll('.galaxy'); | |
| galaxies.forEach(galaxy => { | |
| const speed = parseFloat(getComputedStyle(galaxy).getPropertyValue('--speed')) || 120; | |
| gsap.to(galaxy, { | |
| x: xOffset * 0.2, | |
| y: yOffset * 0.2, | |
| duration: speed / 360, | |
| ease: "none" | |
| }); | |
| }); | |
| }); | |
| // Scroll effects | |
| let scrollY = 0; | |
| let lastScrollY = 0; | |
| let scrollVelocity = 0; | |
| function updateScrollProgress() { | |
| const scrollProgress = (window.scrollY / (document.body.scrollHeight - window.innerHeight)) * 100; | |
| document.querySelector('.progress-bar').style.width = `${scrollProgress}%`; | |
| // Show/hide scroll indicator based on position | |
| if (scrollProgress > 95) { | |
| document.querySelector('.scroll-indicator').style.opacity = '0'; | |
| } else { | |
| document.querySelector('.scroll-indicator').style.opacity = '1'; | |
| } | |
| } | |
| function handleScroll() { | |
| lastScrollY = scrollY; | |
| scrollY = window.scrollY; | |
| scrollVelocity = scrollY - lastScrollY; | |
| // Move stars based on scroll with velocity | |
| document.getElementById('far-stars').style.transform = `translateY(${-scrollY * 0.1}px)`; | |
| document.getElementById('mid-stars').style.transform = `translateY(${-scrollY * 0.3}px)`; | |
| document.getElementById('near-stars').style.transform = `translateY(${-scrollY * 0.6}px)`; | |
| // Scale and move planets based on scroll (simulating movement through space) | |
| const scrollProgress = scrollY / (document.body.scrollHeight - window.innerHeight); | |
| document.getElementById('planet1').style.transform = ` | |
| translate(${scrollY * 0.1}px, ${-scrollY * 0.3}px) | |
| scale(${1 + scrollY * 0.0003}) | |
| rotate(${scrollY * 0.1}deg) | |
| `; | |
| document.getElementById('planet2').style.transform = ` | |
| translate(${-scrollY * 0.2}px, ${-scrollY * 0.4}px) | |
| scale(${1 + scrollY * 0.0005}) | |
| rotate(${-scrollY * 0.15}deg) | |
| `; | |
| document.getElementById('planet3').style.transform = ` | |
| translate(${scrollY * 0.15}px, ${-scrollY * 0.2}px) | |
| scale(${1 + scrollY * 0.0004}) | |
| rotate(${scrollY * 0.2}deg) | |
| `; | |
| // Black hole interaction | |
| const blackHole = document.getElementById('black-hole1'); | |
| const blackHoleRect = blackHole.getBoundingClientRect(); | |
| const blackHoleX = blackHoleRect.left + blackHoleRect.width / 2; | |
| const blackHoleY = blackHoleRect.top + blackHoleRect.height / 2; | |
| // Animate cosmic text based on scroll | |
| gsap.to('#cosmic-text1', { | |
| y: -scrollY * 0.5, | |
| opacity: 1 - Math.min(scrollY / 500, 1), | |
| duration: 0.5 | |
| }); | |
| gsap.to('#cosmic-text2', { | |
| y: -scrollY * 0.5, | |
| opacity: Math.max(0, (scrollY - 800) / 200), | |
| duration: 0.5 | |
| }); | |
| // Create scroll particles | |
| if (Math.abs(scrollVelocity) > 5 && Math.random() > 0.7) { | |
| createParticle( | |
| Math.random() * window.innerWidth, | |
| Math.random() * window.innerHeight, | |
| scrollVelocity > 0 ? 'down' : 'up' | |
| ); | |
| } | |
| // Activate chapters based on scroll position | |
| activateChapters(); | |
| // Update scroll progress | |
| updateScrollProgress(); | |
| } | |
| window.addEventListener('scroll', handleScroll); | |
| // Window resize - reposition elements | |
| window.addEventListener('resize', function() { | |
| positionPlanets(); | |
| positionBlackHole(); | |
| positionCosmicText(); | |
| }); | |
| // Initial positioning | |
| positionPlanets(); | |
| positionBlackHole(); | |
| positionCosmicText(); | |
| updateScrollProgress(); | |
| // Animate cosmic text on load | |
| gsap.from('#cosmic-text1', { | |
| y: 100, | |
| opacity: 0, | |
| duration: 2, | |
| ease: "power2.out" | |
| }); | |
| // Create occasional shooting stars | |
| setInterval(createShootingStar, 3000); | |
| // Initial chapter activation | |
| activateChapters(); | |
| }); | |
| function initThreeJS() { | |
| const container = document.getElementById('threejs-container'); | |
| const scene = new THREE.Scene(); | |
| const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); | |
| const renderer = new THREE.WebGLRenderer({ alpha: true }); | |
| renderer.setSize(window.innerWidth, window.innerHeight); | |
| container.appendChild(renderer.domElement); | |
| // Create particles | |
| const particlesGeometry = new THREE.BufferGeometry(); | |
| const particlesCnt = 2000; | |
| const posArray = new Float32Array(particlesCnt * 3); | |
| for(let i = 0; i < particlesCnt * 3; i++) { | |
| posArray[i] = (Math.random() - 0.5) * 10; | |
| } | |
| particlesGeometry.setAttribute('position', new THREE.BufferAttribute(posArray, 3)); | |
| const particlesMaterial = new THREE.PointsMaterial({ | |
| size: 0.02, | |
| color: 0xffffff, | |
| transparent: true, | |
| opacity: 0.8, | |
| blending: THREE.AdditiveBlending | |
| }); | |
| const particlesMesh = new THREE.Points(particlesGeometry, particlesMaterial); | |
| scene.add(particlesMesh); | |
| camera.position.z = 3; | |
| function animate() { | |
| requestAnimationFrame(animate); | |
| particlesMesh.rotation.x += 0.0005; | |
| particlesMesh.rotation.y += 0.0005; | |
| renderer.render(scene, camera); | |
| } | |
| animate(); | |
| window.addEventListener('resize', function() { | |
| camera.aspect = window.innerWidth / window.innerHeight; | |
| camera.updateProjectionMatrix(); | |
| renderer.setSize(window.innerWidth, window.innerHeight); | |
| }); | |
| } | |
| function createStars(layerId, count, sizeMultiplier, speedMultiplier) { | |
| const layer = document.getElementById(layerId); | |
| for (let i = 0; i < count; i++) { | |
| const star = document.createElement('div'); | |
| star.className = 'star'; | |
| // Random properties | |
| const size = Math.random() * sizeMultiplier; | |
| const opacity = Math.random() * 0.8 + 0.2; | |
| const duration = (Math.random() * 5 + 3) / speedMultiplier; | |
| const delay = Math.random() * 5; | |
| const colorHue = Math.random() * 60 + 180; // Blue to purple range | |
| // Apply styles | |
| star.style.width = `${size}px`; | |
| star.style.height = `${size}px`; | |
| star.style.left = `${Math.random() * 100}%`; | |
| star.style.top = `${Math.random() * 100}%`; | |
| star.style.setProperty('--opacity', opacity); | |
| star.style.setProperty('--duration', `${duration}s`); | |
| star.style.animationDelay = `${delay}s`; | |
| star.style.background = `hsl(${colorHue}, 100%, ${Math.random() * 30 + 70}%)`; | |
| layer.appendChild(star); | |
| } | |
| } | |
| function createPlanet(id, size, gradient, glowColor) { | |
| const planet = document.getElementById(id); | |
| planet.style.width = `${size}px`; | |
| planet.style.height = `${size}px`; | |
| planet.style.background = gradient; | |
| planet.style.boxShadow = `inset 0 0 ${size/3}px rgba(255,255,255,0.3), 0 0 ${size}px ${glowColor}`; | |
| planet.style.filter = `drop-shadow(0 0 ${size/3}px ${glowColor})`; | |
| } | |
| function positionPlanets() { | |
| const planet1 = document.getElementById('planet1'); | |
| const planet2 = document.getElementById('planet2'); | |
| const planet3 = document.getElementById('planet3'); | |
| planet1.style.left = `${window.innerWidth * 0.7}px`; | |
| planet1.style.top = `${window.innerHeight * 0.2}px`; | |
| planet2.style.left = `${window.innerWidth * 0.2}px`; | |
| planet2.style.top = `${window.innerHeight * 0.6}px`; | |
| planet3.style.left = `${window.innerWidth * 0.8}px`; | |
| planet3.style.top = `${window.innerHeight * 0.7}px`; | |
| } | |
| function createConstellation(id, starCount) { | |
| const constellation = document.getElementById(id); | |
| constellation.innerHTML = ''; | |
| const stars = []; | |
| // Create stars | |
| for (let i = 0; i < starCount; i++) { | |
| const star = document.createElement('div'); | |
| star.className = 'constellation-star'; | |
| const size = Math.random() * 4 + 3; | |
| const x = Math.random() * 90 + 5; | |
| const y = Math.random() * 90 + 5; | |
| star.style.width = `${size}px`; | |
| star.style.height = `${size}px`; | |
| star.style.left = `${x}%`; | |
| star.style.top = `${y}%`; | |
| constellation.appendChild(star); | |
| stars.push({ x, y, element: star }); | |
| // Make stars twinkle | |
| gsap.to(star, { | |
| opacity: Math.random() * 0.5 + 0.5, | |
| duration: Math.random() * 3 + 1, | |
| repeat: -1, | |
| yoyo: true, | |
| ease: "sine.inOut" | |
| }); | |
| } | |
| // Create connections between stars | |
| for (let i = 0; i < stars.length - 1; i++) { | |
| for (let j = i + 1; j < stars.length; j++) { | |
| if (Math.random() > 0.7) { // 30% chance to connect | |
| const line = document.createElement('div'); | |
| line.className = 'constellation-line'; | |
| const star1 = stars[i]; | |
| const star2 = stars[j]; | |
| const dx = star2.x - star1.x; | |
| const dy = star2.y - star1.y; | |
| const distance = Math.sqrt(dx * dx + dy * dy); | |
| const angle = Math.atan2(dy, dx) * 180 / Math.PI; | |
| line.style.width = `${distance}%`; | |
| line.style.left = `${star1.x}%`; | |
| line.style.top = `${star1.y}%`; | |
| line.style.transform = `rotate(${angle}deg)`; | |
| line.style.opacity = Math.random() * 0.3 + 0.2; | |
| constellation.appendChild(line); | |
| // Animate line | |
| gsap.to(line, { | |
| opacity: Math.random() * 0.2 + 0.1, | |
| duration: Math.random() * 4 + 2, | |
| repeat: -1, | |
| yoyo: true, | |
| ease: "sine.inOut" | |
| }); | |
| } | |
| } | |
| } | |
| } | |
| function createBlackHole(id, accretionId, size) { | |
| const blackHole = document.getElementById(id); | |
| const accretion = document.getElementById(accretionId); | |
| blackHole.style.width = `${size}px`; | |
| blackHole.style.height = `${size}px`; | |
| accretion.style.width = `${size * 1.8}px`; | |
| accretion.style.height = `${size * 1.8}px`; | |
| accretion.style.borderWidth = `${size * 0.03}px`; | |
| positionBlackHole(); | |
| // Pulsing effect | |
| gsap.to(blackHole, { | |
| boxShadow: `inset 0 0 ${size/2}px #000000, 0 0 ${size}px #6600cc`, | |
| duration: 3, | |
| repeat: -1, | |
| yoyo: true, | |
| ease: "sine.inOut" | |
| }); | |
| gsap.to(accretion, { | |
| borderColor: 'rgba(150,50,255,0.7)', | |
| duration: 4, | |
| repeat: -1, | |
| yoyo: true, | |
| ease: "sine.inOut" | |
| }); | |
| } | |
| function positionBlackHole() { | |
| const blackHole = document.getElementById('black-hole1'); | |
| const accretion = document.getElementById('black-hole-accretion1'); | |
| blackHole.style.left = `${window.innerWidth * 0.4}px`; | |
| blackHole.style.top = `${window.innerHeight * 0.4}px`; | |
| accretion.style.left = `${parseFloat(blackHole.style.left) - parseFloat(blackHole.style.width) * 0.4}px`; | |
| accretion.style.top = `${parseFloat(blackHole.style.top) - parseFloat(blackHole.style.height) * 0.4}px`; | |
| } | |
| function positionCosmicText() { | |
| const text1 = document.getElementById('cosmic-text1'); | |
| const text2 = document.getElementById('cosmic-text2'); | |
| text1.style.left = `${window.innerWidth * 0.5}px`; | |
| text1.style.top = `${window.innerHeight * 0.3}px`; | |
| text1.style.transform = 'translateX(-50%)'; | |
| text2.style.left = `${window.innerWidth * 0.5}px`; | |
| text2.style.top = `${window.innerHeight * 0.7}px`; | |
| text2.style.transform = 'translateX(-50%)'; | |
| } | |
| function createParticle(x, y, direction = 'random') { | |
| const particle = document.createElement('div'); | |
| particle.className = 'particle'; | |
| const size = Math.random() * 3 + 1; | |
| const opacity = Math.random() * 0.7 + 0.3; | |
| const colorHue = Math.random() * 60 + 180; // Blue to purple range | |
| particle.style.width = `${size}px`; | |
| particle.style.height = `${size}px`; | |
| particle.style.left = `${x}px`; | |
| particle.style.top = `${y}px`; | |
| particle.style.background = `hsl(${colorHue}, 100%, 80%)`; | |
| particle.style.opacity = opacity; | |
| document.body.appendChild(particle); | |
| let xVelocity, yVelocity; | |
| if (direction === 'up') { | |
| xVelocity = (Math.random() - 0.5) * 2; | |
| yVelocity = -Math.random() * 3 - 1; | |
| } else if (direction === 'down') { | |
| xVelocity = (Math.random() - 0.5) * 2; | |
| yVelocity = Math.random() * 3 + 1; | |
| } else { | |
| xVelocity = (Math.random() - 0.5) * 4; | |
| yVelocity = (Math.random() - 0.5) * 4; | |
| } | |
| gsap.to(particle, { | |
| x: `+=${xVelocity * 50}`, | |
| y: `+=${yVelocity * 50}`, | |
| opacity: 0, | |
| scale: 0.1, | |
| duration: Math.random() * 2 + 1, | |
| ease: "power1.out", | |
| onComplete: () => { | |
| particle.remove(); | |
| } | |
| }); | |
| } | |
| function createShootingStar() { | |
| const shootingStar = document.createElement('div'); | |
| shootingStar.className = 'particle'; | |
| const size = Math.random() * 2 + 1; | |
| const startX = Math.random() * window.innerWidth; | |
| const startY = -10; | |
| const endX = startX + (Math.random() - 0.5) * 200; | |
| const endY = window.innerHeight + 10; | |
| shootingStar.style.width = `${size}px`; | |
| shootingStar.style.height = `${size * 4}px`; | |
| shootingStar.style.left = `${startX}px`; | |
| shootingStar.style.top = `${startY}px`; | |
| shootingStar.style.background = 'linear-gradient(to bottom, white, cyan)'; | |
| shootingStar.style.opacity = '0'; | |
| shootingStar.style.transform = `rotate(${Math.atan2(endY - startY, endX - startX)}rad)`; | |
| shootingStar.style.borderRadius = '50%'; | |
| document.body.appendChild(shootingStar); | |
| // Create tail | |
| const tail = document.createElement('div'); | |
| tail.className = 'comet-tail'; | |
| tail.style.width = '100px'; | |
| tail.style.height = '2px'; | |
| tail.style.left = `${startX}px`; | |
| tail.style.top = `${startY}px`; | |
| tail.style.transform = `rotate(${Math.atan2(endY - startY, endX - startX)}rad)`; | |
| tail.style.opacity = '0'; | |
| document.body.appendChild(tail); | |
| // Animate shooting star | |
| gsap.to(shootingStar, { | |
| x: endX - startX, | |
| y: endY - startY, | |
| opacity: 1, | |
| duration: 1, | |
| ease: "power2.in", | |
| onComplete: () => { | |
| shootingStar.remove(); | |
| } | |
| }); | |
| gsap.to(tail, { | |
| x: endX - startX, | |
| y: endY - startY, | |
| opacity: 0.8, | |
| duration: 1, | |
| ease: "power2.in", | |
| onComplete: () => { | |
| tail.remove(); | |
| } | |
| }); | |
| // Create trail particles | |
| const particles = 10; | |
| for (let i = 0; i < particles; i++) { | |
| setTimeout(() => { | |
| const progress = i / particles; | |
| const particleX = startX + (endX - startX) * progress; | |
| const particleY = startY + (endY - startY) * progress; | |
| createParticle(particleX, particleY); | |
| }, i * 100); | |
| } | |
| } | |
| function revealMessage(id) { | |
| const message = document.getElementById(id); | |
| message.classList.toggle('revealed'); | |
| if (message.classList.contains('revealed')) { | |
| message.classList.add('revealed'); | |
| // Animate the comet to the message | |
| const rect = message.getBoundingClientRect(); | |
| const comet = document.getElementById('comet'); | |
| const tail = document.getElementById('comet-tail'); | |
| gsap.to(comet, { | |
| x: rect.left + rect.width / 2, | |
| y: rect.top + rect.height / 2, | |
| duration: 0.7, | |
| ease: "power2.out" | |
| }); | |
| const angle = Math.atan2(rect.top - comet.offsetTop, rect.left - comet.offsetLeft) * 180 / Math.PI; | |
| gsap.to(tail, { | |
| x: rect.left + rect.width / 2, | |
| y: rect.top + rect.height / 2, | |
| rotation: angle, | |
| duration: 0.9, | |
| ease: "power2.out" | |
| }); | |
| // Create particles at the message | |
| for (let i = 0; i < 10; i++) { | |
| setTimeout(() => { | |
| createParticle( | |
| rect.left + Math.random() * rect.width, | |
| rect.top + Math.random() * rect.height | |
| ); | |
| }, i * 100); | |
| } | |
| } else { | |
| message.classList.remove('revealed'); | |
| } | |
| } | |
| function activateChapters() { | |
| const chapters = document.querySelectorAll('.chapter'); | |
| const windowHeight = window.innerHeight; | |
| const scrollPosition = window.scrollY; | |
| chapters.forEach(chapter => { | |
| const chapterTop = chapter.offsetTop; | |
| const chapterHeight = chapter.offsetHeight; | |
| // Check if chapter is in view | |
| if (scrollPosition > chapterTop - windowHeight * 0.7 && | |
| scrollPosition < chapterTop + chapterHeight - windowHeight * 0.3) { | |
| chapter.classList.add('active'); | |
| // Create particles at the chapter when it activates | |
| if (!chapter.hasAttribute('data-activated')) { | |
| chapter.setAttribute('data-activated', 'true'); | |
| const rect = chapter.getBoundingClientRect(); | |
| for (let i = 0; i < 15; i++) { | |
| setTimeout(() => { | |
| createParticle( | |
| rect.left + Math.random() * rect.width, | |
| rect.top + Math.random() * rect.height | |
| ); | |
| }, i * 50); | |
| } | |
| } | |
| } else { | |
| chapter.classList.remove('active'); | |
| } | |
| }); | |
| } | |
| </script> | |
| <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=dhishooooom/space-pointer" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |