diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-07-19 21:22:51 +0200 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-07-19 21:22:51 +0200 |
commit | d6acb6e0714f663fce8a16c76b5a8f411cc6227e (patch) | |
tree | 9ee3b19af7761835742169efb96b27b6e38ac530 /web/pw-visualizer/src/webgl/util.ts | |
parent | 338dc6ac63a2292e191099e3424e7d28bc11f31b (diff) | |
download | planetwars.dev-d6acb6e0714f663fce8a16c76b5a8f411cc6227e.tar.xz planetwars.dev-d6acb6e0714f663fce8a16c76b5a8f411cc6227e.zip |
remove obsolete dependencies
Diffstat (limited to 'web/pw-visualizer/src/webgl/util.ts')
-rw-r--r-- | web/pw-visualizer/src/webgl/util.ts | 26 |
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 |