diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2023-04-03 11:51:15 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2024-01-30 10:10:36 +0100 |
| commit | 8efc4a76105779a09cc27b59cbc7f6a59c582e35 (patch) | |
| tree | a59b92c5537b3fab92e04b2f17e4c635ee185a12 /gui/src/main | |
| parent | 4e97ae3a7a566061675854fea1890518d02fd5c6 (diff) | |
| download | mullvadvpn-8efc4a76105779a09cc27b59cbc7f6a59c582e35.tar.xz mullvadvpn-8efc4a76105779a09cc27b59cbc7f6a59c582e35.zip | |
Integrate webgl maps into app
Diffstat (limited to 'gui/src/main')
| -rw-r--r-- | gui/src/main/index.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index 3aa2cc3568..37f6eaa590 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -74,6 +74,8 @@ const ALLOWED_PERMISSIONS = ['clipboard-sanitized-write']; const SANDBOX_DISABLED = app.commandLine.hasSwitch('no-sandbox'); const UPDATE_NOTIFICATION_DISABLED = process.env.MULLVAD_DISABLE_UPDATE_NOTIFICATION === '1'; +const GEO_DIR = path.resolve(__dirname, '../../assets/geo'); + class ApplicationMain implements NotificationSender, @@ -749,6 +751,18 @@ class ApplicationMain currentApiAccessMethod: this.currentApiAccessMethod, })); + IpcMainEventChannel.map.handleGetData(async () => ({ + landContourIndices: await fs.promises.readFile( + path.join(GEO_DIR, 'land_contour_indices.bin'), + ), + landPositions: await fs.promises.readFile(path.join(GEO_DIR, 'land_positions.bin')), + landTriangleIndices: await fs.promises.readFile( + path.join(GEO_DIR, 'land_triangle_indices.bin'), + ), + oceanIndices: await fs.promises.readFile(path.join(GEO_DIR, 'ocean_indices.bin')), + oceanPositions: await fs.promises.readFile(path.join(GEO_DIR, 'ocean_positions.bin')), + })); + IpcMainEventChannel.tunnel.handleConnect(this.connectTunnel); IpcMainEventChannel.tunnel.handleReconnect(this.reconnectTunnel); IpcMainEventChannel.tunnel.handleDisconnect(this.disconnectTunnel); |
