aboutsummaryrefslogtreecommitdiff
path: root/web/pw-visualizer/src/webgl/util.ts
diff options
context:
space:
mode:
Diffstat (limited to 'web/pw-visualizer/src/webgl/util.ts')
-rw-r--r--web/pw-visualizer/src/webgl/util.ts26
1 files changed, 1 insertions, 25 deletions
diff --git a/web/pw-visualizer/src/webgl/util.ts b/web/pw-visualizer/src/webgl/util.ts
index 3ed2b4d..e08af3f 100644
--- a/web/pw-visualizer/src/webgl/util.ts
+++ b/web/pw-visualizer/src/webgl/util.ts
@@ -1,6 +1,3 @@
-import { parse as parsePath } from 'extract-svg-path';
-import svgMesh3d from 'svg-mesh-3d';
-
export interface Dictionary<T> {
[Key: string]: T;
}
@@ -205,25 +202,4 @@ export class Mesh {
this.cells = mesh.cells.flat();
this.positions = mesh.positions.flat();
}
-}
-
-export async function url_to_mesh(url: string): Promise<Mesh> {
-
- return new Promise(function(resolve) {
- fetch(url)
- .then(resp => resp.text())
- .then(data => {
- // var div = document.createElement('div');
- // div.innerHTML = data;
- // var svg = div.querySelector('svg');
-
- var svgPath = parsePath(data);
- var mesh = svgMesh3d(svgPath, {
- delaunay: false,
- scale: 10,
- });
-
- resolve(new Mesh(mesh));
- })
- });
-}
+} \ No newline at end of file