Spaces:
Running
add <!DOCTYPE html>
Browse files<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fantasy Rally - Cosmic Car Designer | WaveType</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/examples/js/controls/OrbitControls.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Orbitron:wght@400;500;700&family=Exo+2:wght@300;400;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
<link href="https://unpkg.com/[email protected]/dist/aos.css" rel="stylesheet">
<script src="https://unpkg.com/[email protected]/dist/aos.js"></script>
<style>
:root {
--primary-bg: #0d0c1d;
--secondary-bg: #131224;
--accent-color: #6c63ff;
--accent-glow: rgba(108, 99, 255, 0.5);
--text-primary: #e0e0e0;
--text-secondary: #a0a0a0;
--border-color: #3c3b53;
--cyber-cyan: #00ffcc;
--cyber-pink: #ff00cc;
}
body {
font-family: 'Space Mono', monospace;
background: linear-gradient(135deg, #0d0c1d, #131224, #24243e);
color: var(--text-primary);
overflow: hidden;
}
.orbitron { font-family: 'Orbitron', sans-serif; }
.exo2 { font-family: 'Exo 2', sans-serif; }
.hidden { display: none; }
/* CRT Effect */
.crt-effect::before {
content: " ";
display: block;
position: fixed;
top: 0; left: 0; bottom: 0; right: 0;
background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
background-size: 100% 2px, 3px 100%;
z-index: 9999;
pointer-events: none;
opacity: 0.15;
}
/* Header & Navigation */
.header-btn {
background: linear-gradient(45deg, rgba(108, 99, 255, 0.2), rgba(0, 255, 204, 0.2));
border: 1px solid var(--accent-glow);
transition: all 0.3s ease;
font-family: 'Space Mono', monospace;
}
.header-btn:hover {
background: linear-gradient(45deg, rgba(108, 99, 255, 0.4), rgba(0, 255, 204, 0.4));
box-shadow: 0 0 15px var(--accent-glow);
transform: translateY(-2px);
}
/* Connection Status */
.connection-status {
position: absolute;
top: 15px;
right: 15px;
padding: 8px 16px;
border-radius: 20px;
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 1px;
border: 1px solid;
}
.status-connected {
background: linear-gradient(135deg, #00ffcc, #00cc99);
color: #000;
border-color: #00ffcc;
box-shadow: 0 0 20px rgba(0, 255, 204, 0.5);
}
.status-disconnected {
background: linear-gradient(135deg, #ff0080, #cc0066);
color: white;
border-color: #ff0080;
box-shadow: 0 0 20px rgba(255, 0, 128, 0.5);
}
.status-connecting {
background: linear-gradient(135deg, #6c63ff, #5a52d5);
color: white;
border-color: #6c63ff;
animation: pulse-connect 2s infinite;
}
@keyframes
pulse-connect {
0%, 100% { opacity: 1; box-shadow: 0 0 20px rgba(108, 99, 255, 0.5); }
50% { opacity: 0.7; box-shadow: 0 0 30px rgba(108, 99, 255, 0.8); }
}
/* Canvas Areas */
#canvas-container, #renderer-container { touch-action: none; }
.label {
background: linear-gradient(135deg, rgba(0,0,0,0.9), rgba(13,12,29,0.8));
color: var(--cyber-cyan);
padding: 8px 16px;
border-radius: 8px;
position: absolute;
top: 15px;
left: 15px;
font-size: 12px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5px;
pointer-events: none;
border: 1px solid rgba(0, 255, 204, 0.3);
box-shadow: 0 4px 20px rgba(0, 255, 204, 0.3);
}
/* Control Buttons */
.control-btn {
background: linear-gradient(45deg, rgba(108, 99, 255, 0.8), rgba(0, 255, 204, 0.8));
border: 1px solid var(--accent-color);
transition: all 0.3s ease;
font-family: 'Space Mono', monospace;
text-transform: uppercase;
font-weight: 700;
letter-spacing: 0.5px;
}
.control-btn:hover {
background: linear-gradient(45deg, var(--accent-color), var(--cyber-cyan));
transform: translateY(-3px);
box-shadow: 0 8px 25px rgba(108, 99, 255, 0.4);
}
.control-btn:disabled {
background: rgba(60, 59, 83, 0.5);
border-color: rgba(60, 59, 83, 0.8);
cursor: not-allowed;
transform: none;
box-shadow: none;
}
/* Car Drop Zone */
#car-drop-zone {
border-color: var(--accent-glow);
background: radial-gradient(circle, rgba(13, 12, 29, 0.8), rgba(19, 18, 36, 0.6));
transition: all 0.3s ease;
border: 3px dashed var(--accent-color);
}
#car-drop-zone.dragover {
border-color: var(--cyber-cyan);
background: radial-gradient(circle, rgba(0, 255, 204, 0.1), rgba(108, 99, 255, 0.1));
transform: scale(1.05);
box-shadow: 0 0 40px rgba(0, 255, 204, 0.3);
}
/* Bubble Modules */
#bubble-container {
position: absolute;
top: 0; left: 0;
width: 100%; height: 100%;
overflow: hidden;
pointer-events: none;
}
.bubble {
position: absolute;
width: 150px; height: 150px;
background: radial-gradient(circle, rgba(108, 99, 255, 0.15), rgba(0, 255, 204, 0.1));
border: 2px solid var(--accent-glow);
border-radius: 50%;
cursor: grab;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
font-size: 0.8rem;
font-weight: 700;
text-transform: uppercase;
backdrop-filter: blur(10px);
transition: all 0.3s ease;
pointer-events: all;
user-select: none;
box-shadow: 0 0 20px rgba(108, 99, 255, 0.2);
}
.bubble:hover {
transform: scale(1.1);
box-shadow: 0 0 30px rgba(0, 255, 204, 0.4);
border-color: var(--cyber-cyan);
}
.bubble:active {
cursor: grabbing;
transform: scale(1.2);
z-index: 50;
}
/* Car Stats Panel */
.car-stats {
background: linear-gradient(135deg, rgba(13, 12, 29, 0.9), rgba(19, 18, 36, 0.8));
backdrop-filter: blur(15px);
border: 1px solid var(--accent-glow);
border-radius: 12px;
padding: 20px;
margin-top: 20px;
box-shadow: 0 8px 25px rgba(108, 99, 255, 0.2);
}
.stat-bar {
background: rgba(60, 59, 83, 0.5);
height: 12px;
border-radius: 6px;
overflow: hidden;
margin-top: 8px;
border: 1px solid rgba(108, 99, 255, 0.3);
}
.stat-fill {
height: 100%;
background: linear-gradient(90deg, var(--cyber-cyan), var(--accent-color));
transition: width 0.5s ease;
box-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
}
/* Player Info */
.player-info {
background: linear-gradient(135deg, rgba(0, 255, 204, 0.1), rgba(108, 99, 255, 0.1));
border: 1px solid var(--cyber-cyan);
border-radius: 8px;
padding: 12px;
margin-bottom: 16px;
}
/* Loading Spinner */
.loading-spinner {
border: 3px solid rgba(108, 99, 255, 0.3);
border-top: 3px solid var(--cyber-cyan);
border-radius: 50%;
width: 20px; height: 20px;
animation: spin 1s linear infinite;
}
@keyframes
spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* Gallery Styles */
.gallery-item {
position: relative;
overflow: hidden;
border-radius: 8px;
transition: all 0.3s ease;
border: 2px solid var(--accent-glow);
}
.gallery-item:hover {
transform: scale(1.05);
border-color: var(--cyber-cyan);
box-shadow: 0 0 25px rgba(0, 255, 204, 0.3);
z-index: 10;
}
.gallery-item .overlay {
position: absolute;
top: 0; left: 0; width: 100%; height: 100%;
background: linear-gradient(45deg, rgba(108, 99, 255, 0.1), rgba(0, 255, 204, 0.1));
opacity: 0;
transition: opacity 0.4s ease;
pointer-events: none;
}
.gallery-item:hover .overlay { opacity: 1; }
/* Modal Styles */
.modal-overlay {
background: rgba(13, 12, 29, 0.9);
backdrop-filter: blur(15px);
}
.modal-content {
background: linear-gradient(135deg, var(--primary-bg), var(--second
- create.racer-profile.html +6 -0
- prompts.txt +1163 -0
|
@@ -669,6 +669,12 @@
|
|
| 669 |
document.getElementById('save-webp-btn').classList.remove('hidden');
|
| 670 |
document.getElementById('save-jpg-btn').classList.remove('hidden');
|
| 671 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 672 |
// Scroll to preview
|
| 673 |
document.querySelector('.sticky').scrollIntoView({ behavior: 'smooth' });
|
| 674 |
});
|
|
|
|
| 669 |
document.getElementById('save-webp-btn').classList.remove('hidden');
|
| 670 |
document.getElementById('save-jpg-btn').classList.remove('hidden');
|
| 671 |
|
| 672 |
+
// If a 3D model is loaded, ensure it's visible in the preview
|
| 673 |
+
if (previewModel) {
|
| 674 |
+
previewModelPlaceholder.classList.add('hidden');
|
| 675 |
+
previewThreedCanvas.classList.remove('hidden');
|
| 676 |
+
}
|
| 677 |
+
|
| 678 |
// Scroll to preview
|
| 679 |
document.querySelector('.sticky').scrollIntoView({ behavior: 'smooth' });
|
| 680 |
});
|
|
@@ -0,0 +1,1163 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
fx create racer card make sure it shows 3d model too
|
| 2 |
+
add <!DOCTYPE html>
|
| 3 |
+
<html lang="en">
|
| 4 |
+
<head>
|
| 5 |
+
<meta charset="UTF-8">
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
+
<title>Fantasy Rally - Cosmic Car Designer | WaveType</title>
|
| 8 |
+
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
| 9 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 10 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
|
| 11 |
+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/examples/js/controls/OrbitControls.js"></script>
|
| 12 |
+
<link href="https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Orbitron:wght@400;500;700&family=Exo+2:wght@300;400;600&display=swap" rel="stylesheet">
|
| 13 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
| 14 |
+
<link href="https://unpkg.com/[email protected]/dist/aos.css" rel="stylesheet">
|
| 15 |
+
<script src="https://unpkg.com/[email protected]/dist/aos.js"></script>
|
| 16 |
+
<style>
|
| 17 |
+
:root {
|
| 18 |
+
--primary-bg: #0d0c1d;
|
| 19 |
+
--secondary-bg: #131224;
|
| 20 |
+
--accent-color: #6c63ff;
|
| 21 |
+
--accent-glow: rgba(108, 99, 255, 0.5);
|
| 22 |
+
--text-primary: #e0e0e0;
|
| 23 |
+
--text-secondary: #a0a0a0;
|
| 24 |
+
--border-color: #3c3b53;
|
| 25 |
+
--cyber-cyan: #00ffcc;
|
| 26 |
+
--cyber-pink: #ff00cc;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
body {
|
| 30 |
+
font-family: 'Space Mono', monospace;
|
| 31 |
+
background: linear-gradient(135deg, #0d0c1d, #131224, #24243e);
|
| 32 |
+
color: var(--text-primary);
|
| 33 |
+
overflow: hidden;
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
.orbitron { font-family: 'Orbitron', sans-serif; }
|
| 37 |
+
.exo2 { font-family: 'Exo 2', sans-serif; }
|
| 38 |
+
.hidden { display: none; }
|
| 39 |
+
|
| 40 |
+
/* CRT Effect */
|
| 41 |
+
.crt-effect::before {
|
| 42 |
+
content: " ";
|
| 43 |
+
display: block;
|
| 44 |
+
position: fixed;
|
| 45 |
+
top: 0; left: 0; bottom: 0; right: 0;
|
| 46 |
+
background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
|
| 47 |
+
linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
|
| 48 |
+
background-size: 100% 2px, 3px 100%;
|
| 49 |
+
z-index: 9999;
|
| 50 |
+
pointer-events: none;
|
| 51 |
+
opacity: 0.15;
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
/* Header & Navigation */
|
| 55 |
+
.header-btn {
|
| 56 |
+
background: linear-gradient(45deg, rgba(108, 99, 255, 0.2), rgba(0, 255, 204, 0.2));
|
| 57 |
+
border: 1px solid var(--accent-glow);
|
| 58 |
+
transition: all 0.3s ease;
|
| 59 |
+
font-family: 'Space Mono', monospace;
|
| 60 |
+
}
|
| 61 |
+
.header-btn:hover {
|
| 62 |
+
background: linear-gradient(45deg, rgba(108, 99, 255, 0.4), rgba(0, 255, 204, 0.4));
|
| 63 |
+
box-shadow: 0 0 15px var(--accent-glow);
|
| 64 |
+
transform: translateY(-2px);
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
/* Connection Status */
|
| 68 |
+
.connection-status {
|
| 69 |
+
position: absolute;
|
| 70 |
+
top: 15px;
|
| 71 |
+
right: 15px;
|
| 72 |
+
padding: 8px 16px;
|
| 73 |
+
border-radius: 20px;
|
| 74 |
+
font-size: 11px;
|
| 75 |
+
font-weight: 700;
|
| 76 |
+
text-transform: uppercase;
|
| 77 |
+
letter-spacing: 1px;
|
| 78 |
+
border: 1px solid;
|
| 79 |
+
}
|
| 80 |
+
.status-connected {
|
| 81 |
+
background: linear-gradient(135deg, #00ffcc, #00cc99);
|
| 82 |
+
color: #000;
|
| 83 |
+
border-color: #00ffcc;
|
| 84 |
+
box-shadow: 0 0 20px rgba(0, 255, 204, 0.5);
|
| 85 |
+
}
|
| 86 |
+
.status-disconnected {
|
| 87 |
+
background: linear-gradient(135deg, #ff0080, #cc0066);
|
| 88 |
+
color: white;
|
| 89 |
+
border-color: #ff0080;
|
| 90 |
+
box-shadow: 0 0 20px rgba(255, 0, 128, 0.5);
|
| 91 |
+
}
|
| 92 |
+
.status-connecting {
|
| 93 |
+
background: linear-gradient(135deg, #6c63ff, #5a52d5);
|
| 94 |
+
color: white;
|
| 95 |
+
border-color: #6c63ff;
|
| 96 |
+
animation: pulse-connect 2s infinite;
|
| 97 |
+
}
|
| 98 |
+
@keyframes pulse-connect {
|
| 99 |
+
0%, 100% { opacity: 1; box-shadow: 0 0 20px rgba(108, 99, 255, 0.5); }
|
| 100 |
+
50% { opacity: 0.7; box-shadow: 0 0 30px rgba(108, 99, 255, 0.8); }
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
/* Canvas Areas */
|
| 104 |
+
#canvas-container, #renderer-container { touch-action: none; }
|
| 105 |
+
.label {
|
| 106 |
+
background: linear-gradient(135deg, rgba(0,0,0,0.9), rgba(13,12,29,0.8));
|
| 107 |
+
color: var(--cyber-cyan);
|
| 108 |
+
padding: 8px 16px;
|
| 109 |
+
border-radius: 8px;
|
| 110 |
+
position: absolute;
|
| 111 |
+
top: 15px;
|
| 112 |
+
left: 15px;
|
| 113 |
+
font-size: 12px;
|
| 114 |
+
font-weight: 700;
|
| 115 |
+
text-transform: uppercase;
|
| 116 |
+
letter-spacing: 0.5px;
|
| 117 |
+
pointer-events: none;
|
| 118 |
+
border: 1px solid rgba(0, 255, 204, 0.3);
|
| 119 |
+
box-shadow: 0 4px 20px rgba(0, 255, 204, 0.3);
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
/* Control Buttons */
|
| 123 |
+
.control-btn {
|
| 124 |
+
background: linear-gradient(45deg, rgba(108, 99, 255, 0.8), rgba(0, 255, 204, 0.8));
|
| 125 |
+
border: 1px solid var(--accent-color);
|
| 126 |
+
transition: all 0.3s ease;
|
| 127 |
+
font-family: 'Space Mono', monospace;
|
| 128 |
+
text-transform: uppercase;
|
| 129 |
+
font-weight: 700;
|
| 130 |
+
letter-spacing: 0.5px;
|
| 131 |
+
}
|
| 132 |
+
.control-btn:hover {
|
| 133 |
+
background: linear-gradient(45deg, var(--accent-color), var(--cyber-cyan));
|
| 134 |
+
transform: translateY(-3px);
|
| 135 |
+
box-shadow: 0 8px 25px rgba(108, 99, 255, 0.4);
|
| 136 |
+
}
|
| 137 |
+
.control-btn:disabled {
|
| 138 |
+
background: rgba(60, 59, 83, 0.5);
|
| 139 |
+
border-color: rgba(60, 59, 83, 0.8);
|
| 140 |
+
cursor: not-allowed;
|
| 141 |
+
transform: none;
|
| 142 |
+
box-shadow: none;
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
/* Car Drop Zone */
|
| 146 |
+
#car-drop-zone {
|
| 147 |
+
border-color: var(--accent-glow);
|
| 148 |
+
background: radial-gradient(circle, rgba(13, 12, 29, 0.8), rgba(19, 18, 36, 0.6));
|
| 149 |
+
transition: all 0.3s ease;
|
| 150 |
+
border: 3px dashed var(--accent-color);
|
| 151 |
+
}
|
| 152 |
+
#car-drop-zone.dragover {
|
| 153 |
+
border-color: var(--cyber-cyan);
|
| 154 |
+
background: radial-gradient(circle, rgba(0, 255, 204, 0.1), rgba(108, 99, 255, 0.1));
|
| 155 |
+
transform: scale(1.05);
|
| 156 |
+
box-shadow: 0 0 40px rgba(0, 255, 204, 0.3);
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
/* Bubble Modules */
|
| 160 |
+
#bubble-container {
|
| 161 |
+
position: absolute;
|
| 162 |
+
top: 0; left: 0;
|
| 163 |
+
width: 100%; height: 100%;
|
| 164 |
+
overflow: hidden;
|
| 165 |
+
pointer-events: none;
|
| 166 |
+
}
|
| 167 |
+
.bubble {
|
| 168 |
+
position: absolute;
|
| 169 |
+
width: 150px; height: 150px;
|
| 170 |
+
background: radial-gradient(circle, rgba(108, 99, 255, 0.15), rgba(0, 255, 204, 0.1));
|
| 171 |
+
border: 2px solid var(--accent-glow);
|
| 172 |
+
border-radius: 50%;
|
| 173 |
+
cursor: grab;
|
| 174 |
+
display: flex;
|
| 175 |
+
align-items: center;
|
| 176 |
+
justify-content: center;
|
| 177 |
+
text-align: center;
|
| 178 |
+
font-size: 0.8rem;
|
| 179 |
+
font-weight: 700;
|
| 180 |
+
text-transform: uppercase;
|
| 181 |
+
backdrop-filter: blur(10px);
|
| 182 |
+
transition: all 0.3s ease;
|
| 183 |
+
pointer-events: all;
|
| 184 |
+
user-select: none;
|
| 185 |
+
box-shadow: 0 0 20px rgba(108, 99, 255, 0.2);
|
| 186 |
+
}
|
| 187 |
+
.bubble:hover {
|
| 188 |
+
transform: scale(1.1);
|
| 189 |
+
box-shadow: 0 0 30px rgba(0, 255, 204, 0.4);
|
| 190 |
+
border-color: var(--cyber-cyan);
|
| 191 |
+
}
|
| 192 |
+
.bubble:active {
|
| 193 |
+
cursor: grabbing;
|
| 194 |
+
transform: scale(1.2);
|
| 195 |
+
z-index: 50;
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
+
/* Car Stats Panel */
|
| 199 |
+
.car-stats {
|
| 200 |
+
background: linear-gradient(135deg, rgba(13, 12, 29, 0.9), rgba(19, 18, 36, 0.8));
|
| 201 |
+
backdrop-filter: blur(15px);
|
| 202 |
+
border: 1px solid var(--accent-glow);
|
| 203 |
+
border-radius: 12px;
|
| 204 |
+
padding: 20px;
|
| 205 |
+
margin-top: 20px;
|
| 206 |
+
box-shadow: 0 8px 25px rgba(108, 99, 255, 0.2);
|
| 207 |
+
}
|
| 208 |
+
.stat-bar {
|
| 209 |
+
background: rgba(60, 59, 83, 0.5);
|
| 210 |
+
height: 12px;
|
| 211 |
+
border-radius: 6px;
|
| 212 |
+
overflow: hidden;
|
| 213 |
+
margin-top: 8px;
|
| 214 |
+
border: 1px solid rgba(108, 99, 255, 0.3);
|
| 215 |
+
}
|
| 216 |
+
.stat-fill {
|
| 217 |
+
height: 100%;
|
| 218 |
+
background: linear-gradient(90deg, var(--cyber-cyan), var(--accent-color));
|
| 219 |
+
transition: width 0.5s ease;
|
| 220 |
+
box-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
|
| 221 |
+
}
|
| 222 |
+
|
| 223 |
+
/* Player Info */
|
| 224 |
+
.player-info {
|
| 225 |
+
background: linear-gradient(135deg, rgba(0, 255, 204, 0.1), rgba(108, 99, 255, 0.1));
|
| 226 |
+
border: 1px solid var(--cyber-cyan);
|
| 227 |
+
border-radius: 8px;
|
| 228 |
+
padding: 12px;
|
| 229 |
+
margin-bottom: 16px;
|
| 230 |
+
}
|
| 231 |
+
|
| 232 |
+
/* Loading Spinner */
|
| 233 |
+
.loading-spinner {
|
| 234 |
+
border: 3px solid rgba(108, 99, 255, 0.3);
|
| 235 |
+
border-top: 3px solid var(--cyber-cyan);
|
| 236 |
+
border-radius: 50%;
|
| 237 |
+
width: 20px; height: 20px;
|
| 238 |
+
animation: spin 1s linear infinite;
|
| 239 |
+
}
|
| 240 |
+
@keyframes spin {
|
| 241 |
+
0% { transform: rotate(0deg); }
|
| 242 |
+
100% { transform: rotate(360deg); }
|
| 243 |
+
}
|
| 244 |
+
|
| 245 |
+
/* Gallery Styles */
|
| 246 |
+
.gallery-item {
|
| 247 |
+
position: relative;
|
| 248 |
+
overflow: hidden;
|
| 249 |
+
border-radius: 8px;
|
| 250 |
+
transition: all 0.3s ease;
|
| 251 |
+
border: 2px solid var(--accent-glow);
|
| 252 |
+
}
|
| 253 |
+
.gallery-item:hover {
|
| 254 |
+
transform: scale(1.05);
|
| 255 |
+
border-color: var(--cyber-cyan);
|
| 256 |
+
box-shadow: 0 0 25px rgba(0, 255, 204, 0.3);
|
| 257 |
+
z-index: 10;
|
| 258 |
+
}
|
| 259 |
+
.gallery-item .overlay {
|
| 260 |
+
position: absolute;
|
| 261 |
+
top: 0; left: 0; width: 100%; height: 100%;
|
| 262 |
+
background: linear-gradient(45deg, rgba(108, 99, 255, 0.1), rgba(0, 255, 204, 0.1));
|
| 263 |
+
opacity: 0;
|
| 264 |
+
transition: opacity 0.4s ease;
|
| 265 |
+
pointer-events: none;
|
| 266 |
+
}
|
| 267 |
+
.gallery-item:hover .overlay { opacity: 1; }
|
| 268 |
+
|
| 269 |
+
/* Modal Styles */
|
| 270 |
+
.modal-overlay {
|
| 271 |
+
background: rgba(13, 12, 29, 0.9);
|
| 272 |
+
backdrop-filter: blur(15px);
|
| 273 |
+
}
|
| 274 |
+
.modal-content {
|
| 275 |
+
background: linear-gradient(135deg, var(--primary-bg), var(--secondary-bg));
|
| 276 |
+
border: 2px solid var(--accent-color);
|
| 277 |
+
box-shadow: 0 0 40px rgba(108, 99, 255, 0.3);
|
| 278 |
+
}
|
| 279 |
+
|
| 280 |
+
/* Responsive Design */
|
| 281 |
+
@media (max-width: 768px) {
|
| 282 |
+
.bubble { width: 120px; height: 120px; font-size: 0.7rem; }
|
| 283 |
+
#car-drop-zone { width: 250px; height: 250px; }
|
| 284 |
+
.control-btn { padding: 8px 16px; font-size: 0.8rem; }
|
| 285 |
+
}
|
| 286 |
+
</style>
|
| 287 |
+
</head>
|
| 288 |
+
<body class="crt-effect">
|
| 289 |
+
<!-- Header -->
|
| 290 |
+
<header class="p-4 flex flex-wrap justify-between items-center gap-4 bg-gradient-to-r from-primary-bg via-secondary-bg to-primary-bg border-b-2 border-accent-color sticky top-0 z-30">
|
| 291 |
+
<div class="flex items-center space-x-3">
|
| 292 |
+
<div class="w-10 h-10 bg-gradient-to-r from-cyan-400 to-purple-500 rounded-full animate-pulse"></div>
|
| 293 |
+
<h1 id="header-title" class="orbitron text-2xl font-bold tracking-wider text-transparent bg-clip-text bg-gradient-to-r from-cyan-400 to-purple-400">
|
| 294 |
+
CAR DESIGNER HUB
|
| 295 |
+
</h1>
|
| 296 |
+
</div>
|
| 297 |
+
<div class="flex items-center gap-2">
|
| 298 |
+
<button id="show-designer-btn" class="header-btn text-white font-bold py-2 px-4 rounded-lg">
|
| 299 |
+
<i class="fas fa-wrench mr-2"></i>Designer
|
| 300 |
+
</button>
|
| 301 |
+
<button id="show-gallery-btn" class="header-btn text-white font-bold py-2 px-4 rounded-lg">
|
| 302 |
+
<i class="fas fa-images mr-2"></i>Gallery
|
| 303 |
+
</button>
|
| 304 |
+
<button id="show-links-btn" class="header-btn text-white font-bold py-2 px-4 rounded-lg">
|
| 305 |
+
<i class="fas fa-link mr-2"></i>Links
|
| 306 |
+
</button>
|
| 307 |
+
</div>
|
| 308 |
+
</header>
|
| 309 |
+
|
| 310 |
+
<!-- Connection Status -->
|
| 311 |
+
<div id="connection-status" class="status-disconnected connection-status">
|
| 312 |
+
Offline Mode
|
| 313 |
+
</div>
|
| 314 |
+
|
| 315 |
+
<!-- Main Content -->
|
| 316 |
+
<main>
|
| 317 |
+
<!-- Car Designer View -->
|
| 318 |
+
<div id="designer-view" class="">
|
| 319 |
+
<div class="w-full h-[calc(100vh-80px)] flex flex-col md:flex-row overflow-hidden">
|
| 320 |
+
|
| 321 |
+
<!-- Controls Panel -->
|
| 322 |
+
<div class="w-full md:w-80 bg-gradient-to-b from-primary-bg to-secondary-bg p-4 flex flex-col space-y-4 order-1 md:order-2 border-l-2 border-accent-color">
|
| 323 |
+
|
| 324 |
+
<!-- Player Info -->
|
| 325 |
+
<div id="player-info" class="player-info hidden">
|
| 326 |
+
<div class="text-sm font-bold text-cyber-cyan" id="player-name">Player: Loading...</div>
|
| 327 |
+
<div class="text-xs text-text-secondary" id="player-level">Level: --</div>
|
| 328 |
+
<div class="text-xs text-text-secondary" id="player-credits">Credits: --</div>
|
| 329 |
+
</div>
|
| 330 |
+
|
| 331 |
+
<h2 class="text-lg font-bold border-b-2 border-accent-color pb-2 text-cyber-cyan orbitron">CAR DESIGNER</h2>
|
| 332 |
+
|
| 333 |
+
<!-- View Controls -->
|
| 334 |
+
<div class="flex flex-wrap gap-2">
|
| 335 |
+
<button id="view-2d-btn" class="flex-1 control-btn py-2 px-4 rounded-lg text-white disabled:opacity-50">
|
| 336 |
+
2D Draw
|
| 337 |
+
</button>
|
| 338 |
+
<button id="view-3d-btn" class="flex-1 control-btn py-2 px-4 rounded-lg text-white">
|
| 339 |
+
3D View
|
| 340 |
+
</button>
|
| 341 |
+
</div>
|
| 342 |
+
|
| 343 |
+
<!-- Action Buttons -->
|
| 344 |
+
<div class="space-y-2">
|
| 345 |
+
<button id="add-module-btn" class="w-full control-btn py-2 px-4 rounded-lg text-white">
|
| 346 |
+
<i class="fas fa-plus mr-2"></i>Add Module
|
| 347 |
+
</button>
|
| 348 |
+
<button id="clear-btn" class="w-full control-btn py-2 px-4 rounded-lg text-white">
|
| 349 |
+
<i class="fas fa-trash mr-2"></i>Clear Design
|
| 350 |
+
</button>
|
| 351 |
+
<button id="save-car-btn" class="w-full control-btn py-2 px-4 rounded-lg text-white">
|
| 352 |
+
<span id="save-btn-text"><i class="fas fa-save mr-2"></i>Save to Garage</span>
|
| 353 |
+
<div id="save-spinner" class="loading-spinner inline-block ml-2 hidden"></div>
|
| 354 |
+
</button>
|
| 355 |
+
<button id="connect-btn" class="w-full control-btn py-2 px-4 rounded-lg text-white">
|
| 356 |
+
<i class="fas fa-wifi mr-2"></i>Connect to Game
|
| 357 |
+
</button>
|
| 358 |
+
</div>
|
| 359 |
+
|
| 360 |
+
<!-- Car Statistics -->
|
| 361 |
+
<div class="car-stats">
|
| 362 |
+
<h3 class="font-bold mb-3 text-cyber-cyan orbitron">Performance Stats</h3>
|
| 363 |
+
<div class="space-y-3">
|
| 364 |
+
<div>
|
| 365 |
+
<div class="flex justify-between text-sm font-bold">
|
| 366 |
+
<span>Speed</span>
|
| 367 |
+
<span id="speed-value" class="text-cyber-cyan">0</span>
|
| 368 |
+
</div>
|
| 369 |
+
<div class="stat-bar">
|
| 370 |
+
<div id="speed-fill" class="stat-fill" style="width: 0%"></div>
|
| 371 |
+
</div>
|
| 372 |
+
</div>
|
| 373 |
+
<div>
|
| 374 |
+
<div class="flex justify-between text-sm font-bold">
|
| 375 |
+
<span>Handling</span>
|
| 376 |
+
<span id="handling-value" class="text-cyber-cyan">0</span>
|
| 377 |
+
</div>
|
| 378 |
+
<div class="stat-bar">
|
| 379 |
+
<div id="handling-fill" class="stat-fill" style="width: 0%"></div>
|
| 380 |
+
</div>
|
| 381 |
+
</div>
|
| 382 |
+
<div>
|
| 383 |
+
<div class="flex justify-between text-sm font-bold">
|
| 384 |
+
<span>Acceleration</span>
|
| 385 |
+
<span id="acceleration-value" class="text-cyber-cyan">0</span>
|
| 386 |
+
</div>
|
| 387 |
+
<div class="stat-bar">
|
| 388 |
+
<div id="acceleration-fill" class="stat-fill" style="width: 0%"></div>
|
| 389 |
+
</div>
|
| 390 |
+
</div>
|
| 391 |
+
<div>
|
| 392 |
+
<div class="flex justify-between text-sm font-bold">
|
| 393 |
+
<span>Durability</span>
|
| 394 |
+
<span id="durability-value" class="text-cyber-cyan">0</span>
|
| 395 |
+
</div>
|
| 396 |
+
<div class="stat-bar">
|
| 397 |
+
<div id="durability-fill" class="stat-fill" style="width: 0%"></div>
|
| 398 |
+
</div>
|
| 399 |
+
</div>
|
| 400 |
+
</div>
|
| 401 |
+
</div>
|
| 402 |
+
|
| 403 |
+
<!-- Instructions -->
|
| 404 |
+
<div class="pt-4 text-sm exo2">
|
| 405 |
+
<h3 class="font-bold mb-2 text-cyber-cyan">Instructions:</h3>
|
| 406 |
+
<ol class="list-decimal list-inside text-text-secondary space-y-1">
|
| 407 |
+
<li>Connect to Fantasy Rally servers</li>
|
| 408 |
+
<li>Draw your car's profile in 2D mode</li>
|
| 409 |
+
<li>Add modular components</li>
|
| 410 |
+
<li>View the 3D model and stats</li>
|
| 411 |
+
<li>Save to your cosmic garage!</li>
|
| 412 |
+
</ol>
|
| 413 |
+
</div>
|
| 414 |
+
</div>
|
| 415 |
+
|
| 416 |
+
<!-- Canvas / Renderer Area -->
|
| 417 |
+
<div class="flex-grow relative order-2 md:order-1">
|
| 418 |
+
<div id="bubble-container"></div>
|
| 419 |
+
|
| 420 |
+
<!-- 2D Canvas -->
|
| 421 |
+
<div id="canvas-container" class="w-full h-full">
|
| 422 |
+
<canvas id="drawing-canvas"></canvas>
|
| 423 |
+
<div class="label">Design Canvas - Draw Your Machine</div>
|
| 424 |
+
|
| 425 |
+
<!-- Central Drop Zone -->
|
| 426 |
+
<div class="absolute inset-0 flex items-center justify-center">
|
| 427 |
+
<div id="car-drop-zone" class="w-80 h-80 rounded-full flex items-center justify-center text-center cursor-pointer">
|
| 428 |
+
<div id="prompt-text" class="text-text-secondary">
|
| 429 |
+
<i class="fas fa-car text-5xl mb-4"></i>
|
| 430 |
+
<p class="font-bold">Drop Car Image Here</p>
|
| 431 |
+
<p class="text-sm">or click to select</p>
|
| 432 |
+
</div>
|
| 433 |
+
<img id="car-image" class="hidden w-full h-full object-cover rounded-full">
|
| 434 |
+
<input type="file" id="file-upload" class="hidden" accept="image/*">
|
| 435 |
+
</div>
|
| 436 |
+
</div>
|
| 437 |
+
</div>
|
| 438 |
+
|
| 439 |
+
<!-- 3D Renderer -->
|
| 440 |
+
<div id="renderer-container" class="w-full h-full hidden">
|
| 441 |
+
<div class="label">3D Preview - Your Cosmic Machine</div>
|
| 442 |
+
</div>
|
| 443 |
+
</div>
|
| 444 |
+
</div>
|
| 445 |
+
</div>
|
| 446 |
+
|
| 447 |
+
<!-- Gallery View -->
|
| 448 |
+
<div id="gallery-view" class="hidden">
|
| 449 |
+
<div class="p-4 sm:p-6">
|
| 450 |
+
<div id="gallery-grid" class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4 sm:gap-6">
|
| 451 |
+
</div>
|
| 452 |
+
</div>
|
| 453 |
+
</div>
|
| 454 |
+
</main>
|
| 455 |
+
|
| 456 |
+
<!-- Modals -->
|
| 457 |
+
<div id="prompt-modal" class="fixed inset-0 z-50 flex items-center justify-center p-4 modal-overlay hidden">
|
| 458 |
+
<div class="modal-content rounded-lg shadow-2xl max-w-4xl w-full max-h-[90vh] flex flex-col sm:flex-row overflow-hidden">
|
| 459 |
+
<img id="modal-img" src="" alt="Enlarged view" class="w-full sm:w-1/2 h-64 sm:h-auto object-cover">
|
| 460 |
+
<div class="p-6 flex flex-col gap-4 overflow-y-auto">
|
| 461 |
+
<div class="flex justify-between items-start">
|
| 462 |
+
<h3 class="text-xl font-bold text-cyber-cyan orbitron">Image Prompt</h3>
|
| 463 |
+
<button id="close-prompt-modal-btn" class="text-2xl text-gray-400 hover:text-white transition-colors">×</button>
|
| 464 |
+
</div>
|
| 465 |
+
<p id="modal-prompt" class="text-gray-300 bg-black/30 p-4 rounded-md border border-accent-color flex-grow exo2"></p>
|
| 466 |
+
<button id="copy-prompt-btn" class="mt-auto w-full control-btn py-2 px-4 rounded-lg text-white">
|
| 467 |
+
<i class="fas fa-copy mr-2"></i>Copy Prompt
|
| 468 |
+
</button>
|
| 469 |
+
</div>
|
| 470 |
+
</div>
|
| 471 |
+
</div>
|
| 472 |
+
|
| 473 |
+
<div id="links-modal" class="fixed inset-0 z-50 flex items-center justify-center p-4 modal-overlay hidden">
|
| 474 |
+
<div class="modal-content rounded-lg shadow-2xl max-w-6xl w-full max-h-[90vh] flex flex-col overflow-hidden">
|
| 475 |
+
<div class="p-4 flex justify-between items-center border-b-2 border-accent-color flex-shrink-0">
|
| 476 |
+
<h3 class="text-xl font-bold text-cyber-cyan orbitron">Project Links & Resources</h3>
|
| 477 |
+
<button id="close-links-modal-btn" class="text-2xl text-gray-400 hover:text-white transition-colors">×</button>
|
| 478 |
+
</div>
|
| 479 |
+
<div id="links-modal-body" class="p-6 overflow-y-auto exo2">
|
| 480 |
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
| 481 |
+
<div>
|
| 482 |
+
<h4 class="font-bold text-lg mb-2 text-cyber-cyan">Project Management</h4>
|
| 483 |
+
<ul class="list-disc list-inside space-y-2 text-sm">
|
| 484 |
+
<li><a href="https://wavetype.xyz/" target="_blank" class="text-accent-color hover:text-cyber-cyan transition-colors">WaveType.xyz</a></li>
|
| 485 |
+
<li><a href="https://dash.infinityfree.com/accounts/if0_38768571" target="_blank" class="text-accent-color hover:text-cyber-cyan transition-colors">InfinityFree Account</a></li>
|
| 486 |
+
<li><a href="https://vercel.com/" target="_blank" class="text-accent-color hover:text-cyber-cyan transition-colors">Vercel Deployments</a></li>
|
| 487 |
+
<li><a href="https://github.com/" target="_blank" class="text-accent-color hover:text-cyber-cyan transition-colors">GitHub Repository</a></li>
|
| 488 |
+
</ul>
|
| 489 |
+
</div>
|
| 490 |
+
<div>
|
| 491 |
+
<h4 class="font-bold text-lg mb-2 text-cyber-cyan">AI & Development</h4>
|
| 492 |
+
<ul class="list-disc list-inside space-y-2 text-sm">
|
| 493 |
+
<li><a href="https://claude.ai" target="_blank" class="text-accent-color hover:text-cyber-cyan transition-colors">Claude AI</a></li>
|
| 494 |
+
<li><a href="https://gemini.google.com" target="_blank" class="text-accent-color hover:text-cyber-cyan transition-colors">Google Gemini</a></li>
|
| 495 |
+
<li><a href="https://chatgpt.com/" target="_blank" class="text-accent-color hover:text-cyber-cyan transition-colors">ChatGPT</a></li>
|
| 496 |
+
<li><a href="https://threejs.org/" target="_blank" class="text-accent-color hover:text-cyber-cyan transition-colors">Three.js Library</a></li>
|
| 497 |
+
</ul>
|
| 498 |
+
</div>
|
| 499 |
+
<div>
|
| 500 |
+
<h4 class="font-bold text-lg mb-2 text-cyber-cyan">Fantasy Rally</h4>
|
| 501 |
+
<ul class="list-disc list-inside space-y-2 text-sm">
|
| 502 |
+
<li><a href="https://discord.com/" target="_blank" class="text-accent-color hover:text-cyber-cyan transition-colors">Discord Server</a></li>
|
| 503 |
+
<li><a href="https://www.facebook.com/" target="_blank" class="text-accent-color hover:text-cyber-cyan transition-colors">Facebook Page</a></li>
|
| 504 |
+
<li><a href="mailto:[email protected]" class="text-accent-color hover:text-cyber-cyan transition-colors">Contact Email</a></li>
|
| 505 |
+
</ul>
|
| 506 |
+
</div>
|
| 507 |
+
</div>
|
| 508 |
+
</div>
|
| 509 |
+
</div>
|
| 510 |
+
</div>
|
| 511 |
+
|
| 512 |
+
<script>
|
| 513 |
+
// Initialize AOS
|
| 514 |
+
AOS.init({ once: true });
|
| 515 |
+
|
| 516 |
+
// MMORPG Integration System
|
| 517 |
+
class FantasyRallyConnector {
|
| 518 |
+
constructor() {
|
| 519 |
+
this.connected = false;
|
| 520 |
+
this.playerData = null;
|
| 521 |
+
this.gameSession = null;
|
| 522 |
+
this.serverUrl = 'wss://api.fantasyrally.game';
|
| 523 |
+
this.apiUrl = 'https://api.fantasyrally.game';
|
| 524 |
+
}
|
| 525 |
+
|
| 526 |
+
async connect() {
|
| 527 |
+
this.updateConnectionStatus('connecting');
|
| 528 |
+
|
| 529 |
+
try {
|
| 530 |
+
await this.simulateConnection();
|
| 531 |
+
this.connected = true;
|
| 532 |
+
this.updateConnectionStatus('connected');
|
| 533 |
+
await this.loadPlayerData();
|
| 534 |
+
this.showPlayerInfo();
|
| 535 |
+
console.log('Connected to Fantasy Rally Cosmic Hub');
|
| 536 |
+
return true;
|
| 537 |
+
} catch (error) {
|
| 538 |
+
console.error('Connection failed:', error);
|
| 539 |
+
this.updateConnectionStatus('disconnected');
|
| 540 |
+
return false;
|
| 541 |
+
}
|
| 542 |
+
}
|
| 543 |
+
|
| 544 |
+
async simulateConnection() {
|
| 545 |
+
return new Promise((resolve) => {
|
| 546 |
+
setTimeout(() => {
|
| 547 |
+
this.gameSession = 'cosmic_' + Math.random().toString(36).substr(2, 9);
|
| 548 |
+
resolve();
|
| 549 |
+
}, 2000);
|
| 550 |
+
});
|
| 551 |
+
}
|
| 552 |
+
|
| 553 |
+
async loadPlayerData() {
|
| 554 |
+
this.playerData = {
|
| 555 |
+
username: 'CosmicRacer_' + Math.floor(Math.random() * 1000),
|
| 556 |
+
level: Math.floor(Math.random() * 50) + 1,
|
| 557 |
+
credits: Math.floor(Math.random() * 50000) + 5000,
|
| 558 |
+
garage: [],
|
| 559 |
+
reputation: Math.floor(Math.random() * 100)
|
| 560 |
+
};
|
| 561 |
+
}
|
| 562 |
+
|
| 563 |
+
updateConnectionStatus(status) {
|
| 564 |
+
const statusElement = document.getElementById('connection-status');
|
| 565 |
+
statusElement.className = `connection-status status-${status}`;
|
| 566 |
+
|
| 567 |
+
switch(status) {
|
| 568 |
+
case 'connected':
|
| 569 |
+
statusElement.innerHTML = '<i class="fas fa-wifi mr-1"></i>ONLINE';
|
| 570 |
+
break;
|
| 571 |
+
case 'connecting':
|
| 572 |
+
statusElement.innerHTML = '<i class="fas fa-spinner fa-spin mr-1"></i>CONNECTING';
|
| 573 |
+
break;
|
| 574 |
+
case 'disconnected':
|
| 575 |
+
statusElement.innerHTML = '<i class="fas fa-wifi-slash mr-1"></i>OFFLINE';
|
| 576 |
+
break;
|
| 577 |
+
}
|
| 578 |
+
}
|
| 579 |
+
|
| 580 |
+
showPlayerInfo() {
|
| 581 |
+
if (this.playerData) {
|
| 582 |
+
document.getElementById('player-name').textContent = `Player: ${this.playerData.username}`;
|
| 583 |
+
add <!DOCTYPE html>
|
| 584 |
+
<html lang="en">
|
| 585 |
+
<head>
|
| 586 |
+
<meta charset="UTF-8">
|
| 587 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 588 |
+
<title>Fantasy Rally - Cosmic Car Designer | WaveType</title>
|
| 589 |
+
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
| 590 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 591 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
|
| 592 |
+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/examples/js/controls/OrbitControls.js"></script>
|
| 593 |
+
<link href="https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Orbitron:wght@400;500;700&family=Exo+2:wght@300;400;600&display=swap" rel="stylesheet">
|
| 594 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
| 595 |
+
<link href="https://unpkg.com/[email protected]/dist/aos.css" rel="stylesheet">
|
| 596 |
+
<script src="https://unpkg.com/[email protected]/dist/aos.js"></script>
|
| 597 |
+
<style>
|
| 598 |
+
:root {
|
| 599 |
+
--primary-bg: #0d0c1d;
|
| 600 |
+
--secondary-bg: #131224;
|
| 601 |
+
--accent-color: #6c63ff;
|
| 602 |
+
--accent-glow: rgba(108, 99, 255, 0.5);
|
| 603 |
+
--text-primary: #e0e0e0;
|
| 604 |
+
--text-secondary: #a0a0a0;
|
| 605 |
+
--border-color: #3c3b53;
|
| 606 |
+
--cyber-cyan: #00ffcc;
|
| 607 |
+
--cyber-pink: #ff00cc;
|
| 608 |
+
}
|
| 609 |
+
|
| 610 |
+
body {
|
| 611 |
+
font-family: 'Space Mono', monospace;
|
| 612 |
+
background: linear-gradient(135deg, #0d0c1d, #131224, #24243e);
|
| 613 |
+
color: var(--text-primary);
|
| 614 |
+
overflow: hidden;
|
| 615 |
+
}
|
| 616 |
+
|
| 617 |
+
.orbitron { font-family: 'Orbitron', sans-serif; }
|
| 618 |
+
.exo2 { font-family: 'Exo 2', sans-serif; }
|
| 619 |
+
.hidden { display: none; }
|
| 620 |
+
|
| 621 |
+
/* CRT Effect */
|
| 622 |
+
.crt-effect::before {
|
| 623 |
+
content: " ";
|
| 624 |
+
display: block;
|
| 625 |
+
position: fixed;
|
| 626 |
+
top: 0; left: 0; bottom: 0; right: 0;
|
| 627 |
+
background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
|
| 628 |
+
linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
|
| 629 |
+
background-size: 100% 2px, 3px 100%;
|
| 630 |
+
z-index: 9999;
|
| 631 |
+
pointer-events: none;
|
| 632 |
+
opacity: 0.15;
|
| 633 |
+
}
|
| 634 |
+
|
| 635 |
+
/* Header & Navigation */
|
| 636 |
+
.header-btn {
|
| 637 |
+
background: linear-gradient(45deg, rgba(108, 99, 255, 0.2), rgba(0, 255, 204, 0.2));
|
| 638 |
+
border: 1px solid var(--accent-glow);
|
| 639 |
+
transition: all 0.3s ease;
|
| 640 |
+
font-family: 'Space Mono', monospace;
|
| 641 |
+
}
|
| 642 |
+
.header-btn:hover {
|
| 643 |
+
background: linear-gradient(45deg, rgba(108, 99, 255, 0.4), rgba(0, 255, 204, 0.4));
|
| 644 |
+
box-shadow: 0 0 15px var(--accent-glow);
|
| 645 |
+
transform: translateY(-2px);
|
| 646 |
+
}
|
| 647 |
+
|
| 648 |
+
/* Connection Status */
|
| 649 |
+
.connection-status {
|
| 650 |
+
position: absolute;
|
| 651 |
+
top: 15px;
|
| 652 |
+
right: 15px;
|
| 653 |
+
padding: 8px 16px;
|
| 654 |
+
border-radius: 20px;
|
| 655 |
+
font-size: 11px;
|
| 656 |
+
font-weight: 700;
|
| 657 |
+
text-transform: uppercase;
|
| 658 |
+
letter-spacing: 1px;
|
| 659 |
+
border: 1px solid;
|
| 660 |
+
}
|
| 661 |
+
.status-connected {
|
| 662 |
+
background: linear-gradient(135deg, #00ffcc, #00cc99);
|
| 663 |
+
color: #000;
|
| 664 |
+
border-color: #00ffcc;
|
| 665 |
+
box-shadow: 0 0 20px rgba(0, 255, 204, 0.5);
|
| 666 |
+
}
|
| 667 |
+
.status-disconnected {
|
| 668 |
+
background: linear-gradient(135deg, #ff0080, #cc0066);
|
| 669 |
+
color: white;
|
| 670 |
+
border-color: #ff0080;
|
| 671 |
+
box-shadow: 0 0 20px rgba(255, 0, 128, 0.5);
|
| 672 |
+
}
|
| 673 |
+
.status-connecting {
|
| 674 |
+
background: linear-gradient(135deg, #6c63ff, #5a52d5);
|
| 675 |
+
color: white;
|
| 676 |
+
border-color: #6c63ff;
|
| 677 |
+
animation: pulse-connect 2s infinite;
|
| 678 |
+
}
|
| 679 |
+
@keyframes pulse-connect {
|
| 680 |
+
0%, 100% { opacity: 1; box-shadow: 0 0 20px rgba(108, 99, 255, 0.5); }
|
| 681 |
+
50% { opacity: 0.7; box-shadow: 0 0 30px rgba(108, 99, 255, 0.8); }
|
| 682 |
+
}
|
| 683 |
+
|
| 684 |
+
/* Canvas Areas */
|
| 685 |
+
#canvas-container, #renderer-container { touch-action: none; }
|
| 686 |
+
.label {
|
| 687 |
+
background: linear-gradient(135deg, rgba(0,0,0,0.9), rgba(13,12,29,0.8));
|
| 688 |
+
color: var(--cyber-cyan);
|
| 689 |
+
padding: 8px 16px;
|
| 690 |
+
border-radius: 8px;
|
| 691 |
+
position: absolute;
|
| 692 |
+
top: 15px;
|
| 693 |
+
left: 15px;
|
| 694 |
+
font-size: 12px;
|
| 695 |
+
font-weight: 700;
|
| 696 |
+
text-transform: uppercase;
|
| 697 |
+
letter-spacing: 0.5px;
|
| 698 |
+
pointer-events: none;
|
| 699 |
+
border: 1px solid rgba(0, 255, 204, 0.3);
|
| 700 |
+
box-shadow: 0 4px 20px rgba(0, 255, 204, 0.3);
|
| 701 |
+
}
|
| 702 |
+
|
| 703 |
+
/* Control Buttons */
|
| 704 |
+
.control-btn {
|
| 705 |
+
background: linear-gradient(45deg, rgba(108, 99, 255, 0.8), rgba(0, 255, 204, 0.8));
|
| 706 |
+
border: 1px solid var(--accent-color);
|
| 707 |
+
transition: all 0.3s ease;
|
| 708 |
+
font-family: 'Space Mono', monospace;
|
| 709 |
+
text-transform: uppercase;
|
| 710 |
+
font-weight: 700;
|
| 711 |
+
letter-spacing: 0.5px;
|
| 712 |
+
}
|
| 713 |
+
.control-btn:hover {
|
| 714 |
+
background: linear-gradient(45deg, var(--accent-color), var(--cyber-cyan));
|
| 715 |
+
transform: translateY(-3px);
|
| 716 |
+
box-shadow: 0 8px 25px rgba(108, 99, 255, 0.4);
|
| 717 |
+
}
|
| 718 |
+
.control-btn:disabled {
|
| 719 |
+
background: rgba(60, 59, 83, 0.5);
|
| 720 |
+
border-color: rgba(60, 59, 83, 0.8);
|
| 721 |
+
cursor: not-allowed;
|
| 722 |
+
transform: none;
|
| 723 |
+
box-shadow: none;
|
| 724 |
+
}
|
| 725 |
+
|
| 726 |
+
/* Car Drop Zone */
|
| 727 |
+
#car-drop-zone {
|
| 728 |
+
border-color: var(--accent-glow);
|
| 729 |
+
background: radial-gradient(circle, rgba(13, 12, 29, 0.8), rgba(19, 18, 36, 0.6));
|
| 730 |
+
transition: all 0.3s ease;
|
| 731 |
+
border: 3px dashed var(--accent-color);
|
| 732 |
+
}
|
| 733 |
+
#car-drop-zone.dragover {
|
| 734 |
+
border-color: var(--cyber-cyan);
|
| 735 |
+
background: radial-gradient(circle, rgba(0, 255, 204, 0.1), rgba(108, 99, 255, 0.1));
|
| 736 |
+
transform: scale(1.05);
|
| 737 |
+
box-shadow: 0 0 40px rgba(0, 255, 204, 0.3);
|
| 738 |
+
}
|
| 739 |
+
|
| 740 |
+
/* Bubble Modules */
|
| 741 |
+
#bubble-container {
|
| 742 |
+
position: absolute;
|
| 743 |
+
top: 0; left: 0;
|
| 744 |
+
width: 100%; height: 100%;
|
| 745 |
+
overflow: hidden;
|
| 746 |
+
pointer-events: none;
|
| 747 |
+
}
|
| 748 |
+
.bubble {
|
| 749 |
+
position: absolute;
|
| 750 |
+
width: 150px; height: 150px;
|
| 751 |
+
background: radial-gradient(circle, rgba(108, 99, 255, 0.15), rgba(0, 255, 204, 0.1));
|
| 752 |
+
border: 2px solid var(--accent-glow);
|
| 753 |
+
border-radius: 50%;
|
| 754 |
+
cursor: grab;
|
| 755 |
+
display: flex;
|
| 756 |
+
align-items: center;
|
| 757 |
+
justify-content: center;
|
| 758 |
+
text-align: center;
|
| 759 |
+
font-size: 0.8rem;
|
| 760 |
+
font-weight: 700;
|
| 761 |
+
text-transform: uppercase;
|
| 762 |
+
backdrop-filter: blur(10px);
|
| 763 |
+
transition: all 0.3s ease;
|
| 764 |
+
pointer-events: all;
|
| 765 |
+
user-select: none;
|
| 766 |
+
box-shadow: 0 0 20px rgba(108, 99, 255, 0.2);
|
| 767 |
+
}
|
| 768 |
+
.bubble:hover {
|
| 769 |
+
transform: scale(1.1);
|
| 770 |
+
box-shadow: 0 0 30px rgba(0, 255, 204, 0.4);
|
| 771 |
+
border-color: var(--cyber-cyan);
|
| 772 |
+
}
|
| 773 |
+
.bubble:active {
|
| 774 |
+
cursor: grabbing;
|
| 775 |
+
transform: scale(1.2);
|
| 776 |
+
z-index: 50;
|
| 777 |
+
}
|
| 778 |
+
|
| 779 |
+
/* Car Stats Panel */
|
| 780 |
+
.car-stats {
|
| 781 |
+
background: linear-gradient(135deg, rgba(13, 12, 29, 0.9), rgba(19, 18, 36, 0.8));
|
| 782 |
+
backdrop-filter: blur(15px);
|
| 783 |
+
border: 1px solid var(--accent-glow);
|
| 784 |
+
border-radius: 12px;
|
| 785 |
+
padding: 20px;
|
| 786 |
+
margin-top: 20px;
|
| 787 |
+
box-shadow: 0 8px 25px rgba(108, 99, 255, 0.2);
|
| 788 |
+
}
|
| 789 |
+
.stat-bar {
|
| 790 |
+
background: rgba(60, 59, 83, 0.5);
|
| 791 |
+
height: 12px;
|
| 792 |
+
border-radius: 6px;
|
| 793 |
+
overflow: hidden;
|
| 794 |
+
margin-top: 8px;
|
| 795 |
+
border: 1px solid rgba(108, 99, 255, 0.3);
|
| 796 |
+
}
|
| 797 |
+
.stat-fill {
|
| 798 |
+
height: 100%;
|
| 799 |
+
background: linear-gradient(90deg, var(--cyber-cyan), var(--accent-color));
|
| 800 |
+
transition: width 0.5s ease;
|
| 801 |
+
box-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
|
| 802 |
+
}
|
| 803 |
+
|
| 804 |
+
/* Player Info */
|
| 805 |
+
.player-info {
|
| 806 |
+
background: linear-gradient(135deg, rgba(0, 255, 204, 0.1), rgba(108, 99, 255, 0.1));
|
| 807 |
+
border: 1px solid var(--cyber-cyan);
|
| 808 |
+
border-radius: 8px;
|
| 809 |
+
padding: 12px;
|
| 810 |
+
margin-bottom: 16px;
|
| 811 |
+
}
|
| 812 |
+
|
| 813 |
+
/* Loading Spinner */
|
| 814 |
+
.loading-spinner {
|
| 815 |
+
border: 3px solid rgba(108, 99, 255, 0.3);
|
| 816 |
+
border-top: 3px solid var(--cyber-cyan);
|
| 817 |
+
border-radius: 50%;
|
| 818 |
+
width: 20px; height: 20px;
|
| 819 |
+
animation: spin 1s linear infinite;
|
| 820 |
+
}
|
| 821 |
+
@keyframes spin {
|
| 822 |
+
0% { transform: rotate(0deg); }
|
| 823 |
+
100% { transform: rotate(360deg); }
|
| 824 |
+
}
|
| 825 |
+
|
| 826 |
+
/* Gallery Styles */
|
| 827 |
+
.gallery-item {
|
| 828 |
+
position: relative;
|
| 829 |
+
overflow: hidden;
|
| 830 |
+
border-radius: 8px;
|
| 831 |
+
transition: all 0.3s ease;
|
| 832 |
+
border: 2px solid var(--accent-glow);
|
| 833 |
+
}
|
| 834 |
+
.gallery-item:hover {
|
| 835 |
+
transform: scale(1.05);
|
| 836 |
+
border-color: var(--cyber-cyan);
|
| 837 |
+
box-shadow: 0 0 25px rgba(0, 255, 204, 0.3);
|
| 838 |
+
z-index: 10;
|
| 839 |
+
}
|
| 840 |
+
.gallery-item .overlay {
|
| 841 |
+
position: absolute;
|
| 842 |
+
top: 0; left: 0; width: 100%; height: 100%;
|
| 843 |
+
background: linear-gradient(45deg, rgba(108, 99, 255, 0.1), rgba(0, 255, 204, 0.1));
|
| 844 |
+
opacity: 0;
|
| 845 |
+
transition: opacity 0.4s ease;
|
| 846 |
+
pointer-events: none;
|
| 847 |
+
}
|
| 848 |
+
.gallery-item:hover .overlay { opacity: 1; }
|
| 849 |
+
|
| 850 |
+
/* Modal Styles */
|
| 851 |
+
.modal-overlay {
|
| 852 |
+
background: rgba(13, 12, 29, 0.9);
|
| 853 |
+
backdrop-filter: blur(15px);
|
| 854 |
+
}
|
| 855 |
+
.modal-content {
|
| 856 |
+
background: linear-gradient(135deg, var(--primary-bg), var(--secondary-bg));
|
| 857 |
+
border: 2px solid var(--accent-color);
|
| 858 |
+
box-shadow: 0 0 40px rgba(108, 99, 255, 0.3);
|
| 859 |
+
}
|
| 860 |
+
|
| 861 |
+
/* Responsive Design */
|
| 862 |
+
@media (max-width: 768px) {
|
| 863 |
+
.bubble { width: 120px; height: 120px; font-size: 0.7rem; }
|
| 864 |
+
#car-drop-zone { width: 250px; height: 250px; }
|
| 865 |
+
.control-btn { padding: 8px 16px; font-size: 0.8rem; }
|
| 866 |
+
}
|
| 867 |
+
</style>
|
| 868 |
+
</head>
|
| 869 |
+
<body class="crt-effect">
|
| 870 |
+
<!-- Header -->
|
| 871 |
+
<header class="p-4 flex flex-wrap justify-between items-center gap-4 bg-gradient-to-r from-primary-bg via-secondary-bg to-primary-bg border-b-2 border-accent-color sticky top-0 z-30">
|
| 872 |
+
<div class="flex items-center space-x-3">
|
| 873 |
+
<div class="w-10 h-10 bg-gradient-to-r from-cyan-400 to-purple-500 rounded-full animate-pulse"></div>
|
| 874 |
+
<h1 id="header-title" class="orbitron text-2xl font-bold tracking-wider text-transparent bg-clip-text bg-gradient-to-r from-cyan-400 to-purple-400">
|
| 875 |
+
CAR DESIGNER HUB
|
| 876 |
+
</h1>
|
| 877 |
+
</div>
|
| 878 |
+
<div class="flex items-center gap-2">
|
| 879 |
+
<button id="show-designer-btn" class="header-btn text-white font-bold py-2 px-4 rounded-lg">
|
| 880 |
+
<i class="fas fa-wrench mr-2"></i>Designer
|
| 881 |
+
</button>
|
| 882 |
+
<button id="show-gallery-btn" class="header-btn text-white font-bold py-2 px-4 rounded-lg">
|
| 883 |
+
<i class="fas fa-images mr-2"></i>Gallery
|
| 884 |
+
</button>
|
| 885 |
+
<button id="show-links-btn" class="header-btn text-white font-bold py-2 px-4 rounded-lg">
|
| 886 |
+
<i class="fas fa-link mr-2"></i>Links
|
| 887 |
+
</button>
|
| 888 |
+
</div>
|
| 889 |
+
</header>
|
| 890 |
+
|
| 891 |
+
<!-- Connection Status -->
|
| 892 |
+
<div id="connection-status" class="status-disconnected connection-status">
|
| 893 |
+
Offline Mode
|
| 894 |
+
</div>
|
| 895 |
+
|
| 896 |
+
<!-- Main Content -->
|
| 897 |
+
<main>
|
| 898 |
+
<!-- Car Designer View -->
|
| 899 |
+
<div id="designer-view" class="">
|
| 900 |
+
<div class="w-full h-[calc(100vh-80px)] flex flex-col md:flex-row overflow-hidden">
|
| 901 |
+
|
| 902 |
+
<!-- Controls Panel -->
|
| 903 |
+
<div class="w-full md:w-80 bg-gradient-to-b from-primary-bg to-secondary-bg p-4 flex flex-col space-y-4 order-1 md:order-2 border-l-2 border-accent-color">
|
| 904 |
+
|
| 905 |
+
<!-- Player Info -->
|
| 906 |
+
<div id="player-info" class="player-info hidden">
|
| 907 |
+
<div class="text-sm font-bold text-cyber-cyan" id="player-name">Player: Loading...</div>
|
| 908 |
+
<div class="text-xs text-text-secondary" id="player-level">Level: --</div>
|
| 909 |
+
<div class="text-xs text-text-secondary" id="player-credits">Credits: --</div>
|
| 910 |
+
</div>
|
| 911 |
+
|
| 912 |
+
<h2 class="text-lg font-bold border-b-2 border-accent-color pb-2 text-cyber-cyan orbitron">CAR DESIGNER</h2>
|
| 913 |
+
|
| 914 |
+
<!-- View Controls -->
|
| 915 |
+
<div class="flex flex-wrap gap-2">
|
| 916 |
+
<button id="view-2d-btn" class="flex-1 control-btn py-2 px-4 rounded-lg text-white disabled:opacity-50">
|
| 917 |
+
2D Draw
|
| 918 |
+
</button>
|
| 919 |
+
<button id="view-3d-btn" class="flex-1 control-btn py-2 px-4 rounded-lg text-white">
|
| 920 |
+
3D View
|
| 921 |
+
</button>
|
| 922 |
+
</div>
|
| 923 |
+
|
| 924 |
+
<!-- Action Buttons -->
|
| 925 |
+
<div class="space-y-2">
|
| 926 |
+
<button id="add-module-btn" class="w-full control-btn py-2 px-4 rounded-lg text-white">
|
| 927 |
+
<i class="fas fa-plus mr-2"></i>Add Module
|
| 928 |
+
</button>
|
| 929 |
+
<button id="clear-btn" class="w-full control-btn py-2 px-4 rounded-lg text-white">
|
| 930 |
+
<i class="fas fa-trash mr-2"></i>Clear Design
|
| 931 |
+
</button>
|
| 932 |
+
<button id="save-car-btn" class="w-full control-btn py-2 px-4 rounded-lg text-white">
|
| 933 |
+
<span id="save-btn-text"><i class="fas fa-save mr-2"></i>Save to Garage</span>
|
| 934 |
+
<div id="save-spinner" class="loading-spinner inline-block ml-2 hidden"></div>
|
| 935 |
+
</button>
|
| 936 |
+
<button id="connect-btn" class="w-full control-btn py-2 px-4 rounded-lg text-white">
|
| 937 |
+
<i class="fas fa-wifi mr-2"></i>Connect to Game
|
| 938 |
+
</button>
|
| 939 |
+
</div>
|
| 940 |
+
|
| 941 |
+
<!-- Car Statistics -->
|
| 942 |
+
<div class="car-stats">
|
| 943 |
+
<h3 class="font-bold mb-3 text-cyber-cyan orbitron">Performance Stats</h3>
|
| 944 |
+
<div class="space-y-3">
|
| 945 |
+
<div>
|
| 946 |
+
<div class="flex justify-between text-sm font-bold">
|
| 947 |
+
<span>Speed</span>
|
| 948 |
+
<span id="speed-value" class="text-cyber-cyan">0</span>
|
| 949 |
+
</div>
|
| 950 |
+
<div class="stat-bar">
|
| 951 |
+
<div id="speed-fill" class="stat-fill" style="width: 0%"></div>
|
| 952 |
+
</div>
|
| 953 |
+
</div>
|
| 954 |
+
<div>
|
| 955 |
+
<div class="flex justify-between text-sm font-bold">
|
| 956 |
+
<span>Handling</span>
|
| 957 |
+
<span id="handling-value" class="text-cyber-cyan">0</span>
|
| 958 |
+
</div>
|
| 959 |
+
<div class="stat-bar">
|
| 960 |
+
<div id="handling-fill" class="stat-fill" style="width: 0%"></div>
|
| 961 |
+
</div>
|
| 962 |
+
</div>
|
| 963 |
+
<div>
|
| 964 |
+
<div class="flex justify-between text-sm font-bold">
|
| 965 |
+
<span>Acceleration</span>
|
| 966 |
+
<span id="acceleration-value" class="text-cyber-cyan">0</span>
|
| 967 |
+
</div>
|
| 968 |
+
<div class="stat-bar">
|
| 969 |
+
<div id="acceleration-fill" class="stat-fill" style="width: 0%"></div>
|
| 970 |
+
</div>
|
| 971 |
+
</div>
|
| 972 |
+
<div>
|
| 973 |
+
<div class="flex justify-between text-sm font-bold">
|
| 974 |
+
<span>Durability</span>
|
| 975 |
+
<span id="durability-value" class="text-cyber-cyan">0</span>
|
| 976 |
+
</div>
|
| 977 |
+
<div class="stat-bar">
|
| 978 |
+
<div id="durability-fill" class="stat-fill" style="width: 0%"></div>
|
| 979 |
+
</div>
|
| 980 |
+
</div>
|
| 981 |
+
</div>
|
| 982 |
+
</div>
|
| 983 |
+
|
| 984 |
+
<!-- Instructions -->
|
| 985 |
+
<div class="pt-4 text-sm exo2">
|
| 986 |
+
<h3 class="font-bold mb-2 text-cyber-cyan">Instructions:</h3>
|
| 987 |
+
<ol class="list-decimal list-inside text-text-secondary space-y-1">
|
| 988 |
+
<li>Connect to Fantasy Rally servers</li>
|
| 989 |
+
<li>Draw your car's profile in 2D mode</li>
|
| 990 |
+
<li>Add modular components</li>
|
| 991 |
+
<li>View the 3D model and stats</li>
|
| 992 |
+
<li>Save to your cosmic garage!</li>
|
| 993 |
+
</ol>
|
| 994 |
+
</div>
|
| 995 |
+
</div>
|
| 996 |
+
|
| 997 |
+
<!-- Canvas / Renderer Area -->
|
| 998 |
+
<div class="flex-grow relative order-2 md:order-1">
|
| 999 |
+
<div id="bubble-container"></div>
|
| 1000 |
+
|
| 1001 |
+
<!-- 2D Canvas -->
|
| 1002 |
+
<div id="canvas-container" class="w-full h-full">
|
| 1003 |
+
<canvas id="drawing-canvas"></canvas>
|
| 1004 |
+
<div class="label">Design Canvas - Draw Your Machine</div>
|
| 1005 |
+
|
| 1006 |
+
<!-- Central Drop Zone -->
|
| 1007 |
+
<div class="absolute inset-0 flex items-center justify-center">
|
| 1008 |
+
<div id="car-drop-zone" class="w-80 h-80 rounded-full flex items-center justify-center text-center cursor-pointer">
|
| 1009 |
+
<div id="prompt-text" class="text-text-secondary">
|
| 1010 |
+
<i class="fas fa-car text-5xl mb-4"></i>
|
| 1011 |
+
<p class="font-bold">Drop Car Image Here</p>
|
| 1012 |
+
<p class="text-sm">or click to select</p>
|
| 1013 |
+
</div>
|
| 1014 |
+
<img id="car-image" class="hidden w-full h-full object-cover rounded-full">
|
| 1015 |
+
<input type="file" id="file-upload" class="hidden" accept="image/*">
|
| 1016 |
+
</div>
|
| 1017 |
+
</div>
|
| 1018 |
+
</div>
|
| 1019 |
+
|
| 1020 |
+
<!-- 3D Renderer -->
|
| 1021 |
+
<div id="renderer-container" class="w-full h-full hidden">
|
| 1022 |
+
<div class="label">3D Preview - Your Cosmic Machine</div>
|
| 1023 |
+
</div>
|
| 1024 |
+
</div>
|
| 1025 |
+
</div>
|
| 1026 |
+
</div>
|
| 1027 |
+
|
| 1028 |
+
<!-- Gallery View -->
|
| 1029 |
+
<div id="gallery-view" class="hidden">
|
| 1030 |
+
<div class="p-4 sm:p-6">
|
| 1031 |
+
<div id="gallery-grid" class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4 sm:gap-6">
|
| 1032 |
+
</div>
|
| 1033 |
+
</div>
|
| 1034 |
+
</div>
|
| 1035 |
+
</main>
|
| 1036 |
+
|
| 1037 |
+
<!-- Modals -->
|
| 1038 |
+
<div id="prompt-modal" class="fixed inset-0 z-50 flex items-center justify-center p-4 modal-overlay hidden">
|
| 1039 |
+
<div class="modal-content rounded-lg shadow-2xl max-w-4xl w-full max-h-[90vh] flex flex-col sm:flex-row overflow-hidden">
|
| 1040 |
+
<img id="modal-img" src="" alt="Enlarged view" class="w-full sm:w-1/2 h-64 sm:h-auto object-cover">
|
| 1041 |
+
<div class="p-6 flex flex-col gap-4 overflow-y-auto">
|
| 1042 |
+
<div class="flex justify-between items-start">
|
| 1043 |
+
<h3 class="text-xl font-bold text-cyber-cyan orbitron">Image Prompt</h3>
|
| 1044 |
+
<button id="close-prompt-modal-btn" class="text-2xl text-gray-400 hover:text-white transition-colors">×</button>
|
| 1045 |
+
</div>
|
| 1046 |
+
<p id="modal-prompt" class="text-gray-300 bg-black/30 p-4 rounded-md border border-accent-color flex-grow exo2"></p>
|
| 1047 |
+
<button id="copy-prompt-btn" class="mt-auto w-full control-btn py-2 px-4 rounded-lg text-white">
|
| 1048 |
+
<i class="fas fa-copy mr-2"></i>Copy Prompt
|
| 1049 |
+
</button>
|
| 1050 |
+
</div>
|
| 1051 |
+
</div>
|
| 1052 |
+
</div>
|
| 1053 |
+
|
| 1054 |
+
<div id="links-modal" class="fixed inset-0 z-50 flex items-center justify-center p-4 modal-overlay hidden">
|
| 1055 |
+
<div class="modal-content rounded-lg shadow-2xl max-w-6xl w-full max-h-[90vh] flex flex-col overflow-hidden">
|
| 1056 |
+
<div class="p-4 flex justify-between items-center border-b-2 border-accent-color flex-shrink-0">
|
| 1057 |
+
<h3 class="text-xl font-bold text-cyber-cyan orbitron">Project Links & Resources</h3>
|
| 1058 |
+
<button id="close-links-modal-btn" class="text-2xl text-gray-400 hover:text-white transition-colors">×</button>
|
| 1059 |
+
</div>
|
| 1060 |
+
<div id="links-modal-body" class="p-6 overflow-y-auto exo2">
|
| 1061 |
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
| 1062 |
+
<div>
|
| 1063 |
+
<h4 class="font-bold text-lg mb-2 text-cyber-cyan">Project Management</h4>
|
| 1064 |
+
<ul class="list-disc list-inside space-y-2 text-sm">
|
| 1065 |
+
<li><a href="https://wavetype.xyz/" target="_blank" class="text-accent-color hover:text-cyber-cyan transition-colors">WaveType.xyz</a></li>
|
| 1066 |
+
<li><a href="https://dash.infinityfree.com/accounts/if0_38768571" target="_blank" class="text-accent-color hover:text-cyber-cyan transition-colors">InfinityFree Account</a></li>
|
| 1067 |
+
<li><a href="https://vercel.com/" target="_blank" class="text-accent-color hover:text-cyber-cyan transition-colors">Vercel Deployments</a></li>
|
| 1068 |
+
<li><a href="https://github.com/" target="_blank" class="text-accent-color hover:text-cyber-cyan transition-colors">GitHub Repository</a></li>
|
| 1069 |
+
</ul>
|
| 1070 |
+
</div>
|
| 1071 |
+
<div>
|
| 1072 |
+
<h4 class="font-bold text-lg mb-2 text-cyber-cyan">AI & Development</h4>
|
| 1073 |
+
<ul class="list-disc list-inside space-y-2 text-sm">
|
| 1074 |
+
<li><a href="https://claude.ai" target="_blank" class="text-accent-color hover:text-cyber-cyan transition-colors">Claude AI</a></li>
|
| 1075 |
+
<li><a href="https://gemini.google.com" target="_blank" class="text-accent-color hover:text-cyber-cyan transition-colors">Google Gemini</a></li>
|
| 1076 |
+
<li><a href="https://chatgpt.com/" target="_blank" class="text-accent-color hover:text-cyber-cyan transition-colors">ChatGPT</a></li>
|
| 1077 |
+
<li><a href="https://threejs.org/" target="_blank" class="text-accent-color hover:text-cyber-cyan transition-colors">Three.js Library</a></li>
|
| 1078 |
+
</ul>
|
| 1079 |
+
</div>
|
| 1080 |
+
<div>
|
| 1081 |
+
<h4 class="font-bold text-lg mb-2 text-cyber-cyan">Fantasy Rally</h4>
|
| 1082 |
+
<ul class="list-disc list-inside space-y-2 text-sm">
|
| 1083 |
+
<li><a href="https://discord.com/" target="_blank" class="text-accent-color hover:text-cyber-cyan transition-colors">Discord Server</a></li>
|
| 1084 |
+
<li><a href="https://www.facebook.com/" target="_blank" class="text-accent-color hover:text-cyber-cyan transition-colors">Facebook Page</a></li>
|
| 1085 |
+
<li><a href="mailto:[email protected]" class="text-accent-color hover:text-cyber-cyan transition-colors">Contact Email</a></li>
|
| 1086 |
+
</ul>
|
| 1087 |
+
</div>
|
| 1088 |
+
</div>
|
| 1089 |
+
</div>
|
| 1090 |
+
</div>
|
| 1091 |
+
</div>
|
| 1092 |
+
|
| 1093 |
+
<script>
|
| 1094 |
+
// Initialize AOS
|
| 1095 |
+
AOS.init({ once: true });
|
| 1096 |
+
|
| 1097 |
+
// MMORPG Integration System
|
| 1098 |
+
class FantasyRallyConnector {
|
| 1099 |
+
constructor() {
|
| 1100 |
+
this.connected = false;
|
| 1101 |
+
this.playerData = null;
|
| 1102 |
+
this.gameSession = null;
|
| 1103 |
+
this.serverUrl = 'wss://api.fantasyrally.game';
|
| 1104 |
+
this.apiUrl = 'https://api.fantasyrally.game';
|
| 1105 |
+
}
|
| 1106 |
+
|
| 1107 |
+
async connect() {
|
| 1108 |
+
this.updateConnectionStatus('connecting');
|
| 1109 |
+
|
| 1110 |
+
try {
|
| 1111 |
+
await this.simulateConnection();
|
| 1112 |
+
this.connected = true;
|
| 1113 |
+
this.updateConnectionStatus('connected');
|
| 1114 |
+
await this.loadPlayerData();
|
| 1115 |
+
this.showPlayerInfo();
|
| 1116 |
+
console.log('Connected to Fantasy Rally Cosmic Hub');
|
| 1117 |
+
return true;
|
| 1118 |
+
} catch (error) {
|
| 1119 |
+
console.error('Connection failed:', error);
|
| 1120 |
+
this.updateConnectionStatus('disconnected');
|
| 1121 |
+
return false;
|
| 1122 |
+
}
|
| 1123 |
+
}
|
| 1124 |
+
|
| 1125 |
+
async simulateConnection() {
|
| 1126 |
+
return new Promise((resolve) => {
|
| 1127 |
+
setTimeout(() => {
|
| 1128 |
+
this.gameSession = 'cosmic_' + Math.random().toString(36).substr(2, 9);
|
| 1129 |
+
resolve();
|
| 1130 |
+
}, 2000);
|
| 1131 |
+
});
|
| 1132 |
+
}
|
| 1133 |
+
|
| 1134 |
+
async loadPlayerData() {
|
| 1135 |
+
this.playerData = {
|
| 1136 |
+
username: 'CosmicRacer_' + Math.floor(Math.random() * 1000),
|
| 1137 |
+
level: Math.floor(Math.random() * 50) + 1,
|
| 1138 |
+
credits: Math.floor(Math.random() * 50000) + 5000,
|
| 1139 |
+
garage: [],
|
| 1140 |
+
reputation: Math.floor(Math.random() * 100)
|
| 1141 |
+
};
|
| 1142 |
+
}
|
| 1143 |
+
|
| 1144 |
+
updateConnectionStatus(status) {
|
| 1145 |
+
const statusElement = document.getElementById('connection-status');
|
| 1146 |
+
statusElement.className = `connection-status status-${status}`;
|
| 1147 |
+
|
| 1148 |
+
switch(status) {
|
| 1149 |
+
case 'connected':
|
| 1150 |
+
statusElement.innerHTML = '<i class="fas fa-wifi mr-1"></i>ONLINE';
|
| 1151 |
+
break;
|
| 1152 |
+
case 'connecting':
|
| 1153 |
+
statusElement.innerHTML = '<i class="fas fa-spinner fa-spin mr-1"></i>CONNECTING';
|
| 1154 |
+
break;
|
| 1155 |
+
case 'disconnected':
|
| 1156 |
+
statusElement.innerHTML = '<i class="fas fa-wifi-slash mr-1"></i>OFFLINE';
|
| 1157 |
+
break;
|
| 1158 |
+
}
|
| 1159 |
+
}
|
| 1160 |
+
|
| 1161 |
+
showPlayerInfo() {
|
| 1162 |
+
if (this.playerData) {
|
| 1163 |
+
document.getElementById('player-name').textContent = `Player: ${this.playerData.username}`;
|