Inesh Davin commited on
Commit
dcae540
·
verified ·
1 Parent(s): 7c8b0d3

not enought upgrade like full 3D web

Browse files
Files changed (6) hide show
  1. README.md +8 -5
  2. components/footer.js +126 -0
  3. components/navbar.js +96 -0
  4. index.html +86 -19
  5. script.js +87 -0
  6. style.css +48 -18
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Cosmic 3d Explorer Voyage
3
- emoji: 🏢
4
- colorFrom: green
5
- colorTo: pink
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
+ title: Cosmic 3D Explorer Voyage 🚀
3
+ colorFrom: gray
4
+ colorTo: purple
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://huggingface.co/deepsite).
components/footer.js ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CosmicFooter extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ :host {
7
+ display: block;
8
+ background: rgba(0, 0, 0, 0.7);
9
+ backdrop-filter: blur(10px);
10
+ border-top: 1px solid rgba(255, 255, 255, 0.1);
11
+ padding: 4rem 2rem;
12
+ }
13
+ .footer-content {
14
+ max-width: 1400px;
15
+ margin: 0 auto;
16
+ display: grid;
17
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
18
+ gap: 3rem;
19
+ }
20
+ .footer-logo {
21
+ font-size: 1.5rem;
22
+ font-weight: 700;
23
+ background: linear-gradient(to right, #a855f7, #ec4899);
24
+ -webkit-background-clip: text;
25
+ background-clip: text;
26
+ color: transparent;
27
+ margin-bottom: 1.5rem;
28
+ display: inline-block;
29
+ }
30
+ .footer-description {
31
+ color: rgba(255, 255, 255, 0.7);
32
+ line-height: 1.6;
33
+ margin-bottom: 2rem;
34
+ }
35
+ .social-links {
36
+ display: flex;
37
+ gap: 1rem;
38
+ }
39
+ .social-links a {
40
+ color: rgba(255, 255, 255, 0.7);
41
+ transition: all 0.3s ease;
42
+ }
43
+ .social-links a:hover {
44
+ color: #a855f7;
45
+ }
46
+ .footer-heading {
47
+ color: white;
48
+ font-size: 1.25rem;
49
+ font-weight: 600;
50
+ margin-bottom: 1.5rem;
51
+ }
52
+ .footer-links {
53
+ display: flex;
54
+ flex-direction: column;
55
+ gap: 1rem;
56
+ }
57
+ .footer-links a {
58
+ color: rgba(255, 255, 255, 0.7);
59
+ text-decoration: none;
60
+ transition: all 0.3s ease;
61
+ }
62
+ .footer-links a:hover {
63
+ color: #a855f7;
64
+ transform: translateX(5px);
65
+ }
66
+ .copyright {
67
+ text-align: center;
68
+ margin-top: 4rem;
69
+ color: rgba(255, 255, 255, 0.5);
70
+ font-size: 0.875rem;
71
+ }
72
+ @media (max-width: 768px) {
73
+ .footer-content {
74
+ grid-template-columns: 1fr;
75
+ }
76
+ }
77
+ </style>
78
+ <div class="footer-content">
79
+ <div class="footer-about">
80
+ <div class="footer-logo">Cosmic 3D</div>
81
+ <p class="footer-description">
82
+ Pushing the boundaries of web-based 3D experiences with cutting-edge technology and stunning visuals.
83
+ </p>
84
+ <div class="social-links">
85
+ <a href="#"><i data-feather="twitter"></i></a>
86
+ <a href="#"><i data-feather="instagram"></i></a>
87
+ <a href="#"><i data-feather="github"></i></a>
88
+ <a href="#"><i data-feather="youtube"></i></a>
89
+ </div>
90
+ </div>
91
+ <div class="footer-links-group">
92
+ <h3 class="footer-heading">Explore</h3>
93
+ <div class="footer-links">
94
+ <a href="/gallery">3D Gallery</a>
95
+ <a href="/tutorials">Tutorials</a>
96
+ <a href="/showcase">Showcase</a>
97
+ <a href="/blog">Blog</a>
98
+ </div>
99
+ </div>
100
+ <div class="footer-links-group">
101
+ <h3 class="footer-heading">Resources</h3>
102
+ <div class="footer-links">
103
+ <a href="/documentation">Documentation</a>
104
+ <a href="/api">API</a>
105
+ <a href="/plugins">Plugins</a>
106
+ <a href="/examples">Examples</a>
107
+ </div>
108
+ </div>
109
+ <div class="footer-links-group">
110
+ <h3 class="footer-heading">Company</h3>
111
+ <div class="footer-links">
112
+ <a href="/about">About Us</a>
113
+ <a href="/careers">Careers</a>
114
+ <a href="/contact">Contact</a>
115
+ <a href="/privacy">Privacy Policy</a>
116
+ </div>
117
+ </div>
118
+ </div>
119
+ <div class="copyright">
120
+ &copy; 2023 Cosmic 3D Explorer. All rights reserved.
121
+ </div>
122
+ `;
123
+ }
124
+ }
125
+
126
+ customElements.define('cosmic-footer', CosmicFooter);
components/navbar.js ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CosmicNavbar extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ :host {
7
+ display: block;
8
+ position: fixed;
9
+ top: 0;
10
+ left: 0;
11
+ right: 0;
12
+ z-index: 1000;
13
+ background: rgba(0, 0, 0, 0.5);
14
+ backdrop-filter: blur(10px);
15
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
16
+ }
17
+ nav {
18
+ display: flex;
19
+ justify-content: space-between;
20
+ align-items: center;
21
+ padding: 1.5rem 2rem;
22
+ max-width: 1400px;
23
+ margin: 0 auto;
24
+ }
25
+ .logo {
26
+ font-size: 1.5rem;
27
+ font-weight: 700;
28
+ background: linear-gradient(to right, #a855f7, #ec4899);
29
+ -webkit-background-clip: text;
30
+ background-clip: text;
31
+ color: transparent;
32
+ text-decoration: none;
33
+ }
34
+ .nav-links {
35
+ display: flex;
36
+ gap: 2rem;
37
+ }
38
+ .nav-links a {
39
+ color: white;
40
+ text-decoration: none;
41
+ font-weight: 500;
42
+ transition: all 0.3s ease;
43
+ position: relative;
44
+ }
45
+ .nav-links a:hover {
46
+ color: #a855f7;
47
+ }
48
+ .nav-links a::after {
49
+ content: '';
50
+ position: absolute;
51
+ bottom: -5px;
52
+ left: 0;
53
+ width: 0;
54
+ height: 2px;
55
+ background: linear-gradient(to right, #a855f7, #ec4899);
56
+ transition: width 0.3s ease;
57
+ }
58
+ .nav-links a:hover::after {
59
+ width: 100%;
60
+ }
61
+ .cta-button {
62
+ background: linear-gradient(to right, #a855f7, #ec4899);
63
+ color: white;
64
+ padding: 0.5rem 1.5rem;
65
+ border-radius: 9999px;
66
+ font-weight: 600;
67
+ transition: all 0.3s ease;
68
+ }
69
+ .cta-button:hover {
70
+ transform: translateY(-2px);
71
+ box-shadow: 0 10px 15px -3px rgba(168, 85, 247, 0.3);
72
+ }
73
+ @media (max-width: 768px) {
74
+ nav {
75
+ padding: 1rem;
76
+ }
77
+ .nav-links {
78
+ display: none;
79
+ }
80
+ }
81
+ </style>
82
+ <nav>
83
+ <a href="/" class="logo">Cosmic 3D</a>
84
+ <div class="nav-links">
85
+ <a href="/explore">Explore</a>
86
+ <a href="/gallery">Gallery</a>
87
+ <a href="/about">About</a>
88
+ <a href="/contact">Contact</a>
89
+ <a href="/login" class="cta-button">Sign In</a>
90
+ </div>
91
+ </nav>
92
+ `;
93
+ }
94
+ }
95
+
96
+ customElements.define('cosmic-navbar', CosmicNavbar);
index.html CHANGED
@@ -1,19 +1,86 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Cosmic 3D Explorer</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <script src="https://unpkg.com/feather-icons"></script>
11
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
12
+ <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.net.min.js"></script>
13
+ </head>
14
+ <body class="bg-black text-white min-h-screen overflow-x-hidden">
15
+ <div id="vanta-bg" class="fixed inset-0 -z-10"></div>
16
+
17
+ <main class="container mx-auto px-4 py-16 relative z-10">
18
+ <div class="text-center mb-20">
19
+ <h1 class="text-5xl md:text-7xl font-bold mb-6 bg-clip-text text-transparent bg-gradient-to-r from-purple-400 via-pink-500 to-red-500">
20
+ Cosmic 3D Explorer
21
+ </h1>
22
+ <p class="text-xl md:text-2xl max-w-3xl mx-auto opacity-90">
23
+ Journey through an immersive 3D universe powered by WebGL and Three.js
24
+ </p>
25
+ </div>
26
+
27
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8 mb-20">
28
+ <div class="bg-gray-900 bg-opacity-50 backdrop-blur-lg rounded-2xl p-8 transform transition-all hover:scale-105 hover:shadow-xl hover:shadow-purple-500/20">
29
+ <div class="h-64 mb-6 rounded-xl bg-gradient-to-br from-purple-500/20 to-pink-500/20 flex items-center justify-center">
30
+ <i data-feather="compass" class="w-16 h-16 text-purple-400"></i>
31
+ </div>
32
+ <h3 class="text-2xl font-bold mb-3">Explore</h3>
33
+ <p class="opacity-80">Navigate through stunning 3D celestial landscapes with intuitive controls.</p>
34
+ </div>
35
+
36
+ <div class="bg-gray-900 bg-opacity-50 backdrop-blur-lg rounded-2xl p-8 transform transition-all hover:scale-105 hover:shadow-xl hover:shadow-blue-500/20">
37
+ <div class="h-64 mb-6 rounded-xl bg-gradient-to-br from-blue-500/20 to-cyan-500/20 flex items-center justify-center">
38
+ <i data-feather="box" class="w-16 h-16 text-blue-400"></i>
39
+ </div>
40
+ <h3 class="text-2xl font-bold mb-3">Interact</h3>
41
+ <p class="opacity-80">Manipulate 3D objects in real-time with physics-based interactions.</p>
42
+ </div>
43
+
44
+ <div class="bg-gray-900 bg-opacity-50 backdrop-blur-lg rounded-2xl p-8 transform transition-all hover:scale-105 hover:shadow-xl hover:shadow-red-500/20">
45
+ <div class="h-64 mb-6 rounded-xl bg-gradient-to-br from-red-500/20 to-orange-500/20 flex items-center justify-center">
46
+ <i data-feather="eye" class="w-16 h-16 text-red-400"></i>
47
+ </div>
48
+ <h3 class="text-2xl font-bold mb-3">Experience</h3>
49
+ <p class="opacity-80">Immerse yourself in VR-ready content with spatial audio.</p>
50
+ </div>
51
+ </div>
52
+
53
+ <div class="relative h-screen mb-20 rounded-3xl overflow-hidden border border-gray-800">
54
+ <div id="threejs-container" class="w-full h-full"></div>
55
+ <div class="absolute bottom-8 left-8 right-8 flex justify-between items-center">
56
+ <div class="bg-black bg-opacity-70 px-4 py-2 rounded-full">
57
+ <span class="text-sm">3D Scene Loading...</span>
58
+ </div>
59
+ <button id="enter-vr" class="bg-purple-600 hover:bg-purple-700 px-6 py-3 rounded-full font-medium flex items-center gap-2">
60
+ <i data-feather="glasses" class="w-5 h-5"></i>
61
+ <span>Enter VR Mode</span>
62
+ </button>
63
+ </div>
64
+ </div>
65
+
66
+ <div class="max-w-4xl mx-auto text-center">
67
+ <h2 class="text-4xl font-bold mb-8">Ready for the Next Dimension?</h2>
68
+ <p class="text-xl mb-8 opacity-90">
69
+ Our 3D web experience pushes boundaries with cutting-edge WebGL technology,
70
+ delivering stunning visuals that respond to your every move.
71
+ </p>
72
+ <a href="/explore" class="inline-block bg-gradient-to-r from-purple-600 to-pink-600 hover:from-purple-700 hover:to-pink-700 text-white px-8 py-4 rounded-full text-lg font-semibold shadow-lg transform transition-all hover:scale-105">
73
+ Start Exploring Now
74
+ </a>
75
+ </div>
76
+ </main>
77
+
78
+ <footer class="py-12 text-center opacity-70 text-sm">
79
+ <p>© 2023 Cosmic 3D Explorer. All rights reserved.</p>
80
+ </footer>
81
+
82
+ <script src="script.js"></script>
83
+ <script>feather.replace();</script>
84
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
85
+ </body>
86
+ </html>
script.js ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ document.addEventListener('DOMContentLoaded', () => {
2
+ // Initialize Vanta.js background
3
+ VANTA.NET({
4
+ el: "#vanta-bg",
5
+ color: 0x7e22ce,
6
+ backgroundColor: 0x0,
7
+ points: 12.00,
8
+ maxDistance: 22.00,
9
+ spacing: 18.00
10
+ });
11
+
12
+ // Initialize Three.js scene
13
+ const initThreeJS = () => {
14
+ const container = document.getElementById('threejs-container');
15
+ const width = container.clientWidth;
16
+ const height = container.clientHeight;
17
+
18
+ const scene = new THREE.Scene();
19
+ const camera = new THREE.PerspectiveCamera(75, width / height, 0.1, 1000);
20
+ const renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });
21
+
22
+ renderer.setSize(width, height);
23
+ renderer.setPixelRatio(window.devicePixelRatio);
24
+ container.appendChild(renderer.domElement);
25
+
26
+ // Add lights
27
+ const ambientLight = new THREE.AmbientLight(0x404040);
28
+ scene.add(ambientLight);
29
+
30
+ const directionalLight = new THREE.DirectionalLight(0xffffff, 1);
31
+ directionalLight.position.set(1, 1, 1);
32
+ scene.add(directionalLight);
33
+
34
+ // Add objects
35
+ const geometry = new THREE.IcosahedronGeometry(2, 1);
36
+ const material = new THREE.MeshPhongMaterial({
37
+ color: 0x7e22ce,
38
+ emissive: 0x3b0764,
39
+ emissiveIntensity: 0.5,
40
+ specular: 0x7b34dd,
41
+ shininess: 50,
42
+ wireframe: false
43
+ });
44
+ const mesh = new THREE.Mesh(geometry, material);
45
+ scene.add(mesh);
46
+
47
+ camera.position.z = 5;
48
+
49
+ // Animation loop
50
+ const animate = () => {
51
+ requestAnimationFrame(animate);
52
+ mesh.rotation.x += 0.005;
53
+ mesh.rotation.y += 0.01;
54
+ renderer.render(scene, camera);
55
+ };
56
+ animate();
57
+
58
+ // Handle window resize
59
+ window.addEventListener('resize', () => {
60
+ camera.aspect = container.clientWidth / container.clientHeight;
61
+ camera.updateProjectionMatrix();
62
+ renderer.setSize(container.clientWidth, container.clientHeight);
63
+ });
64
+
65
+ // VR button functionality
66
+ document.getElementById('enter-vr').addEventListener('click', () => {
67
+ alert('VR functionality would be implemented here with WebXR');
68
+ });
69
+ };
70
+
71
+ initThreeJS();
72
+
73
+ // Intersection Observer for scroll animations
74
+ const observer = new IntersectionObserver((entries) => {
75
+ entries.forEach(entry => {
76
+ if (entry.isIntersecting) {
77
+ entry.target.classList.add('animate-fadeIn');
78
+ }
79
+ });
80
+ }, { threshold: 0.1 });
81
+
82
+ document.querySelectorAll('.animate-on-scroll').forEach(el => {
83
+ observer.observe(el);
84
+ });
85
+ });
86
+
87
+ // Web Components could be added here or in separate files
style.css CHANGED
@@ -1,28 +1,58 @@
 
 
1
  body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
 
 
 
 
 
 
28
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
2
+
3
  body {
4
+ font-family: 'Inter', sans-serif;
5
+ background-color: #000;
6
+ color: #fff;
7
+ overscroll-behavior: none;
8
+ }
9
+
10
+ #threejs-container {
11
+ position: relative;
12
+ width: 100%;
13
+ height: 100%;
14
+ }
15
+
16
+ /* Custom scrollbar */
17
+ ::-webkit-scrollbar {
18
+ width: 8px;
19
+ height: 8px;
20
  }
21
 
22
+ ::-webkit-scrollbar-track {
23
+ background: #0f0f0f;
 
24
  }
25
 
26
+ ::-webkit-scrollbar-thumb {
27
+ background: #4a4a4a;
28
+ border-radius: 4px;
 
 
29
  }
30
 
31
+ ::-webkit-scrollbar-thumb:hover {
32
+ background: #5a5a5a;
 
 
 
 
33
  }
34
 
35
+ /* Animation classes */
36
+ @keyframes float {
37
+ 0%, 100% {
38
+ transform: translateY(0);
39
+ }
40
+ 50% {
41
+ transform: translateY(-10px);
42
+ }
43
  }
44
+
45
+ .float-animation {
46
+ animation: float 6s ease-in-out infinite;
47
+ }
48
+
49
+ .glow {
50
+ filter: drop-shadow(0 0 8px currentColor);
51
+ }
52
+
53
+ /* Responsive tweaks */
54
+ @media (max-width: 768px) {
55
+ #threejs-container {
56
+ height: 60vh;
57
+ }
58
+ }