Skip to content

Commit

Permalink
backend
Browse files Browse the repository at this point in the history
  • Loading branch information
delebash committed Jul 10, 2023
1 parent eb4f320 commit b7dfa58
Show file tree
Hide file tree
Showing 334 changed files with 24,251 additions and 0 deletions.
1,150 changes: 1,150 additions & 0 deletions dist/UPNG.js

Large diffs are not rendered by default.

Binary file added dist/assets/default-babe7699.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/assets/fa-brands-400-20c4a58b.ttf
Binary file not shown.
Binary file added dist/assets/fa-brands-400-74833209.woff2
Binary file not shown.
Binary file added dist/assets/fa-regular-400-528d022d.ttf
Binary file not shown.
Binary file added dist/assets/fa-regular-400-8e7e5ea1.woff2
Binary file not shown.
Binary file added dist/assets/fa-solid-900-67a65763.ttf
Binary file not shown.
Binary file added dist/assets/fa-solid-900-7152a693.woff2
Binary file not shown.
Binary file added dist/assets/fa-v4compatibility-0515a423.ttf
Binary file not shown.
Binary file added dist/assets/fa-v4compatibility-694a17c3.woff2
Binary file not shown.
Binary file added dist/assets/favicon-10aedeea.ico
Binary file not shown.
5 changes: 5 additions & 0 deletions dist/assets/index-1ceaaa61.css

Large diffs are not rendered by default.

3,412 changes: 3,412 additions & 0 deletions dist/assets/index-c1737ee1.js

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions dist/assets/worker-68179e03.js

Large diffs are not rendered by default.

75 changes: 75 additions & 0 deletions dist/binding.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// see: https://michaelmovsesov.com/articles/angular-like-two-way-data-binding-vanilla-js

'use strict'

// Cache DOM elements
const inputElements = document.querySelectorAll('[data-model]');
const boundElements = document.querySelectorAll('[data-bind]');

// Initialize scope variable to hold the state of the model.
let scope = {};


function init() {
// Loop through input elements
for (let el of inputElements) {
if (el.tagName.toLowerCase() === 'input' || el.tagName.toLowerCase() === 'select') {
// Get property name from each input with an attribute of 'data-model'
let propName = el.getAttribute('data-model');

// Update bound scope property on input change
el.addEventListener('keyup', e => { scope[propName] = el.value; });
el.addEventListener('mouseup', e => { scope[propName] = el.value; });

// Set property update logic
setPropUpdateLogic(propName);
}
}
};

function setPropUpdateLogic(prop) {
if (!scope.hasOwnProperty(prop)) {
let value;
Object.defineProperty(scope, prop, {
// Automatically update bound dom elements when a scope property is set to a new value
set: (newValue) => {
value = newValue;

// Set input elements to new value
for (let el of inputElements) {
if (el.getAttribute('data-model') === prop) {
if (el.type) {
el.value = newValue;
}
}
}
// Set all other bound dom elements to new value
for (let el of boundElements) {
if (el.getAttribute('data-bind') === prop) {
if (!el.type) {
el.innerHTML = newValue;
}
}
}
},
get: () => {
return value;
},
enumerable: true
})
}
}

function docReady(fn) {
// see if DOM is already available
if (document.readyState === "complete" || document.readyState === "interactive") {
// call on next available tick
setTimeout(fn, 1);
} else {
document.addEventListener("DOMContentLoaded", fn);
}
}

docReady(function () {
init();
});
107 changes: 107 additions & 0 deletions dist/help.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Help</title>
<link href="styles.css" rel="stylesheet">
</head>
<body>

<div class="help">
<header><h2>Help -- Download heightmap, satellite, weightmap images for use in Unreal or other 3D programs</h2>
<hr>
</header>
<dl>
<dt>Getting Started:</dt>
<dd>1. Get an api key from <a href="https://www.mapbox.com">Mapbox</a> or <a href="https://www.maptiler.com">Maptiler</a>
free account
</dd>
<dd>2. Open the Settings Panel and select either mapbox or maptiler from the Server Type dropdown</dd>
<dd>3. Paste your api key</dd>
<dd>4. Select a download directory</dd>
<dd>5. Click the Save Button</dd>

<dt>Map Controls:</dt>
<dd>1. Left click to select an area</dd>
<dd>2. Shift scroll to increase decrease the selection area</dd>
<dd>3. Use mouse scroll to change your viewpoint, this does not change the heightmap size</dd>
<dd>4. Left click and hold to move around the map</dd>
<dd>5. Right click and hold to pan and tilt</dd>

<dt>Info Panel:</dt>
<dd>Search box -- find a location by name and move the selection to that location</dd>
<dd>Map size -- increase decrease selection area</dd>
<dd>Auto calculate Base & Height -- Automatically chooses the best settings for heightmap creation</dd>
<dd>Base Level -- Changes the start altitude for your heightmap, More white means your start altitude is
higher
</dd>
<dd>Height Scale -- Changes the scale of your height</dd>
<dd>Water depth -- Slightly modifies height</dd>
<dd>Preview -- Loads the preview image based on your settings</dd>

<dt>Export Options Panel:</dt>
<dd><u>Export Settings:</u></dd>
<dd>1. Export type -- Choose download png to manually download the heightmap to your directory</dd>
<dd>or choose import heightmap to automatically import into Unreal requires <a
href="https://github.com/delebash/UnrealMapboxBridgePlugin">Bridge Plugin</a></dd>
<dd>3. Landscape Size -- resize the image to create the the size of your landscape in Unreal</dd>

<dd><u>Export type:</u></dd>
<dd>Override satellite zoom level -- higher zoom level equals better resolution, try 13 to start</dd>
<dd>The higher the zoom level means you will download more files, check your Tile count after you enter your
zoom level
</dd>
<dd>Too high of a zoom level could mean downloading thousands of files</dd>
<dd><u>Select image types to download:</u></dd>
<dd>Check one or all of the options</dd>

<dd><u>Manipulate heightmap: -- only applies to heightmap</u></dd>
<dd>Sea level -- Adjusts the heightmap so when you import into Unreal the map is at sea level -- default
checked
</dd>
<dd>Flip X -- Flips the image on the X axis</dd>
<dd>Flip Y -- Flips the image on the Y axis</dd>

<dd><u>Other Settings:</u></dd>
<dd>Enable World Partition -- Only applies when you Automatically import your heightmap into Unreal using the
plugin
</dd>
<dd>Grid Size -- Same setting in Unreal when you import your landscape with World Partition</dd>
<dd>Blur radius -- Applies a blur to your heightmap, can help smooth out your Unreal landscape</dd>
<dd>The higher the number the more smoothing is applied</dd>
<dd>Weightmap Blur -- Applies smoothing to your Weightmap images. Higher value equals more blur</dd>
<dd>Landscape Name -- Name of your landscape when you use the automatic import into Unreal</dd>
<dd>Export Button -- Start the creation of your selected image types -- Note sometimes the progress bar</dd>
<dd>Will freeze. Just be patient and wait for it to disappear. Downloading Weightmaps can take some extra time
</dd>
<dt>Change map style Panel: -- changes what type of map you want to view</dt>

<dt>Set lng/lat Panel:</dt>
<dd>Manually input lng/lat and move the selection to that location</dd>

<dt>Settings Panel:</dt>
<dd>Api Key -- Paste the api key you got from either mapbox or maptiler</dd>
&nbsp;<dd>Weightmap Url -- Click <a href="https://api.mapbox.com/styles/v1/delebash/clfzz7dot000001qilz330eyt.html?title=copy&access_token=pk.eyJ1IjoiZGVsZWJhc2giLCJhIjoiY2t1YWxkODF0MGh2NjJxcXA4czBpdXlmdyJ9.D_ngzR7j4vU1CILtpNLg4Q&zoomwheel=true&fresh=true#9.64/47.0529/-122.3211/0/7">Copy Mapbox Weightmap Style</a> to copy this style to your mapbox account and then paste your new style address in text box below in the format name/style id example:</dd>
<dd>Desktop Server Url -- The backend server is for use when you need to
download satellite images with a zoom greater than 14. You will need to download the desktop
version from <a href="https://github.com/delebash/unreal_map_bridge_desktop/releases">here</a>
Double click on the exe to start the application. Export image per normal, sat images will
be processed on the backend. This could take a long time depending on how many tiles you are
processing.
</dd>
<dd>Desktop Directory: -- Directory to save images produced from the desktop app such as
C:\map\sat_images. If you are using the automatic heightmap import via the plugin make this directory
the same as Download Directory</dd>

<dt>Weightmap Panel:</dt>
<dd>These list to colors to match features from the Weightmap style to create your</dd>
<dd>weightmap images. For now don't change and this only works in Mapbox</dd>
<dd>Just copy your user name/map id from Mapbox Studio Share button style url</dd>
<dd>The number on the left bar is your current viewing zoom level:</dd>
<dd>Use this to get an idea of what you will see when you download your satellite image with that zoom level
</dd>
</dl>
</div>

</body>
</html>
1 change: 1 addition & 0 deletions dist/icons/10pin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/icons/9pin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/icons/advertising_column.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/icons/aerialway.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/icons/aerodrome.12.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/icons/airfield.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/icons/airport.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/icons/alcohol.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/icons/alcohol_shop.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/icons/alpinehut.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/icons/american_football.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/icons/amusement_arcade.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/icons/amusement_park.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/icons/apartment.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/icons/aquarium.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/icons/archaeological_site.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions dist/icons/area.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/icons/art.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b7dfa58

Please sign in to comment.