mirror of
https://github.com/louis-e/arnis.git
synced 2025-12-24 06:48:00 -05:00
Compare commits
6 Commits
| 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:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Rust
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
@@ -83,7 +83,7 @@ jobs:
|
||||
shell: powershell
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.os }}-build
|
||||
path: target/release/${{ matrix.asset_name }}
|
||||
@@ -96,19 +96,19 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Download Windows build artifact
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: windows-latest-build
|
||||
path: ./builds/windows
|
||||
|
||||
- name: Download Linux build artifact
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ubuntu-latest-build
|
||||
path: ./builds/linux
|
||||
|
||||
- name: Download macOS build artifact
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: macos-latest-build
|
||||
path: ./builds/macos
|
||||
@@ -119,11 +119,11 @@ jobs:
|
||||
chmod +x ./builds/macos/arnis-mac
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
builds/windows/arnis-windows.exe
|
||||
builds/linux/arnis-linux
|
||||
builds/macos/arnis-mac
|
||||
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]]
|
||||
name = "arnis"
|
||||
version = "2.2.0"
|
||||
version = "2.2.1"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"colored",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "arnis"
|
||||
version = "2.2.0"
|
||||
version = "2.2.1"
|
||||
edition = "2021"
|
||||
description = "Arnis - Generate real life cities in Minecraft"
|
||||
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.title = title;
|
||||
link.onclick = function(e) {
|
||||
link.onclick = function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
@@ -456,13 +456,19 @@ $(document).ready(function () {
|
||||
** 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);
|
||||
|
||||
L.mapbox.accessToken = 'pk.eyJ1IjoiY3Vnb3MiLCJhIjoiY2p4Nm43MzA3MDFmZDQwcGxsMjB4Z3hnNiJ9.SQbnMASwdqZe6G4n6OMvVw';
|
||||
map = L.mapbox.map('map').setView([50.114768, 8.687322], 4).addLayer(L.mapbox.styleLayer('mapbox://styles/mapbox/streets-v11'));
|
||||
// Initialize map with OpenStreetMap tiles
|
||||
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', {
|
||||
position: 'right',
|
||||
@@ -498,14 +504,25 @@ $(document).ready(function () {
|
||||
|
||||
// Initialize the FeatureGroup to store editable layers
|
||||
drawnItems = new L.FeatureGroup();
|
||||
map.addLayer(drawnItems);
|
||||
|
||||
// Initialize the draw control and pass it the FeatureGroup of editable layers
|
||||
map.addLayer(drawnItems); // Initialize the draw control and pass it the FeatureGroup of editable layers
|
||||
drawControl = new L.Control.Draw({
|
||||
edit: {
|
||||
featureGroup: drawnItems
|
||||
},
|
||||
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,
|
||||
polygon: false,
|
||||
circle: false,
|
||||
@@ -513,7 +530,6 @@ $(document).ready(function () {
|
||||
}
|
||||
});
|
||||
map.addControl(drawControl);
|
||||
|
||||
/*
|
||||
**
|
||||
** create bounds layer
|
||||
@@ -523,17 +539,22 @@ $(document).ready(function () {
|
||||
**
|
||||
*/
|
||||
startBounds = new L.LatLngBounds([0.0, 0.0], [0.0, 0.0]);
|
||||
var bounds = new L.Rectangle(startBounds,
|
||||
{
|
||||
fill: false,
|
||||
opacity: 1.0,
|
||||
color: '#000'
|
||||
}
|
||||
);
|
||||
var bounds = new L.Rectangle(startBounds, {
|
||||
color: '#3778d4',
|
||||
opacity: 1.0,
|
||||
weight: 3,
|
||||
fill: '#3778d4',
|
||||
lineCap: 'round',
|
||||
lineJoin: 'round'
|
||||
});
|
||||
|
||||
bounds.on('bounds-set', function (e) {
|
||||
// move it to the end of the parent
|
||||
var parent = e.target._renderer._container.parentElement;
|
||||
$(parent).append(e.target._renderer._container);
|
||||
// move it to the end of the parent if renderer exists
|
||||
if (e.target._renderer && e.target._renderer._container) {
|
||||
var parent = e.target._renderer._container.parentElement;
|
||||
$(parent).append(e.target._renderer._container);
|
||||
}
|
||||
|
||||
// Set the hash
|
||||
var southwest = this.getBounds().getSouthWest();
|
||||
var northeast = this.getBounds().getNorthEast();
|
||||
@@ -543,8 +564,21 @@ $(document).ready(function () {
|
||||
var ymax = northeast.lat.toFixed(6);
|
||||
location.hash = ymin + ',' + xmin + ',' + ymax + ',' + xmax;
|
||||
});
|
||||
map.addLayer(bounds)
|
||||
map.addLayer(bounds);
|
||||
|
||||
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);
|
||||
bounds.setBounds(drawnItems.getBounds())
|
||||
$('#boxbounds').text(formatBounds(bounds.getBounds(), '4326'));
|
||||
@@ -629,7 +663,14 @@ $(document).ready(function () {
|
||||
var splitBounds = initialBBox.split(',');
|
||||
startBounds = new L.LatLngBounds([splitBounds[0], splitBounds[1]],
|
||||
[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 = {
|
||||
layer: lyr,
|
||||
layerType: "polygon",
|
||||
@@ -654,4 +695,4 @@ $(document).ready(function () {
|
||||
function notifyBboxUpdate() {
|
||||
const bboxText = document.getElementById('boxbounds').textContent;
|
||||
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>
|
||||
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>
|
||||
|
||||
|
||||
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.draw.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" />
|
||||
|
||||
<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/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.sidebar.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;
|
||||
/// Mapbox API access token for terrain data
|
||||
const MAPBOX_PUBKEY: &str =
|
||||
"pk.eyJ1IjoiY3Vnb3MiLCJhIjoiY2p4Nm43MzA3MDFmZDQwcGxsMjB4Z3hnNiJ9.SQbnMASwdqZe6G4n6OMvVw";
|
||||
"pk.eyJ1IjoibG91aXMtZSIsImEiOiJjbWF0cWlycjEwYWNvMmtxeHFwdDQ5NnJoIn0.6A0AKg0iucvoGhYuCkeOjA";
|
||||
/// Minimum zoom level for terrain tiles
|
||||
const MIN_ZOOM: u8 = 10;
|
||||
/// Maximum zoom level for terrain tiles
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "Arnis",
|
||||
"version": "2.2.0",
|
||||
"version": "2.2.1",
|
||||
"identifier": "com.louisdev.arnis",
|
||||
"build": {
|
||||
"frontendDist": "gui-src"
|
||||
|
||||
Reference in New Issue
Block a user