Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
449fcc18bd | ||
|
|
c69e124eb5 | ||
|
|
7956826c07 | ||
|
|
acbe9adedf | ||
|
|
4ec8f65e6f | ||
|
|
fd2d4b272b |
2
.gitattributes
vendored
@@ -1 +1 @@
|
||||
src/gui/** linguist-vendored
|
||||
gui-src/** linguist-vendored
|
||||
|
||||
6
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -11,13 +11,13 @@ assignees: ''
|
||||
A clear and concise description of what the bug is and what you expected to happen.
|
||||
|
||||
**Used bbox area**
|
||||
Please provide your input parameters (BBOX) so we can reproduce the issue. *(For example: 48.133444 11.569462 48.142609 11.584740)*
|
||||
Please provide your input parameters so we can reproduce the issue. *(For example: 48.133444 11.569462 48.142609 11.584740)*
|
||||
|
||||
**Arnis and Minecraft version**
|
||||
Please tell us what version of Arnis and Minecraft you used, as well as if you are on Windows, Linux or MacOS.
|
||||
Please tell us what version of Arnis and Minecraft you used.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here. If you used any more custom settings, please provide them here too. Please provide the log file if possible as well, which can be found at C:\Users\USERNAME\AppData\Local\com.louisdev.arnis\logs
|
||||
Add any other context about the problem here. If you used any more custom settings, please provide them here too. If you experienced any issue with the application itself like a crash, please provide the log file which can be found at C:\Users\USERNAME\AppData\Local\com.louisdev.arnis\logs
|
||||
|
||||
56
.github/workflows/ci-build.yml
vendored
@@ -1,32 +1,35 @@
|
||||
name: CI Build
|
||||
|
||||
# Trigger CI on pull requests when relevant files change, and pushes to main
|
||||
# Trigger on pull request creation, update, and on pushes to the main branch
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/**'
|
||||
- 'src/**'
|
||||
- 'Cargo.toml'
|
||||
- 'Cargo.lock'
|
||||
branches:
|
||||
- main
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Rust
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
components: clippy, rustfmt
|
||||
targets: ${{ matrix.os == 'windows-latest' && 'x86_64-pc-windows-msvc' || 'x86_64-unknown-linux-gnu' || 'x86_64-apple-darwin' }}
|
||||
components: clippy
|
||||
|
||||
- name: Install Linux dependencies
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y software-properties-common
|
||||
@@ -36,39 +39,14 @@ jobs:
|
||||
sudo apt install -y libgtk-3-dev build-essential pkg-config libglib2.0-dev libsoup-3.0-dev libwebkit2gtk-4.1-dev
|
||||
echo "PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig" >> $GITHUB_ENV
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Check formatting
|
||||
run: cargo fmt -- --check
|
||||
|
||||
- name: Check clippy lints
|
||||
run: cargo clippy --all-targets --all-features -- -D warnings
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
- name: Install Rust dependencies
|
||||
run: cargo fetch
|
||||
|
||||
- name: Set up Rust
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
- name: Install Linux dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y software-properties-common
|
||||
sudo add-apt-repository universe
|
||||
echo "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc)-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
|
||||
sudo apt update
|
||||
sudo apt install -y libgtk-3-dev build-essential pkg-config libglib2.0-dev libsoup-3.0-dev libwebkit2gtk-4.1-dev
|
||||
echo "PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig" >> $GITHUB_ENV
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Build (all targets, all features)
|
||||
run: cargo build --all-targets --all-features --release
|
||||
|
||||
- name: Run unit tests
|
||||
run: cargo test --all-targets --all-features
|
||||
- name: Build
|
||||
run: cargo build --release
|
||||
|
||||
115
.github/workflows/pr-benchmark.yml
vendored
@@ -1,115 +0,0 @@
|
||||
name: PR Benchmark
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened]
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
benchmark:
|
||||
if: |
|
||||
github.event_name == 'pull_request' ||
|
||||
(github.event_name == 'issue_comment' &&
|
||||
github.event.issue.pull_request != null &&
|
||||
contains(github.event.comment.body, 'retrigger-benchmark'))
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Set up Rust
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Create dummy Minecraft world directory
|
||||
run: |
|
||||
mkdir -p "./world/region"
|
||||
|
||||
- name: Build for release
|
||||
run: cargo build --release --no-default-features
|
||||
|
||||
- name: Start timer
|
||||
id: start_time
|
||||
run: echo "start_time=$(date +%s)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Run benchmark command with memory tracking
|
||||
id: benchmark
|
||||
run: |
|
||||
/usr/bin/time -v ./target/release/arnis --path="./world" --terrain --bbox="48.125768 11.552296 48.148565 11.593838" 2> benchmark_log.txt
|
||||
grep "Maximum resident set size" benchmark_log.txt | awk '{print $6}' > peak_mem_kb.txt
|
||||
peak_kb=$(cat peak_mem_kb.txt)
|
||||
peak_mb=$((peak_kb / 1024))
|
||||
echo "peak_memory=${peak_mb}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: End timer and calculate duration
|
||||
id: end_time
|
||||
run: |
|
||||
end_time=$(date +%s)
|
||||
start_time=${{ steps.start_time.outputs.start_time }}
|
||||
duration=$((end_time - start_time))
|
||||
echo "duration=$duration" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Format duration and generate summary
|
||||
id: comment_body
|
||||
run: |
|
||||
duration=${{ steps.end_time.outputs.duration }}
|
||||
minutes=$((duration / 60))
|
||||
seconds=$((duration % 60))
|
||||
peak_mem=${{ steps.benchmark.outputs.peak_memory }}
|
||||
|
||||
baseline_time=30
|
||||
diff=$((duration - baseline_time))
|
||||
abs_diff=${diff#-}
|
||||
|
||||
if [ "$diff" -lt -5 ]; then
|
||||
verdict="✅ This PR **improves generation time**."
|
||||
elif [ "$abs_diff" -le 4 ]; then
|
||||
verdict="🟢 Generation time is unchanged."
|
||||
elif [ "$diff" -le 15 ]; then
|
||||
verdict="⚠️ This PR **worsens generation time**."
|
||||
else
|
||||
verdict="🚨 This PR **drastically worsens generation time**."
|
||||
fi
|
||||
|
||||
baseline_mem=935
|
||||
mem_annotation=""
|
||||
if [ "$peak_mem" -gt 2000 ]; then
|
||||
mem_diff=$((peak_mem - baseline_mem))
|
||||
mem_percent=$((mem_diff * 100 / baseline_mem))
|
||||
mem_annotation=" (↗ ${mem_percent}% more)"
|
||||
fi
|
||||
|
||||
benchmark_time=$(date -u "+%Y-%m-%d %H:%M:%S UTC")
|
||||
|
||||
{
|
||||
echo "summary<<EOF"
|
||||
echo "⏱️ Benchmark run finished in **${minutes}m ${seconds}s**"
|
||||
echo "🧠 Peak memory usage: **${peak_mem} MB**${mem_annotation}"
|
||||
echo ""
|
||||
echo "📈 Compared against baseline: **${baseline_time}s**"
|
||||
echo "🧮 Delta: **${diff}s**"
|
||||
echo "🔢 Commit: [\`${GITHUB_SHA:0:7}\`](https://github.com/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA})"
|
||||
echo ""
|
||||
echo "${verdict}"
|
||||
echo ""
|
||||
echo "📅 **Last benchmark:** ${benchmark_time}"
|
||||
echo ""
|
||||
echo "_You can retrigger the benchmark by commenting \`retrigger-benchmark\`._"
|
||||
echo "EOF"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Comment build time on PR
|
||||
uses: thollander/actions-comment-pull-request@v3
|
||||
with:
|
||||
message: ${{ steps.comment_body.outputs.summary }}
|
||||
comment-tag: benchmark-report
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.BENCHMARK_TOKEN }}
|
||||
67
.github/workflows/release.yml
vendored
@@ -17,20 +17,16 @@ jobs:
|
||||
target: x86_64-unknown-linux-gnu
|
||||
binary_name: arnis
|
||||
asset_name: arnis-linux
|
||||
- os: macos-13 # Intel runner for x86_64 builds
|
||||
- os: macos-latest
|
||||
target: x86_64-apple-darwin
|
||||
binary_name: arnis
|
||||
asset_name: arnis-mac-intel
|
||||
- os: macos-latest # ARM64 runner for ARM64 builds
|
||||
target: aarch64-apple-darwin
|
||||
binary_name: arnis
|
||||
asset_name: arnis-mac-arm64
|
||||
asset_name: arnis-mac
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Rust
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
@@ -53,10 +49,10 @@ jobs:
|
||||
run: cargo fetch
|
||||
|
||||
- name: Build
|
||||
run: cargo build --release --target ${{ matrix.target }}
|
||||
run: cargo build --release
|
||||
|
||||
- name: Rename binary for release
|
||||
run: mv target/${{ matrix.target }}/release/${{ matrix.binary_name }} target/release/${{ matrix.asset_name }}
|
||||
run: mv target/release/${{ matrix.binary_name }} target/release/${{ matrix.asset_name }}
|
||||
|
||||
- name: Install Windows SDK
|
||||
if: matrix.os == 'windows-latest'
|
||||
@@ -89,65 +85,38 @@ jobs:
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.os }}-${{ matrix.target }}-build
|
||||
name: ${{ matrix.os }}-build
|
||||
path: target/release/${{ matrix.asset_name }}
|
||||
|
||||
create-universal-macos:
|
||||
needs: build
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Download macOS Intel build
|
||||
uses: actions/download-artifact@v5
|
||||
with:
|
||||
name: macos-13-x86_64-apple-darwin-build
|
||||
path: ./intel
|
||||
|
||||
- name: Download macOS ARM64 build
|
||||
uses: actions/download-artifact@v5
|
||||
with:
|
||||
name: macos-latest-aarch64-apple-darwin-build
|
||||
path: ./arm64
|
||||
|
||||
- name: Create universal binary
|
||||
run: |
|
||||
lipo -create -output arnis-mac-universal ./intel/arnis-mac-intel ./arm64/arnis-mac-arm64
|
||||
chmod +x arnis-mac-universal
|
||||
|
||||
- name: Upload universal binary
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: macos-universal-build
|
||||
path: arnis-mac-universal
|
||||
|
||||
release:
|
||||
needs: [build, create-universal-macos]
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Download Windows build artifact
|
||||
uses: actions/download-artifact@v5
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: windows-latest-x86_64-pc-windows-msvc-build
|
||||
name: windows-latest-build
|
||||
path: ./builds/windows
|
||||
|
||||
- name: Download Linux build artifact
|
||||
uses: actions/download-artifact@v5
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ubuntu-latest-x86_64-unknown-linux-gnu-build
|
||||
name: ubuntu-latest-build
|
||||
path: ./builds/linux
|
||||
|
||||
- name: Download macOS universal build artifact
|
||||
uses: actions/download-artifact@v5
|
||||
- name: Download macOS build artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: macos-universal-build
|
||||
name: macos-latest-build
|
||||
path: ./builds/macos
|
||||
|
||||
- name: Make Linux and macOS binaries executable
|
||||
run: |
|
||||
chmod +x ./builds/linux/arnis-linux
|
||||
chmod +x ./builds/macos/arnis-mac-universal
|
||||
chmod +x ./builds/macos/arnis-mac
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
@@ -155,6 +124,6 @@ jobs:
|
||||
files: |
|
||||
builds/windows/arnis-windows.exe
|
||||
builds/linux/arnis-linux
|
||||
builds/macos/arnis-mac-universal
|
||||
builds/macos/arnis-mac
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
|
||||
100
.github/workflows/test-macos-build.yml.disabled
vendored
@@ -1,100 +0,0 @@
|
||||
name: Test macOS Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
paths:
|
||||
- '.github/workflows/release.yml'
|
||||
- 'src/**'
|
||||
- 'Cargo.toml'
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
workflow_dispatch: # Allow manual triggering
|
||||
|
||||
jobs:
|
||||
test-macos-builds:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- target: x86_64-apple-darwin
|
||||
asset_name: arnis-mac-intel
|
||||
- target: aarch64-apple-darwin
|
||||
asset_name: arnis-mac-arm64
|
||||
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Rust
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
targets: ${{ matrix.target }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: cargo fetch
|
||||
|
||||
- name: Build for ${{ matrix.target }}
|
||||
run: cargo build --release --target ${{ matrix.target }}
|
||||
|
||||
- name: Rename binary
|
||||
run: mv target/${{ matrix.target }}/release/arnis target/${{ matrix.target }}/release/${{ matrix.asset_name }}
|
||||
|
||||
- name: Check binary architecture
|
||||
run: |
|
||||
file target/${{ matrix.target }}/release/${{ matrix.asset_name }}
|
||||
lipo -info target/${{ matrix.target }}/release/${{ matrix.asset_name }}
|
||||
|
||||
- name: Test binary execution (basic check)
|
||||
run: |
|
||||
chmod +x target/${{ matrix.target }}/release/${{ matrix.asset_name }}
|
||||
# Test that it at least shows help/version (don't run full generation)
|
||||
target/${{ matrix.target }}/release/${{ matrix.asset_name }} --help || echo "Help command completed"
|
||||
|
||||
- name: Upload test artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: test-${{ matrix.target }}-build
|
||||
path: target/${{ matrix.target }}/release/${{ matrix.asset_name }}
|
||||
|
||||
test-universal-binary:
|
||||
needs: test-macos-builds
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Download Intel build
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: test-x86_64-apple-darwin-build
|
||||
path: ./intel
|
||||
|
||||
- name: Download ARM64 build
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: test-aarch64-apple-darwin-build
|
||||
path: ./arm64
|
||||
|
||||
- name: Create and test universal binary
|
||||
run: |
|
||||
lipo -create -output arnis-mac-universal ./intel/arnis-mac-intel ./arm64/arnis-mac-arm64
|
||||
chmod +x arnis-mac-universal
|
||||
|
||||
# Verify it's actually universal
|
||||
echo "=== Universal Binary Info ==="
|
||||
file arnis-mac-universal
|
||||
lipo -info arnis-mac-universal
|
||||
|
||||
# Test execution
|
||||
echo "=== Testing Universal Binary ==="
|
||||
./arnis-mac-universal --help || echo "Universal binary help command completed"
|
||||
|
||||
# Check file size (should be sum of both architectures roughly)
|
||||
echo "=== File Sizes ==="
|
||||
ls -lah ./intel/arnis-mac-intel ./arm64/arnis-mac-arm64 arnis-mac-universal
|
||||
|
||||
- name: Upload universal binary
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: test-universal-build
|
||||
path: arnis-mac-universal
|
||||
6
.gitignore
vendored
@@ -1,8 +1,6 @@
|
||||
/wiki
|
||||
*.mcworld
|
||||
|
||||
# Environment files
|
||||
.env
|
||||
.envrc
|
||||
/.direnv
|
||||
|
||||
# Build artifacts
|
||||
@@ -30,8 +28,6 @@ Thumbs.db
|
||||
/export.json
|
||||
/parsed_osm_data.txt
|
||||
/elevation_debug.png
|
||||
/terrain-tile-cache
|
||||
/arnis-tile-cache
|
||||
/gen/
|
||||
/build/
|
||||
*.rmeta
|
||||
|
||||
2029
Cargo.lock
generated
52
Cargo.toml
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "arnis"
|
||||
version = "2.4.0"
|
||||
version = "2.2.1"
|
||||
edition = "2021"
|
||||
description = "Arnis - Generate real life cities in Minecraft"
|
||||
homepage = "https://github.com/louis-e/arnis"
|
||||
@@ -10,52 +10,40 @@ readme = "README.md"
|
||||
|
||||
[profile.release]
|
||||
lto = "thin"
|
||||
overflow-checks = true
|
||||
|
||||
[features]
|
||||
default = ["gui"]
|
||||
gui = ["tauri", "tauri-plugin-log", "tauri-plugin-shell", "tokio", "rfd", "dirs", "tauri-build", "bedrock"]
|
||||
bedrock = ["bedrockrs_level", "bedrockrs_shared", "nbtx", "zip", "byteorder", "vek"]
|
||||
gui = ["dep:tauri", "dep:tauri-plugin-log", "dep:tauri-plugin-shell"]
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = {version = "2", optional = true}
|
||||
tauri-build = "2"
|
||||
|
||||
[dependencies]
|
||||
base64 = "0.22.1"
|
||||
byteorder = { version = "1.5", optional = true }
|
||||
clap = { version = "4.5", features = ["derive", "env"] }
|
||||
colored = "3.0.0"
|
||||
dirs = {version = "6.0.0", optional = true }
|
||||
fastanvil = "0.32.0"
|
||||
fastnbt = "2.6.0"
|
||||
flate2 = "1.1"
|
||||
clap = { version = "4.1", features = ["derive"] }
|
||||
colored = "2.1.0"
|
||||
dirs = "5.0.1"
|
||||
fastanvil = "0.31.0"
|
||||
fastnbt = "2.5.0"
|
||||
flate2 = "1.0"
|
||||
fnv = "1.0.7"
|
||||
fs2 = "0.4"
|
||||
geo = "0.31.0"
|
||||
image = "0.25"
|
||||
indicatif = "0.17.11"
|
||||
geo = "0.29.3"
|
||||
image = "0.24"
|
||||
indicatif = "0.17.8"
|
||||
itertools = "0.14.0"
|
||||
log = "0.4.27"
|
||||
once_cell = "1.21.3"
|
||||
log = "0.4.22"
|
||||
once_cell = "1.19.0"
|
||||
rand = "0.8.5"
|
||||
rayon = "1.10.0"
|
||||
reqwest = { version = "0.12.15", features = ["blocking", "json"] }
|
||||
rfd = { version = "0.15.4", optional = true }
|
||||
semver = "1.0.27"
|
||||
reqwest = { version = "0.12.7", features = ["blocking", "json"] }
|
||||
rfd = "0.15.1"
|
||||
semver = "1.0.23"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
tauri = { version = "2", optional = true }
|
||||
tauri-plugin-log = { version = "2.6.0", optional = true }
|
||||
tauri-plugin-log = { version = "2.2.0", optional = true }
|
||||
tauri-plugin-shell = { version = "2", optional = true }
|
||||
tokio = { version = "1.48.0", features = ["full"], optional = true }
|
||||
bedrockrs_level = { git = "https://github.com/bedrock-crustaceans/bedrock-rs", package = "bedrockrs_level", optional = true }
|
||||
bedrockrs_shared = { git = "https://github.com/bedrock-crustaceans/bedrock-rs", package = "bedrockrs_shared", optional = true }
|
||||
nbtx = { git = "https://github.com/bedrock-crustaceans/nbtx", optional = true }
|
||||
vek = { version = "0.17", optional = true }
|
||||
zip = { version = "0.6", default-features = false, features = ["deflate"], optional = true }
|
||||
tokio = { version = "1.42.0", features = ["full"] }
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
windows = { version = "0.61.1", features = ["Win32_System_Console"] }
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = "3.23.0"
|
||||
windows = { version = "0.59.0", features = ["Win32_System_Console"] }
|
||||
|
||||
121
README.md
@@ -1,41 +1,110 @@
|
||||
<img src="assets/git/banner.png" width="100%" alt="Banner">
|
||||
<p align="center">
|
||||
<img width="456" height="125" src="https://github.com/louis-e/arnis/blob/main/gui-src/images/logo.png?raw=true">
|
||||
</p>
|
||||
|
||||
# Arnis [](https://github.com/louis-e/arnis/actions) [<img alt="GitHub Release" src="https://img.shields.io/github/v/release/louis-e/arnis" />](https://github.com/louis-e/arnis/releases) [<img alt="GitHub Downloads (all assets, all releases" src="https://img.shields.io/github/downloads/louis-e/arnis/total" />](https://github.com/louis-e/arnis/releases) [](https://github.com/louis-e/arnis/releases) [](https://discord.gg/mA2g69Fhxq)
|
||||
# Arnis [](https://github.com/louis-e/arnis/actions) [<img alt="GitHub Release" src="https://img.shields.io/github/v/release/louis-e/arnis" />](https://github.com/louis-e/arnis/releases) [<img alt="GitHub Downloads (all assets, all releases" src="https://img.shields.io/github/downloads/louis-e/arnis/total" />](https://github.com/louis-e/arnis/releases)
|
||||
|
||||
Arnis creates complex and accurate Minecraft Java Edition (1.17+) and Bedrock Edition worlds that reflect real-world geography, topography, and architecture.
|
||||
This open source project written in Rust generates any chosen location from the real world in Minecraft Java Edition with a high level of detail.
|
||||
|
||||
This free and open source project is designed to handle large-scale geographic data from the real world and generate detailed Minecraft worlds. The algorithm processes geospatial data from OpenStreetMap as well as elevation data to create an accurate Minecraft representation of terrain and architecture.
|
||||
Generate your hometown, big cities, and natural landscapes with ease!
|
||||
###### ⚠️ This Github page is the official project website. Do not download Arnis from any other website.
|
||||
|
||||

|
||||
<i>This Github page and [arnismc.com](https://arnismc.com) are the only official project websites. Do not download Arnis from any other website.</i>
|
||||
## :desktop_computer: Example
|
||||

|
||||
|
||||
By leveraging geospatial data from OpenStreetMap and utilizing the powerful capabilities of Rust, Arnis provides an efficient and robust solution for creating complex and accurate Minecraft worlds that reflect real-world geography and architecture.
|
||||
|
||||
Arnis is designed to handle large-scale data and generate rich, immersive environments that bring real-world cities, landmarks, and natural features into the Minecraft universe. Whether you're looking to replicate your hometown, explore urban environments, or simply build something unique and realistic, Arnis generates your vision.
|
||||
|
||||
## :keyboard: Usage
|
||||
<img width="60%" src="assets/git/gui.png"><br>
|
||||
<img width="60%" src="https://github.com/louis-e/arnis/blob/main/gitassets/gui.png?raw=true"><br>
|
||||
Download the [latest release](https://github.com/louis-e/arnis/releases/) or [compile](#trophy-open-source) the project on your own.
|
||||
|
||||
Choose your area in Arnis using the rectangle tool and select your Minecraft world - then simply click on 'Start Generation'!
|
||||
The world will always be generated starting from the Minecraft coordinates 0 0 0 (/tp 0 0 0). This is the top left of your selected area.
|
||||
|
||||
Choose your area on the map using the rectangle tool and select your Minecraft world - then simply click on <i>Start Generation</i>!
|
||||
Additionally, you can customize various generation settings, such as world scale, spawn point, or building interior generation.
|
||||
To generate your world with terrain, make sure to enable the corresponding feature in the generation settings.
|
||||
|
||||
## 📚 Documentation
|
||||
Minecraft version 1.16.5 and below is currently not supported, but we are working on it! For the best results, use Minecraft version 1.21.4.
|
||||
If you choose to select an own world, be aware that Arnis will overwrite certain areas.
|
||||
|
||||
<img src="assets/git/documentation.png" width="100%" alt="Banner">
|
||||
## :floppy_disk: How it works
|
||||

|
||||
|
||||
Full documentation is available in the [GitHub Wiki](https://github.com/louis-e/arnis/wiki/), covering topics such as technical explanations, FAQs, contribution guidelines and roadmaps.
|
||||
The raw data obtained from the API *[(see FAQ)](#question-faq)* includes each element (buildings, walls, fountains, farmlands, etc.) with its respective corner coordinates (nodes) and descriptive tags. When you run Arnis, the following steps are performed automatically to generate a Minecraft world:
|
||||
|
||||
#### Processing Pipeline
|
||||
1. **Fetching Data from the Overpass API:** The script retrieves geospatial data for the desired bounding box from the Overpass API.
|
||||
2. **Parsing Raw Data:** The raw data is parsed to extract essential information like nodes, ways, and relations. Nodes are converted into Minecraft coordinates, and relations are handled similarly to ways, ensuring all relevant elements are processed correctly. Relations and ways cluster several nodes into one specific object.
|
||||
3. **Prioritizing and Sorting Elements:** The elements (nodes, ways, relations) are sorted by priority to establish a layering system, which ensures that certain types of elements (e.g., entrances and buildings) are generated in the correct order to avoid conflicts and overlapping structures.
|
||||
4. **Generating Minecraft World:** The Minecraft world is generated using a series of element processors (generate_buildings, generate_highways, generate_landuse, etc.) that interpret the tags and nodes of each element to place the appropriate blocks in the Minecraft world. These processors handle the logic for creating 3D structures, roads, natural formations, and more, as specified by the processed data.
|
||||
5. **Generating Ground Layer:** A ground layer is generated based on the provided scale factors to provide a base for the entire Minecraft world. This step ensures all areas have an appropriate foundation (e.g., grass and dirt layers).
|
||||
6. **Saving the Minecraft World:** All the modified chunks are saved back to the Minecraft region files.
|
||||
|
||||
## :question: FAQ
|
||||
- *Wasn't this written in Python before?*<br>
|
||||
Yes! Arnis was initially developed in Python, which benefited from Python's open-source friendliness and ease of readability. This is why we strive for clear, well-documented code in the Rust port of this project to find the right balance. I decided to port the project to Rust to learn more about the language and push the algorithm's performance further. We were nearing the limits of optimization in Python, and Rust's capabilities allow for even better performance and efficiency. The old Python implementation is still available in the python-legacy branch.
|
||||
- *Where does the data come from?*<br>
|
||||
The geographic data is sourced from OpenStreetMap (OSM)[^1], a free, collaborative mapping project that serves as an open-source alternative to commercial mapping services. The data is accessed via the Overpass API, which queries OSM's database. Other services like Google Maps do not provide data like this, which makes OSM perfect for this project.
|
||||
- *How does the Minecraft world generation work?*<br>
|
||||
The script uses the [fastnbt](https://github.com/owengage/fastnbt) cargo package to interact with Minecraft's world format. This library allows Arnis to manipulate Minecraft region files, enabling the generation of real-world locations. The section 'Processing Pipeline' goes a bit further into the details and steps of the generation process itself.
|
||||
- *Where does the name come from?*<br>
|
||||
The project is named after the smallest city in Germany, Arnis[^2]. The city's small size made it an ideal test case for developing and debugging the algorithm efficiently.
|
||||
- *I don't have Minecraft installed but want to generate a world for my kids. How?*<br>
|
||||
When selecting a world, click on 'Select existing world' and choose a directory. The world will be generated there.
|
||||
- *Arnis instantly closes again or the window is empty!*<br>
|
||||
If you're on Windows, please install the [Evergreen Bootstrapper from Microsoft](https://developer.microsoft.com/en-us/microsoft-edge/webview2/?form=MA13LH#download).
|
||||
- *What Minecraft version should I use?*<br>
|
||||
Please use Minecraft version 1.21.4 for the best results. Minecraft version 1.16.5 and below is currently not supported, but we are working on it!
|
||||
- *The generation did finish, but there's nothing in the world!*<br>
|
||||
Make sure to teleport to the generation starting point (/tp 0 0 0). If there is still nothing, you might need to travel a bit further into the positive X and positive Z direction.
|
||||
- *What features are in the world generation settings?*<br>
|
||||
**Terrain:** Make sure to enable this feature to generate your world with elevation data included.<br>
|
||||
**Winter Mode:** This setting changes the generation style to a snowy theme and adds snow layers to the ground.<br>
|
||||
**Scale Factor:** The scale factor determines the size of the generated world.<br>
|
||||
**Custom BBOX Input:** This setting allows you to manually input the bounding box coordinates for the area you want to generate.<br>
|
||||
**Floodfill-Timeout (Sec):** This setting determines the maximum time the floodfill algorithm is allowed to run before being terminated. Increasing this value may improve the generation of large water areas but may also increase processing time.<br>
|
||||
**Ground Height:** This setting determines the base height of the generated world and can be adjusted to create different terrain types.
|
||||
|
||||
## :memo: ToDo and Known Bugs
|
||||
Feel free to choose an item from the To-Do or Known Bugs list, or bring your own idea to the table. Bug reports shall be raised as a Github issue. Contributions are highly welcome and appreciated!
|
||||
- [ ] Fix compilation for Linux
|
||||
- [ ] Rotate maps (https://github.com/louis-e/arnis/issues/97)
|
||||
- [ ] Fix coastal cities generation duration time (water_areas.rs)
|
||||
- [ ] Add street names as signs
|
||||
- [ ] Add support for older Minecraft versions (<=1.16.5) (https://github.com/louis-e/arnis/issues/124, https://github.com/louis-e/arnis/issues/137)
|
||||
- [ ] Mapping real coordinates to Minecraft coordinates (https://github.com/louis-e/arnis/issues/29)
|
||||
- [ ] Add interior to buildings
|
||||
- [ ] Implement house roof types
|
||||
- [ ] Add support for inner attribute in multipolygons and multipolygon elements other than buildings
|
||||
- [ ] Refactor bridges implementation
|
||||
- [ ] Better code documentation
|
||||
- [ ] Refactor fountain structure implementation
|
||||
- [ ] Luanti Support (https://github.com/louis-e/arnis/issues/120)
|
||||
- [ ] Minecraft Bedrock Edition Support (https://github.com/louis-e/arnis/issues/148)
|
||||
- [x] Evaluate and implement elevation (https://github.com/louis-e/arnis/issues/66)
|
||||
- [x] Refactor railway implementation
|
||||
- [x] Evaluate and implement faster region saving
|
||||
- [x] Support multipolygons (https://github.com/louis-e/arnis/issues/112, https://github.com/louis-e/arnis/issues/114)
|
||||
- [x] Memory optimization
|
||||
- [x] Fix Github Action Workflow for releasing MacOS Binary
|
||||
- [x] Design and implement a GUI
|
||||
- [x] Automatic new world creation instead of using an existing world
|
||||
- [x] Fix faulty empty chunks ([https://github.com/owengage/fastnbt/issues/120](https://github.com/owengage/fastnbt/issues/120)) (workaround found)
|
||||
- [x] Setup fork of [https://github.com/aaronr/bboxfinder.com](https://github.com/aaronr/bboxfinder.com) for easy bbox picking
|
||||
|
||||
## :trophy: Open Source
|
||||
#### Key objectives of this project
|
||||
- **Modularity**: Ensure that all components (e.g., data fetching, processing, and world generation) are cleanly separated into distinct modules for better maintainability and scalability.
|
||||
- **Performance Optimization**: We aim to keep a good performance and speed of the world generation process.
|
||||
- **Performance Optimization**: Utilize Rust’s memory safety and concurrency features to optimize the performance of the world generation process.
|
||||
- **Comprehensive Documentation**: Detailed in-code documentation for a clear structure and logic.
|
||||
- **User-Friendly Experience**: Focus on making the project easy to use for end users.
|
||||
- **Cross-Platform Support**: We want this project to run smoothly on Windows, macOS, and Linux.
|
||||
- **Cross-Platform Support**: Ensure the project runs smoothly on Windows, macOS, and Linux.
|
||||
|
||||
#### How to contribute
|
||||
This project is open source and welcomes contributions from everyone! Whether you're interested in fixing bugs, improving performance, adding new features, or enhancing documentation, your input is valuable. Simply fork the repository, make your changes, and submit a pull request. Please respect the above mentioned key objectives. Contributions of all levels are appreciated, and your efforts help improve this tool for everyone.
|
||||
This project is open source and welcomes contributions from everyone! Whether you're interested in fixing bugs, improving performance, adding new features, or enhancing documentation, your input is valuable. Simply fork the repository, make your changes, and submit a pull request. We encourage discussions and suggestions to ensure the project remains modular, optimized, and easy to use for the community. You can use the parameter --debug to get a more detailed output of the processed values, which can be helpful for debugging and development. Contributions of all levels are appreciated, and your efforts help improve this tool for everyone.
|
||||
|
||||
Command line Build: ```cargo run --no-default-features -- --terrain --path="C:/YOUR_PATH/.minecraft/saves/worldname" --bbox="min_lat,min_lng,max_lat,max_lng"```<br>
|
||||
GUI Build: ```cargo run```<br>
|
||||
Build and run it using: ```cargo run --release --no-default-features -- --path="C:/YOUR_PATH/.minecraft/saves/worldname" --bbox="min_lng,min_lat,max_lng,max_lat"```<br>
|
||||
For the GUI: ```cargo run --release```<br>
|
||||
|
||||
After your pull request was merged, I will take care of regularly creating update releases which will include your changes.
|
||||
|
||||
@@ -49,20 +118,6 @@ After your pull request was merged, I will take care of regularly creating updat
|
||||
</picture>
|
||||
</a>
|
||||
|
||||
## :newspaper: Academic & Press Recognition
|
||||
|
||||
<img src="assets/git/recognition.png" width="100%" alt="Banner">
|
||||
|
||||
Arnis has been recognized in various academic and press publications after gaining a lot of attention in December 2024.
|
||||
|
||||
[Floodcraft: Game-based Interactive Learning Environment using Minecraft for Flood Mitigation and Preparedness for K-12 Education](https://www.researchgate.net/publication/384644535_Floodcraft_Game-based_Interactive_Learning_Environment_using_Minecraft_for_Flood_Mitigation_and_Preparedness_for_K-12_Education)
|
||||
|
||||
[Hackaday: Bringing OpenStreetMap Data into Minecraft](https://hackaday.com/2024/12/30/bringing-openstreetmap-data-into-minecraft/)
|
||||
|
||||
[TomsHardware: Minecraft Tool Lets You Create Scale Replicas of Real-World Locations](https://www.tomshardware.com/video-games/pc-gaming/minecraft-tool-lets-you-create-scale-replicas-of-real-world-locations-arnis-uses-geospatial-data-from-openstreetmap-to-generate-minecraft-maps)
|
||||
|
||||
[XDA Developers: Hometown Minecraft Map: Arnis](https://www.xda-developers.com/hometown-minecraft-map-arnis/)
|
||||
|
||||
## :copyright: License Information
|
||||
Copyright (c) 2022-2025 Louis Erbkamm (louis-e)
|
||||
|
||||
@@ -78,7 +133,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.[^3]
|
||||
|
||||
Download Arnis only from the official source https://arnismc.com or https://github.com/louis-e/arnis/. Every other website providing a download and claiming to be affiliated with the project is unofficial and may be malicious.
|
||||
Download Arnis only from the official source (https://github.com/louis-e/arnis/). Every other website providing a download and claiming to be affiliated with the project is unofficial and may be malicious.
|
||||
|
||||
The logo was made by @nxfx21.
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 163 KiB |
|
Before Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 196 KiB |
|
Before Width: | Height: | Size: 790 KiB |
|
Before Width: | Height: | Size: 127 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 86 KiB |
|
Before Width: | Height: | Size: 258 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 54 KiB |
60
flake.lock
generated
@@ -1,60 +0,0 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1755615617,
|
||||
"narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "20075955deac2583bb12f07151c2df830ef346b4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-unstable",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
36
flake.nix
@@ -1,36 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
flake-utils,
|
||||
nixpkgs,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
||||
stdenv = if pkgs.stdenv.isLinux then pkgs.stdenvAdapters.useMoldLinker pkgs.stdenv else pkgs.stdenv;
|
||||
in
|
||||
{
|
||||
devShell = pkgs.mkShell.override { inherit stdenv; } {
|
||||
buildInputs = with pkgs; [
|
||||
openssl.dev
|
||||
pkg-config
|
||||
wayland
|
||||
glib
|
||||
gdk-pixbuf
|
||||
pango
|
||||
gtk3
|
||||
libsoup_3.dev
|
||||
webkitgtk_4_1.dev
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
99
flake/flake.lock
generated
Normal file
@@ -0,0 +1,99 @@
|
||||
{
|
||||
"nodes": {
|
||||
"fenix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"rust-analyzer-src": "rust-analyzer-src"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1724653830,
|
||||
"narHash": "sha256-88f0KK8h6tGIP4Na5RJDKs0S+7WsGGaCGNkLj/bPV3g=",
|
||||
"owner": "nix-community",
|
||||
"repo": "fenix",
|
||||
"rev": "9ecf5e7d800ace001320da8acadd4a3deb872a83",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "fenix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1724479785,
|
||||
"narHash": "sha256-pP3Azj5d6M5nmG68Fu4JqZmdGt4S4vqI5f8te+E/FTw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d0e1602ddde669d5beb01aec49d71a51937ed7be",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-unstable",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"fenix": "fenix",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"rust-analyzer-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1724586512,
|
||||
"narHash": "sha256-mrfwk6nO8N2WtCq3sB2zhd2QN1HMKzeSESzOA6lSsQg=",
|
||||
"owner": "rust-lang",
|
||||
"repo": "rust-analyzer",
|
||||
"rev": "7106cd3be50b2a43c1d9f2787bf22d4369c2b25b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "rust-lang",
|
||||
"ref": "nightly",
|
||||
"repo": "rust-analyzer",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
34
flake/flake.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
inputs = {
|
||||
fenix = {
|
||||
url = "github:nix-community/fenix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = { self, fenix, flake-utils, nixpkgs }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
fenixPkgs = (fenix.packages.${system}.stable);
|
||||
in
|
||||
{
|
||||
devShell = pkgs.mkShell
|
||||
{
|
||||
buildInputs = with pkgs; [
|
||||
openssl.dev
|
||||
pkg-config
|
||||
fenixPkgs.toolchain
|
||||
wayland
|
||||
glib
|
||||
gdk-pixbuf
|
||||
pango
|
||||
gtk3
|
||||
libsoup_3.dev
|
||||
webkitgtk_4_1.dev
|
||||
];
|
||||
};
|
||||
});
|
||||
}
|
||||
|
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
BIN
gitassets/gui.png
Normal file
|
After Width: | Height: | Size: 198 KiB |
BIN
gitassets/mc.gif
Normal file
|
After Width: | Height: | Size: 9.7 MiB |
34
src/gui/css/bbox.css → gui-src/css/bbox.css
vendored
@@ -344,38 +344,4 @@ body,
|
||||
filter: blur(1px) sepia(1) invert(1);
|
||||
transition: all 1s ease;
|
||||
|
||||
}
|
||||
|
||||
/* World Preview Button in Edit Toolbar */
|
||||
.leaflet-draw-toolbar .leaflet-draw-edit-preview {
|
||||
background-position: -31px -2px;
|
||||
}
|
||||
|
||||
.leaflet-draw-toolbar .leaflet-draw-edit-preview.disabled {
|
||||
opacity: 0.4;
|
||||
cursor: not-allowed;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.leaflet-draw-toolbar .leaflet-draw-edit-preview.active {
|
||||
background-color: #a0d0ff;
|
||||
}
|
||||
|
||||
.world-preview-slider-container {
|
||||
padding: 6px 8px !important;
|
||||
background: white !important;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
.world-preview-slider-container a {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.world-preview-slider {
|
||||
width: 80px;
|
||||
height: 8px;
|
||||
cursor: pointer;
|
||||
accent-color: #3887BE;
|
||||
display: block;
|
||||
margin: 0;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 418 B After Width: | Height: | Size: 418 B |
|
Before Width: | Height: | Size: 312 B After Width: | Height: | Size: 312 B |
|
Before Width: | Height: | Size: 205 B After Width: | Height: | Size: 205 B |
|
Before Width: | Height: | Size: 262 B After Width: | Height: | Size: 262 B |
|
Before Width: | Height: | Size: 348 B After Width: | Height: | Size: 348 B |
|
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 207 B |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 278 B After Width: | Height: | Size: 278 B |
|
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 328 B |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 849 B After Width: | Height: | Size: 849 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 847 B After Width: | Height: | Size: 847 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
BIN
gui-src/css/maps/images/spritesheet - Kopie.png
vendored
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
gui-src/css/maps/images/spritesheet-2x.png
vendored
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
gui-src/css/maps/images/spritesheet.png
vendored
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@@ -158,13 +158,12 @@
|
||||
background-position: -182px -2px;
|
||||
}
|
||||
|
||||
/* Disabled states reuse same sprites; opacity indicates disabled */
|
||||
.leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled {
|
||||
background-position: -152px -2px;
|
||||
background-position: -212px -2px;
|
||||
}
|
||||
|
||||
.leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled {
|
||||
background-position: -182px -2px;
|
||||
background-position: -242px -2px;
|
||||
}
|
||||
|
||||
/* ================================================================== */
|
||||
49
gui-src/css/maps/leaflet.draw.ie.css
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
/* Conditional stylesheet for IE. */
|
||||
|
||||
.leaflet-draw-toolbar {
|
||||
border: 3px solid #999;
|
||||
}
|
||||
|
||||
.leaflet-draw-toolbar a {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.leaflet-draw-toolbar a:hover {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.leaflet-draw-actions {
|
||||
left: 32px;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.leaflet-draw-actions li {
|
||||
display: inline;
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
.leaflet-edit-marker-selected {
|
||||
border: 4px dashed #fe93c2;
|
||||
}
|
||||
|
||||
.leaflet-draw-actions a {
|
||||
background-color: #999;
|
||||
}
|
||||
|
||||
.leaflet-draw-actions a:hover {
|
||||
background-color: #a5a5a5;
|
||||
}
|
||||
|
||||
.leaflet-draw-actions-top a {
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.leaflet-draw-actions-bottom a {
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.leaflet-draw-actions-top.leaflet-draw-actions-bottom a {
|
||||
height: 27px;
|
||||
line-height: 27px;
|
||||
}
|
||||
51
gui-src/css/maps/leaflet.ie.css
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
.leaflet-vml-shape {
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
}
|
||||
.lvml {
|
||||
behavior: url(#default#VML);
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.leaflet-control {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.leaflet-popup-tip {
|
||||
width: 21px;
|
||||
_width: 27px;
|
||||
margin: 0 auto;
|
||||
_margin-top: -3px;
|
||||
|
||||
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
|
||||
}
|
||||
.leaflet-popup-tip-container {
|
||||
margin-top: -1px;
|
||||
}
|
||||
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
|
||||
border: 1px solid #999;
|
||||
}
|
||||
.leaflet-popup-content-wrapper {
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
.leaflet-control-zoom,
|
||||
.leaflet-control-layers {
|
||||
border: 3px solid #999;
|
||||
}
|
||||
.leaflet-control-layers-toggle {
|
||||
}
|
||||
.leaflet-control-attribution,
|
||||
.leaflet-control-layers,
|
||||
.leaflet-control-scale-line {
|
||||
background: white;
|
||||
}
|
||||
.leaflet-zoom-box {
|
||||
filter: alpha(opacity=50);
|
||||
}
|
||||
.leaflet-control-attribution {
|
||||
border-top: 1px solid #bbb;
|
||||
border-left: 1px solid #bbb;
|
||||
}
|
||||
757
gui-src/css/maps/mapbox.standalone.css
vendored
Normal file
@@ -0,0 +1,757 @@
|
||||
/* general typography */
|
||||
.leaflet-container {
|
||||
background:#fff;
|
||||
font:15px/25px 'Helvetica Neue', Arial, Helvetica, sans-serif;
|
||||
color:#404040;
|
||||
color:rgba(0,0,0,0.75);
|
||||
outline:0;
|
||||
overflow:hidden;
|
||||
-ms-touch-action:none;
|
||||
}
|
||||
.leaflet-container *,
|
||||
.leaflet-container *:after,
|
||||
.leaflet-container *:before {
|
||||
-webkit-box-sizing:border-box;
|
||||
-moz-box-sizing:border-box;
|
||||
box-sizing:border-box;
|
||||
}
|
||||
|
||||
.leaflet-container h1,
|
||||
.leaflet-container h2,
|
||||
.leaflet-container h3,
|
||||
.leaflet-container h4,
|
||||
.leaflet-container h5,
|
||||
.leaflet-container h6,
|
||||
.leaflet-container p {
|
||||
font-size:15px;
|
||||
line-height:25px;
|
||||
margin:0 0 10px;
|
||||
}
|
||||
.mapbox-small,
|
||||
.leaflet-control-attribution,
|
||||
.leaflet-control-scale,
|
||||
.leaflet-container input,
|
||||
.leaflet-container textarea,
|
||||
.leaflet-container label,
|
||||
.leaflet-container small {
|
||||
font-size:12px;
|
||||
line-height:20px;
|
||||
}
|
||||
|
||||
.leaflet-container a {
|
||||
color:#3887BE;
|
||||
font-weight:normal;
|
||||
text-decoration:none;
|
||||
}
|
||||
.leaflet-container a:hover { color:#63b6e5; }
|
||||
.leaflet-container.dark a { color:#63b6e5; }
|
||||
.leaflet-container.dark a:hover { color:#8fcaec; }
|
||||
|
||||
.leaflet-container.dark .mapbox-button,
|
||||
.leaflet-container .mapbox-button {
|
||||
background-color:#3887be;
|
||||
display:inline-block;
|
||||
height:40px;
|
||||
line-height:40px;
|
||||
text-decoration:none;
|
||||
color:#fff;
|
||||
font-size:12px;
|
||||
white-space:nowrap;
|
||||
text-overflow:ellipsis;
|
||||
}
|
||||
.leaflet-container.dark .mapbox-button:hover,
|
||||
.leaflet-container .mapbox-button:hover {
|
||||
color:#fff;
|
||||
background-color:#3bb2d0;
|
||||
}
|
||||
|
||||
/* Base Leaflet
|
||||
------------------------------------------------------- */
|
||||
.leaflet-map-pane,
|
||||
.leaflet-tile,
|
||||
.leaflet-marker-icon,
|
||||
.leaflet-marker-shadow,
|
||||
.leaflet-tile-pane,
|
||||
.leaflet-tile-container,
|
||||
.leaflet-overlay-pane,
|
||||
.leaflet-shadow-pane,
|
||||
.leaflet-marker-pane,
|
||||
.leaflet-popup-pane,
|
||||
.leaflet-overlay-pane svg,
|
||||
.leaflet-zoom-box,
|
||||
.leaflet-image-layer,
|
||||
.leaflet-layer {
|
||||
position:absolute;
|
||||
left:0;
|
||||
top:0;
|
||||
}
|
||||
|
||||
.leaflet-tile,
|
||||
.leaflet-marker-icon,
|
||||
.leaflet-marker-shadow {
|
||||
-webkit-user-drag:none;
|
||||
-webkit-user-select:none;
|
||||
-moz-user-select:none;
|
||||
user-select:none;
|
||||
}
|
||||
.leaflet-marker-icon,
|
||||
.leaflet-marker-shadow {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.leaflet-tile {
|
||||
filter:inherit;
|
||||
visibility:hidden;
|
||||
}
|
||||
.leaflet-tile-loaded {
|
||||
visibility:inherit;
|
||||
}
|
||||
.leaflet-zoom-box {
|
||||
width:0;
|
||||
height:0;
|
||||
}
|
||||
|
||||
.leaflet-tile-pane { z-index:2; }
|
||||
.leaflet-objects-pane { z-index:3; }
|
||||
.leaflet-overlay-pane { z-index:4; }
|
||||
.leaflet-shadow-pane { z-index:5; }
|
||||
.leaflet-marker-pane { z-index:6; }
|
||||
.leaflet-popup-pane { z-index:7; }
|
||||
|
||||
.leaflet-control {
|
||||
position:relative;
|
||||
z-index:7;
|
||||
pointer-events:auto;
|
||||
float:left;
|
||||
clear:both;
|
||||
}
|
||||
.leaflet-right .leaflet-control { float:right; }
|
||||
.leaflet-top .leaflet-control { margin-top:10px; }
|
||||
.leaflet-bottom .leaflet-control { margin-bottom:10px; }
|
||||
.leaflet-left .leaflet-control { margin-left:10px; }
|
||||
.leaflet-right .leaflet-control { margin-right:10px; }
|
||||
|
||||
.leaflet-top,
|
||||
.leaflet-bottom {
|
||||
position:absolute;
|
||||
z-index:1000;
|
||||
pointer-events:none;
|
||||
}
|
||||
.leaflet-top { top:0; }
|
||||
.leaflet-right { right:0; }
|
||||
.leaflet-bottom { bottom:0; }
|
||||
.leaflet-left { left:0; }
|
||||
|
||||
/* zoom and fade animations */
|
||||
.leaflet-fade-anim .leaflet-tile,
|
||||
.leaflet-fade-anim .leaflet-popup {
|
||||
opacity:0;
|
||||
-webkit-transition:opacity 0.2s linear;
|
||||
-moz-transition:opacity 0.2s linear;
|
||||
-o-transition:opacity 0.2s linear;
|
||||
transition:opacity 0.2s linear;
|
||||
}
|
||||
.leaflet-fade-anim .leaflet-tile-loaded,
|
||||
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
|
||||
opacity:1;
|
||||
}
|
||||
|
||||
.leaflet-zoom-anim .leaflet-zoom-animated {
|
||||
-webkit-transition:-webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||
-o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||
transition: transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||
}
|
||||
.leaflet-zoom-anim .leaflet-tile,
|
||||
.leaflet-pan-anim .leaflet-tile,
|
||||
.leaflet-touching .leaflet-zoom-animated {
|
||||
-webkit-transition:none;
|
||||
-moz-transition:none;
|
||||
-o-transition:none;
|
||||
transition:none;
|
||||
}
|
||||
.leaflet-zoom-anim .leaflet-zoom-hide { visibility: hidden; }
|
||||
|
||||
/* cursors */
|
||||
.map-clickable,
|
||||
.leaflet-clickable {
|
||||
cursor: pointer;
|
||||
}
|
||||
.leaflet-popup-pane,
|
||||
.leaflet-control {
|
||||
cursor:auto;
|
||||
}
|
||||
.leaflet-container {
|
||||
cursor:-webkit-grab;
|
||||
cursor: -moz-grab;
|
||||
}
|
||||
.leaflet-dragging,
|
||||
.leaflet-dragging .map-clickable,
|
||||
.leaflet-dragging .leaflet-clickable,
|
||||
.leaflet-dragging .leaflet-container {
|
||||
cursor:move;
|
||||
cursor:-webkit-grabbing;
|
||||
cursor: -moz-grabbing;
|
||||
}
|
||||
|
||||
.leaflet-zoom-box {
|
||||
background:#fff;
|
||||
border:2px dotted #202020;
|
||||
opacity:0.5;
|
||||
}
|
||||
|
||||
/* general toolbar styles */
|
||||
.leaflet-control-layers,
|
||||
.leaflet-bar {
|
||||
background-color:#fff;
|
||||
border:1px solid #999;
|
||||
border-color:rgba(0,0,0,0.4);
|
||||
border-radius:3px;
|
||||
box-shadow:none;
|
||||
}
|
||||
.leaflet-bar a,
|
||||
.leaflet-bar a:hover {
|
||||
color:#404040;
|
||||
color:rgba(0,0,0,0.75);
|
||||
border-bottom:1px solid #ddd;
|
||||
border-bottom-color:rgba(0,0,0,0.10);
|
||||
}
|
||||
.leaflet-bar a:hover,
|
||||
.leaflet-bar a:active {
|
||||
background-color:#f8f8f8;
|
||||
cursor:pointer;
|
||||
}
|
||||
.leaflet-bar a:first-child {
|
||||
border-radius:3px 3px 0 0;
|
||||
}
|
||||
.leaflet-bar a:last-child {
|
||||
border-bottom:none;
|
||||
border-radius:0 0 3px 3px;
|
||||
}
|
||||
.leaflet-bar a:only-of-type {
|
||||
border-radius:3px;
|
||||
}
|
||||
|
||||
.leaflet-bar .leaflet-disabled {
|
||||
cursor:default;
|
||||
opacity:0.75;
|
||||
}
|
||||
.leaflet-control-zoom-in,
|
||||
.leaflet-control-zoom-out {
|
||||
display:block;
|
||||
content:'';
|
||||
text-indent:-999em;
|
||||
}
|
||||
|
||||
.leaflet-control-layers .leaflet-control-layers-list,
|
||||
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
|
||||
display:none;
|
||||
}
|
||||
.leaflet-control-layers-expanded .leaflet-control-layers-list {
|
||||
display:block;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
.leaflet-control-layers-expanded {
|
||||
background:#fff;
|
||||
padding:6px 10px 6px 6px;
|
||||
color:#404040;
|
||||
color:rgba(0,0,0,0.75);
|
||||
}
|
||||
.leaflet-control-layers-selector {
|
||||
margin-top:2px;
|
||||
position:relative;
|
||||
top:1px;
|
||||
}
|
||||
.leaflet-control-layers label {
|
||||
display: block;
|
||||
}
|
||||
.leaflet-control-layers-separator {
|
||||
height:0;
|
||||
border-top:1px solid #ddd;
|
||||
border-top-color:rgba(0,0,0,0.10);
|
||||
margin:5px -10px 5px -6px;
|
||||
}
|
||||
|
||||
.leaflet-container .leaflet-control-attribution {
|
||||
background-color:rgba(255,255,255,0.25);
|
||||
margin:0;
|
||||
box-shadow:none;
|
||||
}
|
||||
.leaflet-control-attribution a:hover,
|
||||
.map-info-container a:hover {
|
||||
color:inherit;
|
||||
text-decoration:underline;
|
||||
}
|
||||
|
||||
.leaflet-control-attribution,
|
||||
.leaflet-control-scale-line {
|
||||
padding:0 5px;
|
||||
}
|
||||
.leaflet-left .leaflet-control-scale { margin-left:5px; }
|
||||
.leaflet-bottom .leaflet-control-scale { margin-bottom:5px; }
|
||||
|
||||
.leaflet-control-scale-line {
|
||||
background-color:rgba(255,255,255,0.5);
|
||||
border:1px solid #999;
|
||||
border-color:rgba(0,0,0,0.4);
|
||||
border-top:none;
|
||||
padding:2px 5px 1px;
|
||||
white-space:nowrap;
|
||||
overflow:hidden;
|
||||
}
|
||||
.leaflet-control-scale-line:not(:first-child) {
|
||||
border-top:2px solid #ddd;
|
||||
border-top-color:rgba(0,0,0,0.10);
|
||||
border-bottom:none;
|
||||
margin-top:-2px;
|
||||
}
|
||||
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
|
||||
border-bottom:2px solid #777;
|
||||
}
|
||||
|
||||
/* popup */
|
||||
.leaflet-popup {
|
||||
position:absolute;
|
||||
text-align:center;
|
||||
pointer-events:none;
|
||||
}
|
||||
.leaflet-popup-content-wrapper {
|
||||
padding:1px;
|
||||
text-align:left;
|
||||
pointer-events:all;
|
||||
}
|
||||
.leaflet-popup-content {
|
||||
padding:10px 10px 15px;
|
||||
margin:0;
|
||||
line-height:inherit;
|
||||
}
|
||||
.leaflet-popup-tip-container {
|
||||
width:20px;
|
||||
height:20px;
|
||||
margin:0 auto;
|
||||
position:relative;
|
||||
}
|
||||
.leaflet-popup-tip {
|
||||
width:0;
|
||||
height:0;
|
||||
margin:0;
|
||||
border-left:10px solid transparent;
|
||||
border-right:10px solid transparent;
|
||||
border-top:10px solid #fff;
|
||||
box-shadow:none;
|
||||
}
|
||||
.leaflet-popup-close-button {
|
||||
text-indent:-999em;
|
||||
position:absolute;
|
||||
top:0;right:0;
|
||||
pointer-events:all;
|
||||
}
|
||||
.leaflet-popup-close-button:hover {
|
||||
background-color:#f8f8f8;
|
||||
}
|
||||
|
||||
.leaflet-popup-scrolled {
|
||||
overflow:auto;
|
||||
border-bottom:1px solid #ddd;
|
||||
border-top:1px solid #ddd;
|
||||
}
|
||||
|
||||
/* div icon */
|
||||
.leaflet-div-icon {
|
||||
background:#fff;
|
||||
border:1px solid #999;
|
||||
border-color:rgba(0,0,0,0.4);
|
||||
}
|
||||
.leaflet-editing-icon {
|
||||
border-radius:3px;
|
||||
}
|
||||
|
||||
/* Leaflet + Mapbox
|
||||
------------------------------------------------------- */
|
||||
.leaflet-bar a,
|
||||
.mapbox-icon,
|
||||
.map-tooltip.closable .close,
|
||||
.leaflet-control-layers-toggle,
|
||||
.leaflet-popup-close-button,
|
||||
.mapbox-button-icon:before {
|
||||
content:'';
|
||||
display:inline-block;
|
||||
width:26px;
|
||||
height:26px;
|
||||
vertical-align:middle;
|
||||
background-repeat:no-repeat;
|
||||
}
|
||||
.leaflet-bar a {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.leaflet-control-zoom-in,
|
||||
.leaflet-control-zoom-out,
|
||||
.leaflet-popup-close-button,
|
||||
.leaflet-control-layers-toggle,
|
||||
.leaflet-container.dark .map-tooltip .close,
|
||||
.map-tooltip .close,
|
||||
.mapbox-icon {
|
||||
background-image:url(./images/icons-404040.png);
|
||||
background-repeat:no-repeat;
|
||||
background-size:26px 260px;
|
||||
}
|
||||
.mapbox-button-icon:before,
|
||||
.leaflet-container.dark .leaflet-control-zoom-in,
|
||||
.leaflet-container.dark .leaflet-control-zoom-out,
|
||||
.leaflet-container.dark .leaflet-control-layers-toggle,
|
||||
.leaflet-container.dark .mapbox-icon {
|
||||
background-image:url(./images/icons-ffffff.png);
|
||||
background-size:26px 260px;
|
||||
}
|
||||
.leaflet-bar .leaflet-control-zoom-in { background-position:0 0; }
|
||||
.leaflet-bar .leaflet-control-zoom-out { background-position:0 -26px; }
|
||||
.map-tooltip .close, .leaflet-popup-close-button { background-position:0 -52px; }
|
||||
.mapbox-icon-info { background-position:0 -78px; }
|
||||
.leaflet-control-layers-toggle { background-position:0 -104px; }
|
||||
.mapbox-icon-share:before, .mapbox-icon-share { background-position:0 -130px; }
|
||||
.mapbox-icon-geocoder:before, .mapbox-icon-geocoder { background-position:0 -156px; }
|
||||
.mapbox-icon-facebook:before, .mapbox-icon-facebook { background-position:0 -182px; }
|
||||
.mapbox-icon-twitter:before, .mapbox-icon-twitter { background-position:0 -208px; }
|
||||
.mapbox-icon-pinterest:before, .mapbox-icon-pinterest { background-position:0 -234px; }
|
||||
|
||||
@media
|
||||
(-webkit-min-device-pixel-ratio:2),
|
||||
(min-resolution:192dpi) {
|
||||
.leaflet-control-zoom-in,
|
||||
.leaflet-control-zoom-out,
|
||||
.leaflet-popup-close-button,
|
||||
.leaflet-control-layers-toggle,
|
||||
.mapbox-icon {
|
||||
background-image:url(./images/icons-404040@2x.png);
|
||||
}
|
||||
.mapbox-button-icon:before,
|
||||
.leaflet-container.dark .leaflet-control-zoom-in,
|
||||
.leaflet-container.dark .leaflet-control-zoom-out,
|
||||
.leaflet-container.dark .leaflet-control-layers-toggle,
|
||||
.leaflet-container.dark .mapbox-icon {
|
||||
background-image:url(./images/icons-ffffff@2x.png);
|
||||
}
|
||||
}
|
||||
|
||||
.leaflet-popup-content-wrapper,
|
||||
.map-legends,
|
||||
.map-tooltip {
|
||||
background:#fff;
|
||||
border-radius:3px;
|
||||
box-shadow:0 1px 2px rgba(0,0,0,0.10);
|
||||
}
|
||||
.map-legends,
|
||||
.map-tooltip {
|
||||
max-width:300px;
|
||||
}
|
||||
.map-legends .map-legend {
|
||||
padding:10px;
|
||||
}
|
||||
.map-tooltip {
|
||||
z-index:999999;
|
||||
padding:10px;
|
||||
min-width:180px;
|
||||
max-height:400px;
|
||||
overflow:auto;
|
||||
opacity:1;
|
||||
-webkit-transition:opacity 150ms;
|
||||
-moz-transition:opacity 150ms;
|
||||
-o-transition:opacity 150ms;
|
||||
transition:opacity 150ms;
|
||||
}
|
||||
|
||||
.map-tooltip .close {
|
||||
text-indent:-999em;
|
||||
overflow:hidden;
|
||||
display:none;
|
||||
}
|
||||
.map-tooltip.closable .close {
|
||||
position:absolute;
|
||||
top:0;right:0;
|
||||
border-radius:3px;
|
||||
}
|
||||
.map-tooltip.closable .close:active {
|
||||
background-color:#f8f8f8;
|
||||
}
|
||||
|
||||
.leaflet-control-interaction {
|
||||
position:absolute;
|
||||
top:10px;
|
||||
right:10px;
|
||||
width:300px;
|
||||
}
|
||||
.leaflet-popup-content .marker-title {
|
||||
font-weight:bold;
|
||||
}
|
||||
.leaflet-control .mapbox-button {
|
||||
background-color:#fff;
|
||||
border:1px solid #ddd;
|
||||
border-color:rgba(0,0,0,0.10);
|
||||
padding:5px 10px;
|
||||
border-radius:3px;
|
||||
}
|
||||
|
||||
/* Share modal
|
||||
------------------------------------------------------- */
|
||||
.mapbox-modal > div {
|
||||
position:absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
width:100%;
|
||||
height:100%;
|
||||
z-index:-1;
|
||||
overflow-y:auto;
|
||||
}
|
||||
.mapbox-modal.active > div {
|
||||
z-index:99999;
|
||||
transition:all .2s, z-index 0 0;
|
||||
}
|
||||
|
||||
.mapbox-modal .mapbox-modal-mask {
|
||||
background:rgba(0,0,0,0.5);
|
||||
opacity:0;
|
||||
}
|
||||
.mapbox-modal.active .mapbox-modal-mask { opacity:1; }
|
||||
|
||||
.mapbox-modal .mapbox-modal-content {
|
||||
-webkit-transform:translateY(-100%);
|
||||
-moz-transform:translateY(-100%);
|
||||
-ms-transform:translateY(-100%);
|
||||
transform:translateY(-100%);
|
||||
}
|
||||
.mapbox-modal.active .mapbox-modal-content {
|
||||
-webkit-transform:translateY(0);
|
||||
-moz-transform:translateY(0);
|
||||
-ms-transform:translateY(0);
|
||||
transform:translateY(0);
|
||||
}
|
||||
|
||||
.mapbox-modal-body {
|
||||
position:relative;
|
||||
background:#fff;
|
||||
padding:20px;
|
||||
z-index:1000;
|
||||
width:50%;
|
||||
margin:20px 0 20px 25%;
|
||||
}
|
||||
.mapbox-share-buttons {
|
||||
margin:0 0 20px;
|
||||
}
|
||||
.mapbox-share-buttons a {
|
||||
width:33.3333%;
|
||||
border-left:1px solid #fff;
|
||||
text-align:center;
|
||||
border-radius:0;
|
||||
}
|
||||
.mapbox-share-buttons a:last-child { border-radius:0 3px 3px 0; }
|
||||
.mapbox-share-buttons a:first-child { border:none; border-radius:3px 0 0 3px; }
|
||||
|
||||
.mapbox-modal input {
|
||||
width:100%;
|
||||
height:40px;
|
||||
padding:10px;
|
||||
border:1px solid #ddd;
|
||||
border-color:rgba(0,0,0,0.10);
|
||||
color:rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
/* Info Control
|
||||
------------------------------------------------------- */
|
||||
.leaflet-control.mapbox-control-info {
|
||||
margin:5px 30px 10px 10px;
|
||||
min-height:26px;
|
||||
}
|
||||
.leaflet-control.mapbox-control-info-right {
|
||||
margin:5px 10px 10px 30px;
|
||||
}
|
||||
|
||||
.mapbox-info-toggle {
|
||||
background-color:#fff;
|
||||
background-color:rgba(255,255,255,0.25);
|
||||
border-radius:50%;
|
||||
position:absolute;
|
||||
bottom:0;left:0;
|
||||
z-index:1;
|
||||
}
|
||||
.mapbox-control-info-right .mapbox-info-toggle { left:auto; right:0; }
|
||||
.mapbox-control-info.active .mapbox-info-toggle { background-color:#fff; }
|
||||
.mapbox-info-toggle:hover { background-color:rgba(255,255,255,0.5); }
|
||||
|
||||
.map-info-container {
|
||||
background:#fff;
|
||||
background:rgba(255,255,255,0.75);
|
||||
padding:3px 5px 3px 15px;
|
||||
display:none;
|
||||
position:relative;
|
||||
bottom:0;
|
||||
left:13px;
|
||||
border-radius:3px;
|
||||
}
|
||||
.mapbox-control-info.active .map-info-container { display:inline-block; }
|
||||
.mapbox-control-info-right .map-info-container {
|
||||
left:auto;
|
||||
right:13px;
|
||||
padding:3px 15px 3px 5px;
|
||||
}
|
||||
|
||||
/* Geocoder
|
||||
------------------------------------------------------- */
|
||||
.leaflet-control-mapbox-geocoder {
|
||||
position:relative;
|
||||
}
|
||||
.leaflet-control-mapbox-geocoder.searching {
|
||||
opacity:0.75;
|
||||
}
|
||||
.leaflet-control-mapbox-geocoder .leaflet-control-mapbox-geocoder-wrap {
|
||||
background:#fff;
|
||||
position:absolute;
|
||||
border:1px solid #999;
|
||||
border-color:rgba(0,0,0,0.4);
|
||||
border-bottom-width:0;
|
||||
overflow:hidden;
|
||||
left:26px;
|
||||
height:27px;
|
||||
width:0;
|
||||
top:-1px;
|
||||
border-radius:0 3px 3px 0;
|
||||
opacity:0;
|
||||
-webkit-transition:opacity 100ms;
|
||||
-moz-transition:opacity 100ms;
|
||||
-o-transition:opacity 100ms;
|
||||
transition:opacity 100ms;
|
||||
}
|
||||
.leaflet-control-mapbox-geocoder.active .leaflet-control-mapbox-geocoder-wrap {
|
||||
width:180px;
|
||||
opacity:1;
|
||||
}
|
||||
.leaflet-bar .leaflet-control-mapbox-geocoder-toggle,
|
||||
.leaflet-bar .leaflet-control-mapbox-geocoder-toggle:hover {
|
||||
border-bottom:none;
|
||||
}
|
||||
.leaflet-control-mapbox-geocoder-toggle {
|
||||
border-radius:3px;
|
||||
}
|
||||
.leaflet-control-mapbox-geocoder.active,
|
||||
.leaflet-control-mapbox-geocoder.active .leaflet-control-mapbox-geocoder-toggle {
|
||||
border-top-right-radius:0;
|
||||
border-bottom-right-radius:0;
|
||||
}
|
||||
.leaflet-control-mapbox-geocoder .leaflet-control-mapbox-geocoder-form input {
|
||||
background:transparent;
|
||||
border:0;
|
||||
width:180px;
|
||||
padding:0 0 0 10px;
|
||||
height:26px;
|
||||
outline:none;
|
||||
}
|
||||
.leaflet-control-mapbox-geocoder-results {
|
||||
width:180px;
|
||||
position:absolute;
|
||||
left:26px;
|
||||
top:25px;
|
||||
border-radius:0 0 3px 3px;
|
||||
}
|
||||
.leaflet-control-mapbox-geocoder.active .leaflet-control-mapbox-geocoder-results {
|
||||
background:#fff;
|
||||
border:1px solid #999;
|
||||
border-color:rgba(0,0,0,0.4);
|
||||
}
|
||||
|
||||
.leaflet-control-mapbox-geocoder-results a,
|
||||
.leaflet-control-mapbox-geocoder-results span {
|
||||
padding:0 10px;
|
||||
text-overflow:ellipsis;
|
||||
white-space:nowrap;
|
||||
display:block;
|
||||
width:100%;
|
||||
font-size:12px;
|
||||
line-height:26px;
|
||||
text-align:left;
|
||||
overflow:hidden;
|
||||
}
|
||||
.leaflet-control-mapbox-geocoder-results a:first-child {
|
||||
border-top:1px solid #999;
|
||||
border-top-color:rgba(0,0,0,0.4);
|
||||
border-radius:0;
|
||||
}
|
||||
.leaflet-container.dark .leaflet-control .leaflet-control-mapbox-geocoder-results a:hover,
|
||||
.leaflet-control-mapbox-geocoder-results a:hover {
|
||||
background:#f8f8f8;
|
||||
opacity:1;
|
||||
}
|
||||
|
||||
/* Dark Theme
|
||||
------------------------------------------------------- */
|
||||
.leaflet-container.dark .leaflet-bar {
|
||||
background-color:#404040;
|
||||
border-color:#202020;
|
||||
border-color:rgba(0,0,0,0.75);
|
||||
}
|
||||
.leaflet-container.dark .leaflet-bar a {
|
||||
color:#404040;
|
||||
border-color:rgba(0,0,0,0.5);
|
||||
}
|
||||
.leaflet-container.dark .leaflet-bar a:active,
|
||||
.leaflet-container.dark .leaflet-bar a:hover {
|
||||
background-color:#505050;
|
||||
}
|
||||
|
||||
.leaflet-container.dark .mapbox-info-toggle,
|
||||
.leaflet-container.dark .map-info-container,
|
||||
.leaflet-container.dark .leaflet-control-attribution {
|
||||
background-color:rgba(0,0,0,0.25);
|
||||
color:#f8f8f8;
|
||||
}
|
||||
.leaflet-container.dark .leaflet-bar a.leaflet-disabled,
|
||||
.leaflet-container.dark .leaflet-control .mapbox-button.disabled {
|
||||
background-color:#252525;
|
||||
color:#404040;
|
||||
}
|
||||
.leaflet-container.dark .leaflet-control-mapbox-geocoder > div {
|
||||
border-color:#202020;
|
||||
border-color:rgba(0,0,0,0.75);
|
||||
}
|
||||
.leaflet-container.dark .leaflet-control .leaflet-control-mapbox-geocoder-results a {
|
||||
border-color:#ddd #202020;
|
||||
border-color:rgba(0,0,0,0.10) rgba(0,0,0,0.75);
|
||||
}
|
||||
.leaflet-container.dark .leaflet-control .leaflet-control-mapbox-geocoder-results span {
|
||||
border-color:#202020;
|
||||
border-color:rgba(0,0,0,0.75);
|
||||
}
|
||||
|
||||
/* Larger Screens
|
||||
------------------------------------------------------- */
|
||||
@media only screen and (max-width:800px) {
|
||||
.mapbox-modal-body {
|
||||
width:83.3333%;
|
||||
margin-left:8.3333%;
|
||||
}
|
||||
}
|
||||
|
||||
/* Smaller Screens
|
||||
------------------------------------------------------- */
|
||||
@media only screen and (max-width:640px) {
|
||||
.mapbox-modal-body {
|
||||
width:100%;
|
||||
height:100%;
|
||||
margin:0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Browser Fixes
|
||||
------------------------------------------------------- */
|
||||
/* Map is broken in FF if you have max-width: 100% on tiles */
|
||||
.leaflet-container img { max-width:none!important; }
|
||||
/* Stupid Android 2 doesn't understand "max-width: none" properly */
|
||||
.leaflet-container img.leaflet-image-layer { max-width:15000px!important; }
|
||||
/* Android chrome makes tiles disappear without this */
|
||||
.leaflet-tile-container img { -webkit-backface-visibility:hidden; }
|
||||
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
|
||||
.leaflet-overlay-pane svg { -moz-user-select:none; }
|
||||
/* Older IEs don't support the translateY property for display animation */
|
||||
.leaflet-oldie .mapbox-modal .mapbox-modal-content { display:none; }
|
||||
.leaflet-oldie .mapbox-modal.active .mapbox-modal-content { display:block; }
|
||||
.map-tooltip { width:280px\8; /* < IE9 */ }
|
||||
1
gui-src/css/maps/mapbox.v3.2.0.css
vendored
Normal file
355
gui-src/css/styles.css
vendored
Normal file
@@ -0,0 +1,355 @@
|
||||
:root {
|
||||
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
|
||||
font-size: 16px;
|
||||
line-height: 24px;
|
||||
font-weight: 400;
|
||||
color: #0f0f0f;
|
||||
background-color: #f6f6f6;
|
||||
font-synthesis: none;
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #ececec;
|
||||
}
|
||||
|
||||
.container {
|
||||
margin: 0;
|
||||
padding-top: 1vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 6em;
|
||||
padding: 1.5em;
|
||||
will-change: filter;
|
||||
transition: 0.75s;
|
||||
}
|
||||
|
||||
.logo.arnis:hover {
|
||||
filter: drop-shadow(0 0 2em #b3b3b3);
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
a {
|
||||
font-weight: 500;
|
||||
color: #646cff;
|
||||
text-decoration: inherit;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #535bf2;
|
||||
}
|
||||
|
||||
.flex-container {
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
justify-content: center;
|
||||
align-items: stretch;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.section {
|
||||
background: #575757;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.map-box,
|
||||
.controls-box {
|
||||
width: 45%;
|
||||
background: #575757;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.controls-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.controls-box .progress-section {
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
.map-container {
|
||||
border: 2px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.section h2 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #d6d6d6;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 8px;
|
||||
border: 1px solid transparent;
|
||||
padding: 0.6em 1.2em;
|
||||
font-size: 1em;
|
||||
font-weight: 500;
|
||||
color: #0f0f0f;
|
||||
background-color: #ffffff;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.25s;
|
||||
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
|
||||
margin-top: 10px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
border-color: #656565;
|
||||
}
|
||||
|
||||
#selected-directory {
|
||||
font-size: 1em;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.progress-section {
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
.progress-section h2 {
|
||||
margin-bottom: 8px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.progress-bar-container {
|
||||
width: 100%;
|
||||
height: 20px;
|
||||
background-color: #e0e0e0;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
height: 100%;
|
||||
width: 0%;
|
||||
background-color: #4caf50;
|
||||
transition: width 0.4s;
|
||||
}
|
||||
|
||||
/* Left and right alignment for "Saving world..." text */
|
||||
.progress-status {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 0.9em;
|
||||
margin-top: 8px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.footer {
|
||||
margin-top: 20px;
|
||||
text-align: center;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.footer-link {
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.footer-link:hover {
|
||||
color: #b3b3b3;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
color: #f6f6f6;
|
||||
background-color: #2f2f2f;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #ececec;
|
||||
}
|
||||
|
||||
input,
|
||||
button {
|
||||
color: #ffffff;
|
||||
background-color: #0f0f0f98;
|
||||
border-style: inherit;
|
||||
}
|
||||
button:active {
|
||||
background-color: #0f0f0f69;
|
||||
}
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.tooltip button {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.controls-box button {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Customization Settings */
|
||||
.modal {
|
||||
position: fixed;
|
||||
z-index: 1000;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background-color: #797979;
|
||||
padding: 20px;
|
||||
border: 1px solid #797979;
|
||||
border-radius: 10px;
|
||||
width: 400px;
|
||||
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.close-button {
|
||||
color: #e9e9e9;
|
||||
float: right;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.close-button:hover {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#terrain-toggle {
|
||||
accent-color: #fecc44;
|
||||
}
|
||||
|
||||
.terrain-toggle-container, .scale-slider-container {
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
#winter-toggle {
|
||||
accent-color: #fecc44;
|
||||
}
|
||||
|
||||
.winter-toggle-container, .scale-slider-container {
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.scale-slider-container label {
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#scale-value-slider {
|
||||
accent-color: #fecc44;
|
||||
}
|
||||
|
||||
#slider-value {
|
||||
margin-left: 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.bbox-input-container {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.bbox-input-container label {
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#bbox-coords {
|
||||
width: 100%;
|
||||
padding: 8px;
|
||||
border: 1px solid #fecc44;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#bbox-coords:focus {
|
||||
outline: none;
|
||||
border-color: #fecc44;
|
||||
box-shadow: 0 0 5px #fecc44;
|
||||
}
|
||||
|
||||
|
||||
.button-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.start-button {
|
||||
padding: 10px 20px;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
.start-button:hover {
|
||||
background-color: #4caf50;
|
||||
}
|
||||
|
||||
.settings-button {
|
||||
width: 40px !important;
|
||||
height: 38px;
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s, border-color 0.3s;
|
||||
}
|
||||
|
||||
.settings-button .gear-icon::before {
|
||||
content: "⚙️";
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
/* Logo Animation */
|
||||
#arnis-logo {
|
||||
width: 35%;
|
||||
height: auto;
|
||||
opacity: 0;
|
||||
transform: scale(0);
|
||||
animation: zoomInLogo 1s ease-out forwards;
|
||||
}
|
||||
|
||||
/* Keyframe Animation */
|
||||
@keyframes zoomInLogo {
|
||||
0% {
|
||||
transform: scale(0);
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 487 B After Width: | Height: | Size: 487 B |
|
Before Width: | Height: | Size: 231 KiB After Width: | Height: | Size: 231 KiB |
|
Before Width: | Height: | Size: 811 B After Width: | Height: | Size: 811 B |
151
gui-src/index.html
vendored
Normal file
@@ -0,0 +1,151 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="stylesheet" href="./css/styles.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Arnis</title>
|
||||
<script type="module" src="./js/main.js" defer></script>
|
||||
<script type="module" src="./js/license.js" defer></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<main class="container">
|
||||
<div class="row">
|
||||
<a href="https://github.com/louis-e/arnis" target="_blank">
|
||||
<img src="./images/logo.png" id="arnis-logo" class="logo arnis" alt="Arnis Logo" style="width: 35%; height: auto;" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="flex-container">
|
||||
<!-- Left Box: Map and BBox Input -->
|
||||
<section class="section map-box" style="margin-bottom: 0; padding-bottom: 0;">
|
||||
<h2 data-localize="select_location">Select Location</h2>
|
||||
<span id="bbox-text" style="font-size: 1.0em; display: block; margin-top: -8px; margin-bottom: 3px;" data-localize="zoom_in_and_choose">
|
||||
Zoom in and choose your area using the rectangle tool
|
||||
</span>
|
||||
<iframe src="maps.html" width="100%" height="300" class="map-container" title="Map Picker"></iframe>
|
||||
|
||||
<span id="bbox-info"
|
||||
style="font-size: 0.75em; color: #7bd864; display: block; margin-bottom: 4px; font-weight: bold; min-height: 2em;"></span>
|
||||
</section>
|
||||
|
||||
<!-- Right Box: Directory Selection, Start Button, and Progress Bar -->
|
||||
<section class="section controls-box">
|
||||
<div class="controls-content">
|
||||
<h2 data-localize="select_world">Select World</h2>
|
||||
|
||||
<!-- Updated Tooltip Structure -->
|
||||
<div class="tooltip" style="width: 100%;">
|
||||
<button type="button" onclick="openWorldPicker()" style="padding: 10px; line-height: 1.2; width: 100%;">
|
||||
<span id="choose_world">Choose World</span>
|
||||
<br>
|
||||
<span id="selected-world" style="font-size: 0.8em; color: #fecc44; display: block; margin-top: 4px;" data-localize="no_world_selected">
|
||||
No world selected
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="button-container">
|
||||
<button type="button" id="start-button" class="start-button" onclick="startGeneration()" data-localize="start_generation">Start Generation</button>
|
||||
<button type="button" class="settings-button" onclick="openSettings()">
|
||||
<i class="gear-icon"></i>
|
||||
</button>
|
||||
</div>
|
||||
<br><br>
|
||||
|
||||
<div class="progress-section">
|
||||
<h2 data-localize="progress">Progress</h2>
|
||||
<div class="progress-bar-container">
|
||||
<div class="progress-bar" id="progress-bar"></div>
|
||||
</div>
|
||||
<div class="progress-status">
|
||||
<span id="progress-message"></span>
|
||||
<span id="progress-detail">0%</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!-- World Picker Modal -->
|
||||
<div id="world-modal" class="modal" style="display: none;">
|
||||
<div class="modal-content">
|
||||
<span class="close-button" onclick="closeWorldPicker()">×</span>
|
||||
<h2 data-localize="choose_world_modal_title">Choose World</h2>
|
||||
|
||||
<button type="button" id="select-world-button" class="select-world-button" onclick="selectWorld(false)" data-localize="select_existing_world">Select existing world</button>
|
||||
<button type="button" id="generate-world-button" class="generate-world-button" onclick="selectWorld(true)" data-localize="generate_new_world">Generate new world</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Settings Modal -->
|
||||
<div id="settings-modal" class="modal" style="display: none;">
|
||||
<div class="modal-content">
|
||||
<span class="close-button" onclick="closeSettings()">×</span>
|
||||
<h2 data-localize="customization_settings">Customization Settings</h2>
|
||||
|
||||
<!-- Terrain Toggle Button -->
|
||||
<div class="terrain-toggle-container">
|
||||
<label for="terrain-toggle" data-localize="terrain">Terrain:</label>
|
||||
<input type="checkbox" id="terrain-toggle" name="terrain-toggle">
|
||||
</div>
|
||||
|
||||
<!-- Winter Mode Toggle Button -->
|
||||
<div class="winter-toggle-container">
|
||||
<label for="winter-toggle" data-localize="winter_mode">Winter Mode:</label>
|
||||
<input type="checkbox" id="winter-toggle" name="winter-toggle">
|
||||
</div>
|
||||
|
||||
<!-- World Scale Slider -->
|
||||
<div class="scale-slider-container">
|
||||
<label for="scale-value-slider" data-localize="world_scale">World Scale:</label>
|
||||
<input type="range" id="scale-value-slider" name="scale-value-slider" min="0.30" max="2.5" step="0.1" value="1">
|
||||
<span id="slider-value">1.00</span>
|
||||
</div>
|
||||
|
||||
<!-- Bounding Box Input -->
|
||||
<div class="bbox-input-container">
|
||||
<label for="bbox-coords" data-localize="custom_bounding_box">Custom Bounding Box:</label>
|
||||
<input type="text" id="bbox-coords" name="bbox-coords" maxlength="55" style="width: 280px;" placeholder="Format: lat,lng,lat,lng">
|
||||
</div>
|
||||
|
||||
<!-- Floodfill Timeout Input -->
|
||||
<div class="timeout-input-container">
|
||||
<label for="floodfill-timeout" data-localize="floodfill_timeout">Floodfill Timeout (sec):</label>
|
||||
<input type="number" id="floodfill-timeout" name="floodfill-timeout" min="0" step="1" value="20" style="width: 100px;" placeholder="Seconds">
|
||||
</div><br>
|
||||
|
||||
<!-- Ground Level Input -->
|
||||
<div class="ground-level-input-container">
|
||||
<label for="ground-level" data-localize="ground_level">Ground Level:</label>
|
||||
<input type="number" id="ground-level" name="ground-level" min="-64" max="290" value="-62" style="width: 100px;" placeholder="Ground Level">
|
||||
</div>
|
||||
|
||||
<!-- License and Credits Button -->
|
||||
<button type="button" id="license-button" class="license-button" onclick="openLicense()" data-localize="license_and_credits">License and Credits</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- License Modal -->
|
||||
<div id="license-modal" class="modal" style="display: none;">
|
||||
<div class="modal-content">
|
||||
<span class="close-button" onclick="closeLicense()">×</span>
|
||||
<h2 data-localize="license_and_credits">License and Credits</h2>
|
||||
<div id="license-content" style="overflow-y: auto; max-height: 300px; font-size: 0.85em; line-height: 1.3; padding: 10px; border: 1px solid #ccc; border-radius: 4px;">
|
||||
Loading...
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="footer">
|
||||
<a href="https://github.com/louis-e/arnis" target="_blank" class="footer-link" data-localize="footer_text">
|
||||
© {year} Arnis v{version} by louis-e
|
||||
</a>
|
||||
</footer>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
426
src/gui/js/bbox.js → gui-src/js/bbox.js
vendored
@@ -429,7 +429,7 @@ function formatPoint(point, proj) {
|
||||
formattedBounds = y + ' ' + x;
|
||||
}
|
||||
}
|
||||
return formattedPoint
|
||||
return formattedBounds
|
||||
}
|
||||
|
||||
function validateStringAsBounds(bounds) {
|
||||
@@ -461,314 +461,14 @@ $(document).ready(function () {
|
||||
$('input[type="textarea"]').on('click', function (evt) { this.select() });
|
||||
$("#projection").val(currentproj);
|
||||
|
||||
// Initialize map
|
||||
// Initialize map with OpenStreetMap tiles
|
||||
map = L.map('map').setView([50.114768, 8.687322], 4);
|
||||
|
||||
// Define available tile themes
|
||||
var tileThemes = {
|
||||
'osm': {
|
||||
url: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
maxZoom: 19
|
||||
}
|
||||
},
|
||||
'esri-imagery': {
|
||||
url: 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
|
||||
options: {
|
||||
attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community',
|
||||
maxZoom: 18
|
||||
}
|
||||
},
|
||||
'opentopomap': {
|
||||
url: 'https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
attribution: 'Map data: © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, <a href="http://viewfinderpanoramas.org">SRTM</a> | Map style: © <a href="https://opentopomap.org">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)',
|
||||
maxZoom: 17
|
||||
}
|
||||
},
|
||||
'stadia-bright': {
|
||||
url: 'https://tiles.stadiamaps.com/tiles/alidade_smooth/{z}/{x}/{y}.{ext}',
|
||||
options: {
|
||||
minZoom: 0,
|
||||
maxZoom: 19,
|
||||
attribution: '© <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
ext: 'png'
|
||||
}
|
||||
},
|
||||
'stadia-dark': {
|
||||
url: 'https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/{z}/{x}/{y}.{ext}',
|
||||
options: {
|
||||
minZoom: 0,
|
||||
maxZoom: 19,
|
||||
attribution: '© <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
ext: 'png'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Global variable to store current tile layer
|
||||
var currentTileLayer = null;
|
||||
|
||||
// Function to change tile theme with automatic HTTP fallback
|
||||
function changeTileTheme(themeKey) {
|
||||
// Remove current tile layer if it exists
|
||||
if (currentTileLayer) {
|
||||
map.removeLayer(currentTileLayer);
|
||||
}
|
||||
|
||||
// Get the theme configuration
|
||||
var theme = tileThemes[themeKey];
|
||||
if (theme) {
|
||||
// Create and add new tile layer
|
||||
currentTileLayer = L.tileLayer(theme.url, theme.options);
|
||||
|
||||
// Add automatic HTTP fallback for HTTPS failures
|
||||
var failureCount = 0;
|
||||
currentTileLayer.on('tileerror', function(error) {
|
||||
failureCount++;
|
||||
|
||||
// After a few failures, try HTTP fallback
|
||||
if (failureCount >= 6 && !this._httpFallbackAttempted && theme.url.startsWith('https://')) {
|
||||
console.log('HTTPS tile loading failed, attempting HTTP fallback for', themeKey);
|
||||
this._httpFallbackAttempted = true;
|
||||
|
||||
// Create HTTP version of the URL
|
||||
var httpUrl = theme.url.replace('https://', 'http://');
|
||||
|
||||
// Remove the failed HTTPS layer
|
||||
map.removeLayer(this);
|
||||
|
||||
// Create new layer with HTTP URL
|
||||
var httpLayer = L.tileLayer(httpUrl, theme.options);
|
||||
httpLayer._httpFallbackAttempted = true;
|
||||
httpLayer.addTo(map);
|
||||
currentTileLayer = httpLayer;
|
||||
}
|
||||
});
|
||||
|
||||
currentTileLayer.addTo(map);
|
||||
|
||||
// Save preference to localStorage
|
||||
localStorage.setItem('selectedTileTheme', themeKey);
|
||||
}
|
||||
}
|
||||
|
||||
// Load saved theme or default to OSM
|
||||
var savedTheme = localStorage.getItem('selectedTileTheme') || 'osm';
|
||||
changeTileTheme(savedTheme);
|
||||
|
||||
// World overlay state
|
||||
var worldOverlay = null;
|
||||
var worldOverlayData = null;
|
||||
var worldOverlayEnabled = false;
|
||||
var worldPreviewAvailable = false;
|
||||
var sliderControl = null;
|
||||
|
||||
// Create the opacity slider as a proper Leaflet control
|
||||
var SliderControl = L.Control.extend({
|
||||
options: { position: 'topleft' },
|
||||
onAdd: function(map) {
|
||||
var container = L.DomUtil.create('div', 'leaflet-bar world-preview-slider-container');
|
||||
container.id = 'world-preview-slider-container';
|
||||
container.style.display = 'none';
|
||||
|
||||
var slider = L.DomUtil.create('input', 'world-preview-slider', container);
|
||||
slider.type = 'range';
|
||||
slider.min = '0';
|
||||
slider.max = '100';
|
||||
slider.value = '50';
|
||||
slider.id = 'world-preview-opacity';
|
||||
slider.title = 'Overlay Opacity';
|
||||
|
||||
L.DomEvent.on(slider, 'input', function(e) {
|
||||
if (worldOverlay) {
|
||||
worldOverlay.setOpacity(e.target.value / 100);
|
||||
}
|
||||
});
|
||||
|
||||
// Prevent all map interactions
|
||||
L.DomEvent.disableClickPropagation(container);
|
||||
L.DomEvent.disableScrollPropagation(container);
|
||||
L.DomEvent.on(container, 'mousedown', L.DomEvent.stopPropagation);
|
||||
L.DomEvent.on(container, 'touchstart', L.DomEvent.stopPropagation);
|
||||
L.DomEvent.on(slider, 'mousedown', L.DomEvent.stopPropagation);
|
||||
L.DomEvent.on(slider, 'touchstart', L.DomEvent.stopPropagation);
|
||||
|
||||
return container;
|
||||
}
|
||||
});
|
||||
|
||||
// Function to add world preview button to the draw control's edit toolbar
|
||||
function addWorldPreviewToEditToolbar() {
|
||||
// Find the edit toolbar (contains Edit layers and Delete layers buttons)
|
||||
var editToolbar = document.querySelector('.leaflet-draw-toolbar:not(.leaflet-draw-toolbar-top)');
|
||||
if (!editToolbar) {
|
||||
// Try finding by the edit/delete buttons
|
||||
var deleteBtn = document.querySelector('.leaflet-draw-edit-remove');
|
||||
if (deleteBtn) {
|
||||
editToolbar = deleteBtn.parentElement;
|
||||
}
|
||||
}
|
||||
|
||||
if (editToolbar) {
|
||||
// Create the preview button
|
||||
var toggleBtn = document.createElement('a');
|
||||
toggleBtn.className = 'leaflet-draw-edit-preview disabled';
|
||||
toggleBtn.href = '#';
|
||||
toggleBtn.title = 'Show World Preview (not available yet)';
|
||||
toggleBtn.id = 'world-preview-btn';
|
||||
|
||||
toggleBtn.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (worldPreviewAvailable) {
|
||||
toggleWorldOverlay();
|
||||
}
|
||||
});
|
||||
|
||||
editToolbar.appendChild(toggleBtn);
|
||||
|
||||
// Add the slider control to the map
|
||||
sliderControl = new SliderControl();
|
||||
map.addControl(sliderControl);
|
||||
}
|
||||
}
|
||||
|
||||
// Toggle world overlay function
|
||||
function toggleWorldOverlay() {
|
||||
if (!worldPreviewAvailable || !worldOverlayData) return;
|
||||
|
||||
worldOverlayEnabled = !worldOverlayEnabled;
|
||||
var btn = document.getElementById('world-preview-btn');
|
||||
var sliderContainer = document.getElementById('world-preview-slider-container');
|
||||
|
||||
if (worldOverlayEnabled) {
|
||||
// Show overlay
|
||||
var data = worldOverlayData;
|
||||
var bounds = L.latLngBounds(
|
||||
[data.min_lat, data.min_lon],
|
||||
[data.max_lat, data.max_lon]
|
||||
);
|
||||
|
||||
if (worldOverlay) {
|
||||
map.removeLayer(worldOverlay);
|
||||
}
|
||||
|
||||
var opacity = document.getElementById('world-preview-opacity');
|
||||
var opacityValue = opacity ? opacity.value / 100 : 0.5;
|
||||
|
||||
worldOverlay = L.imageOverlay(data.image_base64, bounds, {
|
||||
opacity: opacityValue,
|
||||
interactive: false,
|
||||
zIndex: 500
|
||||
});
|
||||
worldOverlay.addTo(map);
|
||||
|
||||
if (btn) {
|
||||
btn.classList.add('active');
|
||||
btn.title = 'Hide World Preview';
|
||||
}
|
||||
if (sliderContainer) {
|
||||
sliderContainer.style.display = 'block';
|
||||
}
|
||||
} else {
|
||||
// Hide overlay
|
||||
if (worldOverlay) {
|
||||
map.removeLayer(worldOverlay);
|
||||
worldOverlay = null;
|
||||
}
|
||||
if (btn) {
|
||||
btn.classList.remove('active');
|
||||
btn.title = 'Show World Preview';
|
||||
}
|
||||
if (sliderContainer) {
|
||||
sliderContainer.style.display = 'none';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Enable the preview button when data is available
|
||||
function enableWorldPreview(data) {
|
||||
worldOverlayData = data;
|
||||
worldPreviewAvailable = true;
|
||||
var btn = document.getElementById('world-preview-btn');
|
||||
if (btn) {
|
||||
btn.classList.remove('disabled');
|
||||
btn.title = 'Show World Preview';
|
||||
}
|
||||
}
|
||||
|
||||
// Disable and reset preview (when world changes)
|
||||
function disableWorldPreview() {
|
||||
worldPreviewAvailable = false;
|
||||
worldOverlayData = null;
|
||||
worldOverlayEnabled = false;
|
||||
|
||||
if (worldOverlay) {
|
||||
map.removeLayer(worldOverlay);
|
||||
worldOverlay = null;
|
||||
}
|
||||
|
||||
var btn = document.getElementById('world-preview-btn');
|
||||
var sliderContainer = document.getElementById('world-preview-slider-container');
|
||||
if (btn) {
|
||||
btn.classList.add('disabled');
|
||||
btn.classList.remove('active');
|
||||
btn.title = 'Show World Preview (not available yet)';
|
||||
}
|
||||
if (sliderContainer) {
|
||||
sliderContainer.style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
// Listen for messages from parent window
|
||||
window.addEventListener('message', function(event) {
|
||||
if (event.data && event.data.type === 'changeTileTheme') {
|
||||
changeTileTheme(event.data.theme);
|
||||
}
|
||||
|
||||
// Handle world preview data ready (after generation completes)
|
||||
if (event.data && event.data.type === 'worldPreviewReady') {
|
||||
enableWorldPreview(event.data.data);
|
||||
|
||||
// Auto-enable the overlay when generation completes
|
||||
if (!worldOverlayEnabled) {
|
||||
toggleWorldOverlay();
|
||||
}
|
||||
}
|
||||
|
||||
// Handle existing world map load (zoom to location and auto-enable)
|
||||
if (event.data && event.data.type === 'loadExistingWorldMap') {
|
||||
var data = event.data.data;
|
||||
enableWorldPreview(data);
|
||||
|
||||
// Calculate bounds and zoom to them
|
||||
var bounds = L.latLngBounds(
|
||||
[data.min_lat, data.min_lon],
|
||||
[data.max_lat, data.max_lon]
|
||||
);
|
||||
map.fitBounds(bounds, { padding: [50, 50] });
|
||||
|
||||
// Auto-enable the overlay
|
||||
if (!worldOverlayEnabled) {
|
||||
toggleWorldOverlay();
|
||||
}
|
||||
}
|
||||
|
||||
// Handle world changed (disable preview)
|
||||
if (event.data && event.data.type === 'worldChanged') {
|
||||
disableWorldPreview();
|
||||
}
|
||||
});
|
||||
|
||||
// Set the dropdown value in parent window if it exists
|
||||
if (window.parent && window.parent.document) {
|
||||
var dropdown = window.parent.document.getElementById('tile-theme-select');
|
||||
if (dropdown) {
|
||||
dropdown.value = savedTheme;
|
||||
}
|
||||
}
|
||||
// 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',
|
||||
@@ -802,26 +502,9 @@ $(document).ready(function () {
|
||||
crosshair = new L.marker(map.getCenter(), { icon: crosshairIcon, clickable: false });
|
||||
crosshair.addTo(map);
|
||||
|
||||
// Override default tooltips
|
||||
L.drawLocal = L.drawLocal || {};
|
||||
L.drawLocal.draw = L.drawLocal.draw || {};
|
||||
L.drawLocal.draw.toolbar = L.drawLocal.draw.toolbar || {};
|
||||
L.drawLocal.draw.toolbar.buttons = L.drawLocal.draw.toolbar.buttons || {};
|
||||
L.drawLocal.draw.toolbar.buttons.rectangle = 'Choose area';
|
||||
L.drawLocal.draw.toolbar.buttons.marker = 'Set spawnpoint';
|
||||
|
||||
// Initialize the FeatureGroup to store editable layers
|
||||
drawnItems = new L.FeatureGroup();
|
||||
map.addLayer(drawnItems);
|
||||
|
||||
// Custom icon for drawn markers
|
||||
var customMarkerIcon = L.icon({
|
||||
iconUrl: 'images/marker-icon.png',
|
||||
iconSize: [20, 20],
|
||||
iconAnchor: [10, 10],
|
||||
popupAnchor: [0, -10]
|
||||
});
|
||||
|
||||
map.addLayer(drawnItems); // Initialize the draw control and pass it the FeatureGroup of editable layers
|
||||
drawControl = new L.Control.Draw({
|
||||
edit: {
|
||||
featureGroup: drawnItems
|
||||
@@ -843,15 +526,10 @@ $(document).ready(function () {
|
||||
polyline: false,
|
||||
polygon: false,
|
||||
circle: false,
|
||||
marker: {
|
||||
icon: customMarkerIcon
|
||||
}
|
||||
marker: false
|
||||
}
|
||||
});
|
||||
map.addControl(drawControl);
|
||||
|
||||
// Add world preview button to the edit toolbar after drawControl is added
|
||||
addWorldPreviewToEditToolbar();
|
||||
/*
|
||||
**
|
||||
** create bounds layer
|
||||
@@ -889,25 +567,6 @@ $(document).ready(function () {
|
||||
map.addLayer(bounds);
|
||||
|
||||
map.on('draw:created', function (e) {
|
||||
// If it's a marker, make sure we only have one
|
||||
if (e.layerType === 'marker') {
|
||||
// Remove any existing markers
|
||||
drawnItems.eachLayer(function(layer) {
|
||||
if (layer instanceof L.Marker) {
|
||||
drawnItems.removeLayer(layer);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// If it's a rectangle, remove any existing rectangles first
|
||||
if (e.layerType === 'rectangle') {
|
||||
drawnItems.eachLayer(function(layer) {
|
||||
if (layer instanceof L.Rectangle) {
|
||||
drawnItems.removeLayer(layer);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Check if it's a rectangle and set proper styles before adding it to the layer
|
||||
if (e.layerType === 'rectangle') {
|
||||
e.layer.setStyle({
|
||||
@@ -921,29 +580,10 @@ $(document).ready(function () {
|
||||
}
|
||||
|
||||
drawnItems.addLayer(e.layer);
|
||||
|
||||
// Only update the bounds based on non-marker layers
|
||||
if (e.layerType !== 'marker') {
|
||||
// Calculate bounds only from non-marker layers
|
||||
const nonMarkerBounds = new L.LatLngBounds();
|
||||
let hasNonMarkerLayers = false;
|
||||
|
||||
drawnItems.eachLayer(function(layer) {
|
||||
if (!(layer instanceof L.Marker)) {
|
||||
hasNonMarkerLayers = true;
|
||||
nonMarkerBounds.extend(layer.getBounds());
|
||||
}
|
||||
});
|
||||
|
||||
// Only update bounds if there are non-marker layers
|
||||
if (hasNonMarkerLayers) {
|
||||
bounds.setBounds(nonMarkerBounds);
|
||||
$('#boxbounds').text(formatBounds(bounds.getBounds(), '4326'));
|
||||
$('#boxboundsmerc').text(formatBounds(bounds.getBounds(), currentproj));
|
||||
notifyBboxUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
bounds.setBounds(drawnItems.getBounds())
|
||||
$('#boxbounds').text(formatBounds(bounds.getBounds(), '4326'));
|
||||
$('#boxboundsmerc').text(formatBounds(bounds.getBounds(), currentproj));
|
||||
notifyBboxUpdate();
|
||||
if (!e.geojson &&
|
||||
!((drawnItems.getLayers().length == 1) && (drawnItems.getLayers()[0] instanceof L.Marker))) {
|
||||
map.fitBounds(bounds.getBounds());
|
||||
@@ -977,22 +617,7 @@ $(document).ready(function () {
|
||||
});
|
||||
|
||||
map.on('draw:edited', function (e) {
|
||||
// Calculate bounds only from non-marker layers
|
||||
const nonMarkerBounds = new L.LatLngBounds();
|
||||
let hasNonMarkerLayers = false;
|
||||
|
||||
drawnItems.eachLayer(function(layer) {
|
||||
if (!(layer instanceof L.Marker)) {
|
||||
hasNonMarkerLayers = true;
|
||||
nonMarkerBounds.extend(layer.getBounds());
|
||||
}
|
||||
});
|
||||
|
||||
// Only update bounds if there are non-marker layers
|
||||
if (hasNonMarkerLayers) {
|
||||
bounds.setBounds(nonMarkerBounds);
|
||||
}
|
||||
|
||||
bounds.setBounds(drawnItems.getBounds())
|
||||
$('#boxbounds').text(formatBounds(bounds.getBounds(), '4326'));
|
||||
$('#boxboundsmerc').text(formatBounds(bounds.getBounds(), currentproj));
|
||||
notifyBboxUpdate();
|
||||
@@ -1070,25 +695,4 @@ $(document).ready(function () {
|
||||
function notifyBboxUpdate() {
|
||||
const bboxText = document.getElementById('boxbounds').textContent;
|
||||
window.parent.postMessage({ bboxText: bboxText }, '*');
|
||||
}
|
||||
|
||||
// Expose marker coordinates to the parent window
|
||||
function getSpawnPointCoords() {
|
||||
// Check if there are any markers in drawn items
|
||||
const markers = [];
|
||||
drawnItems.eachLayer(function(layer) {
|
||||
if (layer instanceof L.Marker) {
|
||||
const latLng = layer.getLatLng();
|
||||
markers.push({
|
||||
lat: latLng.lat,
|
||||
lng: latLng.lng
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Return the first marker found or null if none exists
|
||||
return markers.length > 0 ? markers[0] : null;
|
||||
}
|
||||
|
||||
// Expose the function to the parent window
|
||||
window.getSpawnPointCoords = getSpawnPointCoords;
|
||||
}
|
||||
44
src/gui/js/license.js → gui-src/js/license.js
vendored
@@ -1,36 +1,18 @@
|
||||
export const licenseText = `
|
||||
<b>Made with ♥️ in Munich by Louis Erbkamm</b>
|
||||
<p><b>Contributors:</b></p>
|
||||
louis-e (Louis Erbkamm)<br>
|
||||
scd31<br>
|
||||
amir16yp<br>
|
||||
vfosnar<br>
|
||||
TheComputerGuy96<br>
|
||||
zer0-dev<br>
|
||||
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/graphs/contributors" style="color: inherit;" target="_blank">Github contributors page</a>. Logo made by nxfx21.
|
||||
<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: #ff8686;"><b>Download Arnis only from the official source:</b> <a href="https://arnismc.com" style="color: inherit;" target="_blank">https://arnismc.com</a> or <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><b>Third-Party Map Data and Tile Services:</b></p>
|
||||
<p>This application uses map tiles from multiple providers, each with their own licensing requirements:</p>
|
||||
|
||||
<b>OpenStreetMap:</b><br> © <a href="https://www.openstreetmap.org/copyright" style="color: inherit;" target="_blank">OpenStreetMap</a> contributors
|
||||
<br><br>
|
||||
|
||||
<b>Esri:</b><br> Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community
|
||||
<br><br>
|
||||
|
||||
<b>OpenTopoMap:</b><br> Map style: © <a href="https://opentopomap.org" style="color: inherit;" target="_blank">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/" style="color: inherit;" target="_blank">CC-BY-SA</a>), Map data: © OpenStreetMap contributors, <a href="http://viewfinderpanoramas.org" style="color: inherit;" target="_blank">SRTM</a>
|
||||
<br><br>
|
||||
|
||||
<b>Stadia Maps:</b><br> © <a href="https://www.stadiamaps.com/" style="color: inherit;" target="_blank">Stadia Maps</a> © <a href="https://openmaptiles.org/" style="color: inherit;" target="_blank">OpenMapTiles</a> © OpenStreetMap contributors
|
||||
<p>Users of this software must comply with the respective licensing terms of these map data providers when using the application.</p>
|
||||
|
||||
<b>AWS Terrain Tiles:</b><br>
|
||||
Elevation data derived from the <a href="https://registry.opendata.aws/terrain-tiles/" style="color: inherit;" target="_blank">AWS Terrain Tiles</a> dataset.
|
||||
<br><br>
|
||||
|
||||
<b>bedrock-rs:</b><br>
|
||||
Bedrock Edition world format support uses the <a href="https://github.com/bedrock-crustaceans/bedrock-rs" style="color: inherit;" target="_blank">bedrock-rs</a> library, licensed under the Apache License 2.0.
|
||||
<br><br>
|
||||
|
||||
<p><b>Privacy Policy:</b></p>
|
||||
If you consent to telemetry data collection, please review our Privacy Policy at:
|
||||
<a href="https://arnismc.com/privacypolicy.html" style="color: inherit;" target="_blank">https://arnismc.com/privacypolicy.html</a>.
|
||||
<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><b>License:</b></p>
|
||||
<pre style="white-space: pre-wrap; font-family: inherit;">
|
||||
@@ -44,7 +26,7 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
||||
"Licensor" shall mean the copyright owner or entity authorized bythe copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and allother entities that control, are controlled by, or are under commoncontrol with that entity. For the purposes of this definition,"control" means (i) the power, direct or indirect, to cause thedirection or management of such entity, whether by contract orotherwise, or (ii) ownership of fifty percent (50%) or more of theoutstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
508
gui-src/js/main.js
vendored
Normal file
@@ -0,0 +1,508 @@
|
||||
import { licenseText } from './license.js';
|
||||
|
||||
let invoke;
|
||||
if (window.__TAURI__) {
|
||||
invoke = window.__TAURI__.core.invoke;
|
||||
} else {
|
||||
function dummyFunc() {}
|
||||
window.__TAURI__ = { event: { listen: dummyFunc } };
|
||||
invoke = dummyFunc;
|
||||
}
|
||||
|
||||
const DEFAULT_LOCALE_PATH = `./locales/en.json`;
|
||||
|
||||
// Initialize elements and start the demo progress
|
||||
window.addEventListener("DOMContentLoaded", async () => {
|
||||
registerMessageEvent();
|
||||
window.selectWorld = selectWorld;
|
||||
window.startGeneration = startGeneration;
|
||||
setupProgressListener();
|
||||
initSettings();
|
||||
initWorldPicker();
|
||||
handleBboxInput();
|
||||
const localization = await getLocalization();
|
||||
await applyLocalization(localization);
|
||||
initFooter();
|
||||
await checkForUpdates();
|
||||
});
|
||||
|
||||
/**
|
||||
* Checks if a JSON response is invalid or falls back to HTML
|
||||
* @param {Response} response - The fetch response object
|
||||
* @returns {boolean} True if the response is invalid JSON
|
||||
*/
|
||||
function invalidJSON(response) {
|
||||
// Workaround for Tauri always falling back to index.html for asset loading
|
||||
return !response.ok || response.headers.get("Content-Type") === "text/html";
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches and returns localization data based on user's language
|
||||
* Falls back to English if requested language is not available
|
||||
* @returns {Promise<Object>} The localization JSON object
|
||||
*/
|
||||
async function getLocalization() {
|
||||
const lang = navigator.language;
|
||||
let response = await fetch(`./locales/${lang}.json`);
|
||||
|
||||
// Try with only first part of language code
|
||||
if (invalidJSON(response)) {
|
||||
response = await fetch(`./locales/${lang.split('-')[0]}.json`);
|
||||
|
||||
// Fallback to default English localization
|
||||
if (invalidJSON(response)) {
|
||||
response = await fetch(DEFAULT_LOCALE_PATH);
|
||||
}
|
||||
}
|
||||
|
||||
const localization = await response.json();
|
||||
return localization;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates an HTML element with localized text
|
||||
* @param {Object} json - Localization data
|
||||
* @param {Object} elementObject - Object containing element or selector
|
||||
* @param {string} localizedStringKey - Key for the localized string
|
||||
*/
|
||||
async function localizeElement(json, elementObject, localizedStringKey) {
|
||||
const element =
|
||||
(!elementObject.element || elementObject.element === "")
|
||||
? document.querySelector(elementObject.selector) : elementObject.element;
|
||||
const attribute = localizedStringKey.startsWith("placeholder_") ? "placeholder" : "textContent";
|
||||
|
||||
if (element) {
|
||||
if (localizedStringKey in json) {
|
||||
element[attribute] = json[localizedStringKey];
|
||||
} else {
|
||||
// Fallback to default (English) string
|
||||
const response = await fetch(DEFAULT_LOCALE_PATH);
|
||||
const defaultJson = await response.json();
|
||||
element[attribute] = defaultJson[localizedStringKey];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function applyLocalization(localization) {
|
||||
const localizationElements = {
|
||||
"h2[data-localize='select_location']": "select_location",
|
||||
"#bbox-text": "zoom_in_and_choose",
|
||||
"h2[data-localize='select_world']": "select_world",
|
||||
"span[id='choose_world']": "choose_world",
|
||||
"#selected-world": "no_world_selected",
|
||||
"#start-button": "start_generation",
|
||||
"h2[data-localize='progress']": "progress",
|
||||
"h2[data-localize='choose_world_modal_title']": "choose_world_modal_title",
|
||||
"button[data-localize='select_existing_world']": "select_existing_world",
|
||||
"button[data-localize='generate_new_world']": "generate_new_world",
|
||||
"h2[data-localize='customization_settings']": "customization_settings",
|
||||
"label[data-localize='winter_mode']": "winter_mode",
|
||||
"label[data-localize='world_scale']": "world_scale",
|
||||
"label[data-localize='custom_bounding_box']": "custom_bounding_box",
|
||||
"label[data-localize='floodfill_timeout']": "floodfill_timeout",
|
||||
"label[data-localize='ground_level']": "ground_level",
|
||||
".footer-link": "footer_text",
|
||||
"button[data-localize='license_and_credits']": "license_and_credits",
|
||||
"h2[data-localize='license_and_credits']": "license_and_credits",
|
||||
|
||||
// Placeholder strings
|
||||
"input[id='bbox-coords']": "placeholder_bbox",
|
||||
"input[id='floodfill-timeout']": "placeholder_floodfill",
|
||||
"input[id='ground-level']": "placeholder_ground"
|
||||
};
|
||||
|
||||
for (const selector in localizationElements) {
|
||||
localizeElement(localization, { selector: selector }, localizationElements[selector]);
|
||||
}
|
||||
|
||||
// Update error messages
|
||||
window.localization = localization;
|
||||
}
|
||||
|
||||
// Function to initialize the footer with the current year and version
|
||||
async function initFooter() {
|
||||
const currentYear = new Date().getFullYear();
|
||||
let version = "x.x.x";
|
||||
|
||||
try {
|
||||
version = await invoke('gui_get_version');
|
||||
} catch (error) {
|
||||
console.error("Failed to fetch version:", error);
|
||||
}
|
||||
|
||||
const footerElement = document.querySelector(".footer-link");
|
||||
if (footerElement) {
|
||||
footerElement.textContent =
|
||||
footerElement.textContent
|
||||
.replace("{year}", currentYear)
|
||||
.replace("{version}", version);
|
||||
}
|
||||
}
|
||||
|
||||
// Function to check for updates and display a notification if available
|
||||
async function checkForUpdates() {
|
||||
try {
|
||||
const isUpdateAvailable = await invoke('gui_check_for_updates');
|
||||
if (isUpdateAvailable) {
|
||||
const footer = document.querySelector(".footer");
|
||||
const updateMessage = document.createElement("a");
|
||||
updateMessage.href = "https://github.com/louis-e/arnis/releases";
|
||||
updateMessage.target = "_blank";
|
||||
updateMessage.style.color = "#fecc44";
|
||||
updateMessage.style.marginTop = "-5px";
|
||||
updateMessage.style.fontSize = "0.95em";
|
||||
updateMessage.style.display = "block";
|
||||
updateMessage.style.textDecoration = "none";
|
||||
|
||||
localizeElement(window.localization, { element: updateMessage }, "new_version_available");
|
||||
footer.style.marginTop = "15px";
|
||||
footer.appendChild(updateMessage);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Failed to check for updates: ", error);
|
||||
}
|
||||
}
|
||||
|
||||
// Function to register the event listener for bbox updates from iframe
|
||||
function registerMessageEvent() {
|
||||
window.addEventListener('message', function (event) {
|
||||
const bboxText = event.data.bboxText;
|
||||
|
||||
if (bboxText) {
|
||||
console.log("Updated BBOX Coordinates:", bboxText);
|
||||
displayBboxInfoText(bboxText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Function to set up the progress bar listener
|
||||
function setupProgressListener() {
|
||||
const progressBar = document.getElementById("progress-bar");
|
||||
const progressMessage = document.getElementById("progress-message");
|
||||
const progressDetail = document.getElementById("progress-detail");
|
||||
|
||||
window.__TAURI__.event.listen("progress-update", (event) => {
|
||||
const { progress, message } = event.payload;
|
||||
|
||||
if (progress != -1) {
|
||||
progressBar.style.width = `${progress}%`;
|
||||
progressDetail.textContent = `${Math.round(progress)}%`;
|
||||
}
|
||||
|
||||
if (message != "") {
|
||||
progressMessage.textContent = message;
|
||||
|
||||
if (message.startsWith("Error!")) {
|
||||
progressMessage.style.color = "#fa7878";
|
||||
generationButtonEnabled = true;
|
||||
} else if (message.startsWith("Done!")) {
|
||||
progressMessage.style.color = "#7bd864";
|
||||
generationButtonEnabled = true;
|
||||
} else {
|
||||
progressMessage.style.color = "";
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function initSettings() {
|
||||
// Settings
|
||||
const settingsModal = document.getElementById("settings-modal");
|
||||
const slider = document.getElementById("scale-value-slider");
|
||||
const sliderValue = document.getElementById("slider-value");
|
||||
|
||||
// Open settings modal
|
||||
function openSettings() {
|
||||
settingsModal.style.display = "flex";
|
||||
settingsModal.style.justifyContent = "center";
|
||||
settingsModal.style.alignItems = "center";
|
||||
}
|
||||
|
||||
// Close settings modal
|
||||
function closeSettings() {
|
||||
settingsModal.style.display = "none";
|
||||
}
|
||||
|
||||
window.openSettings = openSettings;
|
||||
window.closeSettings = closeSettings;
|
||||
|
||||
// Update slider value display
|
||||
slider.addEventListener("input", () => {
|
||||
sliderValue.textContent = parseFloat(slider.value).toFixed(2);
|
||||
});
|
||||
|
||||
|
||||
/// License and Credits
|
||||
function openLicense() {
|
||||
const licenseModal = document.getElementById("license-modal");
|
||||
const licenseContent = document.getElementById("license-content");
|
||||
|
||||
// Render the license text as HTML
|
||||
licenseContent.innerHTML = licenseText;
|
||||
|
||||
// Show the modal
|
||||
licenseModal.style.display = "flex";
|
||||
licenseModal.style.justifyContent = "center";
|
||||
licenseModal.style.alignItems = "center";
|
||||
}
|
||||
|
||||
function closeLicense() {
|
||||
const licenseModal = document.getElementById("license-modal");
|
||||
licenseModal.style.display = "none";
|
||||
}
|
||||
|
||||
window.openLicense = openLicense;
|
||||
window.closeLicense = closeLicense;
|
||||
}
|
||||
|
||||
function initWorldPicker() {
|
||||
// World Picker
|
||||
const worldPickerModal = document.getElementById("world-modal");
|
||||
|
||||
// Open world picker modal
|
||||
function openWorldPicker() {
|
||||
worldPickerModal.style.display = "flex";
|
||||
worldPickerModal.style.justifyContent = "center";
|
||||
worldPickerModal.style.alignItems = "center";
|
||||
}
|
||||
|
||||
// Close world picker modal
|
||||
function closeWorldPicker() {
|
||||
worldPickerModal.style.display = "none";
|
||||
}
|
||||
|
||||
window.openWorldPicker = openWorldPicker;
|
||||
window.closeWorldPicker = closeWorldPicker;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates and processes bounding box coordinates input
|
||||
* Supports both comma and space-separated formats
|
||||
* Updates the map display when valid coordinates are entered
|
||||
*/
|
||||
function handleBboxInput() {
|
||||
const inputBox = document.getElementById("bbox-coords");
|
||||
const bboxInfo = document.getElementById("bbox-info");
|
||||
|
||||
inputBox.addEventListener("input", function () {
|
||||
const input = inputBox.value.trim();
|
||||
|
||||
if (input === "") {
|
||||
bboxInfo.textContent = "";
|
||||
bboxInfo.style.color = "";
|
||||
selectedBBox = "";
|
||||
return;
|
||||
}
|
||||
|
||||
// Regular expression to validate bbox input (supports both comma and space-separated formats)
|
||||
const bboxPattern = /^(-?\d+(\.\d+)?)[,\s](-?\d+(\.\d+)?)[,\s](-?\d+(\.\d+)?)[,\s](-?\d+(\.\d+)?)$/;
|
||||
|
||||
if (bboxPattern.test(input)) {
|
||||
const matches = input.match(bboxPattern);
|
||||
|
||||
// Extract coordinates (Lat / Lng order expected)
|
||||
const lat1 = parseFloat(matches[1]);
|
||||
const lng1 = parseFloat(matches[3]);
|
||||
const lat2 = parseFloat(matches[5]);
|
||||
const lng2 = parseFloat(matches[7]);
|
||||
|
||||
// Validate latitude and longitude ranges in the expected Lat / Lng order
|
||||
if (
|
||||
lat1 >= -90 && lat1 <= 90 &&
|
||||
lng1 >= -180 && lng1 <= 180 &&
|
||||
lat2 >= -90 && lat2 <= 90 &&
|
||||
lng2 >= -180 && lng2 <= 180
|
||||
) {
|
||||
// Input is valid; trigger the event
|
||||
const bboxText = `${lat1} ${lng1} ${lat2} ${lng2}`;
|
||||
window.dispatchEvent(new MessageEvent('message', { data: { bboxText } }));
|
||||
|
||||
// Show custom bbox on the map
|
||||
let map_container = document.querySelector('.map-container');
|
||||
map_container.setAttribute('src', `maps.html#${lat1},${lng1},${lat2},${lng2}`);
|
||||
map_container.contentWindow.location.reload();
|
||||
|
||||
// Update the info text
|
||||
localizeElement(window.localization, { element: bboxInfo }, "custom_selection_confirmed");
|
||||
bboxInfo.style.color = "#7bd864";
|
||||
} else {
|
||||
// Valid numbers but invalid order or range
|
||||
localizeElement(window.localization, { element: bboxInfo }, "error_coordinates_out_of_range");
|
||||
bboxInfo.style.color = "#fecc44";
|
||||
selectedBBox = "";
|
||||
}
|
||||
} else {
|
||||
// Input doesn't match the required format
|
||||
localizeElement(window.localization, { element: bboxInfo }, "invalid_format");
|
||||
bboxInfo.style.color = "#fecc44";
|
||||
selectedBBox = "";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the approximate area of a bounding box in square meters
|
||||
* Uses the Haversine formula for geodesic calculations
|
||||
* @param {number} lng1 - First longitude coordinate
|
||||
* @param {number} lat1 - First latitude coordinate
|
||||
* @param {number} lng2 - Second longitude coordinate
|
||||
* @param {number} lat2 - Second latitude coordinate
|
||||
* @returns {number} Area in square meters
|
||||
*/
|
||||
function calculateBBoxSize(lng1, lat1, lng2, lat2) {
|
||||
// Approximate distance calculation using Haversine formula or geodesic formula
|
||||
const toRad = (angle) => (angle * Math.PI) / 180;
|
||||
const R = 6371000; // Earth radius in meters
|
||||
|
||||
const latDistance = toRad(lat2 - lat1);
|
||||
const lngDistance = toRad(lng2 - lng1);
|
||||
|
||||
const a = Math.sin(latDistance / 2) * Math.sin(latDistance / 2) +
|
||||
Math.cos(toRad(lat1)) * Math.cos(toRad(lat2)) *
|
||||
Math.sin(lngDistance / 2) * Math.sin(lngDistance / 2);
|
||||
const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
||||
|
||||
// Width and height of the box
|
||||
const height = R * latDistance;
|
||||
const width = R * lngDistance;
|
||||
|
||||
return Math.abs(width * height);
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes a longitude value to the range [-180, 180]
|
||||
* @param {number} lon - Longitude value to normalize
|
||||
* @returns {number} Normalized longitude value
|
||||
*/
|
||||
function normalizeLongitude(lon) {
|
||||
return ((lon + 180) % 360 + 360) % 360 - 180;
|
||||
}
|
||||
|
||||
const threshold1 = 30000000.00;
|
||||
const threshold2 = 45000000.00;
|
||||
let selectedBBox = "";
|
||||
|
||||
// Function to handle incoming bbox data
|
||||
function displayBboxInfoText(bboxText) {
|
||||
let [lng1, lat1, lng2, lat2] = bboxText.split(" ").map(Number);
|
||||
|
||||
// Normalize longitudes
|
||||
lat1 = parseFloat(normalizeLongitude(lat1).toFixed(6));
|
||||
lat2 = parseFloat(normalizeLongitude(lat2).toFixed(6));
|
||||
selectedBBox = `${lng1} ${lat1} ${lng2} ${lat2}`;
|
||||
|
||||
const bboxInfo = document.getElementById("bbox-info");
|
||||
|
||||
// Reset the info text if the bbox is 0,0,0,0
|
||||
if (lng1 === 0 && lat1 === 0 && lng2 === 0 && lat2 === 0) {
|
||||
bboxInfo.textContent = "";
|
||||
selectedBBox = "";
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate the size of the selected bbox
|
||||
const selectedSize = calculateBBoxSize(lng1, lat1, lng2, lat2);
|
||||
|
||||
if (selectedSize > threshold2) {
|
||||
localizeElement(window.localization, { element: bboxInfo }, "area_too_large");
|
||||
bboxInfo.style.color = "#fa7878";
|
||||
} else if (selectedSize > threshold1) {
|
||||
localizeElement(window.localization, { element: bboxInfo }, "area_extensive");
|
||||
bboxInfo.style.color = "#fecc44";
|
||||
} else {
|
||||
localizeElement(window.localization, { element: bboxInfo }, "selection_confirmed");
|
||||
bboxInfo.style.color = "#7bd864";
|
||||
}
|
||||
}
|
||||
|
||||
let worldPath = "";
|
||||
async function selectWorld(generate_new_world) {
|
||||
try {
|
||||
const worldName = await invoke('gui_select_world', { generateNew: generate_new_world } );
|
||||
if (worldName) {
|
||||
worldPath = worldName;
|
||||
const lastSegment = worldName.split(/[\\/]/).pop();
|
||||
document.getElementById('selected-world').textContent = lastSegment;
|
||||
document.getElementById('selected-world').style.color = "#fecc44";
|
||||
}
|
||||
} catch (error) {
|
||||
handleWorldSelectionError(error);
|
||||
}
|
||||
|
||||
closeWorldPicker();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles world selection errors and displays appropriate messages
|
||||
* @param {number} errorCode - Error code from the backend
|
||||
*/
|
||||
function handleWorldSelectionError(errorCode) {
|
||||
const errorKeys = {
|
||||
1: "minecraft_directory_not_found",
|
||||
2: "world_in_use",
|
||||
3: "failed_to_create_world",
|
||||
4: "no_world_selected_error"
|
||||
};
|
||||
|
||||
const errorKey = errorKeys[errorCode] || "unknown_error";
|
||||
const selectedWorld = document.getElementById('selected-world');
|
||||
localizeElement(window.localization, { element: selectedWorld }, errorKey);
|
||||
selectedWorld.style.color = "#fa7878";
|
||||
worldPath = "";
|
||||
console.error(errorCode);
|
||||
}
|
||||
|
||||
let generationButtonEnabled = true;
|
||||
/**
|
||||
* Initiates the world generation process
|
||||
* Validates required inputs and sends generation parameters to the backend
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async function startGeneration() {
|
||||
try {
|
||||
if (generationButtonEnabled === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!selectedBBox || selectedBBox == "0.000000 0.000000 0.000000 0.000000") {
|
||||
const bboxInfo = document.getElementById('bbox-info');
|
||||
localizeElement(window.localization, { element: bboxInfo }, "select_location_first");
|
||||
bboxInfo.style.color = "#fa7878";
|
||||
return;
|
||||
}
|
||||
|
||||
if (!worldPath || worldPath === "") {
|
||||
const selectedWorld = document.getElementById('selected-world');
|
||||
localizeElement(window.localization, { element: selectedWorld }, "select_minecraft_world_first");
|
||||
selectedWorld.style.color = "#fa7878";
|
||||
return;
|
||||
}
|
||||
|
||||
var terrain = document.getElementById("terrain-toggle").checked;
|
||||
var winter_mode = document.getElementById("winter-toggle").checked;
|
||||
var scale = parseFloat(document.getElementById("scale-value-slider").value);
|
||||
var floodfill_timeout = parseInt(document.getElementById("floodfill-timeout").value, 10);
|
||||
var ground_level = parseInt(document.getElementById("ground-level").value, 10);
|
||||
|
||||
// Validate floodfill_timeout and ground_level
|
||||
floodfill_timeout = isNaN(floodfill_timeout) || floodfill_timeout < 0 ? 20 : floodfill_timeout;
|
||||
ground_level = isNaN(ground_level) || ground_level < -62 ? 20 : ground_level;
|
||||
|
||||
// Pass the bounding box and selected world to the Rust backend
|
||||
await invoke("gui_start_generation", {
|
||||
bboxText: selectedBBox,
|
||||
selectedWorld: worldPath,
|
||||
worldScale: scale,
|
||||
groundLevel: ground_level,
|
||||
winterMode: winter_mode,
|
||||
floodfillTimeout: floodfill_timeout,
|
||||
terrainEnabled: terrain
|
||||
});
|
||||
|
||||
console.log("Generation process started.");
|
||||
generationButtonEnabled = false;
|
||||
} catch (error) {
|
||||
console.error("Error starting generation:", error);
|
||||
generationButtonEnabled = true;
|
||||
}
|
||||
}
|
||||
9180
gui-src/js/maps/leaflet-src.js
vendored
Normal file
2766
gui-src/js/maps/leaflet.draw-src.js
vendored
Normal file
3
gui-src/js/maps/mapbox.standalone.js
vendored
Normal file
3
gui-src/js/maps/proj4.js
vendored
Normal file
158
gui-src/js/maps/test.runner.js
vendored
Normal file
@@ -0,0 +1,158 @@
|
||||
(function( definition ) { // execute immeidately
|
||||
|
||||
if ( typeof module !== 'undefined' &&
|
||||
typeof module.exports !== 'undefined' ) {
|
||||
module.exports = definition();
|
||||
}
|
||||
else if ( typeof window === "object" ) {
|
||||
// example run syntax: BBOX_T( { 'url' : '/js/maps/testdata.js' } );
|
||||
window.BBOX_T = definition();
|
||||
}
|
||||
|
||||
|
||||
})( function() {
|
||||
'use strict';
|
||||
|
||||
/*
|
||||
**
|
||||
** constructor
|
||||
**
|
||||
*/
|
||||
var TestRunner = function( options ) {
|
||||
options || ( options = {} );
|
||||
|
||||
if( !this || !(this instanceof TestRunner )){
|
||||
return new TestRunner( options );
|
||||
}
|
||||
|
||||
this.test_url = options.url || "";
|
||||
|
||||
this.global_setup(); // execute immediately
|
||||
};
|
||||
|
||||
/*
|
||||
**
|
||||
** functions
|
||||
**
|
||||
*/
|
||||
TestRunner.prototype.global_setup = function() {
|
||||
|
||||
var self = this; // hold ref to instance
|
||||
|
||||
$.ajax({
|
||||
'url' : this.test_url ,
|
||||
'dataType' : 'json'
|
||||
})
|
||||
.done( function( json_data ) {
|
||||
self.run_this_mother.call( self, json_data );
|
||||
})
|
||||
.fail( function( error ) {
|
||||
console.log( "The test data didn't load: ", error );
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
TestRunner.prototype.single_setup = function() {
|
||||
this.get_layer_count();
|
||||
};
|
||||
|
||||
TestRunner.prototype.tear_down = function() {
|
||||
if( this._draw_delete_handler ){
|
||||
this._draw_delete_handler.off('draw:deleted');
|
||||
}
|
||||
};
|
||||
|
||||
TestRunner.prototype.run_this_mother = function( json_data ) {
|
||||
for( var key in json_data ){
|
||||
console.log( "[ RUNNING ]: test " + json_data[key]['type'] + "->" + "simple=" + json_data[key]['simple'] );
|
||||
var data = json_data[key]['data'];
|
||||
if( json_data[key]['type'] === 'geojson' ) {
|
||||
data = JSON.stringify( data );
|
||||
}
|
||||
|
||||
/*
|
||||
** run different tests
|
||||
** the context here is jQuery, so change
|
||||
** to reference the instance
|
||||
*/
|
||||
this.single_setup();
|
||||
|
||||
this.test_parsing( data, json_data );
|
||||
this.test_add2map( json_data );
|
||||
this.test_deletable( json_data );
|
||||
|
||||
this.tear_down();
|
||||
}
|
||||
};
|
||||
|
||||
TestRunner.prototype.test_deletable = function(identifier){ // TODO: this needs work
|
||||
var toolbar = null;
|
||||
// get the right toolbar, depending on attributes
|
||||
for( var key in drawControl._toolbars ){
|
||||
var tbar = drawControl._toolbars[key];
|
||||
if ( !(tbar instanceof L.EditToolbar ) ){
|
||||
continue;
|
||||
}
|
||||
|
||||
toolbar = tbar; // set the right one;
|
||||
}
|
||||
|
||||
// create delete handler that makes sure things are deleted
|
||||
this._draw_delete_handler = map.on('draw:deleted', function (e) {
|
||||
try {
|
||||
e.layers.eachLayer(function (l) {
|
||||
drawnItems.removeLayer(l);
|
||||
});
|
||||
console.warn( "[ PASSED ]: test_deletable" );
|
||||
}
|
||||
catch ( err ) {
|
||||
console.error( "[ DELETE TEST FAIL ]: ", err.message, identifier );
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// loop through this toolbars featureGroup, delete layers
|
||||
if ( !toolbar._activeMode ) {
|
||||
toolbar._modes['remove'].button.click(); // enable deletable
|
||||
}
|
||||
for( var indx in toolbar.options['featureGroup']._layers ) {
|
||||
try {
|
||||
var lyr = toolbar.options['featureGroup']._layers[indx];
|
||||
lyr.fire( 'click' ); // triggers delete
|
||||
}
|
||||
catch ( err ){
|
||||
console.error( "[ DELETE TEST FAIL ]: ", err.message, identifier );
|
||||
}
|
||||
}
|
||||
// WTF?
|
||||
$('a[title="Save changes."]')[0].click(); // disable deletable
|
||||
|
||||
};
|
||||
|
||||
TestRunner.prototype.test_add2map = function(identifier){
|
||||
var current_num = Object.keys( map._layers ).length;
|
||||
if( current_num <= this.num_layers_before_parse ){
|
||||
console.error( "[ ADD2MAP TEST FAIL ]: ", identifier );
|
||||
}
|
||||
else {
|
||||
console.warn( "[ PASSED ]: test_add2map" );
|
||||
}
|
||||
};
|
||||
|
||||
TestRunner.prototype.get_layer_count = function(){
|
||||
this.num_layers_before_parse = Object.keys( map._layers ).length;
|
||||
};
|
||||
|
||||
TestRunner.prototype.test_parsing = function( data, identifier ){
|
||||
var is_valid = FormatSniffer( { data : data } ).sniff();
|
||||
if ( !is_valid ) {
|
||||
console.error( "[ PARSE TEST FAIL ]: ", identifier );
|
||||
}
|
||||
else {
|
||||
console.warn( "[ PASSED ]: test_parsing" );
|
||||
}
|
||||
};
|
||||
|
||||
return TestRunner; // return class def
|
||||
|
||||
});
|
||||
@@ -10,15 +10,15 @@
|
||||
"error_coordinates_out_of_range": "Fehler: Koordinaten sind außerhalb des Bereichs oder falsch geordnet (Lat vor Lng erforderlich).",
|
||||
"invalid_format": "Ungültiges Format. Bitte verwende 'lat,lng,lat,lng' oder 'lat lng lat lng'.",
|
||||
"generation_process_started": "Generierungsprozess gestartet.",
|
||||
"winter_mode": "Wintermodus",
|
||||
"world_scale": "Weltmaßstab",
|
||||
"custom_bounding_box": "Benutzerdefinierte BBOX",
|
||||
"floodfill_timeout": "Floodfill-Timeout (Sek)",
|
||||
"ground_level": "Bodenhöhe",
|
||||
"winter_mode": "Wintermodus:",
|
||||
"world_scale": "Weltmaßstab:",
|
||||
"custom_bounding_box": "Benutzerdefinierte BBOX:",
|
||||
"floodfill_timeout": "Floodfill-Timeout (Sek):",
|
||||
"ground_level": "Bodenhöhe:",
|
||||
"choose_world_modal_title": "Welt wählen",
|
||||
"select_existing_world": "Vorhandene Welt auswählen",
|
||||
"generate_new_world": "Neue Welt generieren",
|
||||
"customization_settings": "Einstellungen",
|
||||
"customization_settings": "Anpassungseinstellungen",
|
||||
"footer_text": "© {year} Arnis v{version} von louis-e",
|
||||
"new_version_available": "Eine neue Version ist verfügbar! Klicke hier, um sie herunterzuladen.",
|
||||
"minecraft_directory_not_found": "Minecraft Verzeichnis nicht gefunden",
|
||||
@@ -30,20 +30,9 @@
|
||||
"area_too_large": "Dieses Gebiet ist sehr groß und könnte das Berechnungslimit überschreiten.",
|
||||
"area_extensive": "Diese Gebietsgröße könnte längere Zeit für die Generierung benötigen.",
|
||||
"selection_confirmed": "Auswahl bestätigt!",
|
||||
"unknown_error": "Unbekannter Fehler",
|
||||
"license_and_credits": "Lizenz und Credits",
|
||||
"unknown_error": "Unknown error",
|
||||
"license_and_credits": "License and Credits",
|
||||
"placeholder_bbox": "Format: lat,lng,lat,lng",
|
||||
"placeholder_floodfill": "Sekunden",
|
||||
"placeholder_ground": "Bodenhöhe",
|
||||
"language": "Sprache",
|
||||
"map_theme": "Kartenstil",
|
||||
"terrain": "Terrain",
|
||||
"generation_mode": "Generierungsmodus",
|
||||
"mode_geo_terrain": "Objekte + Terrain",
|
||||
"mode_geo_only": "Nur Objekte",
|
||||
"mode_terrain_only": "Nur Terrain",
|
||||
"interior": "Innenraum Generierung",
|
||||
"roof": "Dach Generierung",
|
||||
"fillground": "Boden füllen",
|
||||
"bedrock_use_java": "Java für Weltauswahl nutzen"
|
||||
"placeholder_ground": "Bodenhöhe"
|
||||
}
|
||||
@@ -10,11 +10,11 @@
|
||||
"error_coordinates_out_of_range": "Error: Coordinates are out of range or incorrectly ordered (Lat before Lng required).",
|
||||
"invalid_format": "Invalid format. Please use 'lat,lng,lat,lng' or 'lat lng lat lng'.",
|
||||
"generation_process_started": "Generation process started.",
|
||||
"winter_mode": "Winter Mode",
|
||||
"world_scale": "World Scale",
|
||||
"custom_bounding_box": "Custom Bounding Box",
|
||||
"floodfill_timeout": "Floodfill Timeout (sec)",
|
||||
"ground_level": "Ground Level",
|
||||
"winter_mode": "Winter Mode:",
|
||||
"world_scale": "World Scale:",
|
||||
"custom_bounding_box": "Custom Bounding Box:",
|
||||
"floodfill_timeout": "Floodfill Timeout (sec):",
|
||||
"ground_level": "Ground Level:",
|
||||
"choose_world_modal_title": "Choose World",
|
||||
"select_existing_world": "Select existing world",
|
||||
"generate_new_world": "Generate new world",
|
||||
@@ -34,16 +34,5 @@
|
||||
"license_and_credits": "License and Credits",
|
||||
"placeholder_bbox": "Format: lat,lng,lat,lng",
|
||||
"placeholder_floodfill": "Seconds",
|
||||
"placeholder_ground": "Ground Level",
|
||||
"language": "Language",
|
||||
"map_theme": "Map Theme",
|
||||
"terrain": "Terrain",
|
||||
"generation_mode": "Generation Mode",
|
||||
"mode_geo_terrain": "Objects + Terrain",
|
||||
"mode_geo_only": "Objects only",
|
||||
"mode_terrain_only": "Terrain only",
|
||||
"interior": "Interior Generation",
|
||||
"roof": "Roof Generation",
|
||||
"fillground": "Fill Ground",
|
||||
"bedrock_use_java": "Use Java to select worlds"
|
||||
"placeholder_ground": "Ground Level"
|
||||
}
|
||||
@@ -10,11 +10,11 @@
|
||||
"error_coordinates_out_of_range": "Error: Las coordenadas están fuera de rango o están ordenadas incorrectamente (Lat antes de Lng requerido).",
|
||||
"invalid_format": "Formato inválido. Por favor, use 'lat,lng,lat,lng' o 'lat lng lat lng'.",
|
||||
"generation_process_started": "Proceso de generación iniciado.",
|
||||
"winter_mode": "Modo invierno",
|
||||
"world_scale": "Escala del mundo",
|
||||
"custom_bounding_box": "Caja delimitadora personalizada",
|
||||
"floodfill_timeout": "Tiempo de espera de relleno (seg)",
|
||||
"ground_level": "Nivel del suelo",
|
||||
"winter_mode": "Modo invierno:",
|
||||
"world_scale": "Escala del mundo:",
|
||||
"custom_bounding_box": "Caja delimitadora personalizada:",
|
||||
"floodfill_timeout": "Tiempo de espera de relleno (seg):",
|
||||
"ground_level": "Nivel del suelo:",
|
||||
"choose_world_modal_title": "Elegir mundo",
|
||||
"select_existing_world": "Seleccionar mundo existente",
|
||||
"generate_new_world": "Generar nuevo mundo",
|
||||
@@ -34,16 +34,5 @@
|
||||
"license_and_credits": "License and Credits",
|
||||
"placeholder_bbox": "Format: lat,lng,lat,lng",
|
||||
"placeholder_floodfill": "Seconds",
|
||||
"placeholder_ground": "Ground Level",
|
||||
"language": "Idioma",
|
||||
"map_theme": "Tema del Mapa",
|
||||
"terrain": "Terreno",
|
||||
"generation_mode": "Modo de Generación",
|
||||
"mode_geo_terrain": "Objetos + Terreno",
|
||||
"mode_geo_only": "Solo Objetos",
|
||||
"mode_terrain_only": "Solo Terreno",
|
||||
"interior": "Generación Interior",
|
||||
"roof": "Generación de Tejado",
|
||||
"fillground": "Rellenar Suelo",
|
||||
"bedrock_use_java": "Usa Java para elegir mundos"
|
||||
"placeholder_ground": "Ground Level"
|
||||
}
|
||||
@@ -10,11 +10,11 @@
|
||||
"error_coordinates_out_of_range": "Virhe: Koordinaatit ovat kantaman ulkopuolella tai vääriin aseteltu (Lat ennen Lng vaadittu).",
|
||||
"invalid_format": "Väärä formaatti. Käytä 'lat,lng,lat,lng' tai 'lat lng lat lng'.",
|
||||
"generation_process_started": "Luontiprosessi aloitettu.",
|
||||
"winter_mode": "Talvitila",
|
||||
"world_scale": "Maailmanskaalaus",
|
||||
"custom_bounding_box": "Mukautettu rajoituslaatikko",
|
||||
"floodfill_timeout": "Täytön aikakatkaisu (sec)",
|
||||
"ground_level": "Maataso",
|
||||
"winter_mode": "Talvitila:",
|
||||
"world_scale": "Maailmanskaalaus:",
|
||||
"custom_bounding_box": "Mukautettu rajoituslaatikko:",
|
||||
"floodfill_timeout": "Täytön aikakatkaisu (sec):",
|
||||
"ground_level": "Maataso:",
|
||||
"choose_world_modal_title": "Valitse maailma",
|
||||
"select_existing_world": "Valitse olemassa oleva maailma",
|
||||
"generate_new_world": "Luo uusi maailma",
|
||||
@@ -30,20 +30,9 @@
|
||||
"area_too_large": "Tämä alue on todella iso ja voi ylittää tyypilliset laskentarajat.",
|
||||
"area_extensive": "Alue on aika laaja ja voi viedä pitkän ajan ja resursseja.",
|
||||
"selection_confirmed": "Valinta vahvistettu!",
|
||||
"unknown_error": "Tuntematon virhe",
|
||||
"license_and_credits": "Lisenssi ja krediitit",
|
||||
"placeholder_bbox": "Formaatti: lat,lng,lat,lng",
|
||||
"placeholder_floodfill": "Sekuntia",
|
||||
"placeholder_ground": "Maataso",
|
||||
"language": "Kieli",
|
||||
"map_theme": "Karttateema",
|
||||
"terrain": "Maasto",
|
||||
"generation_mode": "Luontitila",
|
||||
"mode_geo_terrain": "Kohteet + Maasto",
|
||||
"mode_geo_only": "Vain kohteet",
|
||||
"mode_terrain_only": "Vain maasto",
|
||||
"interior": "Sisätilan luonti",
|
||||
"roof": "Katon luonti",
|
||||
"fillground": "Täytä maa",
|
||||
"bedrock_use_java": "Käytä Javaa maailmojen valintaan"
|
||||
}
|
||||
"unknown_error": "Unknown error",
|
||||
"license_and_credits": "License and Credits",
|
||||
"placeholder_bbox": "Format: lat,lng,lat,lng",
|
||||
"placeholder_floodfill": "Seconds",
|
||||
"placeholder_ground": "Ground Level"
|
||||
}
|
||||
@@ -10,11 +10,11 @@
|
||||
"error_coordinates_out_of_range": "오류: 좌표가 범위를 벗어나거나 잘못된 순서입니다 (Lat이 Lng보다 먼저 필요합니다).",
|
||||
"invalid_format": "잘못된 형식입니다. 'lat,lng,lat,lng' 또는 'lat lng lat lng' 형식을 사용하세요.",
|
||||
"generation_process_started": "생성 프로세스가 시작되었습니다.",
|
||||
"winter_mode": "겨울 모드",
|
||||
"world_scale": "세계 규모",
|
||||
"custom_bounding_box": "사용자 지정 경계 상자",
|
||||
"floodfill_timeout": "채우기 시간 초과 (초)",
|
||||
"ground_level": "지면 레벨",
|
||||
"winter_mode": "겨울 모드:",
|
||||
"world_scale": "세계 규모:",
|
||||
"custom_bounding_box": "사용자 지정 경계 상자:",
|
||||
"floodfill_timeout": "채우기 시간 초과 (초):",
|
||||
"ground_level": "지면 레벨:",
|
||||
"choose_world_modal_title": "세계 선택",
|
||||
"select_existing_world": "이미 존재하는 세계 선택",
|
||||
"generate_new_world": "새 세계 생성",
|
||||
@@ -34,16 +34,5 @@
|
||||
"license_and_credits": "License and Credits",
|
||||
"placeholder_bbox": "Format: lat,lng,lat,lng",
|
||||
"placeholder_floodfill": "Seconds",
|
||||
"placeholder_ground": "Ground Level",
|
||||
"language": "언어",
|
||||
"map_theme": "지도 테마",
|
||||
"terrain": "지형",
|
||||
"generation_mode": "생성 모드",
|
||||
"mode_geo_terrain": "객체 + 지형",
|
||||
"mode_geo_only": "객체만",
|
||||
"mode_terrain_only": "지형만",
|
||||
"interior": "내부 생성",
|
||||
"roof": "지붕 생성",
|
||||
"fillground": "지면 채우기",
|
||||
"bedrock_use_java": "Java로 세계 선택"
|
||||
"placeholder_ground": "Ground Level"
|
||||
}
|
||||
@@ -10,11 +10,11 @@
|
||||
"error_coordinates_out_of_range": "Klaida: Koordinatės yra už ribų arba neteisingai išdėstytos (plat turi būti prieš ilg).",
|
||||
"invalid_format": "Neteisingas formatas. Prašome naudoti 'plat,ilg,plat,ilg' arba 'plat ilg plat ilg'.",
|
||||
"generation_process_started": "Generacijos procesas pradėtas.",
|
||||
"winter_mode": "Žiemos režimas",
|
||||
"world_scale": "Pasaulio mastelis",
|
||||
"custom_bounding_box": "Pasirinktinis ribos rėmas",
|
||||
"floodfill_timeout": "Užpildymo laiko limitas (sek.)",
|
||||
"ground_level": "Žemės lygis",
|
||||
"winter_mode": "Žiemos režimas:",
|
||||
"world_scale": "Pasaulio mastelis:",
|
||||
"custom_bounding_box": "Pasirinktinis ribos rėmas:",
|
||||
"floodfill_timeout": "Užpildymo laiko limitas (sek.):",
|
||||
"ground_level": "Žemės lygis:",
|
||||
"choose_world_modal_title": "Pasaulio pasirinkimas",
|
||||
"select_existing_world": "Pasirinkti esamą pasaulį",
|
||||
"generate_new_world": "Sugeneruoti naują pasaulį",
|
||||
@@ -34,16 +34,5 @@
|
||||
"license_and_credits": "Licencija ir padėkos",
|
||||
"placeholder_bbox": "Formatas: plat,lyg,plat,lyg",
|
||||
"placeholder_floodfill": "Sekundės",
|
||||
"placeholder_ground": "Žemės lygis",
|
||||
"language": "Kalba",
|
||||
"map_theme": "Žemėlapio tema",
|
||||
"terrain": "Reljefas",
|
||||
"generation_mode": "Generavimo režimas",
|
||||
"mode_geo_terrain": "Objektai + Reljefas",
|
||||
"mode_geo_only": "Tik objektai",
|
||||
"mode_terrain_only": "Tik reljefas",
|
||||
"interior": "Interjero generavimas",
|
||||
"roof": "Stogo generavimas",
|
||||
"fillground": "Užpildyti pagrindą",
|
||||
"bedrock_use_java": "Naudok Java pasauliams"
|
||||
"placeholder_ground": "Žemės lygis"
|
||||
}
|
||||
@@ -10,11 +10,11 @@
|
||||
"error_coordinates_out_of_range": "Błąd: Współrzędne są poza zakresem lub w złej kolejności (wymagana szerokość przed długością).",
|
||||
"invalid_format": "Nieprawidłowy format. Użyj 'szer.,dł.,szer.,dł.' lub 'szer. dł. szer. dł.'.",
|
||||
"generation_process_started": "Proces generowania rozpoczęty.",
|
||||
"winter_mode": "Tryb Zimowy",
|
||||
"world_scale": "Skala świata",
|
||||
"custom_bounding_box": "Niestandardowy obszar",
|
||||
"floodfill_timeout": "Limit czasu wypełniania (sek)",
|
||||
"ground_level": "Wysokość obszaru",
|
||||
"winter_mode": "Tryb Zimowy:",
|
||||
"world_scale": "Skala świata:",
|
||||
"custom_bounding_box": "Niestandardowy obszar:",
|
||||
"floodfill_timeout": "Limit czasu wypełniania (sek):",
|
||||
"ground_level": "Wysokość obszaru:",
|
||||
"choose_world_modal_title": "Wybierz świat",
|
||||
"select_existing_world": "Wybierz istniejący świat",
|
||||
"generate_new_world": "Generuj nowy świat",
|
||||
@@ -30,20 +30,9 @@
|
||||
"area_too_large": "Ten obszar jest bardzo duży i może przekroczyć limity obliczeniowe.",
|
||||
"area_extensive": "Ten obszar jest rozległy i może pochłonąć dużo czasu oraz zasobów.",
|
||||
"selection_confirmed": "Wybór potwierdzony!",
|
||||
"unknown_error": "Nieznany błąd",
|
||||
"license_and_credits": "Licencja i autorzy",
|
||||
"placeholder_bbox": "Format: szer,dł,szer,dł",
|
||||
"placeholder_floodfill": "Sekundy",
|
||||
"placeholder_ground": "Wysokość",
|
||||
"language": "Język",
|
||||
"map_theme": "Motyw mapy",
|
||||
"terrain": "Teren",
|
||||
"generation_mode": "Tryb generowania",
|
||||
"mode_geo_terrain": "Obiekty + Teren",
|
||||
"mode_geo_only": "Tylko obiekty",
|
||||
"mode_terrain_only": "Tylko teren",
|
||||
"interior": "Generowanie wnętrza",
|
||||
"roof": "Generowanie dachu",
|
||||
"fillground": "Wypełnij podłoże",
|
||||
"bedrock_use_java": "Użyj Java do wyboru światów"
|
||||
"unknown_error": "Unknown error",
|
||||
"license_and_credits": "License and Credits",
|
||||
"placeholder_bbox": "Format: lat,lng,lat,lng",
|
||||
"placeholder_floodfill": "Seconds",
|
||||
"placeholder_ground": "Ground Level"
|
||||
}
|
||||
@@ -10,11 +10,11 @@
|
||||
"error_coordinates_out_of_range": "Ошибка: Координаты находятся вне зоны действия или указаны в неправильном порядке (сначала широта, затем долгота)",
|
||||
"invalid_format": "Неверный формат. Используйте 'широта,долгота,широта,долгота' или 'широта долгота широта долгота'",
|
||||
"generation_process_started": "Процесс генерации начат",
|
||||
"winter_mode": "Зимний режим",
|
||||
"world_scale": "Масштаб мира",
|
||||
"custom_bounding_box": "Пользовательская ограничивающая рамка",
|
||||
"floodfill_timeout": "Тайм-аут заливки (сек)",
|
||||
"ground_level": "Уровень земли",
|
||||
"winter_mode": "Зимний режим:",
|
||||
"world_scale": "Масштаб мира:",
|
||||
"custom_bounding_box": "Пользовательская ограничивающая рамка:",
|
||||
"floodfill_timeout": "Тайм-аут заливки (сек):",
|
||||
"ground_level": "Уровень земли:",
|
||||
"choose_world_modal_title": "Выбрать мир",
|
||||
"select_existing_world": "Выбрать существующий мир",
|
||||
"generate_new_world": "Создать новый мир",
|
||||
@@ -30,20 +30,9 @@
|
||||
"area_too_large": "Эта область слишком велика и может превысить типичные вычислительные ограничения",
|
||||
"area_extensive": "Область довольно обширна и может потребовать значительного времени и ресурсов",
|
||||
"selection_confirmed": "Выбор подтвержден!",
|
||||
"unknown_error": "Неизвестная ошибка",
|
||||
"license_and_credits": "Лицензия и авторы",
|
||||
"placeholder_bbox": "Формат: широта,долгота,широта,долгота",
|
||||
"placeholder_floodfill": "Секунды",
|
||||
"placeholder_ground": "Уровень земли",
|
||||
"language": "Язык",
|
||||
"map_theme": "Тема Карты",
|
||||
"terrain": "Рельеф",
|
||||
"generation_mode": "Режим Генерации",
|
||||
"mode_geo_terrain": "Объекты + Рельеф",
|
||||
"mode_geo_only": "Только Объекты",
|
||||
"mode_terrain_only": "Только Рельеф",
|
||||
"interior": "Генерация Интерьера",
|
||||
"roof": "Генерация Крыши",
|
||||
"fillground": "Заполнить Землю",
|
||||
"bedrock_use_java": "Используйте Java для миров"
|
||||
}
|
||||
"unknown_error": "Unknown error",
|
||||
"license_and_credits": "License and Credits",
|
||||
"placeholder_bbox": "Format: lat,lng,lat,lng",
|
||||
"placeholder_floodfill": "Seconds",
|
||||
"placeholder_ground": "Ground Level"
|
||||
}
|
||||