mirror of
https://github.com/louis-e/arnis.git
synced 2026-01-29 16:33:20 -05:00
Compare commits
6 Commits
parallel-p
...
v2.2.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
449fcc18bd | ||
|
|
c69e124eb5 | ||
|
|
7956826c07 | ||
|
|
acbe9adedf | ||
|
|
4ec8f65e6f | ||
|
|
fd2d4b272b |
14
.github/workflows/release.yml
vendored
14
.github/workflows/release.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Rust
|
- name: Set up Rust
|
||||||
uses: dtolnay/rust-toolchain@v1
|
uses: dtolnay/rust-toolchain@v1
|
||||||
@@ -83,7 +83,7 @@ jobs:
|
|||||||
shell: powershell
|
shell: powershell
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.os }}-build
|
name: ${{ matrix.os }}-build
|
||||||
path: target/release/${{ matrix.asset_name }}
|
path: target/release/${{ matrix.asset_name }}
|
||||||
@@ -96,19 +96,19 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Download Windows build artifact
|
- name: Download Windows build artifact
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: windows-latest-build
|
name: windows-latest-build
|
||||||
path: ./builds/windows
|
path: ./builds/windows
|
||||||
|
|
||||||
- name: Download Linux build artifact
|
- name: Download Linux build artifact
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ubuntu-latest-build
|
name: ubuntu-latest-build
|
||||||
path: ./builds/linux
|
path: ./builds/linux
|
||||||
|
|
||||||
- name: Download macOS build artifact
|
- name: Download macOS build artifact
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: macos-latest-build
|
name: macos-latest-build
|
||||||
path: ./builds/macos
|
path: ./builds/macos
|
||||||
@@ -119,11 +119,11 @@ jobs:
|
|||||||
chmod +x ./builds/macos/arnis-mac
|
chmod +x ./builds/macos/arnis-mac
|
||||||
|
|
||||||
- name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
builds/windows/arnis-windows.exe
|
builds/windows/arnis-windows.exe
|
||||||
builds/linux/arnis-linux
|
builds/linux/arnis-linux
|
||||||
builds/macos/arnis-mac
|
builds/macos/arnis-mac
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
|
|||||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -168,7 +168,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "arnis"
|
name = "arnis"
|
||||||
version = "2.2.0"
|
version = "2.2.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
"colored",
|
"colored",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "arnis"
|
name = "arnis"
|
||||||
version = "2.2.0"
|
version = "2.2.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Arnis - Generate real life cities in Minecraft"
|
description = "Arnis - Generate real life cities in Minecraft"
|
||||||
homepage = "https://github.com/louis-e/arnis"
|
homepage = "https://github.com/louis-e/arnis"
|
||||||
|
|||||||
85
gui-src/js/bbox.js
vendored
85
gui-src/js/bbox.js
vendored
@@ -322,7 +322,7 @@ function addLayer(layer, name, title, zIndex, on) {
|
|||||||
}
|
}
|
||||||
link.innerHTML = name;
|
link.innerHTML = name;
|
||||||
link.title = title;
|
link.title = title;
|
||||||
link.onclick = function(e) {
|
link.onclick = function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
|
||||||
@@ -456,13 +456,19 @@ $(document).ready(function () {
|
|||||||
** on top of your DOM
|
** on top of your DOM
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
$('input[type="textarea"]').on('click', function (evt) { this.select() });
|
|
||||||
|
|
||||||
// Have to init the projection input box as it is used to format the initial values
|
// init the projection input box as it is used to format the initial values
|
||||||
|
$('input[type="textarea"]').on('click', function (evt) { this.select() });
|
||||||
$("#projection").val(currentproj);
|
$("#projection").val(currentproj);
|
||||||
|
|
||||||
L.mapbox.accessToken = 'pk.eyJ1IjoiY3Vnb3MiLCJhIjoiY2p4Nm43MzA3MDFmZDQwcGxsMjB4Z3hnNiJ9.SQbnMASwdqZe6G4n6OMvVw';
|
// Initialize map with OpenStreetMap tiles
|
||||||
map = L.mapbox.map('map').setView([50.114768, 8.687322], 4).addLayer(L.mapbox.styleLayer('mapbox://styles/mapbox/streets-v11'));
|
map = L.map('map').setView([50.114768, 8.687322], 4);
|
||||||
|
|
||||||
|
// Add OpenStreetMap tile layer (free to use with attribution)
|
||||||
|
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
|
attribution: '© Map data from <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
|
||||||
|
maxZoom: 19
|
||||||
|
}).addTo(map);
|
||||||
|
|
||||||
rsidebar = L.control.sidebar('rsidebar', {
|
rsidebar = L.control.sidebar('rsidebar', {
|
||||||
position: 'right',
|
position: 'right',
|
||||||
@@ -498,14 +504,25 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
// Initialize the FeatureGroup to store editable layers
|
// Initialize the FeatureGroup to store editable layers
|
||||||
drawnItems = new L.FeatureGroup();
|
drawnItems = new L.FeatureGroup();
|
||||||
map.addLayer(drawnItems);
|
map.addLayer(drawnItems); // Initialize the draw control and pass it the FeatureGroup of editable layers
|
||||||
|
|
||||||
// Initialize the draw control and pass it the FeatureGroup of editable layers
|
|
||||||
drawControl = new L.Control.Draw({
|
drawControl = new L.Control.Draw({
|
||||||
edit: {
|
edit: {
|
||||||
featureGroup: drawnItems
|
featureGroup: drawnItems
|
||||||
},
|
},
|
||||||
draw: {
|
draw: {
|
||||||
|
rectangle: {
|
||||||
|
shapeOptions: {
|
||||||
|
color: '#fe57a1',
|
||||||
|
opacity: 0.6,
|
||||||
|
weight: 3,
|
||||||
|
fillColor: '#fe57a1',
|
||||||
|
fillOpacity: 0.1,
|
||||||
|
dashArray: '10, 10',
|
||||||
|
lineCap: 'round',
|
||||||
|
lineJoin: 'round'
|
||||||
|
},
|
||||||
|
repeatMode: false
|
||||||
|
},
|
||||||
polyline: false,
|
polyline: false,
|
||||||
polygon: false,
|
polygon: false,
|
||||||
circle: false,
|
circle: false,
|
||||||
@@ -513,7 +530,6 @@ $(document).ready(function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
map.addControl(drawControl);
|
map.addControl(drawControl);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
**
|
**
|
||||||
** create bounds layer
|
** create bounds layer
|
||||||
@@ -523,17 +539,22 @@ $(document).ready(function () {
|
|||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
startBounds = new L.LatLngBounds([0.0, 0.0], [0.0, 0.0]);
|
startBounds = new L.LatLngBounds([0.0, 0.0], [0.0, 0.0]);
|
||||||
var bounds = new L.Rectangle(startBounds,
|
var bounds = new L.Rectangle(startBounds, {
|
||||||
{
|
color: '#3778d4',
|
||||||
fill: false,
|
opacity: 1.0,
|
||||||
opacity: 1.0,
|
weight: 3,
|
||||||
color: '#000'
|
fill: '#3778d4',
|
||||||
}
|
lineCap: 'round',
|
||||||
);
|
lineJoin: 'round'
|
||||||
|
});
|
||||||
|
|
||||||
bounds.on('bounds-set', function (e) {
|
bounds.on('bounds-set', function (e) {
|
||||||
// move it to the end of the parent
|
// move it to the end of the parent if renderer exists
|
||||||
var parent = e.target._renderer._container.parentElement;
|
if (e.target._renderer && e.target._renderer._container) {
|
||||||
$(parent).append(e.target._renderer._container);
|
var parent = e.target._renderer._container.parentElement;
|
||||||
|
$(parent).append(e.target._renderer._container);
|
||||||
|
}
|
||||||
|
|
||||||
// Set the hash
|
// Set the hash
|
||||||
var southwest = this.getBounds().getSouthWest();
|
var southwest = this.getBounds().getSouthWest();
|
||||||
var northeast = this.getBounds().getNorthEast();
|
var northeast = this.getBounds().getNorthEast();
|
||||||
@@ -543,8 +564,21 @@ $(document).ready(function () {
|
|||||||
var ymax = northeast.lat.toFixed(6);
|
var ymax = northeast.lat.toFixed(6);
|
||||||
location.hash = ymin + ',' + xmin + ',' + ymax + ',' + xmax;
|
location.hash = ymin + ',' + xmin + ',' + ymax + ',' + xmax;
|
||||||
});
|
});
|
||||||
map.addLayer(bounds)
|
map.addLayer(bounds);
|
||||||
|
|
||||||
map.on('draw:created', function (e) {
|
map.on('draw:created', function (e) {
|
||||||
|
// Check if it's a rectangle and set proper styles before adding it to the layer
|
||||||
|
if (e.layerType === 'rectangle') {
|
||||||
|
e.layer.setStyle({
|
||||||
|
color: '#3778d4',
|
||||||
|
opacity: 1.0,
|
||||||
|
weight: 3,
|
||||||
|
fill: '#3778d4',
|
||||||
|
lineCap: 'round',
|
||||||
|
lineJoin: 'round'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
drawnItems.addLayer(e.layer);
|
drawnItems.addLayer(e.layer);
|
||||||
bounds.setBounds(drawnItems.getBounds())
|
bounds.setBounds(drawnItems.getBounds())
|
||||||
$('#boxbounds').text(formatBounds(bounds.getBounds(), '4326'));
|
$('#boxbounds').text(formatBounds(bounds.getBounds(), '4326'));
|
||||||
@@ -629,7 +663,14 @@ $(document).ready(function () {
|
|||||||
var splitBounds = initialBBox.split(',');
|
var splitBounds = initialBBox.split(',');
|
||||||
startBounds = new L.LatLngBounds([splitBounds[0], splitBounds[1]],
|
startBounds = new L.LatLngBounds([splitBounds[0], splitBounds[1]],
|
||||||
[splitBounds[2], splitBounds[3]]);
|
[splitBounds[2], splitBounds[3]]);
|
||||||
var lyr = new L.Rectangle(startBounds);
|
var lyr = new L.Rectangle(startBounds, {
|
||||||
|
color: '#3778d4',
|
||||||
|
opacity: 1.0,
|
||||||
|
weight: 3,
|
||||||
|
fill: '#3778d4',
|
||||||
|
lineCap: 'round',
|
||||||
|
lineJoin: 'round'
|
||||||
|
});
|
||||||
var evt = {
|
var evt = {
|
||||||
layer: lyr,
|
layer: lyr,
|
||||||
layerType: "polygon",
|
layerType: "polygon",
|
||||||
@@ -654,4 +695,4 @@ $(document).ready(function () {
|
|||||||
function notifyBboxUpdate() {
|
function notifyBboxUpdate() {
|
||||||
const bboxText = document.getElementById('boxbounds').textContent;
|
const bboxText = document.getElementById('boxbounds').textContent;
|
||||||
window.parent.postMessage({ bboxText: bboxText }, '*');
|
window.parent.postMessage({ bboxText: bboxText }, '*');
|
||||||
}
|
}
|
||||||
2
gui-src/js/license.js
vendored
2
gui-src/js/license.js
vendored
@@ -10,7 +10,7 @@ RedAuburn<br>
|
|||||||
daniil2327<br>
|
daniil2327<br>
|
||||||
benjamin051000<br>
|
benjamin051000<br>
|
||||||
|
|
||||||
<p>For a full list of contributors, please refer to the <a href="https://github.com/louis-e/arnis" style="color: inherit;" target="_blank">Github page</a>. Logo made by nxfx21.</p>
|
<p>For a full list of contributors, please refer to the <a href="https://github.com/louis-e/arnis" style="color: inherit;" target="_blank">Github page</a>. Logo made by nxfx21. Map data from <a href="https://www.openstreetmap.org/copyright" style="color: inherit;" target="_blank">OpenStreetMap</a>.</p>
|
||||||
|
|
||||||
<p style="color: #ff7070;"><b>Download Arnis only from the official source:</b> <a href="https://github.com/louis-e/arnis" style="color: inherit;" target="_blank">https://github.com/louis-e/arnis/</a>. Every other website providing a download and claiming to be affiliated with the project is unofficial and may be malicious.</p>
|
<p style="color: #ff7070;"><b>Download Arnis only from the official source:</b> <a href="https://github.com/louis-e/arnis" style="color: inherit;" target="_blank">https://github.com/louis-e/arnis/</a>. Every other website providing a download and claiming to be affiliated with the project is unofficial and may be malicious.</p>
|
||||||
|
|
||||||
|
|||||||
66
gui-src/js/maps/mapbox.v3.2.0.js
vendored
66
gui-src/js/maps/mapbox.v3.2.0.js
vendored
File diff suppressed because one or more lines are too long
2
gui-src/maps.html
vendored
2
gui-src/maps.html
vendored
@@ -7,13 +7,11 @@
|
|||||||
<link rel="stylesheet" href="css/maps/leaflet.css" />
|
<link rel="stylesheet" href="css/maps/leaflet.css" />
|
||||||
<link rel="stylesheet" href="css/maps/leaflet.draw.css" />
|
<link rel="stylesheet" href="css/maps/leaflet.draw.css" />
|
||||||
<link rel="stylesheet" href="css/maps/leaflet.sidebar.css" />
|
<link rel="stylesheet" href="css/maps/leaflet.sidebar.css" />
|
||||||
<link rel="stylesheet" href="css/maps/mapbox.v3.2.0.css" />
|
|
||||||
<link rel="stylesheet" href="css/bbox.css" />
|
<link rel="stylesheet" href="css/bbox.css" />
|
||||||
|
|
||||||
<script src="js/libs/jquery-1.9.1.min.js"></script>
|
<script src="js/libs/jquery-1.9.1.min.js"></script>
|
||||||
<script src="js/libs/jquery-ui-1.10.3.custom.js"></script>
|
<script src="js/libs/jquery-ui-1.10.3.custom.js"></script>
|
||||||
<script src="js/maps/leaflet.js"></script>
|
<script src="js/maps/leaflet.js"></script>
|
||||||
<script src="js/maps/mapbox.v3.2.0.js"></script>
|
|
||||||
<script src="js/maps/leaflet.draw.js"></script>
|
<script src="js/maps/leaflet.draw.js"></script>
|
||||||
<script src="js/maps/leaflet.sidebar.js"></script>
|
<script src="js/maps/leaflet.sidebar.js"></script>
|
||||||
<script src="js/maps/wkt.parser.js"></script>
|
<script src="js/maps/wkt.parser.js"></script>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const MAX_Y: i32 = 256;
|
|||||||
const BASE_HEIGHT_SCALE: f64 = 0.6;
|
const BASE_HEIGHT_SCALE: f64 = 0.6;
|
||||||
/// Mapbox API access token for terrain data
|
/// Mapbox API access token for terrain data
|
||||||
const MAPBOX_PUBKEY: &str =
|
const MAPBOX_PUBKEY: &str =
|
||||||
"pk.eyJ1IjoiY3Vnb3MiLCJhIjoiY2p4Nm43MzA3MDFmZDQwcGxsMjB4Z3hnNiJ9.SQbnMASwdqZe6G4n6OMvVw";
|
"pk.eyJ1IjoibG91aXMtZSIsImEiOiJjbWF0cWlycjEwYWNvMmtxeHFwdDQ5NnJoIn0.6A0AKg0iucvoGhYuCkeOjA";
|
||||||
/// Minimum zoom level for terrain tiles
|
/// Minimum zoom level for terrain tiles
|
||||||
const MIN_ZOOM: u8 = 10;
|
const MIN_ZOOM: u8 = 10;
|
||||||
/// Maximum zoom level for terrain tiles
|
/// Maximum zoom level for terrain tiles
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://schema.tauri.app/config/2",
|
"$schema": "https://schema.tauri.app/config/2",
|
||||||
"productName": "Arnis",
|
"productName": "Arnis",
|
||||||
"version": "2.2.0",
|
"version": "2.2.1",
|
||||||
"identifier": "com.louisdev.arnis",
|
"identifier": "com.louisdev.arnis",
|
||||||
"build": {
|
"build": {
|
||||||
"frontendDist": "gui-src"
|
"frontendDist": "gui-src"
|
||||||
|
|||||||
Reference in New Issue
Block a user