Spaces:
Running
Running
Upload index.html with huggingface_hub
Browse files- index.html +9 -9
index.html
CHANGED
|
@@ -412,19 +412,19 @@ boxEdge.position.set(GRID/2, GRID/2, GRID/2);
|
|
| 412 |
scene.add(boxEdge);
|
| 413 |
|
| 414 |
// Axis labels — X and Y at the top (surface), Depth arrow going down
|
| 415 |
-
function makeLabel(text, pos
|
| 416 |
-
const c = document.createElement('canvas'); c.width=
|
| 417 |
-
const ctx = c.getContext('2d'); ctx.fillStyle='#
|
| 418 |
-
ctx.font=
|
| 419 |
-
ctx.textAlign='center'; ctx.textBaseline='middle'; ctx.fillText(text,
|
| 420 |
const tex = new THREE.CanvasTexture(c);
|
| 421 |
const sp = new THREE.Sprite(new THREE.SpriteMaterial({map:tex,transparent:true}));
|
| 422 |
-
sp.position.copy(pos); sp.scale.set(
|
| 423 |
}
|
| 424 |
// Surface is at Y=GRID (top). Labels on top edges.
|
| 425 |
-
makeLabel('Easting (X)', new THREE.Vector3(GRID/2, GRID+
|
| 426 |
-
makeLabel('Northing (Y)', new THREE.Vector3(-
|
| 427 |
-
makeLabel('Depth \u2193', new THREE.Vector3(-
|
| 428 |
|
| 429 |
let currentMesh = null;
|
| 430 |
|
|
|
|
| 412 |
scene.add(boxEdge);
|
| 413 |
|
| 414 |
// Axis labels — X and Y at the top (surface), Depth arrow going down
|
| 415 |
+
function makeLabel(text, pos) {
|
| 416 |
+
const c = document.createElement('canvas'); c.width=256; c.height=64;
|
| 417 |
+
const ctx = c.getContext('2d'); ctx.fillStyle='#000000';
|
| 418 |
+
ctx.font='bold 32px "Space Grotesk",system-ui,sans-serif';
|
| 419 |
+
ctx.textAlign='center'; ctx.textBaseline='middle'; ctx.fillText(text,128,32);
|
| 420 |
const tex = new THREE.CanvasTexture(c);
|
| 421 |
const sp = new THREE.Sprite(new THREE.SpriteMaterial({map:tex,transparent:true}));
|
| 422 |
+
sp.position.copy(pos); sp.scale.set(14,3.5,1); scene.add(sp);
|
| 423 |
}
|
| 424 |
// Surface is at Y=GRID (top). Labels on top edges.
|
| 425 |
+
makeLabel('Easting (X)', new THREE.Vector3(GRID/2, GRID+4, -3));
|
| 426 |
+
makeLabel('Northing (Y)', new THREE.Vector3(-3, GRID+4, GRID/2));
|
| 427 |
+
makeLabel('Depth \u2193', new THREE.Vector3(-6, GRID/2, -3));
|
| 428 |
|
| 429 |
let currentMesh = null;
|
| 430 |
|