Spaces:
Sleeping
Sleeping
Update app.py
#7
by Elin310 - opened
app.py
CHANGED
|
@@ -223,7 +223,7 @@ TEXTURE_URL = "https://upload.wikimedia.org/wikipedia/commons/7/70/Solarsystemsc
|
|
| 223 |
# -----------------------------
|
| 224 |
def mars_html(texture_url=TEXTURE_URL):
|
| 225 |
return f"""
|
| 226 |
-
<div id="mars-container" style="width:100%;height:420px;position:relative;background:#01010A;
|
| 227 |
<canvas id="mars-canvas" style="display:block;width:100%;height:100%"></canvas>
|
| 228 |
</div>
|
| 229 |
<script type="module">
|
|
@@ -241,8 +241,8 @@ function init() {{
|
|
| 241 |
renderer.setSize(w, h, false);
|
| 242 |
|
| 243 |
scene = new THREE.Scene();
|
| 244 |
-
camera = new THREE.PerspectiveCamera(
|
| 245 |
-
camera.position.set(0, 0,
|
| 246 |
|
| 247 |
// Iluminación tipo amanecer marciano
|
| 248 |
const ambient = new THREE.AmbientLight(0xffccb0, 0.7);
|
|
|
|
| 223 |
# -----------------------------
|
| 224 |
def mars_html(texture_url=TEXTURE_URL):
|
| 225 |
return f"""
|
| 226 |
+
<div id="mars-container" style="width:100%;height:420px;position:relative;background:#01010A;overflow:hidden">
|
| 227 |
<canvas id="mars-canvas" style="display:block;width:100%;height:100%"></canvas>
|
| 228 |
</div>
|
| 229 |
<script type="module">
|
|
|
|
| 241 |
renderer.setSize(w, h, false);
|
| 242 |
|
| 243 |
scene = new THREE.Scene();
|
| 244 |
+
camera = new THREE.PerspectiveCamera(38, w/h, 0.1, 100);
|
| 245 |
+
camera.position.set(0, 0, 3.5);
|
| 246 |
|
| 247 |
// Iluminación tipo amanecer marciano
|
| 248 |
const ambient = new THREE.AmbientLight(0xffccb0, 0.7);
|