Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -175,10 +175,6 @@ class CameraControl3D(gr.HTML):
|
|
| 175 |
html_template = """
|
| 176 |
<div id="camera-control-wrapper" style="width: 100%; height: 450px; position: relative; background: #1a1a1a; border-radius: 12px; overflow: hidden;">
|
| 177 |
<div id="prompt-overlay" style="position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.8); padding: 8px 16px; border-radius: 8px; font-family: monospace; font-size: 12px; color: #00ff88; white-space: nowrap; z-index: 10;"></div>
|
| 178 |
-
<div id="upload-hint" style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #666; font-family: sans-serif; font-size: 14px; text-align: center; pointer-events: none; z-index: 5;">
|
| 179 |
-
<div style="font-size: 32px; margin-bottom: 8px;">📷</div>
|
| 180 |
-
Upload an image to preview
|
| 181 |
-
</div>
|
| 182 |
</div>
|
| 183 |
"""
|
| 184 |
|
|
@@ -186,7 +182,6 @@ class CameraControl3D(gr.HTML):
|
|
| 186 |
(() => {
|
| 187 |
const wrapper = element.querySelector('#camera-control-wrapper');
|
| 188 |
const promptOverlay = element.querySelector('#prompt-overlay');
|
| 189 |
-
const uploadHint = element.querySelector('#upload-hint');
|
| 190 |
|
| 191 |
// Wait for THREE to load
|
| 192 |
const initScene = () => {
|
|
@@ -283,7 +278,6 @@ class CameraControl3D(gr.HTML):
|
|
| 283 |
// Reset to placeholder
|
| 284 |
planeMaterial.map = createPlaceholderTexture();
|
| 285 |
planeMaterial.needsUpdate = true;
|
| 286 |
-
uploadHint.style.display = 'block';
|
| 287 |
// Reset plane to square
|
| 288 |
scene.remove(targetPlane);
|
| 289 |
targetPlane = new THREE.Mesh(new THREE.PlaneGeometry(1.2, 1.2), planeMaterial);
|
|
@@ -292,8 +286,6 @@ class CameraControl3D(gr.HTML):
|
|
| 292 |
return;
|
| 293 |
}
|
| 294 |
|
| 295 |
-
uploadHint.style.display = 'none';
|
| 296 |
-
|
| 297 |
const loader = new THREE.TextureLoader();
|
| 298 |
loader.crossOrigin = 'anonymous';
|
| 299 |
loader.load(url, (texture) => {
|
|
|
|
| 175 |
html_template = """
|
| 176 |
<div id="camera-control-wrapper" style="width: 100%; height: 450px; position: relative; background: #1a1a1a; border-radius: 12px; overflow: hidden;">
|
| 177 |
<div id="prompt-overlay" style="position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.8); padding: 8px 16px; border-radius: 8px; font-family: monospace; font-size: 12px; color: #00ff88; white-space: nowrap; z-index: 10;"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
</div>
|
| 179 |
"""
|
| 180 |
|
|
|
|
| 182 |
(() => {
|
| 183 |
const wrapper = element.querySelector('#camera-control-wrapper');
|
| 184 |
const promptOverlay = element.querySelector('#prompt-overlay');
|
|
|
|
| 185 |
|
| 186 |
// Wait for THREE to load
|
| 187 |
const initScene = () => {
|
|
|
|
| 278 |
// Reset to placeholder
|
| 279 |
planeMaterial.map = createPlaceholderTexture();
|
| 280 |
planeMaterial.needsUpdate = true;
|
|
|
|
| 281 |
// Reset plane to square
|
| 282 |
scene.remove(targetPlane);
|
| 283 |
targetPlane = new THREE.Mesh(new THREE.PlaneGeometry(1.2, 1.2), planeMaterial);
|
|
|
|
| 286 |
return;
|
| 287 |
}
|
| 288 |
|
|
|
|
|
|
|
| 289 |
const loader = new THREE.TextureLoader();
|
| 290 |
loader.crossOrigin = 'anonymous';
|
| 291 |
loader.load(url, (texture) => {
|