Add mobile design
This commit is contained in:
parent
913af8fba6
commit
7d197d73ef
4 changed files with 61 additions and 8 deletions
|
@ -20,7 +20,7 @@ import {
|
|||
buildClippingplanes,
|
||||
} from "./utils/build-clipping-planes";
|
||||
import { buildCoordinateGrid } from "./utils/build-coordinate-grid";
|
||||
import { DragControls } from "three/examples/jsm/Addons.js";
|
||||
import { DragControls, OBJExporter } from "three/examples/jsm/Addons.js";
|
||||
import { MapTilerProvider, MapView, OpenStreetMapsProvider } from "geo-three";
|
||||
import { CustomMapHeightNodeShader } from "./CustomMapHeightNodeShader";
|
||||
import { Data, createSVG } from "./utils/create-borehole-svg";
|
||||
|
@ -286,6 +286,21 @@ export class SceneView extends EventTarget {
|
|||
this._scene.remove(o);
|
||||
}
|
||||
}
|
||||
|
||||
// Function to export the group as an OBJ file
|
||||
public exportOBJ() {
|
||||
const exporter = new OBJExporter();
|
||||
const objString = exporter.parse(this._model);
|
||||
|
||||
// Create a Blob and trigger a download
|
||||
const blob = new Blob([objString], { type: "text/plain" });
|
||||
const link = document.createElement("a");
|
||||
link.href = URL.createObjectURL(blob);
|
||||
link.download = "geologic_model.obj";
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
}
|
||||
}
|
||||
|
||||
async function init(container: HTMLElement, modelId = MODEL_ID) {
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue