refactor: move assets

This commit is contained in:
Azgaar 2022-07-06 01:33:01 +03:00
parent 95baf27d58
commit da1cb4ff9b
230 changed files with 16 additions and 18 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

View file

@ -284,7 +284,7 @@
"fill": "#c99f64"
},
"#oceanicPattern": {
"href": "./images/kiwiroo.png",
"href": "./images/oceanPatterns/kiwiroo.png",
"opacity": 0.4
},
"#terrs": {

View file

@ -280,7 +280,7 @@
"fill": "#466eab"
},
"#oceanicPattern": {
"href": "./images/pattern1.png",
"href": "./images/oceanPatterns/pattern1.png",
"opacity": 0.2
},
"#terrs": {

View file

@ -286,7 +286,7 @@
"fill": "#4e6964"
},
"#oceanicPattern": {
"href": "./images/pattern3.png",
"href": "./images/oceanPatterns/pattern3.png",
"opacity": 0.2
},
"#terrs": {

View file

@ -280,7 +280,7 @@
"fill": "#8dc1c8"
},
"#oceanicPattern": {
"href": "./images/pattern1.png",
"href": "./images/oceanPatterns/pattern1.png",
"opacity": 0.2
},
"#terrs": {

View file

@ -280,7 +280,7 @@
"fill": "#2d788b"
},
"#oceanicPattern": {
"href": "./images/kiwiroo.png",
"href": "./images/oceanPatterns/kiwiroo.png",
"opacity": 0.5
},
"#terrs": {

View file

@ -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");

View file

@ -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);