refactor: move assets
BIN
src/assets/heightmaps/africa-centric.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
src/assets/heightmaps/arabia.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
src/assets/heightmaps/atlantics.png
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
src/assets/heightmaps/britain.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
src/assets/heightmaps/caribbean.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
src/assets/heightmaps/east-asia.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
src/assets/heightmaps/eurasia.png
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
src/assets/heightmaps/europe-accented.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
src/assets/heightmaps/europe-and-central-asia.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
src/assets/heightmaps/europe-central.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
src/assets/heightmaps/europe-north.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
src/assets/heightmaps/europe.png
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
src/assets/heightmaps/greenland.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
src/assets/heightmaps/hellenica.png
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
src/assets/heightmaps/iceland.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
8
src/assets/heightmaps/import-rules.txt
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
To get heightmap with correct height scale:
|
||||
1. Open tangrams.github.io
|
||||
2. Toggle off auto-exposure
|
||||
3. Set max elevation to 2000
|
||||
4. Set min elevation to -500
|
||||
5. Find region you like
|
||||
6. Render image
|
||||
7. Optionally rescale image to a smaller size (e.g. 500x300px) as high resolution is not used
|
||||
BIN
src/assets/heightmaps/indian-ocean.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
src/assets/heightmaps/mediterranean-sea.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
src/assets/heightmaps/middle-east.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
src/assets/heightmaps/north-america.png
Normal file
|
After Width: | Height: | Size: 47 KiB |
BIN
src/assets/heightmaps/us-centric.png
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
src/assets/heightmaps/us-mainland.png
Normal file
|
After Width: | Height: | Size: 43 KiB |
BIN
src/assets/heightmaps/world-from-pacific.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
src/assets/heightmaps/world.png
Normal file
|
After Width: | Height: | Size: 57 KiB |
|
|
@ -284,7 +284,7 @@
|
|||
"fill": "#c99f64"
|
||||
},
|
||||
"#oceanicPattern": {
|
||||
"href": "./images/kiwiroo.png",
|
||||
"href": "./images/oceanPatterns/kiwiroo.png",
|
||||
"opacity": 0.4
|
||||
},
|
||||
"#terrs": {
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@
|
|||
"fill": "#466eab"
|
||||
},
|
||||
"#oceanicPattern": {
|
||||
"href": "./images/pattern1.png",
|
||||
"href": "./images/oceanPatterns/pattern1.png",
|
||||
"opacity": 0.2
|
||||
},
|
||||
"#terrs": {
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@
|
|||
"fill": "#4e6964"
|
||||
},
|
||||
"#oceanicPattern": {
|
||||
"href": "./images/pattern3.png",
|
||||
"href": "./images/oceanPatterns/pattern3.png",
|
||||
"opacity": 0.2
|
||||
},
|
||||
"#terrs": {
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@
|
|||
"fill": "#8dc1c8"
|
||||
},
|
||||
"#oceanicPattern": {
|
||||
"href": "./images/pattern1.png",
|
||||
"href": "./images/oceanPatterns/pattern1.png",
|
||||
"opacity": 0.2
|
||||
},
|
||||
"#terrs": {
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@
|
|||
"fill": "#2d788b"
|
||||
},
|
||||
"#oceanicPattern": {
|
||||
"href": "./images/kiwiroo.png",
|
||||
"href": "./images/oceanPatterns/kiwiroo.png",
|
||||
"opacity": 0.5
|
||||
},
|
||||
"#terrs": {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
"use strict";
|
||||
import {ERROR} from "config/logging";
|
||||
|
||||
window.COArenderer = (function () {
|
||||
const colors = {
|
||||
|
|
@ -1945,9 +1945,8 @@ window.COArenderer = (function () {
|
|||
return fetchedCharges.join("");
|
||||
}
|
||||
|
||||
const url = location.hostname ? "./charges/" : "http://armoria.herokuapp.com/charges/"; // on local machine fetch files from server
|
||||
async function fetchCharge(charge, id) {
|
||||
const fetched = fetch(url + charge + ".svg")
|
||||
const fetched = fetch(`./images/charges/${charge}.svg`)
|
||||
.then(res => {
|
||||
if (res.ok) return res.text();
|
||||
else throw new Error("Cannot fetch charge");
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ window.HeightmapGenerator = (function () {
|
|||
|
||||
// load heightmap into image and render to canvas
|
||||
const img = new Image();
|
||||
img.src = `./heightmaps/${id}.png`;
|
||||
img.src = `../assets/heightmaps/${id}.png`;
|
||||
img.onload = () => {
|
||||
ctx.drawImage(img, 0, 0, cellsX, cellsY);
|
||||
const imageData = ctx.getImageData(0, 0, cellsX, cellsY);
|
||||
|
|
|
|||