curiouscurrent commited on
Commit
ecc1f3d
·
verified ·
1 Parent(s): 5fe5d48

3d design not getting generated

Browse files
Files changed (7) hide show
  1. README.md +8 -5
  2. components/footer.js +222 -0
  3. components/navbar.js +182 -0
  4. gallery.html +184 -0
  5. index.html +250 -19
  6. script.js +390 -0
  7. style.css +166 -19
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: 3d Magic Generator
3
- emoji: 🦀
4
- colorFrom: blue
5
- colorTo: indigo
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: 3D Magic Generator 🎨
3
+ colorFrom: gray
4
+ colorTo: yellow
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,222 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomFooter extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ * {
7
+ margin: 0;
8
+ padding: 0;
9
+ box-sizing: border-box;
10
+ }
11
+
12
+ footer {
13
+ background: linear-gradient(180deg, rgba(17, 24, 39, 0.5), rgba(17, 24, 39, 0.9));
14
+ border-top: 1px solid rgba(75, 85, 99, 0.3);
15
+ padding: 3rem 1rem 2rem;
16
+ margin-top: 4rem;
17
+ }
18
+
19
+ .footer-container {
20
+ max-width: 1280px;
21
+ margin: 0 auto;
22
+ }
23
+
24
+ .footer-content {
25
+ display: grid;
26
+ grid-template-columns: 2fr 1fr 1fr 1fr;
27
+ gap: 3rem;
28
+ margin-bottom: 3rem;
29
+ }
30
+
31
+ .footer-brand h3 {
32
+ font-size: 1.5rem;
33
+ font-weight: bold;
34
+ margin-bottom: 1rem;
35
+ background: linear-gradient(135deg, #0ea5e9, #d946ef);
36
+ -webkit-background-clip: text;
37
+ -webkit-text-fill-color: transparent;
38
+ background-clip: text;
39
+ }
40
+
41
+ .footer-brand p {
42
+ color: #9ca3af;
43
+ line-height: 1.6;
44
+ margin-bottom: 1.5rem;
45
+ }
46
+
47
+ .social-links {
48
+ display: flex;
49
+ gap: 1rem;
50
+ }
51
+
52
+ .social-link {
53
+ width: 40px;
54
+ height: 40px;
55
+ background: rgba(75, 85, 99, 0.2);
56
+ border: 1px solid rgba(75, 85, 99, 0.3);
57
+ border-radius: 0.5rem;
58
+ display: flex;
59
+ align-items: center;
60
+ justify-content: center;
61
+ color: #d1d5db;
62
+ text-decoration: none;
63
+ transition: all 0.2s ease;
64
+ }
65
+
66
+ .social-link:hover {
67
+ background: rgba(14, 165, 233, 0.2);
68
+ border-color: #0ea5e9;
69
+ color: #0ea5e9;
70
+ transform: translateY(-2px);
71
+ }
72
+
73
+ .footer-column h4 {
74
+ color: white;
75
+ font-size: 1rem;
76
+ font-weight: 600;
77
+ margin-bottom: 1rem;
78
+ }
79
+
80
+ .footer-links {
81
+ list-style: none;
82
+ }
83
+
84
+ .footer-links li {
85
+ margin-bottom: 0.75rem;
86
+ }
87
+
88
+ .footer-links a {
89
+ color: #9ca3af;
90
+ text-decoration: none;
91
+ transition: color 0.2s ease;
92
+ }
93
+
94
+ .footer-links a:hover {
95
+ color: #0ea5e9;
96
+ }
97
+
98
+ .footer-bottom {
99
+ padding-top: 2rem;
100
+ border-top: 1px solid rgba(75, 85, 99, 0.3);
101
+ display: flex;
102
+ justify-content: space-between;
103
+ align-items: center;
104
+ flex-wrap: wrap;
105
+ gap: 1rem;
106
+ }
107
+
108
+ .footer-bottom p {
109
+ color: #6b7280;
110
+ font-size: 0.875rem;
111
+ }
112
+
113
+ .footer-bottom-links {
114
+ display: flex;
115
+ gap: 2rem;
116
+ }
117
+
118
+ .footer-bottom-links a {
119
+ color: #6b7280;
120
+ text-decoration: none;
121
+ font-size: 0.875rem;
122
+ transition: color 0.2s ease;
123
+ }
124
+
125
+ .footer-bottom-links a:hover {
126
+ color: #0ea5e9;
127
+ }
128
+
129
+ @media (max-width: 1024px) {
130
+ .footer-content {
131
+ grid-template-columns: 1fr 1fr;
132
+ }
133
+ }
134
+
135
+ @media (max-width: 640px) {
136
+ .footer-content {
137
+ grid-template-columns: 1fr;
138
+ gap: 2rem;
139
+ }
140
+
141
+ .footer-bottom {
142
+ flex-direction: column;
143
+ text-align: center;
144
+ }
145
+
146
+ .footer-bottom-links {
147
+ gap: 1rem;
148
+ }
149
+ }
150
+ </style>
151
+
152
+ <footer>
153
+ <div class="footer-container">
154
+ <div class="footer-content">
155
+ <div class="footer-brand">
156
+ <h3>TextTo3D Studio</h3>
157
+ <p>Transform your ideas into stunning 3D designs with the power of AI. Create, explore, and share your digital masterpieces.</p>
158
+ <div class="social-links">
159
+ <a href="#" class="social-link">
160
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
161
+ <path d="M24 4.557c-.883.392-1.832.656-2.828.775 1.017-.609 1.798-1.574 2.165-2.724-.951.564-2.005.974-3.127 1.195-.897-.957-2.178-1.555-3.594-1.555-3.179 0-5.515 2.966-4.797 6.045-4.091-.205-7.719-2.165-10.148-5.144-1.29 2.213-.669 5.108 1.523 6.574-.806-.026-1.566-.247-2.229-.616-.054 2.281 1.581 4.415 3.949 4.89-.693.188-1.452.232-2.224.084.626 1.956 2.444 3.379 4.6 3.419-2.07 1.623-4.678 2.348-7.29 2.04 2.179 1.397 4.768 2.212 7.548 2.212 9.142 0 14.307-7.721 13.995-14.646.962-.695 1.797-1.562 2.457-2.549z"/>
162
+ </svg>
163
+ </a>
164
+ <a href="#" class="social-link">
165
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
166
+ <path d="M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zM5.838 12a6.162 6.162 0 1 1 12.324 0 6.162 6.162 0 0 1-12.324 0zM12 16a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm4.965-10.405a1.44 1.44 0 1 1 2.881.001 1.44 1.44 0 0 1-2.881-.001z"/>
167
+ </svg>
168
+ </a>
169
+ <a href="#" class="social-link">
170
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
171
+ <path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
172
+ </svg>
173
+ </a>
174
+ </div>
175
+ </div>
176
+
177
+ <div class="footer-column">
178
+ <h4>Product</h4>
179
+ <ul class="footer-links">
180
+ <li><a href="#">Features</a></li>
181
+ <li><a href="#">Pricing</a></li>
182
+ <li><a href="#">API</a></li>
183
+ <li><a href="#">Documentation</a></li>
184
+ </ul>
185
+ </div>
186
+
187
+ <div class="footer-column">
188
+ <h4>Company</h4>
189
+ <ul class="footer-links">
190
+ <li><a href="#">About Us</a></li>
191
+ <li><a href="#">Blog</a></li>
192
+ <li><a href="#">Careers</a></li>
193
+ <li><a href="#">Contact</a></li>
194
+ </ul>
195
+ </div>
196
+
197
+ <div class="footer-column">
198
+ <h4>Resources</h4>
199
+ <ul class="footer-links">
200
+ <li><a href="#">Community</a></li>
201
+ <li><a href="#">Tutorials</a></li>
202
+ <li><a href="#">Support</a></li>
203
+ <li><a href="#">Status</a></li>
204
+ </ul>
205
+ </div>
206
+ </div>
207
+
208
+ <div class="footer-bottom">
209
+ <p>&copy; 2024 TextTo3D Studio. All rights reserved.</p>
210
+ <div class="footer-bottom-links">
211
+ <a href="#">Privacy Policy</a>
212
+ <a href="#">Terms of Service</a>
213
+ <a href="#">Cookie Policy</a>
214
+ </div>
215
+ </div>
216
+ </div>
217
+ </footer>
218
+ `;
219
+ }
220
+ }
221
+
222
+ customElements.define('custom-footer', CustomFooter);
components/navbar.js ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomNavbar extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ * {
7
+ margin: 0;
8
+ padding: 0;
9
+ box-sizing: border-box;
10
+ }
11
+
12
+ nav {
13
+ background: rgba(17, 24, 39, 0.8);
14
+ backdrop-filter: blur(10px);
15
+ border-bottom: 1px solid rgba(75, 85, 99, 0.3);
16
+ position: sticky;
17
+ top: 0;
18
+ z-index: 50;
19
+ }
20
+
21
+ .nav-container {
22
+ max-width: 1280px;
23
+ margin: 0 auto;
24
+ padding: 1rem 2rem;
25
+ display: flex;
26
+ justify-content: space-between;
27
+ align-items: center;
28
+ }
29
+
30
+ .logo {
31
+ display: flex;
32
+ align-items: center;
33
+ gap: 0.75rem;
34
+ font-size: 1.5rem;
35
+ font-weight: bold;
36
+ text-decoration: none;
37
+ color: white;
38
+ }
39
+
40
+ .logo-icon {
41
+ width: 40px;
42
+ height: 40px;
43
+ background: linear-gradient(135deg, #0ea5e9, #d946ef);
44
+ border-radius: 0.5rem;
45
+ display: flex;
46
+ align-items: center;
47
+ justify-content: center;
48
+ animation: float 6s ease-in-out infinite;
49
+ }
50
+
51
+ @keyframes float {
52
+ 0%, 100% { transform: translateY(0px); }
53
+ 50% { transform: translateY(-5px); }
54
+ }
55
+
56
+ .nav-links {
57
+ display: flex;
58
+ gap: 2rem;
59
+ align-items: center;
60
+ }
61
+
62
+ .nav-link {
63
+ color: #d1d5db;
64
+ text-decoration: none;
65
+ font-weight: 500;
66
+ transition: color 0.2s ease;
67
+ position: relative;
68
+ }
69
+
70
+ .nav-link:hover {
71
+ color: #0ea5e9;
72
+ }
73
+
74
+ .nav-link::after {
75
+ content: '';
76
+ position: absolute;
77
+ bottom: -4px;
78
+ left: 0;
79
+ width: 0;
80
+ height: 2px;
81
+ background: linear-gradient(90deg, #0ea5e9, #d946ef);
82
+ transition: width 0.3s ease;
83
+ }
84
+
85
+ .nav-link:hover::after {
86
+ width: 100%;
87
+ }
88
+
89
+ .nav-link.active {
90
+ color: white;
91
+ }
92
+
93
+ .nav-link.active::after {
94
+ width: 100%;
95
+ }
96
+
97
+ .mobile-menu-btn {
98
+ display: none;
99
+ background: none;
100
+ border: none;
101
+ color: white;
102
+ cursor: pointer;
103
+ }
104
+
105
+ @media (max-width: 768px) {
106
+ .nav-links {
107
+ position: fixed;
108
+ top: 0;
109
+ right: -100%;
110
+ width: 70%;
111
+ height: 100vh;
112
+ background: rgba(17, 24, 39, 0.98);
113
+ flex-direction: column;
114
+ justify-content: center;
115
+ align-items: center;
116
+ gap: 2rem;
117
+ transition: right 0.3s ease;
118
+ }
119
+
120
+ .nav-links.open {
121
+ right: 0;
122
+ }
123
+
124
+ .mobile-menu-btn {
125
+ display: block;
126
+ z-index: 51;
127
+ }
128
+ }
129
+ </style>
130
+
131
+ <nav>
132
+ <div class="nav-container">
133
+ <a href="index.html" class="logo">
134
+ <div class="logo-icon">
135
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2">
136
+ <path d="M12 2L2 7L12 12L22 7L12 2Z"></path>
137
+ <path d="M2 17L12 22L22 17"></path>
138
+ <path d="M2 12L12 17L22 12"></path>
139
+ </svg>
140
+ </div>
141
+ TextTo3D Studio
142
+ </a>
143
+
144
+ <div class="nav-links" id="navLinks">
145
+ <a href="index.html" class="nav-link active">Create</a>
146
+ <a href="gallery.html" class="nav-link">Gallery</a>
147
+ <a href="#" class="nav-link">Pricing</a>
148
+ <a href="#" class="nav-link">About</a>
149
+ <button class="px-4 py-2 bg-gradient-to-r from-primary-500 to-secondary-500 text-white rounded-lg font-medium hover:from-primary-600 hover:to-secondary-600 transition-all duration-200">
150
+ Sign Up
151
+ </button>
152
+ </div>
153
+
154
+ <button class="mobile-menu-btn" id="mobileMenuBtn">
155
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
156
+ <line x1="3" y1="12" x2="21" y2="12"></line>
157
+ <line x1="3" y1="6" x2="21" y2="6"></line>
158
+ <line x1="3" y1="18" x2="21" y2="18"></line>
159
+ </svg>
160
+ </button>
161
+ </div>
162
+ </nav>
163
+ `;
164
+
165
+ // Mobile menu functionality
166
+ const mobileMenuBtn = this.shadowRoot.getElementById('mobileMenuBtn');
167
+ const navLinks = this.shadowRoot.getElementById('navLinks');
168
+
169
+ mobileMenuBtn.addEventListener('click', () => {
170
+ navLinks.classList.toggle('open');
171
+ });
172
+
173
+ // Close menu when link is clicked
174
+ this.shadowRoot.querySelectorAll('.nav-link').forEach(link => {
175
+ link.addEventListener('click', () => {
176
+ navLinks.classList.remove('open');
177
+ });
178
+ });
179
+ }
180
+ }
181
+
182
+ customElements.define('custom-navbar', CustomNavbar);
gallery.html ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en" class="dark">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Gallery - TextTo3D Studio</title>
7
+ <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
8
+ <link rel="stylesheet" href="style.css">
9
+ <script src="https://cdn.tailwindcss.com"></script>
10
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
11
+ <script src="https://unpkg.com/feather-icons"></script>
12
+ <script>
13
+ tailwind.config = {
14
+ darkMode: 'class',
15
+ theme: {
16
+ extend: {
17
+ colors: {
18
+ 'primary': {
19
+ 50: '#f0f9ff',
20
+ 100: '#e0f2fe',
21
+ 200: '#bae6fd',
22
+ 300: '#7dd3fc',
23
+ 400: '#38bdf8',
24
+ 500: '#0ea5e9',
25
+ 600: '#0284c7',
26
+ 700: '#0369a1',
27
+ 800: '#075985',
28
+ 900: '#0c4a6e',
29
+ },
30
+ 'secondary': {
31
+ 50: '#fdf4ff',
32
+ 100: '#fae8ff',
33
+ 200: '#f5d0fe',
34
+ 300: '#f0abfc',
35
+ 400: '#e879f9',
36
+ 500: '#d946ef',
37
+ 600: '#c026d3',
38
+ 700: '#a21caf',
39
+ 800: '#86198f',
40
+ 900: '#701a75',
41
+ }
42
+ }
43
+ }
44
+ }
45
+ }
46
+ </script>
47
+ </head>
48
+ <body class="bg-gray-900 text-white min-h-screen">
49
+ <custom-navbar></custom-navbar>
50
+
51
+ <main class="px-4 py-12 lg:px-8">
52
+ <div class="mx-auto max-w-7xl">
53
+ <!-- Header -->
54
+ <div class="text-center mb-12">
55
+ <h1 class="text-4xl font-bold bg-gradient-to-r from-primary-400 to-secondary-400 bg-clip-text text-transparent mb-4">
56
+ 3D Design Gallery
57
+ </h1>
58
+ <p class="text-gray-300 max-w-2xl mx-auto">
59
+ Explore amazing 3D creations from our community. Get inspired and see what's possible with AI-powered design.
60
+ </p>
61
+ </div>
62
+
63
+ <!-- Filter and Search -->
64
+ <div class="mb-8 flex flex-col md:flex-row gap-4 items-center justify-between">
65
+ <div class="flex gap-2 flex-wrap">
66
+ <button class="filter-btn px-4 py-2 bg-primary-500 text-white rounded-lg transition-all duration-200" data-filter="all">
67
+ All
68
+ </button>
69
+ <button class="filter-btn px-4 py-2 bg-gray-700 hover:bg-gray-600 rounded-lg transition-all duration-200" data-filter="architecture">
70
+ Architecture
71
+ </button>
72
+ <button class="filter-btn px-4 py-2 bg-gray-700 hover:bg-gray-600 rounded-lg transition-all duration-200" data-filter="product">
73
+ Products
74
+ </button>
75
+ <button class="filter-btn px-4 py-2 bg-gray-700 hover:bg-gray-600 rounded-lg transition-all duration-200" data-filter="character">
76
+ Characters
77
+ </button>
78
+ <button class="filter-btn px-4 py-2 bg-gray-700 hover:bg-gray-600 rounded-lg transition-all duration-200" data-filter="abstract">
79
+ Abstract
80
+ </button>
81
+ </div>
82
+ <div class="relative">
83
+ <input
84
+ type="text"
85
+ placeholder="Search designs..."
86
+ class="pl-10 pr-4 py-2 bg-gray-800 border border-gray-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent"
87
+ >
88
+ <i data-feather="search" class="absolute left-3 top-2.5 w-4 h-4 text-gray-400"></i>
89
+ </div>
90
+ </div>
91
+
92
+ <!-- Gallery Grid -->
93
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6" id="gallery-grid">
94
+ <!-- Gallery Items will be dynamically loaded here -->
95
+ </div>
96
+
97
+ <!-- Load More -->
98
+ <div class="text-center mt-12">
99
+ <button id="load-more" class="px-8 py-3 bg-gradient-to-r from-primary-500 to-secondary-500 hover:from-primary-600 hover:to-secondary-600 text-white font-semibold rounded-lg transition-all duration-200 transform hover:scale-105">
100
+ Load More Designs
101
+ </button>
102
+ </div>
103
+ </div>
104
+ </main>
105
+
106
+ <custom-footer></custom-footer>
107
+
108
+ <script src="components/navbar.js"></script>
109
+ <script src="components/footer.js"></script>
110
+ <script src="script.js"></script>
111
+ <script>
112
+ // Gallery specific logic
113
+ const galleryItems = [
114
+ { id: 1, title: "Futuristic Skyscraper", category: "architecture", likes: 234, views: 1200, image: "http://static.photos/cityscape/640x360/1" },
115
+ { id: 2, title: "Ergonomic Chair", category: "product", likes: 189, views: 890, image: "http://static.photos/workspace/640x360/2" },
116
+ { id: 3, title: "Dragon Warrior", category: "character", likes: 456, views: 2300, image: "http://static.photos/abstract/640x360/3" },
117
+ { id: 4, title: "Crystal Formation", category: "abstract", likes: 123, views: 560, image: "http://static.photos/minimal/640x360/4" },
118
+ { id: 5, title: "Modern Villa", category: "architecture", likes: 345, views: 1800, image: "http://static/photos/office/640x360/5" },
119
+ { id: 6, title: "Smart Watch", category: "product", likes: 267, views: 1340, image: "http://static/photos/technology/640x360/6" },
120
+ { id: 7, title: "Space Explorer", category: "character", likes: 523, views: 2900, image: "http://static.photos/monochrome/640x360/7" },
121
+ { id: 8, title: "Geometric Patterns", category: "abstract", likes: 98, views: 450, image: "http://static.photos/gradient/640x360/8" }
122
+ ];
123
+
124
+ function loadGalleryItems(filter = 'all') {
125
+ const grid = document.getElementById('gallery-grid');
126
+ grid.innerHTML = '';
127
+
128
+ const filtered = filter === 'all' ? galleryItems : galleryItems.filter(item => item.category === filter);
129
+
130
+ filtered.forEach(item => {
131
+ const card = document.createElement('div');
132
+ card.className = 'bg-gray-800/50 backdrop-blur-sm rounded-xl overflow-hidden border border-gray-700 hover:border-primary-500/50 transition-all duration-300 group cursor-pointer';
133
+ card.innerHTML = `
134
+ <div class="relative overflow-hidden h-48">
135
+ <img src="${item.image}" alt="${item.title}" class="w-full h-full object-cover group-hover:scale-110 transition-transform duration-300">
136
+ <div class="absolute inset-0 bg-gradient-to-t from-black/70 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-end p-4">
137
+ <button class="px-4 py-2 bg-primary-500/90 backdrop-blur-sm rounded-lg text-sm font-medium transform translate-y-full group-hover:translate-y-0 transition-transform duration-300">
138
+ View in 3D
139
+ </button>
140
+ </div>
141
+ </div>
142
+ <div class="p-4">
143
+ <h3 class="font-semibold text-lg mb-2">${item.title}</h3>
144
+ <div class="flex items-center justify-between text-sm text-gray-400">
145
+ <span class="capitalize">${item.category}</span>
146
+ <div class="flex items-center gap-3">
147
+ <span class="flex items-center gap-1">
148
+ <i data-feather="heart" class="w-4 h-4"></i>
149
+ ${item.likes}
150
+ </span>
151
+ <span class="flex items-center gap-1">
152
+ <i data-feather="eye" class="w-4 h-4"></i>
153
+ ${item.views}
154
+ </span>
155
+ </div>
156
+ </div>
157
+ </div>
158
+ `;
159
+ grid.appendChild(card);
160
+ });
161
+
162
+ feather.replace();
163
+ }
164
+
165
+ // Filter buttons
166
+ document.querySelectorAll('.filter-btn').forEach(btn => {
167
+ btn.addEventListener('click', () => {
168
+ document.querySelectorAll('.filter-btn').forEach(b => {
169
+ b.classList.remove('bg-primary-500', 'text-white');
170
+ b.classList.add('bg-gray-700');
171
+ });
172
+ btn.classList.remove('bg-gray-700');
173
+ btn.classList.add('bg-primary-500', 'text-white');
174
+ loadGalleryItems(btn.dataset.filter);
175
+ });
176
+ });
177
+
178
+ // Load initial items
179
+ loadGalleryItems();
180
+
181
+ feather.replace();
182
+ </script>
183
+ </body>
184
+ </html>
index.html CHANGED
@@ -1,19 +1,250 @@
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" class="dark">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>TextTo3D Studio - Transform Words into 3D Magic</title>
7
+ <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
8
+ <link rel="stylesheet" href="style.css">
9
+ <script src="https://cdn.tailwindcss.com"></script>
10
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
11
+ <script src="https://unpkg.com/feather-icons"></script>
12
+ <script>
13
+ tailwind.config = {
14
+ darkMode: 'class',
15
+ theme: {
16
+ extend: {
17
+ colors: {
18
+ 'primary': {
19
+ 50: '#f0f9ff',
20
+ 100: '#e0f2fe',
21
+ 200: '#bae6fd',
22
+ 300: '#7dd3fc',
23
+ 400: '#38bdf8',
24
+ 500: '#0ea5e9',
25
+ 600: '#0284c7',
26
+ 700: '#0369a1',
27
+ 800: '#075985',
28
+ 900: '#0c4a6e',
29
+ },
30
+ 'secondary': {
31
+ 50: '#fdf4ff',
32
+ 100: '#fae8ff',
33
+ 200: '#f5d0fe',
34
+ 300: '#f0abfc',
35
+ 400: '#e879f9',
36
+ 500: '#d946ef',
37
+ 600: '#c026d3',
38
+ 700: '#a21caf',
39
+ 800: '#86198f',
40
+ 900: '#701a75',
41
+ }
42
+ },
43
+ animation: {
44
+ 'float': 'float 6s ease-in-out infinite',
45
+ 'pulse-slow': 'pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite',
46
+ }
47
+ }
48
+ }
49
+ }
50
+ </script>
51
+ </head>
52
+ <body class="bg-gray-900 text-white min-h-screen">
53
+ <custom-navbar></custom-navbar>
54
+
55
+ <main class="relative">
56
+ <!-- Hero Section -->
57
+ <section class="relative overflow-hidden px-4 py-20 lg:px-8">
58
+ <div class="absolute inset-0 bg-gradient-to-br from-primary-900/20 via-transparent to-secondary-900/20"></div>
59
+ <div class="relative mx-auto max-w-7xl">
60
+ <div class="text-center">
61
+ <h1 class="text-4xl font-bold tracking-tight sm:text-6xl lg:text-7xl bg-gradient-to-r from-primary-400 to-secondary-400 bg-clip-text text-transparent">
62
+ Transform Your Ideas
63
+ <br />
64
+ <span class="text-gray-100">Into 3D Reality</span>
65
+ </h1>
66
+ <p class="mx-auto mt-6 max-w-2xl text-lg leading-8 text-gray-300">
67
+ Describe your vision in words and watch as AI creates stunning 3D designs instantly.
68
+ No design skills required.
69
+ </p>
70
+ </div>
71
+
72
+ <!-- 3D Preview Container -->
73
+ <div class="mt-12 grid grid-cols-1 lg:grid-cols-2 gap-8">
74
+ <!-- Input Section -->
75
+ <div class="space-y-6">
76
+ <div class="bg-gray-800/50 backdrop-blur-sm rounded-2xl p-6 border border-gray-700">
77
+ <h3 class="text-xl font-semibold mb-4 flex items-center gap-2">
78
+ <i data-feather="edit-3" class="w-5 h-5 text-primary-400"></i>
79
+ Describe Your Design
80
+ </h3>
81
+ <textarea
82
+ id="text-input"
83
+ class="w-full h-32 bg-gray-900/50 border border-gray-700 rounded-lg p-4 text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent resize-none"
84
+ placeholder="E.g., A futuristic floating house with glass walls and solar panels on a tropical island..."
85
+ ></textarea>
86
+
87
+ <!-- Style Options -->
88
+ <div class="mt-4 space-y-3">
89
+ <label class="block text-sm font-medium text-gray-300 mb-2">Design Style</label>
90
+ <div class="grid grid-cols-2 gap-2">
91
+ <button class="style-btn px-4 py-2 bg-gray-700 hover:bg-primary-600 rounded-lg transition-all duration-200 text-sm" data-style="realistic">
92
+ 🌟 Realistic
93
+ </button>
94
+ <button class="style-btn px-4 py-2 bg-gray-700 hover:bg-primary-600 rounded-lg transition-all duration-200 text-sm" data-style="cartoon">
95
+ 🎨 Cartoon
96
+ </button>
97
+ <button class="style-btn px-4 py-2 bg-gray-700 hover:bg-primary-600 rounded-lg transition-all duration-200 text-sm" data-style="minimalist">
98
+ ⭕ Minimalist
99
+ </button>
100
+ <button class="style-btn px-4 py-2 bg-gray-700 hover:bg-primary-600 rounded-lg transition-all duration-200 text-sm" data-style="fantasy">
101
+ ✨ Fantasy
102
+ </button>
103
+ </div>
104
+ </div>
105
+
106
+ <button
107
+ id="generate-btn"
108
+ class="w-full mt-6 bg-gradient-to-r from-primary-500 to-secondary-500 hover:from-primary-600 hover:to-secondary-600 text-white font-semibold py-3 px-6 rounded-lg transition-all duration-200 transform hover:scale-105 flex items-center justify-center gap-2"
109
+ >
110
+ <i data-feather="cpu" class="w-5 h-5"></i>
111
+ Generate 3D Design
112
+ </button>
113
+ </div>
114
+
115
+ <!-- Generation Progress -->
116
+ <div id="progress-container" class="hidden bg-gray-800/50 backdrop-blur-sm rounded-2xl p-6 border border-gray-700">
117
+ <div class="flex items-center justify-between mb-3">
118
+ <span class="text-sm font-medium text-gray-300">Generating...</span>
119
+ <span id="progress-percent" class="text-sm font-medium text-primary-400">0%</span>
120
+ </div>
121
+ <div class="w-full bg-gray-700 rounded-full h-2">
122
+ <div id="progress-bar" class="bg-gradient-to-r from-primary-500 to-secondary-500 h-2 rounded-full transition-all duration-300" style="width: 0%"></div>
123
+ </div>
124
+ <p class="mt-3 text-xs text-gray-400">AI is creating your 3D masterpiece...</p>
125
+ </div>
126
+ </div>
127
+
128
+ <!-- 3D Output Section -->
129
+ <div class="bg-gray-800/50 backdrop-blur-sm rounded-2xl p-6 border border-gray-700">
130
+ <h3 class="text-xl font-semibold mb-4 flex items-center justify-between">
131
+ <span class="flex items-center gap-2">
132
+ <i data-feather="box" class="w-5 h-5 text-secondary-400"></i>
133
+ 3D Preview
134
+ </span>
135
+ <span id="render-time" class="text-sm text-gray-400"></span>
136
+ </h3>
137
+
138
+ <div id="preview-container" class="relative bg-gray-900/50 rounded-lg overflow-hidden" style="height: 400px;">
139
+ <div class="absolute inset-0 flex items-center justify-center">
140
+ <div class="text-center">
141
+ <div class="w-24 h-24 mx-auto mb-4 rounded-full bg-gradient-to-br from-primary-500/20 to-secondary-500/20 flex items-center justify-center animate-pulse-slow">
142
+ <i data-feather="box" class="w-12 h-12 text-gray-400"></i>
143
+ </div>
144
+ <p class="text-gray-400">Your 3D design will appear here</p>
145
+ </div>
146
+ </div>
147
+ <canvas id="3d-canvas" class="hidden w-full h-full"></canvas>
148
+ </div>
149
+
150
+ <!-- Action Buttons -->
151
+ <div id="action-buttons" class="hidden mt-4 grid grid-cols-3 gap-2">
152
+ <button class="px-4 py-2 bg-gray-700 hover:bg-gray-600 rounded-lg transition-all duration-200 text-sm flex items-center justify-center gap-2">
153
+ <i data-feather="rotate-ccw" class="w-4 h-4"></i>
154
+ Rotate
155
+ </button>
156
+ <button class="px-4 py-2 bg-gray-700 hover:bg-gray-600 rounded-lg transition-all duration-200 text-sm flex items-center justify-center gap-2">
157
+ <i data-feather="download" class="w-4 h-4"></i>
158
+ Export
159
+ </button>
160
+ <button class="px-4 py-2 bg-gray-700 hover:bg-gray-600 rounded-lg transition-all duration-200 text-sm flex items-center justify-center gap-2">
161
+ <i data-feather="share-2" class="w-4 h-4"></i>
162
+ Share
163
+ </button>
164
+ </div>
165
+ </div>
166
+ </div>
167
+ </div>
168
+ </section>
169
+
170
+ <!-- Features Section -->
171
+ <section class="px-4 py-20 lg:px-8">
172
+ <div class="mx-auto max-w-7xl">
173
+ <h2 class="text-3xl font-bold text-center mb-12 bg-gradient-to-r from-primary-400 to-secondary-400 bg-clip-text text-transparent">
174
+ Powered by Advanced AI
175
+ </h2>
176
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
177
+ <div class="bg-gray-800/50 backdrop-blur-sm rounded-2xl p-6 border border-gray-700 hover:border-primary-500/50 transition-all duration-300">
178
+ <div class="w-12 h-12 bg-primary-500/20 rounded-lg flex items-center justify-center mb-4">
179
+ <i data-feather="zap" class="w-6 h-6 text-primary-400"></i>
180
+ </div>
181
+ <h3 class="text-xl font-semibold mb-2">Instant Generation</h3>
182
+ <p class="text-gray-400">Get your 3D models in seconds, not hours. Our AI processes your text instantly.</p>
183
+ </div>
184
+ <div class="bg-gray-800/50 backdrop-blur-sm rounded-2xl p-6 border border-gray-700 hover:border-secondary-500/50 transition-all duration-300">
185
+ <div class="w-12 h-12 bg-secondary-500/20 rounded-lg flex items-center justify-center mb-4">
186
+ <i data-feather="layers" class="w-6 h-6 text-secondary-400"></i>
187
+ </div>
188
+ <h3 class="text-xl font-semibold mb-2">High Detail</h3>
189
+ <p class="text-gray-400">Complex geometries, textures, and lighting that bring your ideas to life.</p>
190
+ </div>
191
+ <div class="bg-gray-800/50 backdrop-blur-sm rounded-2xl p-6 border border-gray-700 hover:border-primary-500/50 transition-all duration-300">
192
+ <div class="w-12 h-12 bg-gradient-to-br from-primary-500/20 to-secondary-500/20 rounded-lg flex items-center justify-center mb-4">
193
+ <i data-feather="sliders" class="w-6 h-6 text-primary-400"></i>
194
+ </div>
195
+ <h3 class="text-xl font-semibold mb-2">Customizable</h3>
196
+ <p class="text-gray-400">Adjust materials, lighting, and camera angles to perfect your vision.</p>
197
+ </div>
198
+ </div>
199
+ </div>
200
+ </section>
201
+
202
+ <!-- Recent Creations -->
203
+ <section class="px-4 py-20 lg:px-8 bg-gray-800/30">
204
+ <div class="mx-auto max-w-7xl">
205
+ <h2 class="text-3xl font-bold text-center mb-12 bg-gradient-to-r from-primary-400 to-secondary-400 bg-clip-text text-transparent">
206
+ Recent Creations
207
+ </h2>
208
+ <div class="grid grid-cols-2 md:grid-cols-4 gap-4" id="recent-creations">
209
+ <div class="bg-gray-800/50 rounded-lg overflow-hidden hover:scale-105 transition-transform duration-300 cursor-pointer">
210
+ <img src="http://static.photos/technology/320x240/1" alt="Creation" class="w-full h-40 object-cover">
211
+ <div class="p-3">
212
+ <p class="text-sm text-gray-300 truncate">Cyberpunk Cityscape</p>
213
+ <p class="text-xs text-gray-500">2 min ago</p>
214
+ </div>
215
+ </div>
216
+ <div class="bg-gray-800/50 rounded-lg overflow-hidden hover:scale-105 transition-transform duration-300 cursor-pointer">
217
+ <img src="http://static.photos/architecture/320x240/2" alt="Creation" class="w-full h-40 object-cover">
218
+ <div class="p-3">
219
+ <p class="text-sm text-gray-300 truncate">Modern Villa</p>
220
+ <p class="text-xs text-gray-500">5 min ago</p>
221
+ </div>
222
+ </div>
223
+ <div class="bg-gray-800/50 rounded-lg overflow-hidden hover:scale-105 transition-transform duration-300 cursor-pointer">
224
+ <img src="http://static.photos/abstract/320x240/3" alt="Creation" class="w-full h-40 object-cover">
225
+ <div class="p-3">
226
+ <p class="text-sm text-gray-300 truncate">Abstract Sculpture</p>
227
+ <p class="text-xs text-gray-500">10 min ago</p>
228
+ </div>
229
+ </div>
230
+ <div class="bg-gray-800/50 rounded-lg overflow-hidden hover:scale-105 transition-transform duration-300 cursor-pointer">
231
+ <img src="http://static.photos/nature/320x240/4" alt="Creation" class="w-full h-40 object-cover">
232
+ <div class="p-3">
233
+ <p class="text-sm text-gray-300 truncate">Fantasy Treehouse</p>
234
+ <p class="text-xs text-gray-500">15 min ago</p>
235
+ </div>
236
+ </div>
237
+ </div>
238
+ </div>
239
+ </section>
240
+ </main>
241
+
242
+ <custom-footer></custom-footer>
243
+
244
+ <script src="components/navbar.js"></script>
245
+ <script src="components/footer.js"></script>
246
+ <script src="script.js"></script>
247
+ <script>feather.replace();</script>
248
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
249
+ </body>
250
+ </html>
script.js ADDED
@@ -0,0 +1,390 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Main application logic
2
+ document.addEventListener('DOMContentLoaded', function() {
3
+ // Style selection
4
+ const styleButtons = document.querySelectorAll('.style-btn');
5
+ let selectedStyle = 'realistic';
6
+
7
+ styleButtons.forEach(btn => {
8
+ btn.addEventListener('click', () => {
9
+ styleButtons.forEach(b => b.classList.remove('active'));
10
+ btn.classList.add('active');
11
+ selectedStyle = btn.dataset.style;
12
+ });
13
+ });
14
+
15
+ // Set default active style
16
+ document.querySelector('[data-style="realistic"]').classList.add('active');
17
+
18
+ // Generate button functionality
19
+ const generateBtn = document.getElementById('generate-btn');
20
+ const textInput = document.getElementById('text-input');
21
+ const progressContainer = document.getElementById('progress-container');
22
+ const progressBar = document.getElementById('progress-bar');
23
+ const progressPercent = document.getElementById('progress-percent');
24
+ const previewContainer = document.getElementById('preview-container');
25
+ const canvas = document.getElementById('3d-canvas');
26
+ const actionButtons = document.getElementById('action-buttons');
27
+ const renderTime = document.getElementById('render-time');
28
+
29
+ generateBtn.addEventListener('click', async () => {
30
+ const text = textInput.value.trim();
31
+
32
+ if (!text) {
33
+ showNotification('Please enter a description for your 3D design', 'warning');
34
+ return;
35
+ }
36
+
37
+ // Show progress
38
+ progressContainer.classList.remove('hidden');
39
+ generateBtn.disabled = true;
40
+ generateBtn.classList.add('opacity-50', 'cursor-not-allowed');
41
+
42
+ // Simulate generation progress
43
+ let progress = 0;
44
+ const startTime = Date.now();
45
+
46
+ const progressInterval = setInterval(() => {
47
+ progress += Math.random() * 15;
48
+ if (progress > 90) progress = 90;
49
+
50
+ progressBar.style.width = `${progress}%`;
51
+ progressPercent.textContent = `${Math.round(progress)}%`;
52
+ }, 200);
53
+
54
+ // Simulate API call
55
+ setTimeout(() => {
56
+ clearInterval(progressInterval);
57
+ progressBar.style.width = '100%';
58
+ progressPercent.textContent = '100%';
59
+
60
+ // Generate 3D visualization
61
+ generate3DVisualization(text, selectedStyle);
62
+
63
+ // Calculate render time
64
+ const endTime = Date.now();
65
+ const renderDuration = ((endTime - startTime) / 1000).toFixed(1);
66
+ renderTime.textContent = `Rendered in ${renderDuration}s`;
67
+
68
+ // Show result
69
+ setTimeout(() => {
70
+ progressContainer.classList.add('hidden');
71
+ generateBtn.disabled = false;
72
+ generateBtn.classList.remove('opacity-50', 'cursor-not-allowed');
73
+ actionButtons.classList.remove('hidden');
74
+ canvas.classList.remove('hidden');
75
+ previewContainer.querySelector('.text-center').classList.add('hidden');
76
+
77
+ // Add to recent creations
78
+ addToRecentCreations(text);
79
+ }, 500);
80
+ }, 3000);
81
+ });
82
+ // Enhanced 3D Visualization
83
+ function generate3DVisualization(description, style) {
84
+ const ctx = canvas.getContext('2d');
85
+ canvas.width = canvas.offsetWidth;
86
+ canvas.height = canvas.offsetHeight;
87
+
88
+ // Store the visualization data for animation
89
+ canvas.dataset.description = description;
90
+ canvas.dataset.style = style;
91
+ canvas.dataset.rotation = '0';
92
+
93
+ draw3DModel(ctx, canvas.width, canvas.height, style, 0);
94
+ }
95
+
96
+ function draw3DModel(ctx, width, height, style, rotation) {
97
+ // Clear canvas
98
+ ctx.clearRect(0, 0, width, height);
99
+
100
+ // Create gradient background based on style
101
+ let gradient;
102
+ switch(style) {
103
+ case 'cartoon':
104
+ gradient = ctx.createLinearGradient(0, 0, width, height);
105
+ gradient.addColorStop(0, '#fef3c7');
106
+ gradient.addColorStop(0.5, '#fed7aa');
107
+ gradient.addColorStop(1, '#fbbf24');
108
+ break;
109
+ case 'minimalist':
110
+ gradient = ctx.createLinearGradient(0, 0, width, height);
111
+ gradient.addColorStop(0, '#f3f4f6');
112
+ gradient.addColorStop(0.5, '#e5e7eb');
113
+ gradient.addColorStop(1, '#d1d5db');
114
+ break;
115
+ case 'fantasy':
116
+ gradient = ctx.createRadialGradient(width/2, height/2, 0, width/2, height/2, width/2);
117
+ gradient.addColorStop(0, '#ddd6fe');
118
+ gradient.addColorStop(0.3, '#f9a8d4');
119
+ gradient.addColorStop(0.6, '#c084fc');
120
+ gradient.addColorStop(1, '#818cf8');
121
+ break;
122
+ default: // realistic
123
+ gradient = ctx.createLinearGradient(0, 0, width, height);
124
+ gradient.addColorStop(0, '#0f172a');
125
+ gradient.addColorStop(0.5, '#1e293b');
126
+ gradient.addColorStop(1, '#334155');
127
+ }
128
+
129
+ ctx.fillStyle = gradient;
130
+ ctx.fillRect(0, 0, width, height);
131
+
132
+ // Add grid for depth perception
133
+ ctx.strokeStyle = style === 'minimalist' ? 'rgba(0, 0, 0, 0.1)' : 'rgba(255, 255, 255, 0.05)';
134
+ ctx.lineWidth = 1;
135
+ const gridSize = 30;
136
+
137
+ for (let x = 0; x <= width; x += gridSize) {
138
+ ctx.beginPath();
139
+ ctx.moveTo(x, 0);
140
+ ctx.lineTo(x, height);
141
+ ctx.stroke();
142
+ }
143
+
144
+ for (let y = 0; y <= height; y += gridSize) {
145
+ ctx.beginPath();
146
+ ctx.moveTo(0, y);
147
+ ctx.lineTo(width, y);
148
+ ctx.stroke();
149
+ }
150
+
151
+ const centerX = width / 2;
152
+ const centerY = height / 2;
153
+
154
+ // Main 3D object - More complex and realistic
155
+ ctx.save();
156
+ ctx.translate(centerX, centerY);
157
+
158
+ // Rotate the entire scene
159
+ ctx.rotate(rotation);
160
+
161
+ // Draw 3D cube with proper perspective
162
+ const size = 100;
163
+ const depth = 60;
164
+
165
+ // Back faces (darker)
166
+ ctx.fillStyle = style === 'cartoon' ? 'rgba(251, 191, 36, 0.4)' :
167
+ style === 'minimalist' ? 'rgba(156, 163, 175, 0.3)' :
168
+ style === 'fantasy' ? 'rgba(168, 85, 247, 0.4)' :
169
+ 'rgba(14, 165, 233, 0.3)';
170
+ ctx.strokeStyle = style === 'cartoon' ? 'rgba(251, 191, 36, 0.8)' :
171
+ style === 'minimalist' ? 'rgba(75, 85, 99, 0.8)' :
172
+ style === 'fantasy' ? 'rgba(168, 85, 247, 0.8)' :
173
+ 'rgba(14, 165, 233, 0.8)';
174
+ ctx.lineWidth = 2;
175
+
176
+ // Back face
177
+ ctx.beginPath();
178
+ ctx.rect(-size/2 - depth/3, -size/2 - depth/3, size, size);
179
+ ctx.fill();
180
+ ctx.stroke();
181
+
182
+ // Side faces
183
+ ctx.fillStyle = style === 'cartoon' ? 'rgba(251, 191, 36, 0.5)' :
184
+ style === 'minimalist' ? 'rgba(156, 163, 175, 0.4)' :
185
+ style === 'fantasy' ? 'rgba(236, 72, 153, 0.5)' :
186
+ 'rgba(217, 70, 239, 0.4)';
187
+
188
+ // Right face
189
+ ctx.beginPath();
190
+ ctx.moveTo(size/2, -size/2);
191
+ ctx.lineTo(size/2 + depth/3, -size/2 - depth/3);
192
+ ctx.lineTo(size/2 + depth/3, size/2 - depth/3);
193
+ ctx.lineTo(size/2, size/2);
194
+ ctx.closePath();
195
+ ctx.fill();
196
+ ctx.stroke();
197
+
198
+ // Top face
199
+ ctx.beginPath();
200
+ ctx.moveTo(-size/2, -size/2);
201
+ ctx.lineTo(-size/2 - depth/3, -size/2 - depth/3);
202
+ ctx.lineTo(size/2 - depth/3, -size/2 - depth/3);
203
+ ctx.lineTo(size/2, -size/2);
204
+ ctx.closePath();
205
+ ctx.fill();
206
+ ctx.stroke();
207
+
208
+ // Front face (brightest)
209
+ ctx.fillStyle = style === 'cartoon' ? 'rgba(251, 191, 36, 0.7)' :
210
+ style === 'minimalist' ? 'rgba(156, 163, 175, 0.6)' :
211
+ style === 'fantasy' ? 'rgba(236, 72, 153, 0.7)' :
212
+ 'rgba(14, 165, 233, 0.6)';
213
+
214
+ ctx.beginPath();
215
+ ctx.rect(-size/2, -size/2, size, size);
216
+ ctx.fill();
217
+ ctx.stroke();
218
+
219
+ // Add decorative elements based on style
220
+ if (style === 'fantasy') {
221
+ // Add sparkles
222
+ ctx.fillStyle = 'rgba(255, 255, 255, 0.8)';
223
+ for (let i = 0; i < 5; i++) {
224
+ const sparkleX = (Math.random() - 0.5) * size * 1.5;
225
+ const sparkleY = (Math.random() - 0.5) * size * 1.5;
226
+ const sparkleSize = Math.random() * 3 + 1;
227
+
228
+ ctx.beginPath();
229
+ ctx.arc(sparkleX, sparkleY, sparkleSize, 0, Math.PI * 2);
230
+ ctx.fill();
231
+ }
232
+ } else if (style === 'cartoon') {
233
+ // Add cartoon eyes
234
+ ctx.fillStyle = 'white';
235
+ ctx.beginPath();
236
+ ctx.arc(-20, -10, 12, 0, Math.PI * 2);
237
+ ctx.arc(20, -10, 12, 0, Math.PI * 2);
238
+ ctx.fill();
239
+
240
+ ctx.fillStyle = 'black';
241
+ ctx.beginPath();
242
+ ctx.arc(-20, -10, 6, 0, Math.PI * 2);
243
+ ctx.arc(20, -10, 6, 0, Math.PI * 2);
244
+ ctx.fill();
245
+ }
246
+
247
+ ctx.restore();
248
+
249
+ // Add shadow
250
+ ctx.save();
251
+ ctx.translate(centerX, centerY + 100);
252
+ ctx.scale(1, 0.3);
253
+ ctx.fillStyle = 'rgba(0, 0, 0, 0.2)';
254
+ ctx.beginPath();
255
+ ctx.ellipse(0, 0, size/2, size/4, 0, 0, Math.PI * 2);
256
+ ctx.fill();
257
+ ctx.restore();
258
+
259
+ // Add text overlay
260
+ ctx.fillStyle = style === 'minimalist' ? 'rgba(0, 0, 0, 0.7)' : 'rgba(255, 255, 255, 0.9)';
261
+ ctx.font = 'bold 14px sans-serif';
262
+ ctx.textAlign = 'center';
263
+ ctx.fillText('3D Model Generated!', centerX, height - 20);
264
+ }
265
+ // Add to recent creations
266
+ function addToRecentCreations(description) {
267
+ const recentContainer = document.getElementById('recent-creations');
268
+ const newItem = document.createElement('div');
269
+ newItem.className = 'bg-gray-800/50 rounded-lg overflow-hidden hover:scale-105 transition-transform duration-300 cursor-pointer opacity-0';
270
+
271
+ const randomSeed = Math.floor(Math.random() * 100);
272
+ newItem.innerHTML = `
273
+ <img src="http://static.photos/abstract/320x240/${randomSeed}" alt="Creation" class="w-full h-40 object-cover">
274
+ <div class="p-3">
275
+ <p class="text-sm text-gray-300 truncate">${description.substring(0, 30)}${description.length > 30 ? '...' : ''}</p>
276
+ <p class="text-xs text-gray-500">Just now</p>
277
+ </div>
278
+ `;
279
+
280
+ recentContainer.insertBefore(newItem, recentContainer.firstChild);
281
+
282
+ // Animate in
283
+ setTimeout(() => {
284
+ newItem.classList.remove('opacity-0');
285
+ newItem.classList.add('opacity-100');
286
+ }, 100);
287
+
288
+ // Remove last item if more than 4
289
+ if (recentContainer.children.length > 4) {
290
+ recentContainer.removeChild(recentContainer.lastChild);
291
+ }
292
+ }
293
+
294
+ // Notification system
295
+ function showNotification(message, type = 'info') {
296
+ const notification = document.createElement('div');
297
+ notification.className = `fixed top-20 right-4 px-6 py-3 rounded-lg shadow-lg transform translate-x-full transition-transform duration-300 z-50`;
298
+
299
+ const bgColor = type === 'warning' ? 'bg-yellow-500' : type === 'error' ? 'bg-red-500' : 'bg-primary-500';
300
+ notification.classList.add(bgColor);
301
+
302
+ notification.innerHTML = `
303
+ <div class="flex items-center gap-2 text-white">
304
+ <i data-feather="${type === 'warning' ? 'alert-triangle' : 'info'}" class="w-5 h-5"></i>
305
+ <span>${message}</span>
306
+ </div>
307
+ `;
308
+
309
+ document.body.appendChild(notification);
310
+ feather.replace();
311
+
312
+ // Animate in
313
+ setTimeout(() => {
314
+ notification.classList.remove('translate-x-full');
315
+ notification.classList.add('translate-x-0');
316
+ }, 100);
317
+
318
+ // Remove after 3 seconds
319
+ setTimeout(() => {
320
+ notification.classList.add('translate-x-full');
321
+ setTimeout(() => {
322
+ notification.remove();
323
+ }, 300);
324
+ }, 3000);
325
+ }
326
+ // Enhanced Canvas animation loop
327
+ let animationId;
328
+ function animateCanvas() {
329
+ if (!canvas.classList.contains('hidden') && canvas.dataset.style) {
330
+ const rotation = (Date.now() / 1000) % (Math.PI * 2);
331
+ const ctx = canvas.getContext('2d');
332
+
333
+ draw3DModel(
334
+ ctx,
335
+ canvas.width,
336
+ canvas.height,
337
+ canvas.dataset.style,
338
+ rotation * 0.5
339
+ );
340
+ }
341
+ animationId = requestAnimationFrame(animateCanvas);
342
+ }
343
+
344
+ // Start animation loop
345
+ animateCanvas();
346
+
347
+ // Clean up animation when canvas is hidden
348
+ const observer = new MutationObserver((mutations) => {
349
+ mutations.forEach((mutation) => {
350
+ if (mutation.type === 'attributes' && mutation.attributeName === 'class') {
351
+ if (canvas.classList.contains('hidden')) {
352
+ cancelAnimationFrame(animationId);
353
+ } else if (canvas.dataset.style) {
354
+ animateCanvas();
355
+ }
356
+ }
357
+ });
358
+ });
359
+
360
+ observer.observe(canvas, { attributes: true });
361
+ });
362
+
363
+ // Smooth scroll for anchor links
364
+ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
365
+ anchor.addEventListener('click', function (e) {
366
+ e.preventDefault();
367
+ const target = document.querySelector(this.getAttribute('href'));
368
+ if (target) {
369
+ target.scrollIntoView({ behavior: 'smooth' });
370
+ }
371
+ });
372
+ });
373
+
374
+ // Intersection Observer for animations
375
+ const observerOptions = {
376
+ threshold: 0.1,
377
+ rootMargin: '0px 0px -50px 0px'
378
+ };
379
+
380
+ const observer = new IntersectionObserver((entries) => {
381
+ entries.forEach(entry => {
382
+ if (entry.isIntersecting) {
383
+ entry.target.classList.add('animate-fadeIn');
384
+ }
385
+ });
386
+ }, observerOptions);
387
+
388
+ document.querySelectorAll('.section-animate').forEach(el => {
389
+ observer.observe(el);
390
+ });
style.css CHANGED
@@ -1,28 +1,175 @@
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
+ /* Custom animations and global styles */
2
+ @keyframes float {
3
+ 0%, 100% {
4
+ transform: translateY(0px);
5
+ }
6
+ 50% {
7
+ transform: translateY(-20px);
8
+ }
9
  }
10
 
11
+ @keyframes gradient-shift {
12
+ 0%, 100% {
13
+ background-position: 0% 50%;
14
+ }
15
+ 50% {
16
+ background-position: 100% 50%;
17
+ }
18
  }
19
 
20
+ .animate-float {
21
+ animation: float 6s ease-in-out infinite;
 
 
 
22
  }
23
 
24
+ .gradient-animate {
25
+ background: linear-gradient(-45deg, #0ea5e9, #d946ef, #0ea5e9, #d946ef);
26
+ background-size: 400% 400%;
27
+ animation: gradient-shift 15s ease infinite;
 
 
28
  }
29
 
30
+ /* Custom scrollbar */
31
+ ::-webkit-scrollbar {
32
+ width: 8px;
33
+ height: 8px;
34
  }
35
+
36
+ ::-webkit-scrollbar-track {
37
+ background: #1f2937;
38
+ }
39
+
40
+ ::-webkit-scrollbar-thumb {
41
+ background: #4b5563;
42
+ border-radius: 4px;
43
+ }
44
+
45
+ ::-webkit-scrollbar-thumb:hover {
46
+ background: #6b7280;
47
+ }
48
+
49
+ /* Glass morphism effect */
50
+ .glass {
51
+ background: rgba(31, 41, 55, 0.5);
52
+ backdrop-filter: blur(10px);
53
+ border: 1px solid rgba(75, 85, 99, 0.3);
54
+ }
55
+
56
+ /* Glow effects */
57
+ .glow-primary {
58
+ box-shadow: 0 0 20px rgba(14, 165, 233, 0.5);
59
+ }
60
+
61
+ .glow-secondary {
62
+ box-shadow: 0 0 20px rgba(217, 70, 239, 0.5);
63
+ }
64
+
65
+ /* Smooth transitions */
66
+ * {
67
+ transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
68
+ }
69
+
70
+ /* Text selection */
71
+ ::selection {
72
+ background: rgba(14, 165, 233, 0.3);
73
+ }
74
+
75
+ /* Focus styles */
76
+ .focus-ring:focus {
77
+ outline: none;
78
+ ring: 2px;
79
+ ring-color: #0ea5e9;
80
+ ring-offset: 2px;
81
+ }
82
+
83
+ /* Hover lift effect */
84
+ .hover-lift {
85
+ transition: transform 0.2s ease;
86
+ }
87
+
88
+ .hover-lift:hover {
89
+ transform: translateY(-4px);
90
+ }
91
+
92
+ /* Loading animation */
93
+ .loading-dots::after {
94
+ content: '';
95
+ animation: dots 1.5s steps(4, end) infinite;
96
+ }
97
+
98
+ @keyframes dots {
99
+ 0%, 20% {
100
+ content: '';
101
+ }
102
+ 40% {
103
+ content: '.';
104
+ }
105
+ 60% {
106
+ content: '..';
107
+ }
108
+ 80%, 100% {
109
+ content: '...';
110
+ }
111
+ }
112
+ /* 3D Canvas styles */
113
+ #3d-canvas {
114
+ width: 100%;
115
+ height: 100%;
116
+ display: block;
117
+ border-radius: 8px;
118
+ }
119
+
120
+ /* Preview container enhancements */
121
+ #preview-container {
122
+ position: relative;
123
+ background: linear-gradient(135deg, #1e293b, #0f172a);
124
+ border-radius: 12px;
125
+ overflow: hidden;
126
+ }
127
+
128
+ #preview-container::before {
129
+ content: '';
130
+ position: absolute;
131
+ top: -2px;
132
+ left: -2px;
133
+ right: -2px;
134
+ bottom: -2px;
135
+ background: linear-gradient(45deg, #0ea5e9, #d946ef, #0ea5e9);
136
+ border-radius: 12px;
137
+ opacity: 0;
138
+ transition: opacity 0.3s ease;
139
+ z-index: -1;
140
+ }
141
+
142
+ #preview-container:hover::before {
143
+ opacity: 0.3;
144
+ }
145
+
146
+ /* Loading spinner for canvas */
147
+ .canvas-loading {
148
+ position: absolute;
149
+ top: 50%;
150
+ left: 50%;
151
+ transform: translate(-50%, -50%);
152
+ width: 60px;
153
+ height: 60px;
154
+ border: 3px solid rgba(14, 165, 233, 0.3);
155
+ border-top: 3px solid #0ea5e9;
156
+ border-radius: 50%;
157
+ animation: spin 1s linear infinite;
158
+ }
159
+
160
+ @keyframes spin {
161
+ 0% { transform: translate(-50%, -50%) rotate(0deg); }
162
+ 100% { transform: translate(-50%, -50%) rotate(360deg); }
163
+ }
164
+ /* Style button active state */
165
+ .style-btn.active {
166
+ background: linear-gradient(135deg, #0ea5e9, #d946ef);
167
+ color: white;
168
+ }
169
+
170
+ /* Responsive grid adjustments */
171
+ @media (max-width: 768px) {
172
+ .grid-responsive {
173
+ grid-template-columns: 1fr;
174
+ }
175
+ }