Spaces:
Running
Running
File size: 48,639 Bytes
f97861c 67a2a31 f97861c a53d1ef f97861c a53d1ef 67a2a31 f97861c a53d1ef 67a2a31 f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c 67a2a31 f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef 67a2a31 a53d1ef f97861c 67a2a31 f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef 67a2a31 a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef 67a2a31 a53d1ef f97861c a53d1ef f97861c a53d1ef 67a2a31 a53d1ef 67a2a31 f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c a53d1ef f97861c 67a2a31 f97861c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 |
<!DOCTYPE html>
<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> |