Spaces:
Running
Running
Update index.html
Browse files- 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 |
-
|
| 29 |
-
|
| 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 |
-
|
| 36 |
-
padding: 25px 30px; color: white;
|
| 37 |
-
}
|
| 38 |
|
| 39 |
-
.button-grid {
|
| 40 |
-
|
| 41 |
-
gap: 22px; padding: 30px; flex: 1;
|
| 42 |
-
}
|
| 43 |
|
| 44 |
.glass-btn {
|
| 45 |
-
background:
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 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
|
| 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;
|
| 81 |
</div>
|
| 82 |
<div class="button-grid">
|
| 83 |
-
<button class="glass-btn" onclick="
|
| 84 |
-
<button class="glass-btn" onclick="
|
| 85 |
-
<button class="glass-btn" onclick="
|
| 86 |
-
<button class="glass-btn" onclick="
|
| 87 |
-
<button class="glass-btn" onclick="
|
| 88 |
-
<button class="glass-btn" onclick="
|
| 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
|
| 110 |
-
|
| 111 |
-
|
| 112 |
}
|
| 113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
function randomEnvironment() {
|
| 115 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
}
|
| 117 |
|
| 118 |
function launchSky() { document.getElementById('skyInput').click(); }
|
| 119 |
-
function pickScreenMedia() { alert("Screen Media picker coming
|
| 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>
|