Metaprime commited on
Commit
8aed3ee
Β·
verified Β·
1 Parent(s): e2cb822

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +52 -46
index.html CHANGED
@@ -22,41 +22,24 @@
22
  box-shadow:0 0 18px rgba(255,70,90,0.6); transition: all 0.3s;
23
  display:flex; align-items:center; gap:12px;
24
  }
25
-
26
  .panel-btn:hover { background:rgba(255,65,85,0.4); transform:scale(1.04); }
27
 
28
- /* === FULL GLB PICKER SCREEN === */
29
- .picker-screen {
30
- position: fixed; inset: 0; background: rgba(0,0,0,0.88);
31
- display: none; flex-direction: column; z-index: 2000;
32
- }
33
 
34
- .picker-header {
35
- display: flex; justify-content: space-between; align-items: center;
36
- padding: 25px 30px; color: white;
37
- }
38
 
39
- .button-grid {
40
- display: grid; grid-template-columns: repeat(2, 1fr);
41
- gap: 22px; padding: 30px; flex: 1;
42
- }
43
 
44
  .glass-btn {
45
- background: rgba(255, 45, 45, 0.22);
46
- color: white; border: 3px solid rgba(255, 85, 85, 0.85);
47
- padding: 30px 20px; font-size: 18px; font-weight: 600;
48
- border-radius: 18px; text-align: center; cursor: pointer;
49
- box-shadow: 0 0 35px rgba(255, 70, 70, 0.7),
50
- inset 0 0 25px rgba(255, 130, 130, 0.4);
51
- backdrop-filter: blur(12px);
52
- transition: all 0.3s ease;
53
- }
54
-
55
- .glass-btn:hover {
56
- background: rgba(255, 65, 65, 0.35);
57
- box-shadow: 0 0 50px rgba(255, 100, 100, 0.9);
58
- transform: scale(1.06);
59
  }
 
60
  </style>
61
  </head>
62
  <body>
@@ -73,25 +56,28 @@
73
  <button class="panel-btn" onclick="randomEnvironment()">🎲 Surprise Me</button>
74
  </div>
75
 
76
- <!-- GLB Picker Screen -->
77
  <div id="glbPicker" class="picker-screen">
78
  <div class="picker-header">
79
  <h2>GLB Picker</h2>
80
- <button onclick="closeGLBPicker()" style="background:none;border:none;color:white;font-size:36px;cursor:pointer;">βœ•</button>
81
  </div>
82
  <div class="button-grid">
83
- <button class="glass-btn" onclick="selectCategory('sky')">🌌 Sky / Environment</button>
84
- <button class="glass-btn" onclick="selectCategory('terrain')">🌲 Terrain / Landscape</button>
85
- <button class="glass-btn" onclick="selectCategory('characters')">πŸ‘€ Characters / Avatars</button>
86
- <button class="glass-btn" onclick="selectCategory('props')">πŸ“¦ Props / Objects</button>
87
- <button class="glass-btn" onclick="selectCategory('media')">πŸ–ΌοΈ Media Frames</button>
88
- <button class="glass-btn" onclick="selectCategory('effects')">✨ Effects</button>
89
  </div>
90
  </div>
91
 
92
  <input type="file" id="skyInput" accept="image/*,video/*" style="display:none;">
 
93
 
94
  <script>
 
 
95
  function togglePanel() {
96
  const panel = document.getElementById('panel');
97
  panel.style.display = (panel.style.display === 'flex') ? 'none' : 'flex';
@@ -106,22 +92,42 @@
106
  document.getElementById('glbPicker').style.display = 'none';
107
  }
108
 
109
- function selectCategory(cat) {
110
- alert(`Selected: ${cat}\n\nGLB loading system will go here next update.`);
111
- closeGLBPicker();
112
  }
113
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  function randomEnvironment() {
115
- alert("🎲 Surprise Me!\n\nRandom scene generator coming soon.");
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  }
117
 
118
  function launchSky() { document.getElementById('skyInput').click(); }
119
- function pickScreenMedia() { alert("Screen Media picker coming in next update"); }
120
-
121
- document.getElementById('skyInput').addEventListener('change', function(e) {
122
- const file = e.target.files[0];
123
- if (file) alert("Loaded background: " + file.name);
124
- });
125
  </script>
126
  </body>
127
  </html>
 
22
  box-shadow:0 0 18px rgba(255,70,90,0.6); transition: all 0.3s;
23
  display:flex; align-items:center; gap:12px;
24
  }
 
25
  .panel-btn:hover { background:rgba(255,65,85,0.4); transform:scale(1.04); }
26
 
27
+ .picker-screen { position:fixed; inset:0; background:rgba(0,0,0,0.9);
28
+ display:none; flex-direction:column; z-index:2000; }
 
 
 
29
 
30
+ .picker-header { display:flex; justify-content:space-between; align-items:center;
31
+ padding:25px 30px; color:white; }
 
 
32
 
33
+ .button-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:22px;
34
+ padding:30px; flex:1; }
 
 
35
 
36
  .glass-btn {
37
+ background:rgba(255,45,45,0.22); color:white; border:3px solid rgba(255,85,85,0.85);
38
+ padding:28px 20px; font-size:17px; font-weight:600; border-radius:18px;
39
+ box-shadow:0 0 35px rgba(255,70,70,0.7), inset 0 0 25px rgba(255,130,130,0.4);
40
+ backdrop-filter:blur(12px); transition:all 0.3s; text-align:center;
 
 
 
 
 
 
 
 
 
 
41
  }
42
+ .glass-btn:hover { background:rgba(255,65,65,0.35); transform:scale(1.06); }
43
  </style>
44
  </head>
45
  <body>
 
56
  <button class="panel-btn" onclick="randomEnvironment()">🎲 Surprise Me</button>
57
  </div>
58
 
59
+ <!-- GLB Picker -->
60
  <div id="glbPicker" class="picker-screen">
61
  <div class="picker-header">
62
  <h2>GLB Picker</h2>
63
+ <button onclick="closeGLBPicker()" style="background:none;border:none;color:white;font-size:36px;">βœ•</button>
64
  </div>
65
  <div class="button-grid">
66
+ <button class="glass-btn" onclick="pickGLB('sky')">🌌 Sky / Environment</button>
67
+ <button class="glass-btn" onclick="pickGLB('terrain')">🌲 Terrain / Landscape</button>
68
+ <button class="glass-btn" onclick="pickGLB('characters')">πŸ‘€ Characters</button>
69
+ <button class="glass-btn" onclick="pickGLB('props')">πŸ“¦ Props / Objects</button>
70
+ <button class="glass-btn" onclick="pickGLB('media')">πŸ–ΌοΈ Media Frames</button>
71
+ <button class="glass-btn" onclick="pickGLB('effects')">✨ Effects</button>
72
  </div>
73
  </div>
74
 
75
  <input type="file" id="skyInput" accept="image/*,video/*" style="display:none;">
76
+ <input type="file" id="glbInput" accept=".glb" style="display:none;">
77
 
78
  <script>
79
+ let glbFiles = { sky: [ ] };
80
+
81
  function togglePanel() {
82
  const panel = document.getElementById('panel');
83
  panel.style.display = (panel.style.display === 'flex') ? 'none' : 'flex';
 
92
  document.getElementById('glbPicker').style.display = 'none';
93
  }
94
 
95
+ function pickGLB(category) {
96
+ document.getElementById('glbInput').dataset.category = category;
97
+ document.getElementById('glbInput').click();
98
  }
99
 
100
+ // Handle GLB file selection
101
+ document.getElementById('glbInput').addEventListener('change', function(e) {
102
+ const file = e.target.files[0];
103
+ const category = e.target.dataset.category;
104
+
105
+ if (file && category) {
106
+ glbFiles .push(file);
107
+ alert(`βœ… Added ${file.name} to ${category} category!\n\nTotal in this category: ${glbFiles .length}`);
108
+ closeGLBPicker();
109
+ }
110
+ });
111
+
112
  function randomEnvironment() {
113
+ let message = "🎲 Random Environment:\n\n";
114
+
115
+ Object.keys(glbFiles).forEach(cat => {
116
+ if (glbFiles .length > 0) {
117
+ const randomFile = glbFiles [Math.floor(Math.random() * glbFiles .length)];
118
+ message += `${cat}: ${randomFile.name}\n`;
119
+ }
120
+ });
121
+
122
+ if (message === "🎲 Random Environment:\n\n") {
123
+ message += "No GLBs loaded yet.\nGo to GLB Picker and upload some files first!";
124
+ }
125
+
126
+ alert(message);
127
  }
128
 
129
  function launchSky() { document.getElementById('skyInput').click(); }
130
+ function pickScreenMedia() { alert("πŸ“Ί Screen Media picker - coming next update"); }
 
 
 
 
 
131
  </script>
132
  </body>
133
  </html>