Work on compass

This commit is contained in:
Fuhrmann 2025-03-19 13:56:08 +01:00
parent b94151bc01
commit 63fc0d1187
4 changed files with 176 additions and 65 deletions

View file

@ -19,7 +19,10 @@ import {
Orientation,
buildClippingplanes,
} from "./utils/build-clipping-planes";
import { buildCoordinateGrid } from "./utils/build-coordinate-grid";
import {
buildCoordinateGrid,
buildHeightGrid,
} from "./utils/build-coordinate-grid";
import {
DragControls,
OBJExporter,
@ -371,9 +374,15 @@ async function init(container: HTMLElement, modelId = MODEL_ID) {
// Add a coordinate grid to the scene
const { gridHelper, annotations } = buildCoordinateGrid(extent);
const { heightGridHelper, heightAnnotations } = buildHeightGrid(extent);
const annotationsGroup = new Group();
annotationsGroup.name = "coordinate-grid";
annotationsGroup.add(...annotations, gridHelper);
annotationsGroup.add(
...annotations,
gridHelper,
...heightAnnotations,
heightGridHelper
);
annotationsGroup.visible = false;
scene.add(annotationsGroup);