Compare commits

...

922 Commits

Author SHA1 Message Date
Louis Erbkamm
0dcf4d2bc9 Merge pull request #515 from louis-e/major-release-prep
Major release preperation
2025-08-23 18:20:51 +02:00
Louis Erbkamm
0fd8f938e7 Merge branch 'main' into major-release-prep 2025-08-23 18:19:56 +02:00
Louis Erbkamm
97f891b5c9 Merge pull request #530 from louis-e/castle-material
Minor element generation enhancements
2025-08-23 18:10:59 +02:00
louis-e
4a92d3f249 Remove oak_trapdoor barrier 2025-08-23 18:10:03 +02:00
louis-e
fac0e06b1d Fix cargo fmt 2025-08-23 18:07:04 +02:00
louis-e
21d9dbddbc Enhance swing sets 2025-08-23 18:05:48 +02:00
louis-e
002ae8c7cf Enhance parking spaces 2025-08-23 18:03:12 +02:00
louis-e
09ab08bec2 Enhance greenfield and cemetery 2025-08-23 18:02:59 +02:00
Louis Erbkamm
14ecfa8aab Merge pull request #529 from louis-e/castle-material
Castle materials
2025-08-23 17:08:15 +02:00
louis-e
532e3bbb89 Implement specific castle materials 2025-08-23 17:07:42 +02:00
louis-e
ce7a2ad97e Implement specific castle materials 2025-08-23 17:07:32 +02:00
Louis Erbkamm
bc7a0d80c4 Merge pull request #528 from louis-e/window-resizable
Implement #343: Allow window to be resizable
2025-08-23 16:45:32 +02:00
louis-e
074a4f0b52 Implement #343: Allow window to be resizable 2025-08-23 16:44:36 +02:00
Louis Erbkamm
c4e2bf1b4d Merge pull request #527 from louis-e/discord-button
Add Discord button link to settings
2025-08-23 16:40:07 +02:00
louis-e
53e6be6f4a Add Discord button link to settings 2025-08-23 16:39:41 +02:00
Louis Erbkamm
37f1510399 Merge pull request #526 from louis-e/http-fallback
Fix cargo fmt
2025-08-23 16:34:13 +02:00
louis-e
dadd6917f9 Fix cargo fmt 2025-08-23 16:33:10 +02:00
Louis Erbkamm
d7dd4f64ba Merge pull request #525 from louis-e/http-fallback
Add automatic HTTP fallback for HTTPS tile loading failures
2025-08-23 16:28:15 +02:00
louis-e
6f47321ee7 Add automatic HTTP fallback for HTTPS tile loading failures 2025-08-23 16:27:23 +02:00
Louis Erbkamm
60b5f45c39 Merge pull request #524 from louis-e/linux-gpu-drivers
Fix #486: Map not loading due to GPU driver conflicts
2025-08-23 16:06:56 +02:00
louis-e
c714541434 Fix #486: Map not loading due to GPU driver conflicts 2025-08-23 16:06:07 +02:00
Louis Erbkamm
162a650f53 Merge pull request #523 from scd31/args-typo
fix typo in args
2025-08-23 15:49:56 +02:00
Stephen D
21bed97226 fix typo in args 2025-08-22 23:21:30 -04:00
Louis Erbkamm
07d4ad94bb Add Community Discord to README 2025-08-22 23:49:51 +02:00
Louis Erbkamm
0c403fd09e Add Community Discord to README 2025-08-22 23:49:15 +02:00
Louis Erbkamm
c8cdf74f02 Add Community Discord to README 2025-08-22 23:44:50 +02:00
Louis Erbkamm
ef6debdff2 Add Community Discord to README 2025-08-22 23:05:04 +02:00
Louis Erbkamm
dba37f9f2d Add Community Discord to README 2025-08-22 23:04:39 +02:00
Louis Erbkamm
1f02c40cb9 Merge branch 'main' into major-release-prep 2025-08-22 16:04:23 +02:00
Louis Erbkamm
9351883ae0 Merge pull request #522 from louis-e/fix-macos-builds-universal
Fix MacOS CI universal release builds
2025-08-22 16:02:18 +02:00
louis-e
2e3b66fe4a Fix MacOS CI release builds 2025-08-22 16:01:33 +02:00
Louis Erbkamm
d6151ab333 Merge pull request #520 from louis-e/fix-macos-builds
Fix MacOS builds
2025-08-22 15:17:25 +02:00
louis-e
1a56e5f08f Adjust baseline memory usage 2025-08-22 15:14:08 +02:00
louis-e
e3335cb6e6 ci: switch to Linux-only builds for faster PR feedback 2025-08-22 15:13:09 +02:00
louis-e
3a65e8b877 Remove mapbox argument 2025-08-22 15:03:58 +02:00
louis-e
fa84a8e4cc Remove mapbox argument 2025-08-22 15:00:37 +02:00
louis-e
257a3bcac4 Fix MacOS CI release builds 2025-08-22 14:57:36 +02:00
Louis Erbkamm
f262613871 Merge pull request #518 from louis-e/minor-fixes
Minor fixes
2025-08-22 02:15:42 +02:00
louis-e
43215ad19f Remove double call 2025-08-22 00:04:16 +02:00
louis-e
00541e43ef Fix missing tree leave block 2025-08-22 00:03:17 +02:00
Louis Erbkamm
732693b71d Merge pull request #516 from louis-e/gui-feature-gate-fix
fix: add feature gate for GUI-dependent spawn update code
2025-08-21 23:04:40 +02:00
louis-e
eaaf320c04 Remove chests from building interior 2025-08-21 23:04:16 +02:00
louis-e
79507637c2 Update benchmark baseline values 2025-08-21 22:54:25 +02:00
Louis Erbkamm
a722235e97 Merge pull request #514 from danieldegroot2/bbox-openstreetmap-provider
Update bbox.js - Use preferred tile.openstreetmap.org URL
2025-08-21 22:51:29 +02:00
louis-e
53f29e6e4d fix: add feature gate for GUI-dependent spawn update code 2025-08-21 22:48:19 +02:00
louis-e
89363f926a Update and modernize README 2025-08-21 22:43:41 +02:00
Louis Erbkamm
c06b5df768 Add recognition.png 2025-08-21 22:42:08 +02:00
louis-e
909e2ab97f Update Arnis version 2025-08-21 22:28:03 +02:00
louis-e
43ed19f456 Update and modernize README 2025-08-21 22:27:43 +02:00
Louis Erbkamm
5ec087c3ed Add documentation.png 2025-08-21 22:24:09 +02:00
Louis Erbkamm
20eee2b0ec Add documentation.png 2025-08-21 22:21:59 +02:00
Louis Erbkamm
821b9b9cb5 Add preview.jpg 2025-08-21 22:09:38 +02:00
Louis Erbkamm
fff9783806 Add files via upload 2025-08-21 21:28:22 +02:00
danieldegroot2
fd66b51169 Update bbox.js - Use preferred tile.openstreetmap.org URL
See https://github.com/openstreetmap/operations/issues/737
2025-08-21 20:58:41 +02:00
Louis Erbkamm
f8a2dc622a Add banner.png 2025-08-21 20:22:49 +02:00
Louis Erbkamm
9aeb35ac99 Merge pull request #513 from louis-e/minor-terrain-fixes
Update spawn point Y coord according to terrain
2025-08-21 19:28:52 +02:00
louis-e
84bef5fcd1 Enlarge CI benchmark area 2025-08-21 19:13:03 +02:00
louis-e
0230e7cb4c Fix cargo fmt and clippy 2025-08-21 19:02:44 +02:00
louis-e
fd9af964cc Enlarge CI benchmark area 2025-08-21 19:01:28 +02:00
louis-e
954391d468 Add support button 2025-08-21 18:55:35 +02:00
louis-e
c0ab878b91 Fix building offset when non-terrain mode 2025-08-21 18:40:57 +02:00
louis-e
af24887399 Update spawn point Y coord according to terrain 2025-08-21 18:01:42 +02:00
Louis Erbkamm
3cb9496252 Merge pull request #512 from louis-e/map-themes
Add map themes to settings
2025-08-21 17:25:16 +02:00
louis-e
a76d0e7121 Add map theme setting 2025-08-21 17:21:10 +02:00
louis-e
a9e883fc86 Add new map style translation 2025-08-21 17:20:42 +02:00
louis-e
6da977cc11 Update license 2025-08-21 17:20:24 +02:00
Louis Erbkamm
acbe81db93 Merge pull request #509 from louis-e/session-lock
Add session.lock to prevent world access during generation
2025-08-20 21:38:58 +02:00
louis-e
0249a0e933 Add session.lock to prevent world access during generation 2025-08-20 21:26:54 +02:00
louis-e
7748ef0cd6 Add session.lock to prevent world access during generation 2025-08-20 21:23:23 +02:00
Louis Erbkamm
5cb82abc9b Merge pull request #508 from louis-e/terrain-smoothness
Deprecate ground level input
2025-08-20 21:17:48 +02:00
louis-e
4fa486bc27 Add session.lock to prevent world access during generation 2025-08-20 21:15:39 +02:00
louis-e
4fb467988c Deprecate ground level input 2025-08-20 21:03:28 +02:00
Louis Erbkamm
adc0bcb3ee Merge pull request #506 from louis-e/gui-fixes
Minor GUI Fixes
2025-08-10 21:24:54 +02:00
louis-e
b8b41a3541 Fix floodfill algorithm for U-shape buildings 2025-08-10 20:40:01 +02:00
louis-e
c02ee9e988 Fix bbox map priority 2025-08-10 20:39:48 +02:00
louis-e
3ccc6c0853 Shorten translations for fitting UI 2025-08-10 19:55:54 +02:00
louis-e
b1c0aea317 Revert version check change 2025-08-10 19:55:39 +02:00
louis-e
651aed65fb Add translations for interior and roof generation 2025-08-10 19:42:51 +02:00
louis-e
f180d84ef2 Fix dropdown preview language 2025-08-10 19:37:48 +02:00
louis-e
2cee6f6ab2 Clear bbox and spawn point when searching for new city 2025-08-10 19:28:44 +02:00
louis-e
bbf52e8b89 Fix bbox selection preserved when custom input is invalid 2025-08-10 19:13:04 +02:00
Louis Erbkamm
8ec67f8420 Merge pull request #498 from louis-e/dependabot/cargo/clap-4.5.42
build(deps): bump clap from 4.5.23 to 4.5.42
2025-08-03 23:00:03 +02:00
Louis Erbkamm
a431a05f0d Merge pull request #499 from louis-e/dependabot/cargo/tokio-1.47.0
build(deps): bump tokio from 1.44.2 to 1.47.0
2025-08-03 22:59:53 +02:00
Louis Erbkamm
37b80f02db Merge pull request #500 from louis-e/dependabot/cargo/geo-0.30.0
build(deps): bump geo from 0.29.3 to 0.30.0
2025-08-03 22:59:47 +02:00
Louis Erbkamm
7dff3ac865 Merge pull request #501 from louis-e/dependabot/cargo/rfd-0.15.4
build(deps): bump rfd from 0.15.3 to 0.15.4
2025-08-03 22:59:33 +02:00
Louis Erbkamm
7e1981672b Merge pull request #505 from louis-e/elevation-crop-mapping-fix
Elevation crop mapping fix
2025-08-03 22:30:29 +02:00
louis-e
e0c3ab3451 Fix clippy #[allow(clippy::uninlined_format_args)] 2025-08-03 22:30:04 +02:00
louis-e
9ea526f0eb Fix elevation coordinate drift with geographic pixel cropping 2025-08-03 22:25:19 +02:00
louis-e
3307f63864 Update progress percentages 2025-08-03 22:21:58 +02:00
Louis Erbkamm
fb70f00da8 Merge pull request #496 from louis-e/maps-search-box
Add city search box to map with geocoding support
2025-08-03 14:21:46 +02:00
louis-e
58cff26d37 Add autocomplete off tag to search box 2025-08-03 14:21:28 +02:00
louis-e
a7c5e1baee Color adaptions on search box 2025-08-03 14:08:57 +02:00
dependabot[bot]
29fc3ce916 build(deps): bump rfd from 0.15.3 to 0.15.4
Bumps [rfd](https://github.com/PolyMeilex/rfd) from 0.15.3 to 0.15.4.
- [Release notes](https://github.com/PolyMeilex/rfd/releases)
- [Changelog](https://github.com/PolyMeilex/rfd/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PolyMeilex/rfd/compare/0.15.3...0.15.4)

---
updated-dependencies:
- dependency-name: rfd
  dependency-version: 0.15.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-01 02:58:35 +00:00
dependabot[bot]
d3365d01b1 build(deps): bump geo from 0.29.3 to 0.30.0
Bumps [geo](https://github.com/georust/geo) from 0.29.3 to 0.30.0.
- [Changelog](https://github.com/georust/geo/blob/main/CHANGES.md)
- [Commits](https://github.com/georust/geo/compare/geo-0.29.3...geo-0.30.0)

---
updated-dependencies:
- dependency-name: geo
  dependency-version: 0.30.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-01 02:58:06 +00:00
dependabot[bot]
04cbb6427e build(deps): bump tokio from 1.44.2 to 1.47.0
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.44.2 to 1.47.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.44.2...tokio-1.47.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-version: 1.47.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-01 02:57:46 +00:00
dependabot[bot]
3680bc8849 build(deps): bump clap from 4.5.23 to 4.5.42
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.23 to 4.5.42.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.23...clap_complete-v4.5.42)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.5.42
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-01 02:57:26 +00:00
louis-e
5cfb3faece Add city search box to map with geocoding support 2025-07-23 21:39:33 +02:00
Louis Erbkamm
3217eea558 Merge pull request #495 from louis-e/man_made
Add man_made tagged elements
2025-07-23 21:24:28 +02:00
louis-e
c3b2624307 Fix cargo fmt and clippy 2025-07-23 21:21:33 +02:00
louis-e
12a401c690 Remove unused import 2025-07-23 21:19:33 +02:00
louis-e
d188f6d579 Add man_made tagged elements 2025-07-23 21:18:16 +02:00
Louis Erbkamm
d2fb65c715 Merge pull request #494 from louis-e/better-waterways
Better waterway parsing
2025-07-23 21:16:19 +02:00
louis-e
d370c72425 Fix cargo fmt 2025-07-23 21:13:46 +02:00
louis-e
3e9f71f81a Fix polygon closure preservation in bbox clipping for multipolygon water areas 2025-07-23 16:43:16 +02:00
louis-e
6b2c4eb55b Fix cargo clippy 2025-07-21 23:07:05 +02:00
louis-e
88a7cf2f6e Runtime detect and fix faulty terrain tiles 2025-07-21 22:54:30 +02:00
louis-e
d7296f69d3 Fix more polyline clipping in sutherland hodgman algorithm 2025-07-21 22:52:50 +02:00
louis-e
c298300a27 Minor improvements to water area generation 2025-07-21 22:19:28 +02:00
Louis Erbkamm
9b752a8915 Merge pull request #484 from louis-e/dependabot/cargo/tauri-plugin-log-2.6.0
build(deps): bump tauri-plugin-log from 2.2.2 to 2.6.0
2025-07-21 21:39:35 +02:00
dependabot[bot]
0285e63dbf build(deps): bump tauri-plugin-log from 2.2.2 to 2.6.0
Bumps [tauri-plugin-log](https://github.com/tauri-apps/plugins-workspace) from 2.2.2 to 2.6.0.
- [Release notes](https://github.com/tauri-apps/plugins-workspace/releases)
- [Commits](https://github.com/tauri-apps/plugins-workspace/compare/os-v2.2.2...log-v2.6.0)

---
updated-dependencies:
- dependency-name: tauri-plugin-log
  dependency-version: 2.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-21 19:38:47 +00:00
louis-e
33097aa302 Add more waterway types 2025-07-21 21:32:39 +02:00
louis-e
c6504a2fa3 Better waterway parsing 2025-07-21 21:31:54 +02:00
Louis Erbkamm
8da93ab628 Merge pull request #482 from louis-e/dependabot/cargo/reqwest-0.12.15
build(deps): bump reqwest from 0.12.12 to 0.12.15
2025-07-21 21:05:06 +02:00
Louis Erbkamm
8ba4d3ddef Merge pull request #483 from louis-e/dependabot/cargo/flate2-1.1.2
build(deps): bump flate2 from 1.1.1 to 1.1.2
2025-07-21 21:05:01 +02:00
Louis Erbkamm
74ceb3afb8 Merge pull request #485 from louis-e/dependabot/cargo/tauri-build-2.0.5
build(deps): bump tauri-build from 2.0.4 to 2.0.5
2025-07-21 21:04:33 +02:00
Louis Erbkamm
c886894e14 Merge pull request #493 from louis-e/terrain-aws-migration
Migrate from Mapbox to AWS Terrain Tiles
2025-07-21 21:01:06 +02:00
louis-e
8d6c666f75 Fix cargo fmt and clippy 2025-07-21 20:52:23 +02:00
louis-e
de2bce5a0a Support landuse relations 2025-07-21 20:50:07 +02:00
louis-e
8e9d6f0ad1 Revert water areas 2025-07-21 20:46:09 +02:00
louis-e
eb13dabd16 Refine element processors 2025-07-21 20:44:50 +02:00
louis-e
af612095fa Refine elevation parameters 2025-07-21 20:44:37 +02:00
louis-e
8132881f86 Add old tile cache directory name to gitignorew 2025-07-20 23:57:28 +02:00
louis-e
994ae0d770 Rename tile cache directory 2025-07-20 23:56:01 +02:00
louis-e
da10ffc655 Revert conditional terrain disablement 2025-07-20 23:52:12 +02:00
Louis Erbkamm
d987ae73d0 Merge branch 'main' into dependabot/cargo/reqwest-0.12.15 2025-07-20 23:49:47 +02:00
Louis Erbkamm
f4accbbf8c Merge branch 'main' into dependabot/cargo/flate2-1.1.2 2025-07-20 23:49:44 +02:00
Louis Erbkamm
9887efd1e3 Merge branch 'main' into dependabot/cargo/tauri-build-2.0.5 2025-07-20 23:49:28 +02:00
Louis Erbkamm
50f5a1a844 Merge branch 'main' into terrain-aws-migration 2025-07-20 23:45:52 +02:00
louis-e
5cd590f165 Migrate from Mapbox to AWS Terrain Tiles 2025-07-20 23:45:29 +02:00
Louis Erbkamm
1d031a75bc Merge pull request #492 from louis-e/natural-extension
Add support for more natural elements
2025-07-20 23:42:50 +02:00
Louis Erbkamm
a17ef09727 Fix cargo fmt and clippy 2025-07-20 23:37:22 +02:00
Louis Erbkamm
ed20642e8b Merge branch 'main' into natural-extension 2025-07-20 23:33:47 +02:00
louis-e
501825d05b Fix cargo fmt and clippy 2025-07-20 23:33:31 +02:00
Louis Erbkamm
6ee1b55924 Merge pull request #491 from louis-e/sutherland-hodgman-algorithm
Implement Sutherland-Hodgman algorithm for element clipping
2025-07-20 23:32:42 +02:00
Louis Erbkamm
1a206b8e69 Fix cargo fmt and clippy 2025-07-20 23:30:08 +02:00
louis-e
52fe87b90d Add more natural elements 2025-07-20 23:24:12 +02:00
louis-e
3ea85009e7 Implement Sutherland-Hodgman algorithm for element clipping 2025-07-20 23:21:36 +02:00
Louis Erbkamm
bd5a7b9bee Merge pull request #465 from louis-e/buildings-foundation
Buildings Overhaul
2025-07-20 23:18:19 +02:00
louis-e
799c7d6007 Fix cargo fmt 2025-07-20 23:11:06 +02:00
louis-e
7f28089c14 Fix interior wall roof clipping 2025-07-20 23:07:28 +02:00
louis-e
4bb69b6b16 Fix cargo fmt and clippy 2025-07-20 18:35:09 +02:00
louis-e
36d084d02f Minor refinements 2025-07-20 17:14:34 +02:00
louis-e
9d4ce48d8d Remove args from roof generation 2025-07-20 15:10:57 +02:00
louis-e
6f7efd8a1c Change stair block mapping 2025-07-20 15:08:09 +02:00
louis-e
37ec4be8fc Fix cargo fmt and clippy 2025-07-20 01:35:15 +02:00
louis-e
6b43f12769 Fixed scanlines in floodfill algorithm 2025-07-20 01:30:27 +02:00
louis-e
06357abe97 Improve generation time by implementing floodfill caching 2025-07-20 01:03:25 +02:00
louis-e
86c92104dd Remove unused vars and log lines 2025-07-20 00:33:49 +02:00
louis-e
c9551d8ec0 Fix cargo fmt and clippy 2025-07-19 23:45:06 +02:00
louis-e
6b676eab08 Change roof material choice chance 2025-07-19 23:39:59 +02:00
louis-e
2a6a507082 Temporary improvement for water_areas generation speed 2025-07-19 23:37:09 +02:00
louis-e
9a7c00a3c4 Fix metal barriers 2025-07-19 23:34:12 +02:00
louis-e
57dcd72979 Add highway outline 2025-07-19 23:33:55 +02:00
louis-e
486dcdee2e Revert floodfill optimization 2025-07-19 23:33:41 +02:00
louis-e
7f01b596cb Conditional terrain disablement based on bbox size 2025-07-19 20:47:39 +02:00
louis-e
4a672811c0 Calculate terrain blur in relation to bbox size 2025-07-19 20:47:13 +02:00
louis-e
0ec64fc13d Fix min_levels tag 2025-07-19 20:11:32 +02:00
louis-e
f9796c60a0 Improve floodfill performance 2025-07-19 20:06:14 +02:00
louis-e
2fd0244889 Performance improvements 2025-07-19 20:00:27 +02:00
louis-e
7e6ab21a9e Fixed cargo fmt and clippy 2025-07-19 18:17:20 +02:00
louis-e
dd7578d8d3 Add support for custom block property creation 2025-07-19 18:14:17 +02:00
louis-e
4b766095c8 Improved hipped and gabled roofs 2025-07-19 16:19:11 +02:00
louis-e
e8d718772a Fix progress updates 2025-07-13 20:46:25 +02:00
louis-e
0a488655d2 Unified cone building roof 2025-07-13 19:25:45 +02:00
louis-e
aed978947d Improved pyramidal building roof 2025-07-13 19:08:10 +02:00
louis-e
f4d35eebf7 Improved skillion roof type 2025-07-13 17:27:26 +02:00
louis-e
97fe4e264b More floor variations 2025-07-13 15:54:40 +02:00
louis-e
d53af0a3f4 Fix cargo fmt and clippy 2025-07-13 02:16:42 +02:00
louis-e
3e7e4b663e Refactored building block color mapping 2025-07-13 02:13:16 +02:00
louis-e
a86506b28d Add building accent blocks 2025-07-12 22:43:12 +02:00
louis-e
b9250651a2 Conditional roof generation 2025-07-12 21:23:35 +02:00
louis-e
98ed4e3f1c Fix cargo formatting 2025-07-12 16:26:41 +02:00
Louis Erbkamm
73776578bf Update elevation differences 2025-07-12 16:22:07 +02:00
Louis Erbkamm
aa36db7f13 Merge branch 'main' into buildings-foundation 2025-07-12 16:20:54 +02:00
louis-e
38c2550f0d Remove wiki 2025-07-12 16:12:30 +02:00
louis-e
4c8108bdf9 Added window glass block variation 2025-07-12 16:11:22 +02:00
louis-e
0ff6cabcf5 Shift floors for visual variation 2025-07-12 15:39:31 +02:00
Louis Erbkamm
dd22bbb943 Merge pull request #487 from louis-e/gui-settings
GUI Settings refactored languages
2025-07-02 16:39:28 +02:00
louis-e
5bbe3f1ec9 removed handleLanguageSelection() 2025-07-02 16:39:14 +02:00
louis-e
1db53c4656 Added localized language and fillground attribute 2025-07-02 16:27:58 +02:00
louis-e
43f3f2f67d Added localized language and fillground attribute 2025-07-02 16:25:55 +02:00
louis-e
dc3ea8df5e Removed duplicate functions 2025-07-02 16:14:23 +02:00
louis-e
f9776c4472 Added language dropdown 2025-07-02 16:07:00 +02:00
Louis Erbkamm
27f8c70a10 Merge pull request #474 from XianlinSheng/dev-unicoord
Rearrange geocoord and bbox into coordinate_system in the same style as cartesian point and xzbbox
2025-07-02 14:40:34 +02:00
louis-e
6842a44e2a Fix fmt 2025-07-02 14:33:04 +02:00
louis-e
b28ce5cc12 Fix clippy 2025-07-02 14:29:16 +02:00
louis-e
d56894debd Resolve cargo fmt warnings 2025-07-02 13:56:36 +02:00
louis-e
2571e43f7e Merge dev-unicoord into main with conflict resolution 2025-07-02 13:54:33 +02:00
louis-e
0d3f1b6b5d Merge dev-unicoord into main with conflict resolution 2025-07-02 13:54:04 +02:00
dependabot[bot]
174374e514 build(deps): bump tauri-build from 2.0.4 to 2.0.5
Bumps [tauri-build](https://github.com/tauri-apps/tauri) from 2.0.4 to 2.0.5.
- [Release notes](https://github.com/tauri-apps/tauri/releases)
- [Commits](https://github.com/tauri-apps/tauri/compare/tauri-build-v2.0.4...tauri-build-v2.0.5)

---
updated-dependencies:
- dependency-name: tauri-build
  dependency-version: 2.0.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 06:29:54 +00:00
dependabot[bot]
f3fbe6e84d build(deps): bump flate2 from 1.1.1 to 1.1.2
Bumps [flate2](https://github.com/rust-lang/flate2-rs) from 1.1.1 to 1.1.2.
- [Release notes](https://github.com/rust-lang/flate2-rs/releases)
- [Commits](https://github.com/rust-lang/flate2-rs/compare/1.1.1...1.1.2)

---
updated-dependencies:
- dependency-name: flate2
  dependency-version: 1.1.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 05:39:35 +00:00
dependabot[bot]
34d5d4ae22 build(deps): bump reqwest from 0.12.12 to 0.12.15
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.12.12 to 0.12.15.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.12...v0.12.15)

---
updated-dependencies:
- dependency-name: reqwest
  dependency-version: 0.12.15
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 05:30:35 +00:00
Louis Erbkamm
666e47ce7e Change ANDESITE_WALL to STONE_BRICK_WALL 2025-06-24 22:17:46 +02:00
Louis Erbkamm
5a3b92b4f3 Merge pull request #466 from GMart/Update-block-types
Update barrier generation
2025-06-24 22:16:03 +02:00
Garrett M
a300f793ec Merge branch 'louis-e:main' into Update-block-types 2025-06-24 10:02:39 -04:00
Louis Erbkamm
cccea1d87a Merge pull request #468 from louis-e/dependabot/cargo/serde_json-1.0.140
build(deps): bump serde_json from 1.0.134 to 1.0.140
2025-06-22 16:46:12 +02:00
dependabot[bot]
19bac86e5e build(deps): bump serde_json from 1.0.134 to 1.0.140
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.134 to 1.0.140.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.134...v1.0.140)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-version: 1.0.140
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-22 13:46:51 +00:00
Louis Erbkamm
491057255c Merge pull request #470 from louis-e/dependabot/cargo/indicatif-0.17.11
build(deps): bump indicatif from 0.17.9 to 0.17.11
2025-06-22 15:42:32 +02:00
dependabot[bot]
44fe74083a build(deps): bump indicatif from 0.17.9 to 0.17.11
Bumps [indicatif](https://github.com/console-rs/indicatif) from 0.17.9 to 0.17.11.
- [Release notes](https://github.com/console-rs/indicatif/releases)
- [Commits](https://github.com/console-rs/indicatif/compare/0.17.9...0.17.11)

---
updated-dependencies:
- dependency-name: indicatif
  dependency-version: 0.17.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-22 13:42:04 +00:00
Louis Erbkamm
10fbc7e85a Merge pull request #469 from louis-e/dependabot/cargo/rfd-0.15.3
build(deps): bump rfd from 0.15.2 to 0.15.3
2025-06-22 15:41:18 +02:00
Louis Erbkamm
cdafe0488a Merge pull request #471 from louis-e/dependabot/cargo/image-0.25.6
build(deps): bump image from 0.24.9 to 0.25.6
2025-06-22 15:41:02 +02:00
Louis Erbkamm
df3c9d2507 Merge pull request #472 from louis-e/dependabot/github_actions/actions/checkout-4
build(deps): bump actions/checkout from 3 to 4
2025-06-22 15:40:50 +02:00
Louis Erbkamm
5cbcd68f46 Merge pull request #452 from akx/terrain-fixes
Terrain fixes
2025-06-22 15:40:37 +02:00
Louis Erbkamm
fe10b7d079 Merge branch 'main' into terrain-fixes 2025-06-22 15:24:45 +02:00
louis-e
b8ffb51bdc Return ground 2025-06-22 15:24:17 +02:00
XianlinSheng
404e733f65 merge 2025-06-09 21:36:45 -04:00
louis-e
2fd3d47ca1 Move interior generation into own file 2025-06-02 20:42:09 +02:00
louis-e
a327552fba Add more detailed interior 2025-06-02 20:14:46 +02:00
Louis Erbkamm
e95a6ff738 Add Wiki reference 2025-06-01 16:43:47 +02:00
louis-e
d2f1fca921 Revert cargo fmt 2025-06-01 15:59:57 +02:00
louis-e
7df43604e2 Add interior toggle button 2025-06-01 15:43:36 +02:00
louis-e
96e40cf15f Fix fmt and clippy 2025-06-01 15:30:58 +02:00
louis-e
e6dfa5d59e Add building interior generation 2025-06-01 15:28:35 +02:00
dependabot[bot]
b760f0e720 build(deps): bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-01 03:06:57 +00:00
dependabot[bot]
fec3059157 build(deps): bump image from 0.24.9 to 0.25.6
Bumps [image](https://github.com/image-rs/image) from 0.24.9 to 0.25.6.
- [Changelog](https://github.com/image-rs/image/blob/main/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.24.9...v0.25.6)

---
updated-dependencies:
- dependency-name: image
  dependency-version: 0.25.6
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-01 02:43:02 +00:00
dependabot[bot]
57fee8b273 build(deps): bump rfd from 0.15.2 to 0.15.3
Bumps [rfd](https://github.com/PolyMeilex/rfd) from 0.15.2 to 0.15.3.
- [Release notes](https://github.com/PolyMeilex/rfd/releases)
- [Changelog](https://github.com/PolyMeilex/rfd/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PolyMeilex/rfd/compare/0.15.2...0.15.3)

---
updated-dependencies:
- dependency-name: rfd
  dependency-version: 0.15.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-01 02:42:28 +00:00
Garrett M
6c62ada7cc Add whitelist items to gate nodes
Add additional whitelist items to gate nodes, to hopefully improve the look of gates
2025-05-30 20:41:01 -04:00
Garrett M
ead52305cf Merge branch 'louis-e:main' into Update-block-types 2025-05-30 16:04:07 -04:00
Garrett M
662c8a9a27 Update barrier generation
Update barrier generation: Separate out ways and nodes. Add gates and stiles, etc as nodes.
Update metal and related barriers to IRON_BARS
2025-05-30 16:03:23 -04:00
Louis Erbkamm
101b340071 Merge pull request #462 from louis-e/new-icon
Add new desktop icon
2025-05-30 01:53:36 +02:00
louis-e
39a7461f82 Automatically calculate roof_height_boost 2025-05-30 01:44:58 +02:00
louis-e
c49605d993 Improve gabled roof 2025-05-30 01:34:05 +02:00
louis-e
3e3948d345 Improve hipped roof 2025-05-30 01:19:30 +02:00
louis-e
d32e4edaa3 Remove txt 2025-05-30 01:01:26 +02:00
Garrett M
d115ee2ec7 Fix Floor map and add new block
Fix type with building floor variations color map, and add oak trapdoor block
2025-05-29 18:56:49 -04:00
louis-e
1a41766f2e World name adaption 2025-05-30 00:54:22 +02:00
louis-e
b191bc294a Unified roofs 2025-05-30 00:37:48 +02:00
louis-e
d146f3fd83 Revert combined roof types 2025-05-30 00:11:02 +02:00
louis-e
eea839f5ad Add roofs 2025-05-30 00:10:27 +02:00
louis-e
2c0c475f57 Fix unused warning 2025-05-29 22:15:34 +02:00
louis-e
37ed36b433 Add tall building specific windows 2025-05-29 21:28:58 +02:00
louis-e
548e0f9456 Fix foundation 2025-05-29 21:04:40 +02:00
louis-e
eb7ec70f39 Generate buildings with foundation 2025-05-29 16:59:49 +02:00
Aarni Koskela
cb32be70b2 Fix lint issue 2025-05-24 18:22:18 +00:00
louis-e
8fbf432b5b Add new desktop icon 2025-05-24 03:15:56 +02:00
Louis Erbkamm
e86937ec1b Merge branch 'main' into terrain-fixes 2025-05-24 02:38:32 +02:00
Louis Erbkamm
71e28d1403 Merge pull request #457 from akx/fix-benchmark-ci
CI: fix benchmark time to not include build
2025-05-24 02:36:25 +02:00
Louis Erbkamm
de79896dc5 Merge pull request #451 from akx/overflows
Some overflow fixes
2025-05-24 02:35:11 +02:00
Louis Erbkamm
047e3a0feb Merge pull request #461 from louis-e/spawn-position
Select spawn position using marker
2025-05-24 02:14:41 +02:00
louis-e
97d59d8e0c Abort when spawn point in bbox verification fails 2025-05-24 02:09:07 +02:00
louis-e
fda9a3a6b2 Fix bbox drawing issue 2025-05-24 02:04:17 +02:00
louis-e
82145250ae Fine tune construction generation 2025-05-24 02:02:39 +02:00
louis-e
4df49422df Add marker to set spawn position 2025-05-24 01:14:24 +02:00
Louis Erbkamm
db123792d4 Merge pull request #450 from akx/more-fixes-1
Data parsing fixes
2025-05-23 21:34:45 +02:00
Louis Erbkamm
526b6ae5e8 Merge pull request #460 from louis-e/remove-unneeded-src
Remove unneeded js and css files
2025-05-23 21:29:26 +02:00
louis-e
55e8688031 Remove unneeded js and css files 2025-05-23 21:17:12 +02:00
Louis Erbkamm
8001014454 Merge branch 'main' into terrain-fixes 2025-05-23 21:04:32 +02:00
Louis Erbkamm
188bacad88 Merge branch 'main' into fix-benchmark-ci 2025-05-23 20:58:18 +02:00
Louis Erbkamm
a2cd96214d pr-benchmark.yml: Fix token 2025-05-23 20:58:09 +02:00
Louis Erbkamm
103693b28d pr-benchmark.yml: Add permissions to fix CI error 2025-05-23 20:44:56 +02:00
Aarni Koskela
07503c1763 Adjust benchmark baseline time now that it doesn't include build 2025-05-19 09:04:35 +03:00
Aarni Koskela
03c72c7a14 CI: use Swatinem/rust-cache 2025-05-19 09:04:35 +03:00
Aarni Koskela
58157cee37 CI: don't require clippy for benchmark 2025-05-19 09:04:35 +03:00
Aarni Koskela
806dd11b51 CI: separate benchmark build from run step 2025-05-19 09:04:35 +03:00
Aarni Koskela
6a94435d33 Default to new hard-coded mapbox access token if none provided 2025-05-19 08:26:38 +03:00
Aarni Koskela
a188f521bb Print out terrain heights 2025-05-19 08:21:30 +03:00
Aarni Koskela
2969966fd1 Cache Mapbox tiles locally to avoid requests when possible 2025-05-19 08:21:30 +03:00
Aarni Koskela
b4c6f55ef4 De-hardcode Mapbox access token (it gives 401 now anyway) 2025-05-19 08:21:30 +03:00
Aarni Koskela
654124be75 Move elevation data fetching out of the ground impl 2025-05-19 08:21:29 +03:00
Aarni Koskela
384f541254 Handle Mapbox API errors 2025-05-19 08:20:52 +03:00
Aarni Koskela
5e44313730 Separate terrain constructor for flat and fetch cases 2025-05-19 08:20:52 +03:00
Louis Erbkamm
885c3a7127 Merge pull request #456 from louis-e/map-provider-switch
Switch map provider from Mapbox to OSM
2025-05-18 22:49:14 +02:00
louis-e
b86289c49a Switch map provider from Mapbox to OSM 2025-05-18 22:44:44 +02:00
Louis Erbkamm
144ac58468 Merge pull request #447 from akx/ci-fixes
Small CI fixes
2025-05-18 19:59:01 +02:00
Louis Erbkamm
03a4997cac updated checkout@v3 to v4 2025-05-18 19:58:19 +02:00
Louis Erbkamm
fd4aefaf2b Merge branch 'main' into ci-fixes 2025-05-18 19:48:19 +02:00
XianlinSheng
4edfddb33c merge 2025-05-18 12:35:29 -04:00
XianlinSheng
f46fb696ce Merge branch 'main' into dev-unicoord 2025-05-18 12:29:45 -04:00
Louis Erbkamm
0bc6967d83 Merge pull request #130 from louis-e/dependabot/github_actions/actions/upload-artifact-4
Bump actions/upload-artifact from 3 to 4
2025-05-18 16:46:02 +02:00
Louis Erbkamm
a37612626c Merge pull request #129 from louis-e/dependabot/github_actions/actions/checkout-4
Bump actions/checkout from 3 to 4
2025-05-18 16:45:44 +02:00
Louis Erbkamm
5e8bb3f5a0 Merge pull request #131 from louis-e/dependabot/github_actions/softprops/action-gh-release-2
Bump softprops/action-gh-release from 1 to 2
2025-05-18 16:45:38 +02:00
Louis Erbkamm
4226438075 Merge pull request #132 from louis-e/dependabot/github_actions/actions/download-artifact-4
Bump actions/download-artifact from 3 to 4
2025-05-18 16:45:11 +02:00
Louis Erbkamm
cd30fc74af Merge pull request #454 from louis-e/mapbox-token
Fix expired mapbox token
2025-05-18 16:34:38 +02:00
louis-e
62c3f94857 Fix expired mapbox token 2025-05-18 16:33:03 +02:00
Louis Erbkamm
5de8f1c78d Prepare hotfix release 2025-05-18 16:29:05 +02:00
Louis Erbkamm
d0295bfd40 Prepare hotfix release 2025-05-18 16:28:52 +02:00
Louis Erbkamm
b3b3436efd pr-benchmark.yml: update generation time logic 2025-05-18 15:47:41 +02:00
XianlinSheng
dea764783b merge 2025-05-16 13:06:00 -04:00
Aarni Koskela
f42d15780c Use wrapping multiplication for parking spot markings 2025-05-16 13:10:45 +03:00
Aarni Koskela
d19cf5aef2 Avoid integer overflow when dealing with large enough water areas 2025-05-16 13:10:45 +03:00
Aarni Koskela
bf2e3d5b94 Do overflow checks even in release (avoids some hangs, but panics instead) 2025-05-16 13:10:45 +03:00
Aarni Koskela
4145e30194 CI: Run CI when CI spec changes 2025-05-16 12:31:25 +03:00
Aarni Koskela
6ec1827178 CI: Don't run lints/clippy in all environments 2025-05-16 12:31:25 +03:00
Aarni Koskela
3a05023540 CI: use Swatinem/rust-cache 2025-05-16 12:31:25 +03:00
Aarni Koskela
b0437cfc62 Use buffered writer for debug file 2025-05-16 12:27:31 +03:00
Aarni Koskela
883b4b56dc Split OSM data during parsing 2025-05-16 12:27:31 +03:00
Aarni Koskela
00b5e5393a Give parse_osm_data ownership of the data instead of cloning 2025-05-16 12:26:20 +03:00
Louis Erbkamm
948bef41ae Merge pull request #448 from louis-e/clippy-fix
Fix clippy
2025-05-15 21:11:32 +02:00
Louis Erbkamm
fe54a11fde Fix clippy 2025-05-15 21:10:15 +02:00
Louis Erbkamm
400004ec51 Merge pull request #446 from akx/retrieve-improvements
Small data retrieval improvements
2025-05-15 20:59:29 +02:00
Louis Erbkamm
c6377f7155 pr-benchmark.yml: Adapted time baseline 2025-05-15 20:36:37 +02:00
Louis Erbkamm
20e6621bb5 Merge pull request #444 from GMart/FixScaling
Fix scaling of roads and building heights
2025-05-15 20:35:33 +02:00
Aarni Koskela
fdc5156036 Remove undocumented write-data-when-debugging feature 2025-05-15 15:42:12 +03:00
Aarni Koskela
23583c77de Separate fetch-data-from-file and fetch-data-from-overpass; add save_file option 2025-05-15 15:42:12 +03:00
Aarni Koskela
6d599e19c0 Improve error message for invalid bbox 2025-05-15 15:42:12 +03:00
Aarni Koskela
4ff0d6e2be Move Minecraft world directory validation to args parser 2025-05-15 15:42:11 +03:00
Garrett M
95f1c4d9b5 Merge branch 'louis-e:main' into FixScaling 2025-05-12 08:20:25 -04:00
Louis Erbkamm
b13eb1fcdf Merge pull request #409 from XianlinSheng/main
Open up a map editing architecture in the workflow for transformation, and enables generating at non-origin
2025-05-12 00:29:34 +02:00
Garrett M
0866649444 Fix stripes and aeroways
Have stripes and aeroways respect the scaling. Stripes with the .floor() function never showed the stripes at a low scaling. ceil() seems to work.
Undo accidental mod: with function in buildings.rs
2025-05-11 00:44:23 -04:00
Garrett M
958160918b Fix scaling of roads and building heights
Fix road widths to respect scaling. Buildings now respect scale for start_y_offset, fixing most floating buildings
2025-05-10 16:20:32 -04:00
XianlinSheng
8bd98a72aa change xzbbox fields to standard common names: bounding_rect, min, max 2025-05-04 19:25:24 -04:00
XianlinSheng
f7c3404328 move geo_distance etc to coordinate_system::transformation; pack lat_lon_to_minecraft_coords into method CoordTransformation.transform_point(llpoint) 2025-05-04 01:41:22 -04:00
XianlinSheng
ef2f341456 osm_parser returns xzbbox directly, remove explicit usage of scale_factor_x in the main pipeline 2025-05-03 17:22:29 -04:00
XianlinSheng
4e82b0a497 move bbox and geocoord into coordinate_system::geographic 2025-05-03 17:04:21 -04:00
XianlinSheng
d0b671625b move ground fetch to data fetching section, which also enables rotation architecture 2025-05-03 15:48:19 -04:00
XianlinSheng
657d50b6e0 support new main.rs 2025-05-03 14:23:15 -04:00
Louis Erbkamm
922e752684 Merge pull request #425 from GMart/Update-block-types
Update leisure and highway element processing
2025-05-03 16:37:09 +02:00
Garrett M
873f6aa995 Merge branch 'louis-e:main' into Update-block-types 2025-05-02 11:17:34 -04:00
Garrett M
0cd4c0e28d Add comments and dirt block option
Add comments to code, add dirt to option for dog park, playground, etc.
2025-05-02 11:16:44 -04:00
Garrett M
97eebbb977 Fixes for stairs and unneeded tag
In Leisure, soccer golf is used less than 1000 time worldwide. Removed since it will rarely be used.
in highways, changes stairs to be GRAY_CONCRETE for now, until they are properly added.
2025-05-02 11:06:59 -04:00
Louis Erbkamm
7ae6dc8143 Merge pull request #430 from Oleg4260/main
Implement wetlands
2025-05-02 17:04:52 +02:00
Oleg4260
a112cda485 Merge branch 'louis-e:main' into main 2025-05-02 12:44:40 +03:00
Garrett M
116f753e45 Merge branch 'louis-e:main' into Update-block-types 2025-05-01 18:36:46 -04:00
Louis Erbkamm
3c41be1ad0 Merge pull request #416 from benjamin051000/separate-gui-logic
Move GUI logic to its own file
2025-05-01 23:51:39 +02:00
Louis Erbkamm
7ad15c70c3 main.rs: fix fmt 2025-05-01 23:03:47 +02:00
Louis Erbkamm
bf53f4bb2f gui.rs: fix fmt 2025-05-01 23:01:15 +02:00
Louis Erbkamm
be819c01a0 Update gui.rs with latest changes 2025-05-01 22:59:47 +02:00
Louis Erbkamm
899cb2ee16 Merge branch 'main' into separate-gui-logic 2025-05-01 22:58:49 +02:00
Louis Erbkamm
b63b3ae05a pr-benchmark.yml: add memory annotation 2025-05-01 22:01:07 +02:00
Oleg4260
48c2e93292 Merge branch 'main' into main 2025-05-01 18:34:58 +03:00
Garrett M
4395eb6dd6 Merge branch 'louis-e:main' into Update-block-types 2025-05-01 09:11:31 -04:00
Louis Erbkamm
e8bbbec0f9 pr-benchmark.yml: add more stats 2025-05-01 15:07:07 +02:00
Garrett M
b16c0f84ac Merge branch 'louis-e:main' into Update-block-types 2025-05-01 09:03:48 -04:00
Louis Erbkamm
6efee57cbc pr-benchmark.yml: fix reference time 2025-05-01 14:52:10 +02:00
Louis Erbkamm
41ae099887 pr-benchmark.yml: enable terrain 2025-05-01 14:46:58 +02:00
Louis Erbkamm
781bb79ae5 Merge pull request #434 from louis-e/dependabot/cargo/once_cell-1.21.3
Bump once_cell from 1.20.2 to 1.21.3
2025-05-01 14:40:27 +02:00
Louis Erbkamm
3b378296a3 Merge pull request #433 from louis-e/dependabot/cargo/windows-0.61.1
Bump windows from 0.59.0 to 0.61.1
2025-05-01 14:40:15 +02:00
Louis Erbkamm
703b83a2fd Merge pull request #432 from louis-e/dependabot/cargo/colored-3.0.0
Bump colored from 2.2.0 to 3.0.0
2025-05-01 14:39:49 +02:00
Louis Erbkamm
c7e1b5bf67 Merge pull request #431 from louis-e/dependabot/cargo/flate2-1.1.1
Bump flate2 from 1.0.35 to 1.1.1
2025-05-01 14:39:40 +02:00
Garrett M
b8f45ac178 Merge branch 'louis-e:main' into Update-block-types 2025-05-01 08:34:10 -04:00
Louis Erbkamm
e9133c136a pr-benchmark.yml: fix reference time 2025-05-01 14:23:40 +02:00
Louis Erbkamm
92881cf3b3 pr-benchmark.yml: fix new line 2025-05-01 14:19:42 +02:00
Louis Erbkamm
421fe47ecf pr-benchmark.yml: fix summary 2025-05-01 14:13:55 +02:00
Louis Erbkamm
0c2c99544e pr-benchmark.yml: fix summary 2025-05-01 14:12:22 +02:00
Louis Erbkamm
491716f0fc pr-benchmark.yml: fix summary 2025-05-01 14:10:48 +02:00
Louis Erbkamm
96f9bc736e pr-benchmark.yml: more detailed comment 2025-05-01 14:05:38 +02:00
Louis Erbkamm
ffe694f9d8 pr-benchmark.yml: add detailed comment 2025-05-01 14:00:34 +02:00
Louis Erbkamm
c7b6df92ab Update pr-benchmark.yml 2025-05-01 13:53:13 +02:00
Louis Erbkamm
5b67f8ee84 pr-benchmark.yml: update bbox arg input 2025-05-01 13:49:52 +02:00
Louis Erbkamm
179cb6fa2d pr-benchmark.yml: Create dummy world 2025-05-01 13:46:00 +02:00
Louis Erbkamm
15c8265a21 pr-benchmark.yml: run on command 2025-05-01 13:40:27 +02:00
Louis Erbkamm
7ec0b9aa03 Run pr-benchmark.yml on opened PR 2025-05-01 13:33:51 +02:00
dependabot[bot]
c1ac1774fb Bump once_cell from 1.20.2 to 1.21.3
Bumps [once_cell](https://github.com/matklad/once_cell) from 1.20.2 to 1.21.3.
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.20.2...v1.21.3)

---
updated-dependencies:
- dependency-name: once_cell
  dependency-version: 1.21.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-01 02:14:14 +00:00
dependabot[bot]
b46cd17ff4 Bump windows from 0.59.0 to 0.61.1
Bumps [windows](https://github.com/microsoft/windows-rs) from 0.59.0 to 0.61.1.
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/commits)

---
updated-dependencies:
- dependency-name: windows
  dependency-version: 0.61.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-01 02:13:54 +00:00
dependabot[bot]
2789a40fd0 Bump colored from 2.2.0 to 3.0.0
Bumps [colored](https://github.com/mackwic/colored) from 2.2.0 to 3.0.0.
- [Release notes](https://github.com/mackwic/colored/releases)
- [Changelog](https://github.com/colored-rs/colored/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mackwic/colored/compare/v2.2.0...v3.0.0)

---
updated-dependencies:
- dependency-name: colored
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-01 02:13:40 +00:00
dependabot[bot]
6f71bc3fdb Bump flate2 from 1.0.35 to 1.1.1
Bumps [flate2](https://github.com/rust-lang/flate2-rs) from 1.0.35 to 1.1.1.
- [Release notes](https://github.com/rust-lang/flate2-rs/releases)
- [Commits](https://github.com/rust-lang/flate2-rs/compare/1.0.35...1.1.1)

---
updated-dependencies:
- dependency-name: flate2
  dependency-version: 1.1.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-01 02:13:26 +00:00
Garrett M
7a102dec51 Fix extra match and typo
Fix GRASS to GRASS_BLOCK
Remove ladder type as it would have to have special properties to work properly
2025-04-30 19:24:39 -04:00
Oleg4260
320acac80d More wetland types 2025-04-30 17:33:53 +03:00
Oleg4260
0cad9fa307 fix forest generating over roads 2025-04-30 16:41:18 +03:00
Garrett M
b03202ac71 Update leisure.rs
Fix nature_reserve
Add more leisure values.
2025-04-29 14:11:01 -04:00
Oleg4260
32ae0778e2 Implement wetlands
Implement wetlands

cargo fmt; implement bog

Better bog
2025-04-29 20:49:16 +03:00
Garrett M
faef164abe Fix marina and add more blocks to highways.rs
Remove marina from water. It was making entire marina areas water, which was not intended. Add some block types to highways
2025-04-28 23:39:04 -04:00
Garrett M
d9930c2b44 Merge branch 'louis-e:main' into Update-block-types 2025-04-28 17:35:38 -04:00
Louis Erbkamm
1a0fc291b0 Merge pull request #426 from Oleg4260/main
Fixes for pull/423
2025-04-28 21:21:40 +02:00
Oleg4260
bb14b1da49 fix fmt 2025-04-28 12:55:10 +03:00
Oleg4260
c0edbaa92c cargo fmt 2025-04-28 12:48:49 +03:00
Oleg4260
bf69996427 Fix crash caused by unicode characters in area_name 2025-04-28 12:45:34 +03:00
Oleg4260
1c734cdd7c Fix generation of ground layers, remove unnecessary function 2025-04-28 12:10:57 +03:00
XianlinSheng
b815a3b563 fix clippy, allow the bad-styled floating point values in test 2025-04-28 01:47:38 -04:00
XianlinSheng
32745217a7 support new elevation code 2025-04-28 01:43:09 -04:00
XianlinSheng
11cec0fc15 merge main 2025-04-28 00:39:15 -04:00
XianlinSheng
f9cc2acf11 add tests for operators generation from json, translator results, xzbbox, including a test_utilities.rs for fetching example data 2025-04-28 00:22:57 -04:00
Garrett M
ed529071ae Merge branch 'louis-e:main' into Update-block-types 2025-04-27 21:08:27 -04:00
Louis Erbkamm
9a288e3966 Merge pull request #423 from louis-e/simplify-elevation
Simplify elevation retrieval in each element processor
2025-04-27 23:48:54 +02:00
louis-e
e5f0717838 Fix bedrock layer 2025-04-27 23:39:08 +02:00
louis-e
c258892b45 Fix cargo fmt 2025-04-27 23:23:37 +02:00
louis-e
151ced7625 Assign persistent property to birch leaves 2025-04-27 23:21:38 +02:00
louis-e
73e8bab4a0 Resolve merge conflicts 2025-04-27 23:18:12 +02:00
Garrett M
3dfa2ca62e leisure.rs cargo fmt
Cargo fmt
2025-04-27 16:48:30 -04:00
Louis Erbkamm
f1d3c0b980 Merge pull request #421 from Oleg4260/main
Optimize ground generation + new natural elements
2025-04-27 22:36:52 +02:00
louis-e
bcc986969f Merge branch 'simplify-elevation' of https://github.com/louis-e/arnis into simplify-elevation 2025-04-27 22:28:35 +02:00
Louis Erbkamm
2d07e9c2b9 Fix cargo fmt 2025-04-27 22:27:11 +02:00
Louis Erbkamm
a213bace19 Fix clippy 2025-04-27 22:18:50 +02:00
Louis Erbkamm
7552a99a34 Fix clippy 2025-04-27 22:16:28 +02:00
XianlinSheng
2a52538a1e improve safety for public interfaces of xzbboxes 2025-04-27 16:09:11 -04:00
Louis Erbkamm
ec3f5825b4 Fix formatting 2025-04-27 22:08:09 +02:00
louis-e
1294c3ef3c Fix formatting for CI 2025-04-27 22:06:52 +02:00
Louis Erbkamm
ca2fd0b1c6 Merge branch 'main' into simplify-elevation 2025-04-27 21:58:13 +02:00
louis-e
b5596548db Optimize WorldEditor performance with strategic #[inline] attributes 2025-04-27 21:57:01 +02:00
Oleg4260
6167466b2f Less vegetation in heathland 2025-04-27 22:56:03 +03:00
louis-e
5e18402017 Add location name to world name 2025-04-27 21:47:25 +02:00
Oleg4260
ec76a5f2e2 Add heath and orchard generation 2025-04-27 22:14:49 +03:00
XianlinSheng
369e422b4a change operator into trait; factory method return error-backtracable Result 2025-04-27 14:32:28 -04:00
Oleg4260
349f15807a Final adjustments 2025-04-27 21:27:19 +03:00
Oleg4260
6fdf28ab81 Add beach surface material processing, dead bushes in sand, plants in scrub and grassland 2025-04-27 19:15:30 +03:00
louis-e
c961287290 Adapt code comments 2025-04-27 16:59:56 +02:00
louis-e
1fefb20f71 Fix formatting 2025-04-27 16:52:37 +02:00
louis-e
022c44a7d4 Remove unused code 2025-04-27 16:52:13 +02:00
louis-e
6b8a8ad666 Patch amenities.rs to new relative block setter logic 2025-04-27 16:51:49 +02:00
louis-e
c0e1d0e3b4 Patch buildings.rs to new relative block setter logic 2025-04-27 16:38:17 +02:00
louis-e
fb64d0c360 Add absolute setter support in world_editor.rs 2025-04-27 16:10:13 +02:00
Oleg4260
19cac3ea81 Minor reformatting 2025-04-27 15:18:16 +03:00
Oleg4260
8bad88bdca Refactor editor.check_for_block() 2025-04-27 15:00:42 +03:00
Oleg4260
e62ba6a95a Merge branch 'louis-e:main' into main 2025-04-27 13:46:02 +03:00
Garrett M
d1b18871ce Update leisure generation and fix typo
Fix 'Mincraft' typo (Code still works so not sure what that prefix did)
Add additional types for leisure
2025-04-27 00:07:58 -04:00
XianlinSheng
4d47a22904 add xzbbox validity check in factory 2025-04-26 23:21:15 -04:00
Benjamin Wheeler
d4b74fc48a Move GUI logic to its own file. Simplify main fn. 2025-04-26 23:13:32 -04:00
louis-e
38752f2666 Fix fmt for elevation retrieval simplification 2025-04-27 03:35:52 +02:00
louis-e
77a9c23ed3 Simplify elevation retrieval 2025-04-27 03:32:44 +02:00
XianlinSheng
a991f60d29 fix clippy 2025-04-26 21:07:25 -04:00
XianlinSheng
966241aa52 merge to main 2025-04-26 20:57:36 -04:00
XianlinSheng
e9cc0ced41 xzbbox architecture made compatible for rotation and cropping; improve namings; fix water area dependencies on new xzbbox (add get_min_coords) 2025-04-26 20:38:03 -04:00
Louis Erbkamm
987b8b3d74 Merge pull request #422 from louis-e/simplification-refactoring
Remove winter mode as discussed in issues/415
2025-04-27 01:29:06 +02:00
Louis Erbkamm
f398c7e6b8 Removed dirt reference 2025-04-27 01:26:40 +02:00
louis-e
9a759c39db Fix fmt for winter mode removal 2025-04-27 00:51:36 +02:00
louis-e
856cba162e Remove winter mode as discussed in issues/415 2025-04-27 00:48:56 +02:00
Louis Erbkamm
55d0208a32 Merge pull request #411 from HelleBenjamin/main
Update Finnish translation
2025-04-27 00:01:18 +02:00
Louis Erbkamm
b1d20cbd1a Patch --all-features discussed in pull/417 2025-04-26 23:59:07 +02:00
Louis Erbkamm
cca4d1a361 Merge pull request #417 from benjamin051000/ci-cache
CI: Add cache action to preserve build artifacts.
2025-04-26 23:57:11 +02:00
Oleg4260
ae5a838fa3 Optimize ground generation 2025-04-26 19:05:17 +03:00
Louis Erbkamm
06974e2bf7 Arch Linux AUR package 2025-04-26 16:13:17 +02:00
Louis Erbkamm
b769ff34de Merge pull request #113 from adamperkowski/docs/aur
docs(README): add Arch Linux installation instructions
2025-04-26 16:11:18 +02:00
Louis Erbkamm
0f8e302aff Merge branch 'main' into docs/aur 2025-04-26 16:10:45 +02:00
Louis Erbkamm
597051303c Merge pull request #360 from louis-e/dependabot/cargo/dirs-6.0.0
Bump dirs from 5.0.1 to 6.0.0
2025-04-26 16:06:19 +02:00
Louis Erbkamm
08bdc64999 Merge branch 'main' into dependabot/cargo/dirs-6.0.0 2025-04-26 16:06:12 +02:00
Louis Erbkamm
3723127132 Resolve open discussion in pull/354 2025-04-26 15:43:59 +02:00
Louis Erbkamm
f8a1da1967 Merge pull request #354 from TheComputerGuy96/desktop-file
Add a XDG desktop file
2025-04-26 15:43:09 +02:00
Louis Erbkamm
9352ee62b7 Merge pull request #420 from louis-e/revert-line
Revert to second dirt addition line
2025-04-26 15:19:53 +02:00
Louis Erbkamm
8816af5c75 Revert to second dirt addition line 2025-04-26 15:19:38 +02:00
Louis Erbkamm
2fb09d1fba Merge pull request #377 from benjamin051000/formalize-bbox
Formal BBox struct
2025-04-26 15:00:09 +02:00
Benjamin Wheeler
c3ce8829f3 Update GUI bbox to use comma delim. Add gui bbox errors. 2025-04-25 20:28:11 -04:00
Benjamin Wheeler
a3f0d5e367 Formal bounding box type BBox.
`BBox` represents a *valid* bounding box.

It's only possible to have a BBox object that's valid.
2025-04-25 20:28:06 -04:00
Benjamin Helle
d93b771422 Merge branch 'main' into main 2025-04-24 15:47:41 +03:00
Louis Erbkamm
4271dc3b7d Merge pull request #414 from Oleg4260/main
Minor improvements to farmland code
2025-04-22 22:39:49 +02:00
Oleg4260
6732697f46 Use args.ground_level instead of MIN_Y with terrain enabled 2025-04-22 17:56:12 +03:00
Benjamin Helle
4d94ab98a4 Merge branch 'main' into main 2025-04-22 01:34:39 +03:00
Benjamin Wheeler
2c8418bf90 Add cache action to preserve build artifacts.
Github Copilot made this... so who knows if it actually works.
2025-04-21 18:17:08 -04:00
Oleg4260
a1ed2b9dd2 Clean up farmland code 2025-04-20 23:17:35 +03:00
Oleg4260
9b7cabc549 Fix space between water blocks (meant to be 8) 2025-04-20 16:05:45 +03:00
XianlinSheng
21b0b99d7e improve modulization of map_editing and coordinate_system. make cartesian coordinate_system::cartesian for extension of spherical coordinate submod 2025-04-19 23:58:07 -04:00
Louis Erbkamm
db47f6ab20 Merge pull request #412 from louis-e/revert-improvement
Revert improvement
2025-04-19 15:13:55 +02:00
louis-e
ef261a24e4 Revert benches in leisure, discussion in pull/406 2025-04-19 15:13:22 +02:00
louis-e
898457e06c Revert improvement, discussion in pull/406 2025-04-19 15:10:04 +02:00
Benjamin Helle
0f84c8a38c Update Finnish translation 2025-04-19 15:39:21 +03:00
Benjamin Helle
f416f650c2 Update Finnish translation 2025-04-19 15:38:28 +03:00
XianlinSheng
f39b760aa0 fix redundant namings 2025-04-13 03:05:27 -04:00
XianlinSheng
bfbb8b05a2 Merge updated branch 'main' 2025-04-13 02:30:06 -04:00
XianlinSheng
3173a8f7d8 add map editing into workflow 2025-04-13 02:29:55 -04:00
XianlinSheng
9dac978a69 add map_editing architecture, cancels coordinate restriction starting from 0 2025-04-13 00:43:26 -04:00
Louis Erbkamm
b98c043bb8 Merge pull request #376 from benjamin051000/ci-cargo-test
ci: run cargo test
2025-04-13 00:45:35 +02:00
Louis Erbkamm
2a1233c463 Merge pull request #374 from benjamin051000/fix-terrain-flag
Set `terrain` arg to store true.
2025-04-13 00:44:37 +02:00
Louis Erbkamm
e1869fbbbc Merge pull request #340 from benjamin051000/refactor-block-defs
Change functions returning vecs to global arrays.
2025-04-13 00:43:11 +02:00
Benjamin Wheeler
bfba692aaf Change functions returning vecs to global arrays.
I'm not sure why these were initally functions. I think they are better
off as global arrays, since the function would initialize a new vec
every time its called, whereas this only initializes it once.
2025-04-10 16:57:29 -04:00
Benjamin Wheeler
1382e05e25 Add cargo test to CI 2025-04-10 16:25:02 -04:00
Benjamin Wheeler
642928057a Add unit tests for --winter, --debug, --terrain flags. 2025-04-10 16:23:09 -04:00
Benjamin Wheeler
1749f6a1f2 Set terrain arg to SetTrue.
This was erroneously set to `SetFalse`, which means it's impossible to
enable the terrain from the cli.

According to clap docs, the default action for a bool arg is SetTrue,
and the default value is false. (https://docs.rs/clap/latest/clap/_derive/index.html#arg-types)

So we don't need to provide any additional args here.
2025-04-10 16:23:09 -04:00
Louis Erbkamm
4c08c5fe72 Patch arabic translation 2025-04-10 22:19:35 +02:00
Louis Erbkamm
8a4961a0a6 Merge pull request #287 from Salmonings/main
Add Arabic language
2025-04-10 22:18:43 +02:00
Louis Erbkamm
05569fb0fc fr-FR.json adaptions from pull/318/ 2025-04-10 22:15:47 +02:00
Louis Erbkamm
f203ad1c09 Merge pull request #396 from Phantomwise/translation-french
Add translation for French (France)
2025-04-10 22:13:39 +02:00
Louis Erbkamm
4d123211ee Merge pull request #398 from xCipHanD/ChineseTranslation
Update Chinese translation
2025-04-10 22:10:35 +02:00
Louis Erbkamm
8a191e563d Merge pull request #407 from louis-e/dependabot/cargo/cargo-6f59152c2a
Bump the cargo group with 5 updates
2025-04-10 22:05:07 +02:00
Louis Erbkamm
9c0db6f1c7 Update README.md 2025-04-10 21:59:07 +02:00
dependabot[bot]
a7638d971a Bump the cargo group with 5 updates
Bumps the cargo group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [tauri-plugin-shell](https://github.com/tauri-apps/plugins-workspace) | `2.2.0` | `2.2.1` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.44.1` | `1.44.2` |
| [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) | `0.5.14` | `0.5.15` |
| [openssl](https://github.com/sfackler/rust-openssl) | `0.10.70` | `0.10.72` |
| [ring](https://github.com/briansmith/ring) | `0.17.8` | `0.17.14` |


Updates `tauri-plugin-shell` from 2.2.0 to 2.2.1
- [Release notes](https://github.com/tauri-apps/plugins-workspace/releases)
- [Commits](https://github.com/tauri-apps/plugins-workspace/compare/os-v2.2.0...os-v2.2.1)

Updates `tokio` from 1.44.1 to 1.44.2
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.44.1...tokio-1.44.2)

Updates `crossbeam-channel` from 0.5.14 to 0.5.15
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.14...crossbeam-channel-0.5.15)

Updates `openssl` from 0.10.70 to 0.10.72
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.70...openssl-v0.10.72)

Updates `ring` from 0.17.8 to 0.17.14
- [Changelog](https://github.com/briansmith/ring/blob/main/RELEASES.md)
- [Commits](https://github.com/briansmith/ring/commits)

---
updated-dependencies:
- dependency-name: tauri-plugin-shell
  dependency-version: 2.2.1
  dependency-type: direct:production
  dependency-group: cargo
- dependency-name: tokio
  dependency-version: 1.44.2
  dependency-type: direct:production
  dependency-group: cargo
- dependency-name: crossbeam-channel
  dependency-version: 0.5.15
  dependency-type: indirect
  dependency-group: cargo
- dependency-name: openssl
  dependency-version: 0.10.72
  dependency-type: indirect
  dependency-group: cargo
- dependency-name: ring
  dependency-version: 0.17.14
  dependency-type: indirect
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-10 19:51:16 +00:00
Louis Erbkamm
fa6a023b7c Merge pull request #406 from louis-e/pull403-adaptions
Minor adaptions for PR 403
2025-04-10 21:50:09 +02:00
Louis Erbkamm
2ac4cacd2d Merge pull request #363 from louis-e/dependabot/cargo/cargo-2c68f0befb
Bump openssl from 0.10.68 to 0.10.70 in the cargo group
2025-04-10 21:49:17 +02:00
Louis Erbkamm
b334212667 Merge pull request #391 from louis-e/dependabot/cargo/tauri-plugin-log-2.2.2
Bump tauri-plugin-log from 2.2.0 to 2.2.2
2025-04-10 21:48:58 +02:00
Louis Erbkamm
dc7f3f973e Merge pull request #402 from louis-e/dependabot/cargo/tokio-1.44.1
Bump tokio from 1.42.0 to 1.44.1
2025-04-10 21:48:42 +02:00
Louis Erbkamm
44f58dcd22 Merge pull request #401 from louis-e/dependabot/cargo/log-0.4.27
Bump log from 0.4.22 to 0.4.27
2025-04-10 21:48:38 +02:00
louis-e
4c1643281d fmt: Fix formatting 2025-04-10 21:47:35 +02:00
louis-e
6e113746d4 Minor adaptions for PR 403 2025-04-10 21:41:35 +02:00
Louis Erbkamm
6a1d6d32ff Merge pull request #403 from Oleg4260/main
Some improvements for the generation
2025-04-10 21:39:09 +02:00
Oleg4260
8d6d10fc47 Remove ugly "benches" 2025-04-09 17:23:18 +03:00
Oleg4260
c022611d08 Add custom layers for some landuse and natural objects, use stone as a marker not to generate dirt 2025-04-07 18:21:57 +03:00
Oleg4260
5a15ba3a62 Clarify comment 2025-04-07 12:34:02 +03:00
Oleg4260
c526f295c3 cargo fmt 2025-04-07 12:23:43 +03:00
Oleg4260
0e0a08cfc9 Remove stone filling under quarries (doesn't work anymore) 2025-04-07 12:22:58 +03:00
Oleg4260
d992e5eb87 Remove BASE_HEIGHT_SCALE, remove scale.sqrt to match X and Z scale 2025-04-07 10:59:56 +03:00
Oleg4260
5c0e24ee73 fix fmt 2025-04-06 18:29:35 +03:00
Oleg4260
9d85de61a3 Replace water grid with dot grid in farmlands 2025-04-06 18:27:42 +03:00
Oleg4260
b23749b330 Change scale to 1.0 2025-04-05 20:56:35 +03:00
Oleg4260
77debbbc20 Fix clippy error 2025-04-05 15:24:25 +03:00
Oleg4260
8970ce5ffe Remove trees from farmlands 2025-04-05 15:06:47 +03:00
Oleg4260
7a36ac9c3f Improve winter mode 2025-04-05 14:40:19 +03:00
Oleg4260
4363dfd558 Add more natural surfaces 2025-04-05 13:22:52 +03:00
Oleg4260
1aac2e3068 Increase max_y to 319 2025-04-05 01:31:59 +03:00
dependabot[bot]
d16cedde9a Bump tokio from 1.42.0 to 1.44.1
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.42.0 to 1.44.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.42.0...tokio-1.44.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-version: 1.44.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-01 03:04:46 +00:00
dependabot[bot]
59b71ebd84 Bump log from 0.4.22 to 0.4.27
Bumps [log](https://github.com/rust-lang/log) from 0.4.22 to 0.4.27.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.22...0.4.27)

---
updated-dependencies:
- dependency-name: log
  dependency-version: 0.4.27
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-01 03:03:02 +00:00
xciphand
2e01c8c710 Update Chinese Translation 2025-03-26 12:03:17 +08:00
Louis Erbkamm
bff58b39fd Fix cargo fmt 2025-03-23 17:14:13 +01:00
Louis Erbkamm
887e622428 Added fillground if wrapping around bedrock generation 2025-03-23 17:11:01 +01:00
Louis Erbkamm
931f03a784 Merge pull request #337 from Oleg4260/main
Added ores generation in quarries + other changes
2025-03-23 17:09:08 +01:00
Oleg4260
c1c43d9244 Fix stone bricks in rural area 2025-03-22 19:25:06 +02:00
Phantomwise
8a84a08316 Add translation for French (France) 2025-03-20 04:25:32 +01:00
Oleg4260
2c72a61324 sync 2025-03-09 23:09:06 +02:00
Oleg4260
bf263a4f8c fix conflict 2025-03-09 22:56:35 +02:00
Louis Erbkamm
50ba0bad6e Merge pull request #346 from Xatresu/hutranslation
Add Hungarian translation
2025-03-09 21:47:44 +01:00
Louis Erbkamm
1d80e6e047 Merge pull request #378 from benjamin051000/clippy-warnings
Fix clippy warnings
2025-03-09 21:43:35 +01:00
Louis Erbkamm
b5e9bb885d Merge pull request #335 from benjamin051000/refactor-tree
Refactor tree generation
2025-03-09 21:40:38 +01:00
dependabot[bot]
665b8f095b Bump tauri-plugin-log from 2.2.0 to 2.2.2
Bumps [tauri-plugin-log](https://github.com/tauri-apps/plugins-workspace) from 2.2.0 to 2.2.2.
- [Release notes](https://github.com/tauri-apps/plugins-workspace/releases)
- [Commits](https://github.com/tauri-apps/plugins-workspace/compare/os-v2.2.0...log-v2.2.2)

---
updated-dependencies:
- dependency-name: tauri-plugin-log
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-09 20:33:13 +00:00
Louis Erbkamm
75bee6ca97 Merge pull request #321 from benjamin051000/remove-more-gui-deps
Remove gui-only deps when building cli
2025-03-09 21:31:52 +01:00
Oleg4260
41055825ef Replace iron blocks under railways with gravel 2025-03-08 13:56:34 +02:00
Benjamin Wheeler
6fd3a8eda7 Fix clippy warnings 2025-02-21 22:42:44 -05:00
Oleg4260
c578a436b4 Replace light concrete with dirt path for highway:path 2025-02-11 23:52:10 +02:00
Oleg4260
211ac4ed72 Merge branch 'main' of https://github.com/Oleg4260/arnis 2025-02-04 17:02:12 +02:00
Oleg4260
3d0a1c3c4d cargo fmt 2025-02-04 17:02:10 +02:00
Oleg4260
0c9c8e1366 Merge branch 'main' of https://github.com/Oleg4260/arnis 2025-02-04 17:00:15 +02:00
Oleg4260
0e28d34224 Use editor.fill_blocks() instead of loop 2025-02-04 16:59:09 +02:00
Oleg4260
3b1425cd30 Merge branch 'main' of https://github.com/Oleg4260/arnis 2025-02-04 16:08:20 +02:00
Oleg4260
ce0bce99fb Added feature to fill ground with stone
Trying to fix compilation error
2025-02-04 16:08:09 +02:00
Oleg4260
cde0042b85 Trying to fix compilation error 2025-02-04 00:22:49 +02:00
Oleg4260
622edaff07 Added feature to fill ground with stone 2025-02-04 00:06:09 +02:00
dependabot[bot]
ca760563d1 Bump openssl from 0.10.68 to 0.10.70 in the cargo group
Bumps the cargo group with 1 update: [openssl](https://github.com/sfackler/rust-openssl).


Updates `openssl` from 0.10.68 to 0.10.70
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.68...openssl-v0.10.70)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-03 18:51:25 +00:00
dependabot[bot]
f278d629eb Bump dirs from 5.0.1 to 6.0.0
Bumps [dirs](https://github.com/soc/dirs-rs) from 5.0.1 to 6.0.0.
- [Commits](https://github.com/soc/dirs-rs/commits)

---
updated-dependencies:
- dependency-name: dirs
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-01 02:40:47 +00:00
Echo J
2c319bae5d Add a XDG desktop file
This allows proper packaging of the application for Linux distros
2025-01-29 20:55:49 +02:00
Xatres
809ff2793d Add files via upload 2025-01-27 03:35:52 +01:00
Benjamin Wheeler
3ba9c58f85 element_processing/tree: Make all trees conform to a struct.
This decouples the data that each tree has with the block-placing
procedure. Now, all the data about a tree is stored in `struct Tree`,
and the `Tree::create()` function handles all paths accordingly.
2025-01-25 23:39:38 -05:00
Benjamin Wheeler
66b7f47e32 element_processing/tree: Update create_tree signature
x, y, z -> (x, y, z)

Also some small variable renames
2025-01-25 23:39:38 -05:00
Benjamin Wheeler
a96911e112 element_processing/tree: DRY on fill calls, use j with y.
This commit is a little messy:
- It reduces repitition of the block fill calls and the snow layer calls
- It also replaces previous usage of `y + i` with `y + j` to keep the
  variable conventions the same.
2025-01-25 23:39:35 -05:00
Benjamin Wheeler
112481f36f Remove gui-only deps when building cli
It looks like these are only GUI dependencies. I still need to test that
it compiles, but these give unused warnings when compiling with the gui
disabled.
2025-01-25 22:03:16 -05:00
Benjamin Wheeler
65cd0d453a element_processing/tree: replace round{1,2,3} with generic round
round takes a parameter which is a reference to an array of patterns.
The patterns are defined at the top of the file as `[(i32, i32, i32)]`.
2025-01-25 21:33:13 -05:00
Benjamin Wheeler
febd1b7a3e element_processing/tree: Use loops to reduce repitition 2025-01-25 21:33:13 -05:00
Oleg4260
6b527855e4 cargo fmt 2025-01-25 20:07:03 +02:00
Oleg4260
cc1e28b80a Added ores generation in quarries 2025-01-25 20:03:16 +02:00
Louis Erbkamm
a969d65ae4 Trigger ci-build.yml only when files in src/ have changed 2025-01-25 14:15:23 +01:00
Louis Erbkamm
acf123488a Merge pull request #333 from Oleg4260/main
Add landuse for quarry and landfills + add one advice in FAQ
2025-01-25 14:10:08 +01:00
Louis Erbkamm
938a2d74ad Merge pull request #334 from wielandb/hedge-fix
Make leaves persistent to stop hedges from decaying
2025-01-25 14:09:02 +01:00
Louis Erbkamm
33144a149c Merge pull request #336 from TheComputerGuy96/lt-update
Update Lithuanian translation
2025-01-25 14:07:18 +01:00
Echo J
fbb0f845cd Update Lithuanian translation 2025-01-25 12:20:30 +02:00
Wieland
c71cd111ca Make leaves persistent 2025-01-24 22:41:30 +01:00
Oleg4260
04d9d5269f Put changes back again (i messed up with merging lmao) 2025-01-24 20:29:43 +02:00
Oleg4260
f53e4d65e3 Merge branch 'main' of https://github.com/Oleg4260/arnis 2025-01-24 20:20:27 +02:00
Oleg4260
c39d6fc1ef Merge branch 'louis-e:main' into main 2025-01-24 20:12:53 +02:00
Oleg4260
a1c69b4cb0 Did cargo fmt 2025-01-24 20:11:10 +02:00
Louis Erbkamm
b57719b0f4 Merge pull request #317 from krvstek/main
Update Polish translation
2025-01-24 17:21:41 +01:00
Louis Erbkamm
893945b98a Merge pull request #324 from Denisskas/main
Update Russian translation
2025-01-24 17:19:19 +01:00
Oleg4260
a57c5f1f1b Add landuse for quarry and landfill 2025-01-23 23:37:28 +02:00
Oleg4260
718389e88d Revert "Replaced iron blocks under railways with gravel"
This reverts commit 3f4536e04f.
2025-01-23 20:50:33 +02:00
Oleg4260
3f4536e04f Replaced iron blocks under railways with gravel 2025-01-23 19:43:57 +02:00
Oleg4260
1f79285e83 Update README.md
I had an issue of the program not opening when I switched to KDE and removed some gtk libraries i don't need, I found out that webkit2gtk-4.1 is required, so I think this should be in the FAQ as this might help others with the same issue
2025-01-23 18:11:45 +02:00
Adham Hakki
31dca8b0b7 Merge branch 'main' into main 2025-01-22 21:26:37 +02:00
Denisskas
54791388d1 Update ru.json 2025-01-22 13:18:47 +04:00
krvstek.
7fa05d3e7b Update Polish translation 2025-01-21 23:02:33 +00:00
Louis Erbkamm
daf07bd743 Merge pull request #316 from louis-e/prepare-release-fmt
Handle block properties in new saving logic
2025-01-21 23:36:26 +01:00
louis-e
163ab0407d Handle block properties in new saving logic 2025-01-21 23:36:04 +01:00
Louis Erbkamm
0361e7d63d Merge pull request #315 from louis-e/prepare-release
Prepare release
2025-01-21 23:33:02 +01:00
louis-e
bc422460ff Handle block properties in new saving logic 2025-01-21 23:28:55 +01:00
louis-e
53f0097884 Prepare Alpine Release 2025-01-21 23:28:04 +01:00
Louis Erbkamm
bbfb63886d Update README.md 2025-01-21 22:37:38 +01:00
Louis Erbkamm
928f487a29 Merge pull request #260 from austenadler/feature/allow-disabling-gui
Allow disabling gui at compile time
2025-01-21 22:34:57 +01:00
Louis Erbkamm
ff7a09061e Merge branch 'main' into feature/allow-disabling-gui 2025-01-21 22:13:27 +01:00
Louis Erbkamm
911ec00ddb Merge pull request #312 from louis-e/minor-tweaks
Minor tweaks
2025-01-21 20:47:28 +01:00
louis-e
54137f2117 Updated README 2025-01-21 20:46:53 +01:00
louis-e
50d38a1dd4 Localization formatting changes 2025-01-21 20:44:08 +01:00
louis-e
e5ab62eb18 Added comments for better documentation 2025-01-21 20:36:39 +01:00
Louis Erbkamm
1a8a3114f4 Merge pull request #299 from HelleBenjamin/main
Add Finnish translation
2025-01-21 20:31:58 +01:00
Louis Erbkamm
a52ba2bd39 Merge pull request #289 from TheComputerGuy96/klaipeda
Translation support rework
2025-01-21 20:30:34 +01:00
Benjamin Helle
8195f0bc6e Merge branch 'main' into main 2025-01-21 16:49:03 +02:00
Louis Erbkamm
4df4a3de32 Merge pull request #306 from wielandb/main
Add "razed" to values of railway=* not rendered
2025-01-20 23:50:07 +01:00
Louis Erbkamm
e65a1ee37e Merge branch 'main' into main 2025-01-20 23:47:10 +01:00
Louis Erbkamm
66e47e190a Merge branch 'main' into klaipeda 2025-01-20 23:46:22 +01:00
dependabot[bot]
b9133664ec Bump actions/upload-artifact from 3 to 4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-20 22:45:24 +00:00
dependabot[bot]
032e084265 Bump softprops/action-gh-release from 1 to 2
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 1 to 2.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v1...v2)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-20 22:45:23 +00:00
dependabot[bot]
49202b0f33 Bump actions/download-artifact from 3 to 4
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-20 22:45:20 +00:00
Louis Erbkamm
8755fd3285 Merge pull request #308 from louis-e/elevation-wip
Merge Elevation feature
2025-01-20 23:44:28 +01:00
louis-e
982ef56b29 Fix chunk in wrong location issue with unfinished region patch 2025-01-20 23:13:44 +01:00
louis-e
28070d3c51 Fix chunk in wrong location issue with unfinished region patch 2025-01-20 23:03:57 +01:00
louis-e
d9a0a4aa86 CI (fmt): Fix formatting 2025-01-20 22:45:02 +01:00
louis-e
1f0f6676ed Added railway orientation blocks 2025-01-20 21:28:00 +01:00
louis-e
ff44fe4eda Adapted update messages 2025-01-20 21:27:37 +01:00
louis-e
42976b0113 Fixed railway orientation 2025-01-20 21:27:07 +01:00
louis-e
55b170fb7d TODO Edits 2025-01-20 21:26:54 +01:00
louis-e
852bbf2236 Added self signed signature to Windows release and added Mac release 2025-01-20 21:24:07 +01:00
louis-e
cc6080c0c3 Adapt aeroways to new elevation logic 2025-01-20 20:17:44 +01:00
louis-e
5672ca3f1e Update player rotation in world generation and minor tweaks 2025-01-20 20:00:00 +01:00
Wieland
fc29544835 Fix indentation 2025-01-19 03:35:13 +01:00
Wieland
bf6ac1f61a Add "turntable" to values that should not be rendered 2025-01-19 03:32:13 +01:00
louis-e
8c17a5b0bb Modify player position for world generation 2025-01-19 02:53:37 +01:00
Wieland
bc6ffa3bf9 Change formatting 2025-01-19 02:22:58 +01:00
louis-e
dec0317790 Implement fixes for elevation 2025-01-19 01:46:58 +01:00
louis-e
091acd5849 Added dynamic year in license 2025-01-19 01:46:37 +01:00
Wieland
056203fb21 Add "razed" to values of railway=* not rendered 2025-01-19 01:41:28 +01:00
louis-e
415c9d33fe Bresenham algorithm optimization 2025-01-19 00:14:23 +01:00
louis-e
1820112093 CI (fmt) fix: Merge main into elevation-wip 2025-01-19 00:08:26 +01:00
louis-e
c573a02fd6 Optimized cartesian 2025-01-18 23:52:08 +01:00
louis-e
4c6b9833eb Optimized bresenham algorithm performance 2025-01-18 23:51:41 +01:00
louis-e
8cb8d76357 Set terrain toggle to not-default on 2025-01-18 23:51:17 +01:00
louis-e
fc105b84e0 Merge main into elevation-wip 2025-01-18 21:23:53 +01:00
louis-e
f873a7ab69 Merge branch 'main' into elevation-wip 2025-01-18 18:43:03 +01:00
louis-e
61a67240a6 WIP: Save changes before merging main 2025-01-18 18:35:39 +01:00
Austen Adler
c0753ab23e Format with consistent style 2025-01-16 22:41:53 -05:00
Austen Adler
9461d1f46e Merge remote-tracking branch 'origin/main' into feature/allow-disabling-gui 2025-01-16 22:41:22 -05:00
Austen Adler
3036237fdf Free and reattach to console when running on Windows 2025-01-16 22:31:32 -05:00
Benjamin Helle
95e71b8da5 Added finnish language json 2025-01-17 00:57:53 +02:00
Echo J
255786bc93 Add Lithuanian translation
This may be strange in some places though
2025-01-15 16:44:13 +02:00
Echo J
3c552fe5ed Make placeholder strings translatable (and license one too)
There's some strings coming from the Rust side though (which
will require extra code work)
2025-01-15 16:44:13 +02:00
Echo J
49ff415316 Use localization helper function for JS-based HTML elements 2025-01-15 16:44:13 +02:00
Echo J
71315c60ea Rework applyLocalization() function
This removes all of the boilerplate for setting strings (now the
strings are set by looping through an object and calling a helper function)

The helper function also has an English string fallback if a translation
doesn't have one

And finally some functions/.html code were adjusted to simplify the localization
helper function (this also means innerHTML is no longer used for safety)
2025-01-15 16:44:11 +02:00
Echo J
18b1ea0e0b Don't hardcode language codes
This will make adding a new translation a bit easier (this change
also accepts full codes for language variations like en-UK or pt-BR)

Also specify a full code for English and Chinese translations (Chinese
variation was found with a translation tool's language detector so
it might not be accurate)
2025-01-15 16:43:23 +02:00
Echo J
c6a8da0b40 Remove unused translation strings
These 2 strings are a duplicate of existing ones (which should
reduce translation boilerplate a bit)
2025-01-15 16:43:23 +02:00
Louis Erbkamm
308498550b Merge pull request #290 from TheComputerGuy96/misc-fixes
Miscellaneous fixes
2025-01-15 14:35:16 +01:00
Louis Erbkamm
f7e917edc7 Merge pull request #286 from RedAuburn/better-fences
Support barrier / fence types
2025-01-15 14:32:09 +01:00
Echo J
8221da46e0 Add a NVIDIA WebKit workaround 2025-01-14 21:30:19 +02:00
Echo J
3645b7edd7 Fix wrong variable in an error handler 2025-01-14 21:01:17 +02:00
Echo J
606779f681 Set a border CSS property for buttons/input boxes
For some reason the background color isn't applied on input boxes
(only on WebKit) if I don't set this
2025-01-14 20:43:56 +02:00
Echo J
dce5f472f0 Make the GUI partially work in a web browser
The lack of window.__TAURI__ object prevents most of the JS code
from running (this change stubs it which allows the Tauri GUI to
be tested in a web browser with a simple web server like PHP's one)
2025-01-14 20:39:08 +02:00
Harry Bond
f4bf8c1d3c Support barrier / fence types 2025-01-13 22:22:28 +00:00
Adham Hakki
7ae9ac35d1 Add Arabic language
Just love the idea and the project so a little bit of contributing might help! Here's the Arabic locales for the program! Just be careful as Arabic is a RTL language so it might go wrong/weird
2025-01-13 21:32:29 +02:00
louis-e
686ac2c181 Fix rebasing issues 2025-01-12 22:45:50 +01:00
Louis Erbkamm
b334ed9841 Merge pull request #280 from krvstek/main
simplification & fixes for Polish
2025-01-12 22:26:27 +01:00
louis-e
96dc9ced30 Merge branch 'main' into elevation-wip 2025-01-12 22:23:22 +01:00
krvstek.
03d86f4552 simplification & fixes for Polish 2025-01-12 21:03:15 +00:00
Louis Erbkamm
6e3406f117 Merge pull request #276 from zer0-dev/russia_overpass_workaround
Add fallback api urls specifically for Russia
2025-01-12 20:05:16 +01:00
zer0-dev
7e929d5ef3 Add fallback api urls specifically for Russia 2025-01-12 21:27:18 +03:00
Louis Erbkamm
49a5ed8157 Merge pull request #272 from louis-e/park-relation-fix
Park relation fix and faster saving
2025-01-12 18:01:05 +01:00
louis-e
f60170ef59 CI (fmt) fix: Fixed leisure generation for multipolygons 2025-01-12 17:50:13 +01:00
louis-e
b34bf4f646 CI (fmt) fix: Fixed leisure generation for multipolygons 2025-01-12 17:46:56 +01:00
Austen Adler
efc14821cf Remove note about running with no-default-features 2025-01-12 11:46:30 -05:00
louis-e
ba9c7df5ff Merge branch 'main' into park-relation-fix 2025-01-12 17:41:16 +01:00
louis-e
3eb29a0c21 Fixed leisure generation for multipolygons 2025-01-12 17:38:51 +01:00
louis-e
17ead3c2fc Fixed leisure generation for multipolygons 2025-01-12 17:37:30 +01:00
louis-e
f661f174bd Optimize world save with parallel chunks & buffer reuse 2025-01-12 17:15:09 +01:00
louis-e
7792930277 Optimize world save with parallel chunks & buffer reuse 2025-01-12 17:05:45 +01:00
louis-e
18d3e45d2c Optimize world save with parallel chunks & buffer reuse 2025-01-12 17:05:32 +01:00
Louis Erbkamm
c2b9f87688 Update bug_report.md 2025-01-12 16:39:20 +01:00
Louis Erbkamm
0850bca4de Update prerelease.yml 2025-01-12 16:32:31 +01:00
Louis Erbkamm
ef25c669c1 Merge pull request #270 from louis-e/prerelease-action
Added prerelease workflow
2025-01-12 16:20:12 +01:00
louis-e
df09afe868 Added prerelease workflow 2025-01-12 16:19:42 +01:00
Louis Erbkamm
e9a2329e38 Update README.md 2025-01-12 16:10:56 +01:00
Louis Erbkamm
9cb919eeae Merge pull request #269 from louis-e/readme-enhancement
Readme enhancements and credits addition
2025-01-12 16:05:05 +01:00
Louis Erbkamm
e2c9b07e91 Merge branch 'main' into readme-enhancement 2025-01-12 16:04:14 +01:00
louis-e
3efb8460c1 Readme enhancements and credits addition 2025-01-12 16:02:56 +01:00
Louis Erbkamm
0efa681bb9 Merge pull request #253 from zer0-dev/main
Fix tall grass generating on non-grass blocks. Colored roofs only for single houses
2025-01-12 01:27:08 +01:00
Louis Erbkamm
a92c5bb01f Merge pull request #267 from zer0-dev/custom_bbox_show
Show custom bbox on map-container
2025-01-12 00:18:33 +01:00
zer0-dev
408e182be2 Show custom bbox on map-container 2025-01-11 21:45:42 +03:00
zer0-dev
ea3cf80472 Add SNOW_BLOCK to whitelist for tall grass generation. Sort parsed_elements to put landuse elements in the end 2025-01-11 20:47:02 +03:00
zer0-dev
28ecbb58e7 Merge branch 'louis-e:main' into main 2025-01-11 19:47:08 +03:00
Louis Erbkamm
7b7ff6b534 Merge pull request #265 from louis-e/russian-line-breaking
Simplified translation to avoid line breaking
2025-01-11 17:09:09 +01:00
louis-e
5e6eb0969b Simplified translation to avoid line breaking 2025-01-11 17:06:44 +01:00
Louis Erbkamm
9d6c528438 Merge pull request #257 from zer0-dev/min_level_fix
Fix building levels counting as difference between buildng:levels and building:min_level
2025-01-11 17:04:47 +01:00
Louis Erbkamm
920725d21f Merge pull request #258 from RedAuburn/kerbs
Ignore barrier=kerb
2025-01-11 17:04:16 +01:00
Louis Erbkamm
3689bfbf6d Merge pull request #259 from RedAuburn/mc-flatpak
Use Minecraft Flatpak directory if it exists
2025-01-11 17:04:05 +01:00
Louis Erbkamm
8ed864210f Merge branch 'main' into main 2025-01-11 16:55:50 +01:00
Louis Erbkamm
a0d242716d Merge branch 'main' into min_level_fix 2025-01-11 16:53:56 +01:00
Louis Erbkamm
a604e546a7 Merge branch 'main' into kerbs 2025-01-11 16:53:23 +01:00
Louis Erbkamm
3e88da384a Merge branch 'main' into feature/allow-disabling-gui 2025-01-11 16:53:11 +01:00
Louis Erbkamm
3c5f5eff24 Merge branch 'main' into mc-flatpak 2025-01-11 16:52:55 +01:00
Louis Erbkamm
c750b90719 Merge pull request #264 from louis-e/clippy-fix
Fixed CI Clippy warnings
2025-01-11 16:52:37 +01:00
louis-e
553dce3c3b Fixed CI Clippy warnings 2025-01-11 16:50:31 +01:00
Harry Bond
24d7a7e3eb Use Minecraft Flatpak directory if it exists 2025-01-11 12:05:42 +00:00
zer0-dev
b34a9c851c Formatting 2025-01-11 11:38:36 +03:00
zer0-dev
1274781223 Formatting 2025-01-11 11:25:05 +03:00
Austen Adler
ab21b88c90 Allow disabling gui 2025-01-10 22:49:40 -05:00
Harry Bond
9470bbf87f Ignore kerbs
Signed-off-by: Harry Bond <me@hbond.xyz>
2025-01-10 23:11:54 +00:00
zer0-dev
c4e27b6059 Fix Github Actions CI 2025-01-10 23:01:54 +03:00
zer0-dev
c26cb933dc Fix building levels counting as difference between buildng:levels and building:min_level 2025-01-10 22:58:00 +03:00
zer0-dev
83be3c7c64 Fix tall grass generating on non-grass blocks. Change random roof color to generate only on single houses 2025-01-09 23:04:17 +03:00
Louis Erbkamm
999dd8db51 Fix Github Actions CI 2025-01-08 01:00:58 +01:00
Louis Erbkamm
9570d0533c Update version 2025-01-08 00:48:03 +01:00
Louis Erbkamm
103fe83efc Update version 2025-01-08 00:47:52 +01:00
Louis Erbkamm
155f66dfb1 Removed obsolete .log suffix 2025-01-08 00:40:47 +01:00
Louis Erbkamm
9ea8e8860a Removed unreliable API servers 2025-01-08 00:36:11 +01:00
Louis Erbkamm
cc5e691531 Merge pull request #241 from louis-e/data-retrieval-error-handling
Improved error handling and fixed some minor bugs
2025-01-07 23:54:31 +01:00
louis-e
9b33ed17ce CI (fmt) fix: Improved error handling and fixed some minor bugs 2025-01-07 23:53:07 +01:00
louis-e
bac263311a Improved error handling and fixed some minor bugs 2025-01-07 23:45:51 +01:00
Louis Erbkamm
486541b14a Updated license 2025-01-07 22:28:07 +01:00
dependabot[bot]
1609608ae8 Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-07 21:27:21 +00:00
Louis Erbkamm
7cfb78b0e1 Merge pull request #240 from amir16yp/main
Add generic linux binary to releases workflow
2025-01-07 22:26:32 +01:00
Louis Erbkamm
dbd96cfdac Merge pull request #238 from louis-e/translation-patch
Added Swedish and Korean, fixed Spanish
2025-01-07 22:20:31 +01:00
Louis Erbkamm
e4ed404f5e Merge pull request #237 from louis-e/minimum-height-parking
Ensure minimum height for parking structure
2025-01-07 22:20:20 +01:00
Amir Y. Perehodnik
b6838fdbb1 Merge branch 'louis-e:main' into main 2025-01-07 23:14:35 +02:00
Amir Y. Perehodnik
ac9bfab3e6 just do linux and windows for now 2025-01-07 23:03:07 +02:00
louis-e
dc57d092f8 Added Swedish and Korean, fixed Spanish 2025-01-07 21:59:45 +01:00
louis-e
357dded61a Ensure minimum height for parking structure 2025-01-07 21:52:57 +01:00
Louis Erbkamm
edba29bf2b Merge pull request #236 from louis-e/buildings-min_level
Support building:min_level tag for elevated building parts
2025-01-07 21:47:20 +01:00
Louis Erbkamm
410bd7b926 Merge branch 'main' into buildings-min_level 2025-01-07 21:35:47 +01:00
Louis Erbkamm
14d93526d4 Merge pull request #235 from louis-e/scale-adaptive-building-height
Scale adaptive building height
2025-01-07 21:34:49 +01:00
louis-e
273e02d626 Support building:min_level tag for elevated building parts 2025-01-07 21:34:32 +01:00
louis-e
88e7cc35a9 Adapt building height automatically to scale 2025-01-07 21:23:53 +01:00
louis-e
37cd210104 Adapt building height automatically to scale 2025-01-07 21:22:46 +01:00
Louis Erbkamm
ed22a6cd99 Merge pull request #233 from louis-e/aeroways
Implemented aeroways
2025-01-07 21:10:57 +01:00
Amir Y. Perehodnik
ecaaea5da1 make it only support linux and windows x64 2025-01-07 22:06:03 +02:00
Amir Y. Perehodnik
43e8cce970 whoops 2025-01-07 22:01:59 +02:00
Amir Y. Perehodnik
f05ed0c3dc mac isnt compiling, try linux x86 and x64 and windows x86 and x64 2025-01-07 22:01:43 +02:00
Amir Y. Perehodnik
9be60f7805 remove arm64 linux, not compiling for some reason 2025-01-07 21:58:53 +02:00
louis-e
366a651925 Implemented aeroways 2025-01-07 20:58:36 +01:00
Amir Y. Perehodnik
6c593694d0 Update release.yml 2025-01-07 21:55:44 +02:00
Amir Y. Perehodnik
09d3b891bb Add arm64 mac os and linux 2025-01-07 21:50:20 +02:00
Amir Y. Perehodnik
a841178d46 Merge branch 'louis-e:main' into main 2025-01-07 21:49:16 +02:00
Louis Erbkamm
aea28d185d Merge pull request #232 from louis-e/multipolygon-building-levels-fix
fix: respect building:levels tag from OSM relations
2025-01-07 20:41:22 +01:00
Amir Y. Perehodnik
3af10a2a6b include generic linux binary in releases workflow 2025-01-07 21:37:07 +02:00
louis-e
6e8160cf73 CI (fmt) fix: respect building:levels tag from OSM relations 2025-01-07 20:30:11 +01:00
louis-e
1c0a3b3035 CI (fmt) fix: respect building:levels tag from OSM relations 2025-01-07 20:26:28 +01:00
louis-e
b4a9852ecc fix: respect building:levels tag from OSM relations 2025-01-07 20:23:56 +01:00
Louis Erbkamm
05cd857c5f Merge pull request #230 from louis-e/apache-license
License Change from GPL-3.0 to Apache 2.0
2025-01-07 14:22:35 +01:00
Louis Erbkamm
dba0e4512a Merge pull request #231 from louis-e/apache-license-1
Update README.md
2025-01-07 14:22:16 +01:00
Louis Erbkamm
23e55e0c27 Update README.md 2025-01-07 14:21:42 +01:00
Louis Erbkamm
5d2cdee14f License Change from GPL-3.0 to Apache 2.0
**Summary:**
This pull request proposes changing the project's license from GPL-3.0 to Apache License 2.0. The primary motivation for this change is to address ongoing issues with unauthorized websites and individuals misusing the project's name and branding without proper attribution or permission. The Apache 2.0 license offers additional protections, including a trademark clause that prevents misuse of the project name in a way that could mislead users.

**Reason for the Change:**
We've recently encountered several instances of unauthorized websites falsely presenting themselves as official sources of Arnis. While the GPL-3.0 license ensures the project's openness, it lacks provisions to prevent brand misuse. The Apache 2.0 license requires users to give proper attribution and explicitly prohibits using the project's name or branding without permission.

**Request for Approval:**
As contributors to this project, your approval is required for this license change. Please review the proposed change and provide your feedback or approval. Your contributions are highly valued, and your consent is necessary to proceed with this transition.

Thank you for your support in protecting the integrity of the Arnis project! The project will remain open source and free for everyone to use, modify, and contribute to, as it has always been.
2025-01-07 14:15:20 +01:00
Louis Erbkamm
8d91d98a20 Merge pull request #221 from ctrlaltf2/main 2025-01-07 11:24:52 +01:00
ctrlaltf2
a2d61702f1 Add dependencies for building to flake.nix 2025-01-06 23:54:57 -05:00
Louis Erbkamm
893f8c3802 Update README.md 2025-01-07 00:06:46 +01:00
louis-e
ac8c5bf466 Enabled terrain by default 2025-01-06 23:13:48 +01:00
louis-e
e4c6208b22 Added elevation as settings feature 2025-01-06 23:12:42 +01:00
louis-e
f5144d7ba4 Added terrain logic to other element processors 2025-01-06 22:23:42 +01:00
louis-e
f50e10891b Patched all remaining element processors to new elevation logic (except for bridges) 2025-01-06 20:13:31 +01:00
Louis Erbkamm
66819a577b Merge pull request #209 from louis-e/main
Bring elevation-wip up to date to main code base
2025-01-06 17:53:51 +01:00
Louis Erbkamm
85f3e55f04 Merge pull request #207 from shiksyt/main
Update russian translate
2025-01-06 17:39:39 +01:00
Louis Erbkamm
8c270b71bb Merge pull request #208 from TheComputerGuy96/shell-fix
Initialize the Tauri shell plugin
2025-01-06 17:28:38 +01:00
Louis Erbkamm
49ead6c42e Merge pull request #199 from TheComputerGuy96/cargotoml-cleanup
Cargo.toml cleanup
2025-01-06 17:15:32 +01:00
Echo J
1baa0d9d40 Initialize the Tauri shell plugin
This fixes the GitHub link in the main window
2025-01-06 18:13:27 +02:00
Echo J
028ef4bd50 Switch to ThinLTO for release builds
This apparently reduces build time with the same LTO performance
gain
2025-01-06 17:51:22 +02:00
sh1kcs
596231f50b Update ru.json 2025-01-06 21:40:09 +06:00
Echo J
f8fc8e4020 Remove empty features list from some crates
I'm not sure why this was in place
2025-01-06 17:39:47 +02:00
sh1kcs
9417f0e67b Update ru.json 2025-01-06 21:38:08 +06:00
sh1kcs
5e70a9c7e3 Update ru.json 2025-01-06 21:36:12 +06:00
Louis Erbkamm
df65d2393e Merge pull request #205 from louis-e/localization-feedback 2025-01-06 16:26:07 +01:00
Louis Erbkamm
7c4eee955c Merge branch 'main' into localization-feedback 2025-01-06 16:13:17 +01:00
Louis Erbkamm
8ca2cf9ab9 Merge pull request #197 from TheComputerGuy96/linux-fixes
Linux fixes
2025-01-06 16:11:43 +01:00
louis-e
97e70bfef0 Implemented translation feedback for Ukrainian and Russian 2025-01-06 16:10:40 +01:00
Louis Erbkamm
b52f5fb552 Merge pull request #201 from krvstek/main
Add Polish language
2025-01-06 15:59:16 +01:00
Louis Erbkamm
bad6c6df57 Merge pull request #198 from TheComputerGuy96/ci-changes
CI changes/improvements
2025-01-06 15:49:06 +01:00
Echo J
8999fc9a26 Bring back the Ubuntu CI builds
After adding extra dependencies, that build job turns green again

This is basically a revert of 5a215c1eda
2025-01-06 16:28:37 +02:00
Echo J
40d28e0d93 Switch to default xdg-portal for rfd
The GTK 3 backend of rfd is relatively problematic (it causes
a whole app freeze when the command function isn't async and
a SIGABRT on app exit when it is async: https://github.com/tauri-apps/plugins-workspace/issues/2255)
so use the better-working xdg-portal backend instead (this will
also help with Flatpak compatibility)

This also removes the unused tauri-plugin-dialog dependency
(which conflicts with our rfd features)
2025-01-06 16:28:33 +02:00
Louis Erbkamm
8e2ad72dc8 Merge pull request #202 from louis-e/logging
Added logging for improved crash analysis
2025-01-06 14:41:27 +01:00
louis-e
49b08a84af Added logging for improved crash analysis 2025-01-06 14:29:37 +01:00
louis-e
2beee07f98 Added logging for improved crash analysis 2025-01-06 14:25:46 +01:00
louis-e
a21c92849e Added logging for improved crash analysis 2025-01-06 14:16:59 +01:00
louis-e
2844c812e0 Merge branch 'logging' of https://github.com/louis-e/arnis into logging 2025-01-06 14:16:32 +01:00
louis-e
aeeb1912d3 Added logging for improved crash analysis 2025-01-06 14:15:49 +01:00
Louis Erbkamm
08d7f7dbbe Merge branch 'main' into logging 2025-01-06 13:57:56 +01:00
louis-e
73f87162c9 Added logging for improved crash analysis 2025-01-06 13:56:50 +01:00
krvstek.
ccf7784848 Add Polish language 2025-01-06 12:37:06 +00:00
Echo J
704249b5cc Switch to a maintained Rust toolchain action
This removes the set-output warnings too
2025-01-06 13:09:40 +02:00
Echo J
6d0c03862c Allow manual runs for CI workflow
This might make debugging CI issues easier
2025-01-06 13:09:39 +02:00
Echo J
bd2a852105 Freeze Cargo state for release workflow 2025-01-06 12:51:56 +02:00
louis-e
c0778c265f Resolved merge conflicts between elevation-wip and main 2025-01-06 02:00:49 +01:00
Louis Erbkamm
a513f0e230 Merge pull request #188 from Ilya114/main
Add Ukrainian add some fixes for russian translation
2025-01-05 23:45:39 +01:00
Louis Erbkamm
c2c9f2e556 Added Ukrainian to main.js 2025-01-05 23:38:22 +01:00
Ilya114
712127228d Rename uk.json to ua.json 2025-01-05 21:17:59 +02:00
Ilya114
3ee1b80ea2 Update ru.json 2025-01-05 20:09:03 +02:00
Ilya114
b1c0f39a65 Create uk.json 2025-01-05 20:08:47 +02:00
Ilya114
23233a5f11 Update ru.json 2025-01-05 20:01:03 +02:00
Louis Erbkamm
424e2751a6 Merge pull request #186 from louis-e/language-support
Added additional support for Spanish, Russian, Chinese and German
2025-01-05 17:52:06 +01:00
louis-e
458f709931 Added additional support for Spanish, Russian, Chinese and German 2025-01-05 17:24:36 +01:00
louis-e
9ad0b5d5ee Added additional support for Spanish, Russian, Chinese and German 2025-01-05 17:11:00 +01:00
Louis Erbkamm
47231f5121 Merge pull request #179 from louis-e/parking-buildings
Added multi level parking buildings
2025-01-05 15:54:38 +01:00
louis-e
4f749d3e98 CI (fix) fmt: Added multi level parking buildings 2025-01-05 15:24:39 +01:00
Louis Erbkamm
7fb4670c87 Update README.md 2025-01-05 15:19:19 +01:00
louis-e
451c346f3d CI (fix) fmt: Added multi level parking buildings 2025-01-05 15:12:23 +01:00
louis-e
2c996637d4 Added multi level parking buildings 2025-01-05 15:10:58 +01:00
Louis Erbkamm
96cbf2ac96 Updated version 2025-01-05 00:38:20 +01:00
Louis Erbkamm
feab8cea98 Updated version 2025-01-05 00:38:10 +01:00
Louis Erbkamm
8128270a57 Merge pull request #169 from louis-e/embed-bootstrapper
Embed bootstrapper
2025-01-05 00:08:29 +01:00
Louis Erbkamm
8ab5745efa Merge branch 'main' into embed-bootstrapper 2025-01-04 23:57:27 +01:00
Louis Erbkamm
8291a94e13 Merge pull request #168 from louis-e/fix-shelter
Fix amenity shelter elements
2025-01-04 23:57:18 +01:00
louis-e
8d5d96f88a Embed WebView2 bootstrapper 2025-01-04 23:52:06 +01:00
louis-e
5008ddd988 Fix amenity shelter elements 2025-01-04 23:45:09 +01:00
Louis Erbkamm
4a200e01f8 Merge pull request #166 from louis-e/no-world-fix
No world selected fix
2025-01-04 23:37:53 +01:00
Louis Erbkamm
eb9e349cdb Update README.md 2025-01-04 23:23:05 +01:00
Louis Erbkamm
4ccb8a492b Merge branch 'main' into no-world-fix 2025-01-04 23:19:57 +01:00
Louis Erbkamm
a7a74fecdb Merge pull request #165 from louis-e/multipolygon-support
Fix: Generate multipolygon buildings from OSM relations
2025-01-04 23:18:44 +01:00
Louis Erbkamm
364e4933ac Added multipolygon support done 2025-01-04 23:18:12 +01:00
louis-e
b7db71209e Fix logic to make sure that generation cannot be started when no world is selected 2025-01-04 23:09:51 +01:00
louis-e
ae4c8371ae Fix: Generate multipolygon buildings from OSM relations 2025-01-04 22:58:47 +01:00
Louis Erbkamm
14aa8e94d5 Merge pull request #133 from louis-e/dependabot/cargo/itertools-0.14.0
Update itertools requirement from 0.13.0 to 0.14.0
2025-01-04 22:03:09 +01:00
Louis Erbkamm
8f739e0189 Merge pull request #134 from louis-e/dependabot/cargo/geo-0.29.3
Update geo requirement from 0.28.0 to 0.29.3
2025-01-04 22:02:47 +01:00
Louis Erbkamm
c9b2899c83 Merge pull request #135 from louis-e/dependabot/cargo/dirs-5.0.1
Update dirs requirement from 4.0.0 to 5.0.1
2025-01-04 22:02:25 +01:00
Louis Erbkamm
155e3e5a9b Merge pull request #158 from adamperkowski/fix/cargolock
fix: include `Cargo.lock`
2025-01-04 17:31:43 +01:00
Adam Perkowski
d364ed1361 fix: include Cargo.lock 2025-01-04 15:33:04 +01:00
Louis Erbkamm
2f2d1c79bb Merge pull request #155 from louis-e/scale-adaption
Adapted minimum scale value to 0.3
2025-01-04 15:19:29 +01:00
Louis Erbkamm
54313019af Added new todos 2025-01-04 15:02:12 +01:00
louis-e
1bd3fb6802 Adapted minimum scale value to 0.3 2025-01-04 14:58:25 +01:00
louis-e
5cbeeb0e01 Adapted minimum scale value to 0.3 2025-01-04 14:57:57 +01:00
Louis Erbkamm
55b522764d Update bug_report.md 2025-01-04 14:46:10 +01:00
Louis Erbkamm
e2fd24ba08 Added bbox example to issue template 2025-01-04 14:24:34 +01:00
Louis Erbkamm
b095c40285 Update README.md 2025-01-04 14:21:16 +01:00
Louis Erbkamm
ffd5a274b0 Merge pull request #127 from benjamin051000/main
Change rfd features to enable manual builds on Linux.
2025-01-03 20:42:42 +01:00
Louis Erbkamm
0097e3b834 Update README.md 2025-01-03 20:38:25 +01:00
Louis Erbkamm
b37aa8185b Merge pull request #138 from louis-e/sign-implementation
Added set_sign in world_editor.rs
2025-01-03 20:25:47 +01:00
louis-e
11c1c18188 CI (clippy) fix: Added set_sign in world_editor.rs 2025-01-03 20:14:02 +01:00
louis-e
6200d4d6ef Added set_sign in world_editor.rs 2025-01-03 20:08:48 +01:00
Louis Erbkamm
2afd508d67 Merge pull request #136 from louis-e/generation-custom-dir
Enable generation without having Minecraft installed
2025-01-03 18:02:00 +01:00
louis-e
62a5a85625 CI (fmt) fix: Enable generation without having Minecraft installed 2025-01-03 17:27:44 +01:00
louis-e
36a17afd9f Enable generation without having Minecraft installed 2025-01-03 17:24:32 +01:00
dependabot[bot]
7c211938f7 Update dirs requirement from 4.0.0 to 5.0.1
---
updated-dependencies:
- dependency-name: dirs
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-03 16:05:44 +00:00
dependabot[bot]
3aa66407be Update geo requirement from 0.28.0 to 0.29.3
Updates the requirements on [geo](https://github.com/georust/geo) to permit the latest version.
- [Changelog](https://github.com/georust/geo/blob/main/CHANGES.md)
- [Commits](https://github.com/georust/geo/compare/geo-0.28.0...geo-0.29.3)

---
updated-dependencies:
- dependency-name: geo
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-03 16:04:58 +00:00
dependabot[bot]
18f1239215 Update itertools requirement from 0.13.0 to 0.14.0
Updates the requirements on [itertools](https://github.com/rust-itertools/itertools) to permit the latest version.
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-itertools/itertools/compare/v0.13.0...v0.14.0)

---
updated-dependencies:
- dependency-name: itertools
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-03 16:03:59 +00:00
Louis Erbkamm
f9d7600839 Merge pull request #123 from sebastiaanspeck/add-dependabot
Add dependabot for automatic dependency updates
2025-01-03 17:03:03 +01:00
Benjamin Wheeler
1bee90889c Change rfd features to enable manual builds on Linux.
rfd wasn't building on Linux, since its default features appear to be
for Windows. This commit changes them to work on Linux. TODO test on
Windows.
2025-01-03 10:40:02 -05:00
Louis Erbkamm
ecead36496 Merge pull request #105 from louis-e/longitude-wrapping-fix
Fixed longitude wrapping bug
2025-01-03 16:35:39 +01:00
louis-e
13a48105fe Removed obsolete console log 2025-01-03 16:06:11 +01:00
Sebastiaan Speck
07fdcf7bed Add dependabot for automatic dependency updates 2025-01-03 05:03:19 +01:00
Adam Perkowski
8e29b1422e docs(README): add Arch Linux installation instructions 2025-01-01 18:17:26 +01:00
Louis Erbkamm
aae99417dd Update README.md 2025-01-01 00:50:40 +01:00
louis-e
f4e0b66245 Fixed longitude wrapping bug 2024-12-31 12:14:18 +01:00
Louis Erbkamm
a99dd0f907 Updated version 2024-12-30 00:28:03 +01:00
Louis Erbkamm
5b023fc9ce Updated version 2024-12-30 00:27:51 +01:00
Louis Erbkamm
ed57bf1b4e Update README.md 2024-12-30 00:16:13 +01:00
Louis Erbkamm
1f45100707 Merge pull request #100 from louis-e/groundlevel-parameter
Added groundlevel parameter to settings
2024-12-30 00:05:32 +01:00
Louis Erbkamm
aa1c8509a5 Merge branch 'main' into groundlevel-parameter 2024-12-29 23:54:04 +01:00
louis-e
6193a05be7 fmt (clippy): fixed redundant field names in struct initialization 2024-12-29 23:53:33 +01:00
louis-e
b9277e6a60 Added groundlevel parameter to settings 2024-12-29 23:48:17 +01:00
Louis Erbkamm
5ae8c27bfa Merge pull request #98 from louis-e/new-world-generation
Added support for generating new world
2024-12-29 23:28:04 +01:00
Louis Erbkamm
0f47fa1316 Update README.md 2024-12-29 23:20:23 +01:00
louis-e
04c0b5e6f8 fmt (clippy): Removed unneeded return statement required by clippy 2024-12-29 23:17:59 +01:00
louis-e
c339f02d1b fmt (clippy): Removed unneeded return statement required by clippy 2024-12-29 23:02:19 +01:00
louis-e
e2e69d119f fmt: Fixed cargo fmt required formatting 2024-12-29 22:58:05 +01:00
Louis Erbkamm
278c7a2cda Extended bug_report.md 2024-12-29 22:56:47 +01:00
louis-e
fb31cb5a21 Added LastPlayed unix timestamp modification 2024-12-29 22:52:15 +01:00
louis-e
712c7db03e Added support for generating new world 2024-12-29 22:42:53 +01:00
Louis Erbkamm
420852fcb0 Added rotate maps to TODO section 2024-12-29 15:15:23 +01:00
Louis Erbkamm
a3aae00ae0 Updated star history section 2024-12-29 01:23:01 +01:00
Louis Erbkamm
7401036675 Merge pull request #95 from louis-e/floodfill-settings
Add floodfill timeout support
2024-12-29 00:55:24 +01:00
Louis Erbkamm
46cf1bca63 FUNDING.yml 2024-12-29 00:53:10 +01:00
louis-e
ae3a91970f Add floodfill timeout support 2024-12-29 00:41:20 +01:00
Louis Erbkamm
b44b7995d1 Merge pull request #94 from louis-e/session-lock-check
Check session lock before selecting world
2024-12-28 23:55:38 +01:00
louis-e
f3ae449f02 Check session lock before selecting world 2024-12-28 23:41:45 +01:00
Louis Erbkamm
2e319d5ea0 Merge pull request #93 from louis-e/snow-mode
Added winter mode
2024-12-28 23:34:29 +01:00
louis-e
1a259d6dfc Added winter mode 2024-12-28 23:22:07 +01:00
Louis Erbkamm
036e54807e Merge pull request #92 from louis-e/force-dark-theme
Force dark theme
2024-12-28 16:24:13 +01:00
louis-e
a75cffd94b Force dark theme 2024-12-28 16:21:35 +01:00
Louis Erbkamm
135e15077a Merge pull request #91 from louis-e/settings-menu
Added settings menu including scale option and custom bbox input
2024-12-28 03:20:45 +01:00
louis-e
a284f77545 Added settings menu including scale option and custom bbox input 2024-12-28 03:07:47 +01:00
Louis Erbkamm
5cb749ba8f Added .gitattributes 2024-12-25 01:50:30 +01:00
louis-e
b13f8cb96a Added capabilities/ 2024-12-25 01:42:08 +01:00
Louis Erbkamm
5121f3b647 Merge pull request #89 from louis-e/gui-impl
Implemented GUI
2024-12-25 00:52:01 +01:00
louis-e
5a215c1eda ci: remove Ubuntu build from CI workflow due to https://github.com/tauri-apps/tauri/issues/11222 2024-12-25 00:40:56 +01:00
louis-e
fbe40a0611 fix(ci): install libsoup3 and set PKG_CONFIG_PATH to resolve build issues on Ubuntu 2024-12-25 00:38:44 +01:00
louis-e
cab154e631 fix(ci): explicitly add universe and backports repositories to resolve dependency issues 2024-12-25 00:37:46 +01:00
louis-e
5a1d2024f3 fix(ci): resolve libsoup3-dev installation issue by adding universe repository and fallback to source build 2024-12-25 00:36:21 +01:00
louis-e
3c29f3d2a0 fix(ci): resolve gdk-sys build failure on Ubuntu by installing GTK dependencies 2024-12-25 00:32:32 +01:00
louis-e
0f0115f6bc fix(ci): install libsoup3 and set PKG_CONFIG_PATH to resolve build issues on Ubuntu 2024-12-25 00:31:01 +01:00
louis-e
36af3ad79d fix(ci): resolve gdk-sys build failure on Ubuntu by installing GTK dependencies 2024-12-25 00:22:33 +01:00
louis-e
4685a7297c Implemented GUI 2024-12-25 00:08:04 +01:00
Louis Erbkamm
28800b2fc2 Add files via upload 2024-12-24 23:14:23 +01:00
Louis Erbkamm
7c62da68b3 Merge pull request #84 from louis-e/region_file_fix
Fix region file creation and template writing in create_region function
2024-11-02 16:57:46 +01:00
louis-e
e578e5da6e Added truncate 2024-11-02 16:47:47 +01:00
louis-e
8293df44d4 Fix region file creation and template writing in create_region function
- Added `.create(true)` to `File::options()` in `create_region` to ensure the region file is created if it doesn't exist, resolving "file not found" error.
- Replaced `std::fs::copy` with `include_bytes!` macro for in-memory access to `region.template`, simplifying file handling and improving performance.

These changes ensure smoother file creation and handling during world generation.
2024-11-02 16:42:28 +01:00
Louis Erbkamm
8aa2f2b76e Merge pull request #81 from scd31/dont_download_template_region
Don't download region.template from github
2024-11-02 13:35:19 +01:00
Louis Erbkamm
8947b93f2f Fix borrowing CI error 2024-11-02 13:26:29 +01:00
Louis Erbkamm
bc9590ab0d Merge branch 'main' into dont_download_template_region 2024-11-02 13:22:21 +01:00
Louis Erbkamm
7ef7950bcb Merge pull request #80 from scd31/clippy_fixes
Clippy fixes
2024-11-02 13:18:57 +01:00
Louis Erbkamm
25e4b17d32 Merge pull request #83 from scd31/world_format_bugfix
revert a small world change
2024-11-02 13:17:55 +01:00
Stephen D
2068c1aa92 revert a small world change 2024-10-27 21:17:17 -03:00
Stephen D
31fe15becb fix remaining clippys 2024-10-27 11:36:21 -03:00
Stephen D
4b9f9f7d98 add rustfmt to CI 2024-10-27 11:25:57 -03:00
Stephen D
aa68f40170 cargo fmt the project 2024-10-27 11:25:56 -03:00
Stephen D
a394f40659 run clippy lints in CI 2024-10-27 11:24:56 -03:00
Stephen D
4d4ae69a9e fix clippy lints 2024-10-27 11:24:55 -03:00
Louis Erbkamm
7decd3765f Merge pull request #82 from scd31/thicc_world
Raise the world
2024-10-27 13:09:06 +01:00
Louis Erbkamm
fe2ee73166 Merge pull request #79 from scd31/world_scale
allow custom world scales
2024-10-27 12:53:03 +01:00
Louis Erbkamm
c71fced60d Merge pull request #78 from scd31/memeory_improvements
Memory improvements
2024-10-27 12:52:12 +01:00
Louis Erbkamm
0e53b185dc Merge pull request #77 from scd31/river_perf_improvements
river performance improvements
2024-10-27 12:49:42 +01:00
Stephen D
1200e8c32d raise up world 2024-10-25 12:47:09 -03:00
Stephen D
4aea786cd4 make minecraft recompute light levels for us 2024-10-24 22:30:17 -03:00
Stephen D
c9c0cb2f2c rivers 2024-10-24 19:24:40 -03:00
Stephen D
18de6ec808 very beginnings of elevation. Using a sinewave map and not everything has been moved onto the surface yet. Also, some things need better logic when placed on the surface (buildings go underground a bit) 2024-10-24 19:24:39 -03:00
Stephen D
9f521489ab raise up world 2024-10-23 22:07:53 -03:00
Stephen D
e5dba4dfbe speed up world saving significantly 2024-10-23 21:44:09 -03:00
Stephen D
5edda1bd7e Don't download region.template from github 2024-10-20 22:30:14 -03:00
Stephen D
c3e7765852 allow custom world scales 2024-10-20 21:16:41 -03:00
Stephen D
c89b9e4941 improve memory usage 2024-10-20 19:34:30 -03:00
Stephen D
dc29108b06 missed a file 2024-10-20 12:50:22 -03:00
Stephen D
78a747a618 river performance improvements 2024-10-20 12:45:40 -03:00
Louis Erbkamm
b727e85f65 Update contributors section in README.md
Added new contributors and removed contributors from the old legacy Python version of the project since they're already mentioned in the according legacy branch
2024-10-19 20:05:33 +02:00
Louis Erbkamm
85ef56cf32 Update contributors section in README.md
Added new contributors and removed contributors from the old legacy Python version of the project since they're already mentioned in the according legacy branch
2024-10-19 20:04:44 +02:00
Louis Erbkamm
14c649963e Merge pull request #76 from scd31/wide_rivers
Wide rivers
2024-10-19 20:00:08 +02:00
Louis Erbkamm
d79593d1c8 Merge pull request #74 from scd31/world_format_fix
fix chunk file in wrong location
2024-10-19 19:55:47 +02:00
Stephen D
839260407b working river generation! Very slow; still have to optimize 2024-10-19 12:19:35 -03:00
Stephen D
13cae5c910 refactor in preparation of river processing 2024-10-18 20:05:35 -03:00
Stephen D
53a62d0150 make north point north 2024-10-17 19:15:16 -03:00
Stephen D
ce17ec3267 fix loading bar 2024-10-16 19:25:01 -03:00
Stephen D
7deb31d898 code cleanup 2024-10-16 19:04:18 -03:00
Stephen D
9b23b62ffe fix bug when computing chunk pos for cities larger than a single region file 2024-10-15 22:43:06 -03:00
Stephen D
8034bd7824 fix chunk file in wrong location 2024-10-15 22:34:41 -03:00
Louis Erbkamm
6d68afd726 Merge pull request #73 from scd31/negative_bbox
Allow hyphen at start of bbox argument
2024-10-14 16:14:55 +02:00
Stephen D
010a7f73f2 allow hyphen at start of bbox argument 2024-10-13 13:40:55 -03:00
Louis Erbkamm
e0cecfdb8d Merge pull request #71 from vfosnar/main
another round of my improvements
2024-09-29 21:59:06 +02:00
Vojtěch Fošnár
5a69850967 enable lto 2024-09-23 20:08:49 +02:00
Vojtěch Fošnár
dfc9dada46 finish color implementation 2024-09-23 20:01:25 +02:00
Vojtěch Fošnár
569f408a07 simple surface for playground/pitch 2024-09-23 19:05:49 +02:00
Vojtěch Fošnár
0ca289d2df start of better wall and roof color implementation 2024-09-23 18:56:18 +02:00
Vojtěch Fošnár
5fa09131e3 implement floodfill timeout 2024-09-23 13:12:40 +02:00
Louis Erbkamm
38aa80b707 Merge pull request #69 from vfosnar/main
- Respect building:colour and roof:colour - get_block_for_color
- Fix parsing height for values containing m suffix
- Raise height calculation from levels * 3 to levels * 4
- Offset floors by 2 to match with the windows
- Simple information=board implementation
2024-09-22 22:31:21 +02:00
Vojtěch Fošnár
d512da2267 offset floors by 2, simple information=board impl 2024-09-22 19:23:39 +02:00
Vojtěch Fošnár
cc92ac42d2 fix parsing height with meters suffix 2024-09-22 15:08:35 +02:00
Vojtěch Fošnár
50213a185e add flake.nix and direnv to support development on NixOS, respect building:colour and roof:colour 2024-09-22 14:52:07 +02:00
Louis Erbkamm
96ad9ebd34 Fixed Issue #65 (Buildings over roads) 2024-09-22 11:42:37 +02:00
Louis Erbkamm
0d48f60c2f Merge pull request #64 from louis-e/api-error-handling
Graceful handling of API request errors
2024-09-21 19:23:32 +02:00
louis-e
755583d540 Graceful handling of API request errors 2024-09-21 19:18:24 +02:00
Louis Erbkamm
1056b89660 Removed survey 2024-09-21 03:02:16 +02:00
Louis Erbkamm
73011560a7 Fixed REMOTE_CARGO_TOML_URL const url 2024-09-21 01:35:07 +02:00
Louis Erbkamm
00ab57e1ea Update Cargo.toml 2024-09-20 19:38:31 +02:00
Louis Erbkamm
0ff31781fb Fixed Rust release workflow 2024-09-20 19:38:10 +02:00
Louis Erbkamm
f8bf0c02dd Added reference to releases in README 2024-09-20 19:31:56 +02:00
Louis Erbkamm
89135b8ddd Fixed Rust release workflow 2024-09-20 19:26:32 +02:00
Louis Erbkamm
543c1e551d Update Cargo.toml 2024-09-20 19:15:15 +02:00
Louis Erbkamm
7a17524de9 Fixed Rust release workflow 2024-09-20 19:13:03 +02:00
Louis Erbkamm
444c6f2d50 Fixed region.template download path 2024-09-20 19:02:30 +02:00
Louis Erbkamm
122c5f01a9 Updated README 2024-09-20 18:18:26 +02:00
louis-e
851c46b86d Merge experimental-rust-dev into main, resolve conflicts 2024-09-20 18:14:03 +02:00
Louis Erbkamm
8552b412e6 Merge pull request #59 from louis-e/prepare-rust-release
Prepare rust release
2024-09-20 18:03:09 +02:00
louis-e
f48598e1bc Prepare rust release 2024-09-20 18:01:43 +02:00
Louis Erbkamm
45ace99a9e Merge pull request #58 from louis-e/minor-fixes
Minor optimization
2024-09-18 20:22:43 +02:00
louis-e
540b8db7d9 Minor optimization 2024-09-18 20:17:40 +02:00
Louis Erbkamm
023bd888f2 Merge pull request #57 from louis-e/lighting-fix
Fixed lighting levels (SkyLight)
2024-09-18 18:41:20 +02:00
louis-e
c237978ce9 Fixed lighting levels (SkyLight) 2024-09-18 18:40:31 +02:00
Louis Erbkamm
1b661c1619 Merge pull request #56 from louis-e/fix-overlay
Fixed overlay issue
2024-09-18 00:19:01 +02:00
louis-e
685df7caa0 Fixed overlay issue 2024-09-18 00:17:15 +02:00
Louis Erbkamm
15f4bf0345 Merge pull request #55 from louis-e/fix-properties
Fix block properties
2024-09-17 21:44:41 +02:00
louis-e
eee26aeda5 Fixed block properties 2024-09-17 21:43:28 +02:00
Louis Erbkamm
4cc432b699 Refactored height check 2024-09-16 21:32:57 +02:00
Louis Erbkamm
baa70a7f3c Update README.md 2024-09-16 21:03:27 +02:00
Louis Erbkamm
9e4f743778 Updated Git Assets 2024-09-16 20:48:01 +02:00
Louis Erbkamm
10bcfbfc8a Added Git Assets 2024-09-16 20:38:45 +02:00
Louis Erbkamm
385ee223e0 Merge pull request #54 from louis-e/third-port-bulk
Major third porting bulk
2024-09-15 22:56:41 +02:00
Louis Erbkamm
2b09c18ec9 Merge branch 'experimental-rust-dev' into third-port-bulk 2024-09-15 22:56:27 +02:00
louis-e
ee88e9dc47 Major third porting bulk 2024-09-15 22:52:19 +02:00
Louis Erbkamm
f9ce6f208c Create feature_request.md 2024-09-14 15:53:54 +02:00
Louis Erbkamm
83e1296ce9 Create discussion.md 2024-09-14 15:53:34 +02:00
Louis Erbkamm
72c8cdc3b7 Create bug_report.md 2024-09-14 15:52:53 +02:00
Louis Erbkamm
15837d5050 Added Release Workflow 2024-09-14 15:51:58 +02:00
Louis Erbkamm
dbbb6a896a Update README.md 2024-09-11 21:04:31 +02:00
Louis Erbkamm
e9ca4789c0 Merge pull request #52 from louis-e/second-port-bulk
Fine tuning and bug fixing
2024-09-11 20:15:15 +02:00
louis-e
c3b7904286 Fine tuning and bug fixing 2024-09-11 20:13:52 +02:00
Louis Erbkamm
0b385197db Merge pull request #51 from louis-e/core-port-impl
Core feature port
2024-09-01 03:31:19 +02:00
Louis Erbkamm
77fe64c910 Delete Cargo.lock 2024-09-01 03:30:26 +02:00
louis-e
bfb4bdaf6c Core feature port 2024-09-01 03:22:59 +02:00
Louis Erbkamm
704736f9dd Enhanced modularization and core feature porting
Merge pull request #47 from louis-e/rust-modularization
2024-08-25 03:03:06 +02:00
louis-e
a7c1f7be5e Enhanced modularization and core feature porting
Modularization: Separated core logic into dedicated modules (world_editor, args, data_processing, block_definitions) for better maintainability.
Bresenham Algorithm: Implemented efficient block placement for drawing lines in 3D space.
Block Definitions: Centralized block constants for cleaner and reusable block references.
Input Argument Parsing: Integrated clap for robust command-line argument handling, including dynamic path and bounding box inputs.
File Structure: Refined file organization to support scalability and easier navigation.
2024-08-25 03:00:04 +02:00
Louis Erbkamm
1bdbf83d22 Added Support for Multi-Region Block Modifications and Cuboid Fill Functionality
Multi-Region Support: The editor now handles block modifications across multiple regions, dynamically loading and creating region files as needed.
Cuboid Fill Functionality: Adds a fill_blocks method to allow setting a block type across a defined 3D area, improving bulk modifications.
2024-08-25 01:18:44 +02:00
louis-e
478ffb6709 Initial branch setup 2024-08-24 16:37:06 +02:00
188 changed files with 57842 additions and 3214 deletions

View File

@@ -1,5 +0,0 @@
[flake8]
ignore = E203, W503, F405, F403
# line length is intentionally set to 80 here because black uses Bugbear
# See https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-length for more details
max-line-length = 100

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
gui-src/** linguist-vendored

1
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1 @@
buy_me_a_coffee: louisdev

View File

@@ -10,11 +10,14 @@ assignees: ''
**Describe the bug**
A clear and concise description of what the bug is and what you expected to happen.
**Used bbox parameter**
Please provide your input parameters so we can reproduce the issue.
**Used bbox area**
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.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here. Please also provide the --bbox input parameters you used so we can reproduce the issue.
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

10
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"

View File

@@ -1,45 +0,0 @@
name: Build and Release for Linux
on:
release:
types: [created] # Triggers only when a release is created
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Create Executable
uses: Martin005/pyinstaller-action@v1.2.0
with:
python_ver: '3.10'
spec: 'pyinst-compile.spec'
requirements: 'requirements.txt'
upload_exe_with_name: 'arnis'
options: '--onefile --name arnis'
- name: Build
run: make build
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./dist/arnis
asset_name: arnis
asset_content_type: application/octet-stream

View File

@@ -1,45 +0,0 @@
name: Build and Release for Windows
on:
release:
types: [created] # Triggers only when a release is created
jobs:
build-and-release:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Create Executable
uses: Martin005/pyinstaller-action@v1.2.0
with:
python_ver: '3.10'
spec: 'pyinst-compile.spec'
requirements: 'requirements.txt'
upload_exe_with_name: 'arnis.exe'
options: '--onefile --name arnis'
- name: Build
run: make build
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./dist/arnis.exe
asset_name: arnis.exe
asset_content_type: application/octet-stream

74
.github/workflows/ci-build.yml vendored Normal file
View File

@@ -0,0 +1,74 @@
name: CI Build
# Trigger CI on pull requests when relevant files change, and pushes to main
on:
pull_request:
paths:
- '.github/**'
- 'src/**'
- 'Cargo.toml'
- 'Cargo.lock'
push:
branches:
- main
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Rust
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
components: clippy
- 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: 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@v4
- 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

111
.github/workflows/pr-benchmark.yml vendored Normal file
View File

@@ -0,0 +1,111 @@
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@v4
- 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.101470,11.517792,48.168375,11.626968" 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=135
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=5865
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
{
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 "_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 }}

View File

@@ -0,0 +1,92 @@
name: [DISABLED] Pre-release Dev Build
on:
push:
branches:
- main
jobs:
build:
strategy:
matrix:
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
binary_name: arnis.exe
asset_name: arnis-windows-x64.exe
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
binary_name: arnis
asset_name: arnis-linux-x64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Rust
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
targets: ${{ matrix.target }}
- name: Install Linux dependencies
if: matrix.os == 'ubuntu-latest'
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
- name: Install dependencies
run: cargo fetch --locked
- name: Build
run: cargo build --frozen --release
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-build
path: target/release/${{ matrix.binary_name }}
prerelease:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Download Windows build artifact
uses: actions/download-artifact@v3
with:
name: windows-latest-build
path: ./builds/windows
- name: Download Linux build artifact
uses: actions/download-artifact@v3
with:
name: ubuntu-latest-build
path: ./builds/linux
- name: Make Linux binary executable
run: chmod +x ./builds/linux/arnis
- name: Create Pre-release on GitHub
uses: ncipollo/release-action@v1
with:
tag: "dev-build-${{ github.run_number }}"
name: "Experimental Development Build #${{ github.run_number }}"
body: "Automated pre-release built from the main branch for testing purposes. This build may contain experimental features. For the latest official version, please download the latest stable release."
draft: false
prerelease: true
makeLatest: false
files: |
builds/windows/arnis.exe
builds/linux/arnis
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,32 +0,0 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
# Reduced subset of file from https://github.com/actions/starter-workflows/blob/main/ci/python-app.yml
name: Python application
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest black
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Check the black styling
run: |
make style-check
- name: Lint with flake8
run: |
make lint
- name: Run unit tests
run: |
python -m pytest

160
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,160 @@
name: Build and Release Arnis
on:
release:
types: [created]
jobs:
build:
strategy:
matrix:
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
binary_name: arnis.exe
asset_name: arnis-windows.exe
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
binary_name: arnis
asset_name: arnis-linux
- os: macos-13 # Intel runner for x86_64 builds
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
runs-on: ${{ matrix.os }}
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 Linux dependencies
if: matrix.os == 'ubuntu-latest'
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
- name: Install dependencies
run: cargo fetch
- name: Build
run: cargo build --release --target ${{ matrix.target }}
- name: Rename binary for release
run: mv target/${{ matrix.target }}/release/${{ matrix.binary_name }} target/release/${{ matrix.asset_name }}
- name: Install Windows SDK
if: matrix.os == 'windows-latest'
run: |
choco install windows-sdk-10.1 -y
$env:Path += ";C:\Program Files (x86)\Windows Kits\10\bin\x64"
shell: powershell
- name: Locate signtool.exe
if: matrix.os == 'windows-latest'
id: locate_signtool
run: |
$env:ProgramFilesX86 = [System.Environment]::GetFolderPath('ProgramFilesX86')
$signtoolPath = Get-ChildItem -Path "$env:ProgramFilesX86\Windows Kits\10\bin" -Recurse -Filter signtool.exe | Where-Object { $_.FullName -match '\\x64\\' } | Select-Object -First 1 -ExpandProperty FullName
if (-not $signtoolPath) { throw "signtool.exe not found." }
echo "signtool=$signtoolPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
shell: powershell
- name: Self-sign Windows executable
if: matrix.os == 'windows-latest'
run: |
$password = ConvertTo-SecureString -String $env:WINDOWS_CERT_PASSWORD -Force -AsPlainText
$cert = New-SelfSignedCertificate -Type CodeSigningCert -Subject 'CN=Arnis' -CertStoreLocation Cert:\CurrentUser\My -NotAfter (Get-Date).AddYears(5)
Export-PfxCertificate -Cert $cert -FilePath arnis-cert.pfx -Password $password
& $env:signtool sign /f arnis-cert.pfx /p $env:WINDOWS_CERT_PASSWORD /t http://timestamp.digicert.com target/release/${{ matrix.asset_name }}
env:
WINDOWS_CERT_PASSWORD: ${{ secrets.WINDOWS_CERT_PASSWORD }}
shell: powershell
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.target }}-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@v4
with:
name: macos-13-x86_64-apple-darwin-build
path: ./intel
- name: Download macOS ARM64 build
uses: actions/download-artifact@v4
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]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download Windows build artifact
uses: actions/download-artifact@v4
with:
name: windows-latest-x86_64-pc-windows-msvc-build
path: ./builds/windows
- name: Download Linux build artifact
uses: actions/download-artifact@v4
with:
name: ubuntu-latest-x86_64-unknown-linux-gnu-build
path: ./builds/linux
- name: Download macOS universal build artifact
uses: actions/download-artifact@v4
with:
name: macos-universal-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
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
builds/windows/arnis-windows.exe
builds/linux/arnis-linux
builds/macos/arnis-mac-universal
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}

View File

@@ -0,0 +1,100 @@
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

201
.gitignore vendored
View File

@@ -1,167 +1,52 @@
# Original file is from https://github.com/github/gitignore/blob/main/Python.gitignore
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
/wiki
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
# Environment files
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
.envrc
/.direnv
# Spyder project settings
.spyderproject
.spyproject
# Build artifacts
/target
**/*.rs.bk
# Rope project settings
.ropeproject
# IDE/editor files
.idea/
/.vscode/
/*.swp
*.iml
*.suo
*.ntvs*
*.njsproj
*.sln
*.ps1
# mkdocs documentation
/site
# System files
.DS_Store
Thumbs.db
*.tmp
*.log
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Generated files
/export.json
/parsed_osm_data.txt
/elevation_debug.png
/terrain-tile-cache
/arnis-tile-cache
/gen/
/build/
*.rmeta
*.dSYM
# Pyre type checker
.pyre/
# Tauri specific
flake/
gen/
# pytype static type analyzer
.pytype/
# Miscellaneous
*.bak
*.old
*.orig
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
# Debug files
arnis-debug-raw_data.json
arnis-debug-processed_data.json
arnis-debug-map.png
image.img
# Ignore all in flake directory except specific files
/flake/*
!/flake/flake.nix
!/flake/flake.lock

7073
Cargo.lock generated Normal file
View File

File diff suppressed because it is too large Load Diff

53
Cargo.toml Normal file
View File

@@ -0,0 +1,53 @@
[package]
name = "arnis"
version = "2.3.0"
edition = "2021"
description = "Arnis - Generate real life cities in Minecraft"
homepage = "https://github.com/louis-e/arnis"
repository = "https://github.com/louis-e/arnis"
license = "Apache-2.0"
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"]
[build-dependencies]
tauri-build = {version = "2", optional = true}
[dependencies]
clap = { version = "4.5", features = ["derive", "env"] }
colored = "3.0.0"
dirs = {version = "6.0.0", optional = true }
fastanvil = "0.31.0"
fastnbt = "2.5.0"
flate2 = "1.1"
fnv = "1.0.7"
fs2 = "0.4"
geo = "0.30.0"
image = "0.25"
indicatif = "0.17.11"
itertools = "0.14.0"
log = "0.4.27"
once_cell = "1.21.3"
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.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-shell = { version = "2", optional = true }
tokio = { version = "1.47.0", features = ["full"], optional = true }
[target.'cfg(windows)'.dependencies]
windows = { version = "0.61.1", features = ["Win32_System_Console"] }
[dev-dependencies]
tempfile = "3.20.0"

View File

@@ -1,6 +0,0 @@
FROM python:3.9
RUN apt-get update && apt-get -y install git ffmpeg libsm6 libxext6
RUN cd /home && mkdir /home/region && git clone https://github.com/louis-e/arnis.git
WORKDIR /home/arnis
RUN pip install -r requirements.txt
ENTRYPOINT ["python", "arnis.py"]

875
LICENSE
View File

@@ -1,674 +1,201 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"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.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
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.

View File

@@ -1,11 +0,0 @@
# Check if black formatter will work without any rewrites, and produces an exit code
style-check:
black src/ --check
# This will reformat all python files unders bookdifferent/ into the python black standard
style:
black src/
# Checks that the python source files are compliant regarding errors and style conventions
lint:
flake8 src/

175
README.md
View File

@@ -1,135 +1,90 @@
<p align="center">
<img width="456" height="125" src="https://github.com/louis-e/arnis/blob/main/gitassets/logo.png?raw=true">
</p>
<img src="https://github.com/louis-e/arnis/blob/main/gitassets/banner.png?raw=true" width="100%" alt="Banner">
# Arnis [![Testing](https://github.com/louis-e/arnis/actions/workflows/python-app.yml/badge.svg)](https://github.com/louis-e/arnis/actions/workflows/python-app.yml)
This open source project generates any chosen location from the real world in Minecraft, allowing users to explore and build in a virtual world that mirrors the real one.
<br><br>
⇒ [Where did you find this project?](https://6okq6xh5jt4.typeform.com/to/rSjZaB41)
<br>
## :desktop_computer: Example
![Minecraft World Demo](https://github.com/louis-e/arnis/blob/main/gitassets/demo-comp.png?raw=true)
![Minecraft World Demo Before After](https://github.com/louis-e/arnis/blob/main/gitassets/before-after.gif?raw=true)
# Arnis [![CI Build Status](https://github.com/louis-e/arnis/actions/workflows/ci-build.yml/badge.svg)](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) [![Download here](https://img.shields.io/badge/Download-here-green)](https://github.com/louis-e/arnis/releases) [![Discord](https://img.shields.io/discord/1326192999738249267?label=Discord&color=%237289da)](https://discord.gg/mA2g69Fhxq)
## :floppy_disk: How it works
![CLI Generation](https://github.com/louis-e/arnis/blob/main/gitassets/cli-generation.gif?raw=true)
Arnis creates complex and accurate Minecraft Java Edition worlds that reflect real-world geography, topography, and architecture.
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 the script, the following steps are performed automatically to generate a Minecraft world:
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!
#### Processing Pipeline
1. Scraping Data from API: The script fetches geospatial data from the Overpass Turbo API.
2. Determine Coordinate Extremes: Identifies the highest and lowest latitude and longitude values from the dataset.
3. Standardize Coordinate Lengths: Ensures all coordinates are of uniform length and removes the decimal separator.
4. Normalize Data: Adjusts all coordinates to start from zero by subtracting the previously determined lowest values.
5. Parse Data: Transforms the raw data into a standardized structure.
6. Sort elements by priority: Enables a layering system with prioritized elements.
7. Optimize Array Size: Focuses on the outermost buildings to reduce array size.
8. Generate Minecraft World: Iterates through the array to create the Minecraft world, including 3D structures like forests, houses, and rivers.
![Minecraft Preview](https://raw.githubusercontent.com/louis-e/arnis/refs/heads/main/gitassets/preview.jpg)
<i>This Github page is the official project website. Do not download Arnis from any other website.</i>
## :keyboard: Usage
```python3 arnis.py --bbox="min_lng,min_lat,max_lng,max_lat" --path="C:/Users/username/AppData/Roaming/.minecraft/saves/worldname"```
<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.
Use http://bboxfinder.com/ to draw a rectangle of your wanted area. Then copy the four box coordinates as shown below and use them as the input for the --bbox parameter.
![How to find area](https://github.com/louis-e/arnis/blob/main/gitassets/bbox-finder.png?raw=true)
The world will always be generated starting from the coordinates 0 0 0.
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.
Manually generate a new Minecraft world (preferably a flat world) before running the script.
The --bbox parameter specifies the bounding box coordinates in the format: min_lng,min_lat,max_lng,max_lat.
Use --path to specify the location of the Minecraft world.
With the --timeout parameter you can set the timeout for the floodfill algorithm in seconds (default: 2).
You can optionally use the parameter --debug to see processed value outputs during runtime.
## 📚 Documentation
#### Experimental City/State/Country Input Method
The following method is experimental and may not perform as expected. Support is limited.
<img src="https://github.com/louis-e/arnis/blob/main/gitassets/documentation.png?raw=true" width="100%" alt="Banner">
```python3 arnis.py --city="CityName" --state="StateName" --country="CountryName" --path="C:/Users/username/AppData/Roaming/.minecraft/saves/worldname"```
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.
### Docker image (experimental)
If you want to run this project containerized, you can use the Dockerfile provided in this repository. It will automatically scrape the latest source code from the repository. After running the container, you have to manually copy the generated region files from the container to the host machine in order to use them. When running the Docker image, set the ```--path``` parameter to ```/home```.
```
docker build -t arnis .
docker run arnis --city="Arnis" --state="Schleswig Holstein" --country="Deutschland" --path="/home"
docker cp CONTAINER_ID:/home/region DESTINATION_PATH
```
## :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.
- **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.
## :cd: Requirements
- Python 3
- ```pip install -r requirements.txt```
#### 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.
- To conform with style guide please format any changes and check the code quality
```black .```
```flake8 src/```
Command line Build: ```cargo run --no-default-features -- --terrain --path="C:/YOUR_PATH/.minecraft/saves/worldname" --bbox="min_lng,min_lat,max_lng,max_lat"```<br>
GUI Build: ```cargo run```<br>
- Functionality should be covered by automated tests.
```python -m pytest```
## :question: FAQ
- *Why do some cities take so long to generate?*<br>
The script's performance can be significantly affected by large elements, such as extensive farmlands. The floodfill algorithm can slow down considerably when dealing with such elements, leading to long processing times. Thus there is also a timeout restriction in place, which can be adjusted by the user *[(see Usage)](#keyboard-usage)*. It is recommended to start with smaller areas to get a sense of the script's performance. Continuous improvements on the algorithm especially focus on effiency improvements.
- *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.
- *How does the Minecraft world generation work?*<br>
The script uses the [anvil-parser](https://github.com/matcool/anvil-parser) library to interact with Minecraft's world format. This library allows the script to create and manipulate Minecraft region files, enabling the generation of real-world locations within the game.
- *Where does the name come from?*<br>
The project is named after Arnis[^2], the smallest city in Germany. The city's small size made it an ideal test case for developing and debugging the script efficiently.
## :memo: ToDo
Feel free to choose an item from the To-Do or Known Bugs list, or bring your own idea to the table. Contributions from everyone are welcome and encouraged to help improve this project.
- [ ] Look into https://github.com/Intergalactyc/anvil-new which seems to have a better support
- [ ] Tool for mapping real coordinates to Minecraft coordinates
- [ ] Fix railway orientation
- [ ] Fix gaps in bridges
- [ ] Full refactoring of variable and function names, establish naming conventions
- [ ] Detection of wrong bbox input
- [ ] Evaluate and implement multiprocessing in the ground layer initialization and floodfill algorithm
- [ ] Implement elevation
- [ ] Add interior to buildings
- [ ] Save fountain structure in the code (similar to the tree structure)
- [ ] Add windows to buildings
- [ ] Generate a few big cities using high performance hardware and make them available to download
- [ ] Optimize region file size
- [ ] Street markings
- [ ] Add better code comments
- [x] Alternative reliable city input options
- [x] Split up processData array into several smaller ones for big cities
- [x] Find alternative for CV2 package
- [x] Floodfill timeout parameter
- [x] Automated Tests
- [x] PEP8
- [x] Use f-Strings in print statements
- [x] Add Dockerfile
- [x] Added path check
- [x] Improve RAM usage
## :bug: Known Bugs
- [ ] Docker image size
- [x] 'Noer' bug (occurs when several different digits appear in coordinates before the decimal point)
- [x] 'Nortorf' bug (occurs when there are several elements with a big distance to each other, e.g. the API returns several different cities with the exact same name)
- [x] Saving step memory overflow
- [x] Non uniform OSM naming standards (dashes) (See name tags at https://overpass-turbo.eu/s/1mMj)
## :trophy: Hall of Fame Contributors
This section is dedicated to recognizing and celebrating the outstanding contributions of individuals who have significantly enhanced this project. Your work and dedication are deeply appreciated!
#### Contributors:
- callumfrance
- amir16yp
- EdwardWeir13579
- daniil2327
After your pull request was merged, I will take care of regularly creating update releases which will include your changes.
## :star: Star History
[![Star History Chart](https://api.star-history.com/svg?repos=louis-e/arnis&type=Date)](https://star-history.com/#louis-e/arnis&Date)
<a href="https://star-history.com/#louis-e/arnis&Date">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=louis-e/arnis&Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=louis-e/arnis&Date&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=louis-e/arnis&Date&type=Date" />
</picture>
</a>
## :newspaper: Academic & Press Recognition
<img src="https://github.com/louis-e/arnis/blob/main/gitassets/recognition.png?raw=true" 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
This project is licensed under the GNU General Public License v3.0 (GPL-3.0).[^3]
Copyright (c) 2022-2025 Louis Erbkamm (louis-e)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
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://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.
Copyright (c) 2022-2024 louis-e
[^1]: https://en.wikipedia.org/wiki/OpenStreetMap
[^2]: https://en.wikipedia.org/wiki/Arnis,_Germany
[^3]:
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
For the full license text, see the LICENSE file.
[^3]: https://github.com/louis-e/arnis/blob/main/LICENSE

View File

@@ -1,10 +0,0 @@
#!/usr/bin/env python
# Copyright 2022 by louis-e, https://github.com/louis-e/.
# MIT License
# Please see the LICENSE file that should have been included as part of this package.
from src.main import run
if __name__ == "__main__":
run()

4
build.rs Normal file
View File

@@ -0,0 +1,4 @@
fn main() {
#[cfg(feature = "gui")]
tauri_build::build()
}

10
capabilities/default.json Normal file
View File

@@ -0,0 +1,10 @@
{
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "default",
"description": "Capability for the main window",
"windows": ["main"],
"permissions": [
"core:default",
"shell:allow-open"
]
}

View File

@@ -0,0 +1,32 @@
[
{
"comment": "this make all elements x+=2000, z+=2000",
"operation": "translate",
"config": {
"type": "vector",
"config": {
"vector": {
"dx": 2000,
"dz": 2000
}
}
}
},
{
"comment": "This drags the map at point 2000,2000 to 100,100",
"operation": "translate",
"config": {
"type": "startend",
"config": {
"start": {
"x": 2000,
"z": 2000
},
"end": {
"x": 0,
"z": 0
}
}
}
}
]

99
flake/flake.lock generated Normal file
View 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
View 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
];
};
});
}

BIN
gitassets/banner.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 MiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

BIN
gitassets/cli.gif Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

BIN
gitassets/documentation.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

BIN
gitassets/gui.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

BIN
gitassets/preview.jpg Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 790 KiB

BIN
gitassets/recognition.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 MiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

15
gui-src/arnis.desktop vendored Normal file
View File

@@ -0,0 +1,15 @@
[Desktop Entry]
Type=Application
Name=Arnis
Comment=Generate cities from real life in Minecraft
Comment[lt]=Sugeneruokite tikrovės miestus „Minecraft“ žaidime
Comment[de]=Generiere echte Städte in Minecraft
Comment[fr]=Générez des villes réelles dans Minecraft
Comment[es]=Genera ciudades reales en Minecraft
Comment[pt]=Gere cidades reais no Minecraft
Comment[zh_CN]=在 Minecraft 中生成现实城市
Icon=icon
Exec=arnis
Categories=Game;Education;Geoscience
Keywords=OSM;OpenStreetMap;Minecraft
StartupWMClass=arnis

347
gui-src/css/bbox.css vendored Normal file
View File

@@ -0,0 +1,347 @@
html,
body,
#map {
height: 100%;
width: 100%;
padding: 0px;
margin: 0px;
font-family: "Courier New", Courier, monospace;
}
#info-box {
position: absolute;
width: 100%;
height: auto;
bottom: 0;
border: 0 0 7px 0;
z-index: 10000;
}
#coord-format {
position: absolute;
bottom: 0;
right: 15;
}
#coord-format .bboxlabel {
width: 100%;
}
#coord-format form {
margin-bottom: 10px;
}
#info img {
vertical-align: middle;
height: 16px;
width: auto;
opacity: 0.6;
}
#info img:hover {
opacity: 1;
cursor: pointer;
}
#info-toggle ul {
margin: 0 0 0 20px;
padding: 0;
}
#info-toggle ul li {
display: inline-block;
padding: 4px 7px 0;
background-color: rgba(230, 230, 230, 0.4);
border-top-left-radius: 3px;
border-top-right-radius: 3px;
font-weight: 900;
cursor: pointer;
}
#info-toggle ul li.active {
background-color: rgba(255, 255, 255, 0.8);
}
#info-toggle-button {
background-color: rgba(0, 0, 0, 0.7) !important;
color: #fff;
}
#info-toggle-button:hover {
background-color: #f4f4f4;
}
#projlabel,
#wgslabel {
display: inline-block;
color: #333;
z-index: 10000;
}
#projcoords {
display: none;
}
.coords {
text-align: left;
padding: 7px 0;
background-color: rgba(255, 255, 255, 0.8);
}
#bbounds,
#mbounds,
#mcenter {
font-size: small;
display: block;
z-index: 10000;
padding: 2px 0;
}
#mouse,
#tile,
#zoom {
display: inline-block;
}
.bboxlabel {
font-size: small;
font-weight: bold;
z-index: 10000;
background-color: black;
color: white;
text-align: center;
display: inline-block;
padding-left: 2px;
width: 60px;
}
.bboxllpos,
.bboxllpossmall,
.bboxprojpos,
.bboxprojpossmall,
.tilesmall,
.zoomsmall {
font-size: small;
font-weight: bold;
color: black;
display: inline-block;
padding-left: 5px;
}
.bboxllpos {
width: 350px;
}
.bboxllpossmall {
width: 200px;
}
.bboxprojpos {
width: 450px;
}
.bboxprojpossmall {
width: 250px;
}
.tilesmall {
width: 60px;
}
.zoomsmall {
width: 20px;
}
#map-ui-proj {
position: absolute;
top: 460px;
left: 10px;
list-style: none;
margin: 0;
padding: 0;
z-index: 100;
}
#map-ui-proj a {
font: normal 13px/18px 'Helvetica Neue', Helvetica, sans-serif;
background: #FFF;
color: #3C4E5A;
display: block;
margin: 0;
padding: 0;
border: 1px solid #BBB;
border-bottom-width: 0;
min-width: 75px;
padding: 2px;
text-decoration: none;
text-align: center;
}
#map-ui-proj a:hover {
background: #ECF5FA;
}
#map-ui-proj li:last-child a {
border-bottom-width: 1px;
-webkit-border-radius: 0 0 3px 3px;
border-radius: 0 0 3px 3px;
}
#map-ui-proj li:first-child a {
-webkit-border-radius: 3px 3px 0 0;
border-radius: 3px 3px 0 0;
}
#map-ui-proj a.active {
background: #3887BE;
border-color: #3887BE;
border-top-color: #FFF;
color: #FFF;
}
.epsglabel {
font-size: small;
font-weight: bold;
background-color: black;
color: white;
z-index: 10000;
}
#map-ui {
position: absolute;
top: 330px;
left: 12px;
list-style: none;
margin: 0;
padding: 0;
z-index: 100;
}
#map-ui a {
background-color: #fff;
border-bottom: 1px solid #ccc;
width: 30px;
height: 30px;
line-height: 30px;
display: block;
text-align: center;
text-decoration: none;
color: black;
background-image: url('css/maps/images/bbox-sprites.png');
background-repeat: no-repeat;
}
#map-ui a:hover {
background-color: #ECF5FA;
}
#map-ui li:last-child a {
border-bottom-width: 1px;
-webkit-border-radius: 0 0 3px 3px;
border-radius: 0 0 3px 3px;
background-position: -33px -2px;
}
#map-ui li:last-child a.enabled {
border-bottom-width: 1px;
-webkit-border-radius: 0 0 3px 3px;
border-radius: 0 0 3px 3px;
background-position: -278px -2px;
}
#map-ui li:first-child a {
-webkit-border-radius: 3px 3px 0 0;
border-radius: 3px 3px 0 0;
}
#create-geojson a.enabled {
background-position: -248px -2px;
}
#create-geojson a {
background-position: -2px -2px;
}
#geolocation a {
background-position: -186px -2px;
}
#geolocation a.active {
background-position: -63px -2px;
}
#help a.enabled {
background-position: -342px -2px;
}
#help a {
background-position: -93px -2px;
}
.zeroclipboard-is-hover {
opacity: 1 !important;
}
.leaflet-sidebar textarea {
/* display: none; */
height: 95%;
width: 100%;
border: 1;
padding: 2em;
resize: none;
-webkit-box-sizing: border-box;
/* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box;
/* Firefox, other Gecko */
box-sizing: border-box;
/* Opera/IE 8+ */
}
.leaflet-sidebar button {
font-size: large;
}
.leaflet-sidebar .close {
z-index: 10001;
}
.ui-autocomplete {
max-height: 180px;
overflow-y: auto;
/* prevent horizontal scrollbar */
overflow-x: hidden;
}
/* IE 6 doesn't support max-height
* we use height instead, but this forces the menu to always be this tall
*/
* html .ui-autocomplete {
height: 180px;
}
.unblurred.leaflet-tile-loaded {
-moz-filter: blur(0) sepia(0) invert(0);
-webkit-filter: blur(0) sepia(0) invert(0);
filter: blur(0) sepia(0) invert(0);
-moz-transition: all 1s ease;
-webkit-transition: all 1s ease;
transition: all 1s ease;
}
.blurred.leaflet-tile-loaded {
-moz-filter: blur(1px) sepia(1) invert(1);
-moz-transition: all 1s ease;
-webkit-filter: blur(1px) sepia(1) invert(1);
-webkit-transition: all 1s ease;
filter: blur(1px) sepia(1) invert(1);
transition: all 1s ease;
}

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because one or more lines are too long

BIN
gui-src/css/maps/images/bbox-sprites.png vendored Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

505
gui-src/css/maps/images/bbox-sprites.svg vendored Normal file
View File

@@ -0,0 +1,505 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="740"
height="60"
viewBox="0 0 740.00003 59.999999"
enable-background="new 0 0 100 100"
xml:space="preserve"
inkscape:version="0.48.2 r9819"
sodipodi:docname="bbox-sprites.svg"
inkscape:export-filename="/Users/aaronr/github/bboxfinder.com/css/maps/images/bbox-sprites.png"
inkscape:export-xdpi="45"
inkscape:export-ydpi="45"><metadata
id="metadata51"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
id="defs49"><inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 50 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="100 : 50 : 1"
inkscape:persp3d-origin="50 : 33.333333 : 1"
id="perspective5373" /></defs><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1226"
inkscape:window-height="844"
id="namedview47"
showgrid="true"
inkscape:zoom="1.32"
inkscape:cx="372.13373"
inkscape:cy="27.069218"
inkscape:window-x="8"
inkscape:window-y="1"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
borderlayer="false"><inkscape:grid
type="xygrid"
id="grid6480"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" /></sodipodi:namedview>
<g
id="g3285"
transform="matrix(0.84510875,0,0,0.84510875,2.4666349,3.9025275)"><path
inkscape:connector-curvature="0"
id="path3147"
d="m 19.02918,27.70898 0,-1.42397 1.52567,0 1.52569,0 0,-4.78047 0,-4.78046 -1.6274,0 -1.62738,0 0,1.52568 0,1.52568 -1.52567,0 -1.52569,0 0,-3.05136 0,-3.05135 7.83182,0 7.83182,0 0,3.05135 0,3.05136 -1.52569,0 -1.52567,0 0,-1.52568 0,-1.52568 -1.62739,0 -1.62739,0 0,4.78046 0,4.78047 1.52568,0 1.52567,0 0,1.42397 0,1.42396 -4.57703,0 -4.57704,0 0,-1.42396 z"
style="fill:#464646;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none" /><path
inkscape:connector-curvature="0"
id="path3149"
d="m 19.64356,39.48975 0,-5.51027 1.35498,0 1.35497,0 0,4.15529 0,4.15527 12.64649,0 12.6465,0 0,-9.8462 0,-9.84619 -5.60059,0 -5.60059,0 0,-1.26465 0,-1.26465 6.95558,0 6.95556,0 0,12.46582 0,12.46583 L 35,45 l -15.35644,0 0,-5.51025 z"
style="fill:#464646;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none" /></g><path
inkscape:connector-curvature="0"
id="path6172"
d=""
style="fill:#bbbbbb;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none" /><path
inkscape:connector-curvature="0"
id="path6178"
d=""
style="fill:#bbbbbb;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none" /><path
inkscape:connector-curvature="0"
id="path6184"
d=""
style="fill:#bbbbbb;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none" /><path
inkscape:connector-curvature="0"
id="path6186"
d=""
style="fill:#bbbbbb;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none" /><path
inkscape:connector-curvature="0"
id="path6270"
d=""
style="fill:#bbbbbb;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none" /><path
inkscape:connector-curvature="0"
id="path6288"
d=""
style="fill:#bbbbbb;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none" /><path
inkscape:connector-curvature="0"
id="path6682"
d=""
style="fill:#bbbbbb;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none" /><path
inkscape:connector-curvature="0"
id="path6684"
d=""
style="fill:#bbbbbb;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none" /><g
id="g3192"
transform="matrix(0.27873303,0,0,0.27873303,128.9627,14.868054)"
style="fill:#464646;fill-opacity:1">
<g
id="g3194"
style="fill:#464646;fill-opacity:1">
<rect
style="fill:#464646;fill-opacity:1;fill-rule:evenodd"
x="-114.388"
y="10.951"
clip-rule="evenodd"
width="20.32"
height="20.318001"
id="rect3196" />
<rect
style="fill:#464646;fill-opacity:1;fill-rule:evenodd"
x="-114.388"
y="36.349998"
clip-rule="evenodd"
width="20.32"
height="20.318001"
id="rect3198" />
<rect
style="fill:#464646;fill-opacity:1;fill-rule:evenodd"
x="-114.388"
y="61.748001"
clip-rule="evenodd"
width="20.32"
height="20.319"
id="rect3200" />
<rect
style="fill:#464646;fill-opacity:1;fill-rule:evenodd"
x="-139.785"
y="10.951"
clip-rule="evenodd"
width="20.318001"
height="20.318001"
id="rect3202" />
<rect
style="fill:#464646;fill-opacity:1;fill-rule:evenodd"
x="-139.785"
y="36.349998"
clip-rule="evenodd"
width="20.318001"
height="20.318001"
id="rect3204" />
<rect
style="fill:#464646;fill-opacity:1;fill-rule:evenodd"
x="-139.785"
y="61.748001"
clip-rule="evenodd"
width="20.318001"
height="20.319"
id="rect3206" />
<rect
style="fill:#464646;fill-opacity:1;fill-rule:evenodd"
x="-165.187"
y="10.951"
clip-rule="evenodd"
width="20.32"
height="20.318001"
id="rect3208" />
<rect
style="fill:#464646;fill-opacity:1;fill-rule:evenodd"
x="-165.187"
y="36.349998"
clip-rule="evenodd"
width="20.32"
height="20.318001"
id="rect3210" />
<rect
style="fill:#464646;fill-opacity:1;fill-rule:evenodd"
x="-165.187"
y="61.748001"
clip-rule="evenodd"
width="20.32"
height="20.319"
id="rect3212" />
</g>
<path
style="fill:#464646;fill-opacity:1;fill-rule:evenodd"
inkscape:connector-curvature="0"
clip-rule="evenodd"
d="m -175.144,0.991 v 90.855 h 91.032 V 0.991 h -91.032 z m 84.395,84.217 h -77.757 V 7.63 h 77.757 v 77.578 z"
id="path3214" />
</g><g
style="opacity:0.4;fill:#464646;fill-opacity:1"
transform="matrix(0.27657836,0,0,0.27657836,373.31286,14.597384)"
id="g3288">
<g
style="fill:#464646;fill-opacity:1"
id="g3290">
<rect
id="rect3292"
height="20.318001"
width="20.32"
clip-rule="evenodd"
y="10.951"
x="-114.388"
style="fill:#464646;fill-opacity:1;fill-rule:evenodd" />
<rect
id="rect3294"
height="20.318001"
width="20.32"
clip-rule="evenodd"
y="36.349998"
x="-114.388"
style="fill:#464646;fill-opacity:1;fill-rule:evenodd" />
<rect
id="rect3296"
height="20.319"
width="20.32"
clip-rule="evenodd"
y="61.748001"
x="-114.388"
style="fill:#464646;fill-opacity:1;fill-rule:evenodd" />
<rect
id="rect3298"
height="20.318001"
width="20.318001"
clip-rule="evenodd"
y="10.951"
x="-139.785"
style="fill:#464646;fill-opacity:1;fill-rule:evenodd" />
<rect
id="rect3300"
height="20.318001"
width="20.318001"
clip-rule="evenodd"
y="36.349998"
x="-139.785"
style="fill:#464646;fill-opacity:1;fill-rule:evenodd" />
<rect
id="rect3302"
height="20.319"
width="20.318001"
clip-rule="evenodd"
y="61.748001"
x="-139.785"
style="fill:#464646;fill-opacity:1;fill-rule:evenodd" />
<rect
id="rect3304"
height="20.318001"
width="20.32"
clip-rule="evenodd"
y="10.951"
x="-165.187"
style="fill:#464646;fill-opacity:1;fill-rule:evenodd" />
<rect
id="rect3306"
height="20.318001"
width="20.32"
clip-rule="evenodd"
y="36.349998"
x="-165.187"
style="fill:#464646;fill-opacity:1;fill-rule:evenodd" />
<rect
id="rect3308"
height="20.319"
width="20.32"
clip-rule="evenodd"
y="61.748001"
x="-165.187"
style="fill:#464646;fill-opacity:1;fill-rule:evenodd" />
</g>
<path
id="path3310"
d="m -175.144,0.991 v 90.855 h 91.032 V 0.991 h -91.032 z m 84.395,84.217 h -77.757 V 7.63 h 77.757 v 77.578 z"
clip-rule="evenodd"
inkscape:connector-curvature="0"
style="fill:#464646;fill-opacity:1;fill-rule:evenodd" />
</g><g
id="g3465"
transform="matrix(0.25404736,0,0,0.25404736,140.09745,14.744984)"
style="fill:#464646;fill-opacity:1"><g
id="g3451"
style="fill:#464646;fill-opacity:1">
<path
id="path3453"
d="m 28.793,71.207 c -5.062,-5.065 -7.6,-11.705 -7.62,-18.356 l -6.515,-0.002 c 0.021,8.32 3.193,16.635 9.526,22.967 6.335,6.331 14.647,9.504 22.967,9.526 L 47.15,78.827 C 40.5,78.806 33.856,76.268 28.793,71.207 z"
inkscape:connector-curvature="0"
style="fill:#464646;fill-opacity:1" />
<path
id="path3455"
d="M 18.423,81.575 C 10.501,73.654 6.535,63.251 6.514,52.85 L 0,52.846 c 0.02,12.074 4.623,24.145 13.815,33.34 9.193,9.188 21.261,13.796 33.337,13.812 V 93.483 C 36.745,93.467 26.346,89.495 18.423,81.575 z"
inkscape:connector-curvature="0"
style="fill:#464646;fill-opacity:1" />
</g><path
id="path3457"
d="M 76.157,43.675 73.294,43.334 C 77.075,38.692 76.803,31.847 72.475,27.523 68.154,23.196 61.309,22.924 56.664,26.705 L 56.325,23.843 32.482,0 11.531,20.949 l 23.842,23.843 2.864,0.341 c -3.779,4.643 -3.506,11.485 0.819,15.811 4.325,4.325 11.167,4.596 15.81,0.819 L 55.205,64.625 79.05,88.466 100,67.519 76.157,43.675 z M 38.384,38.586 20.749,20.949 32.482,9.218 l 17.637,17.636 0.669,5.64 -6.762,6.761 -5.642,-0.669 z M 79.05,79.249 61.412,61.613 l -0.668,-5.64 6.761,-6.761 5.642,0.668 17.633,17.639 -11.73,11.73 z"
inkscape:connector-curvature="0"
style="fill:#464646;fill-opacity:1" /></g><g
id="g4314"
transform="matrix(0.24999998,0,0,0.24999998,200.32251,15.25725)"
style="fill:#464646;fill-opacity:1"><path
id="path4302"
d="M 49.541,0 C 22.198,-0.019 0.027,22.376 0,49.978 0.027,77.621 22.198,100.01 49.541,100 76.894,100.011 99.064,77.621 99.085,49.979 99.064,22.376 76.894,-0.019 49.541,0 z m 0,88.483 C 28.503,88.483 11.445,71.252 11.462,49.971 11.441,28.742 28.503,11.514 49.541,11.52 70.589,11.514 87.65,28.742 87.673,49.978 87.65,71.251 70.589,88.483 49.541,88.483 z"
inkscape:connector-curvature="0"
style="fill:#464646;fill-opacity:1" /><path
id="path4304"
d="m 45.37,64.349 9.073,-0.041 v -7.015 c -0.023,-1.901 0.863,-3.704 3.242,-5.261 2.38,-1.563 9.016,-4.725 9.025,-13.061 C 66.7,30.67 59.73,24.955 53.868,23.72 48.014,22.529 41.665,23.324 37.169,28.281 c -4.042,4.396 -4.892,7.892 -4.905,15.603 h 9.07 v -1.799 c -0.014,-4.103 0.458,-8.438 6.312,-9.64 3.222,-0.631 6.226,0.375 8.018,2.103 2.024,2.007 2.042,6.496 -1.222,8.722 l -5.09,3.465 c -2.959,1.919 -3.977,4.038 -3.983,7.142 v 10.472 l 10e-4,0 z"
inkscape:connector-curvature="0"
style="fill:#464646;fill-opacity:1" /><polygon
id="polygon4306"
points="45.325,67.903 54.484,67.903 54.484,77.194 45.325,77.194 "
style="fill:#464646;fill-opacity:1" /></g><g
transform="matrix(0.84510875,0,0,0.84510875,246.47145,2.7863074)"
id="g4319"
style="opacity:0.4"><path
style="fill:#464646;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none"
d="m 19.02918,27.70898 0,-1.42397 1.52567,0 1.52569,0 0,-4.78047 0,-4.78046 -1.6274,0 -1.62738,0 0,1.52568 0,1.52568 -1.52567,0 -1.52569,0 0,-3.05136 0,-3.05135 7.83182,0 7.83182,0 0,3.05135 0,3.05136 -1.52569,0 -1.52567,0 0,-1.52568 0,-1.52568 -1.62739,0 -1.62739,0 0,4.78046 0,4.78047 1.52568,0 1.52567,0 0,1.42397 0,1.42396 -4.57703,0 -4.57704,0 0,-1.42396 z"
id="path4321"
inkscape:connector-curvature="0" /><path
style="fill:#464646;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none"
d="m 19.64356,39.48975 0,-5.51027 1.35498,0 1.35497,0 0,4.15529 0,4.15527 12.64649,0 12.6465,0 0,-9.8462 0,-9.84619 -5.60059,0 -5.60059,0 0,-1.26465 0,-1.26465 6.95558,0 6.95556,0 0,12.46582 0,12.46583 L 35,45 l -15.35644,0 0,-5.51025 z"
id="path4323"
inkscape:connector-curvature="0" /></g><g
style="opacity:0.4;fill:#464646;fill-opacity:1"
transform="matrix(0.24999998,0,0,0.24999998,445.38927,15.676751)"
id="g4325"><path
style="fill:#464646;fill-opacity:1"
inkscape:connector-curvature="0"
d="M 49.541,0 C 22.198,-0.019 0.027,22.376 0,49.978 0.027,77.621 22.198,100.01 49.541,100 76.894,100.011 99.064,77.621 99.085,49.979 99.064,22.376 76.894,-0.019 49.541,0 z m 0,88.483 C 28.503,88.483 11.445,71.252 11.462,49.971 11.441,28.742 28.503,11.514 49.541,11.52 70.589,11.514 87.65,28.742 87.673,49.978 87.65,71.251 70.589,88.483 49.541,88.483 z"
id="path4327" /><path
style="fill:#464646;fill-opacity:1"
inkscape:connector-curvature="0"
d="m 45.37,64.349 9.073,-0.041 v -7.015 c -0.023,-1.901 0.863,-3.704 3.242,-5.261 2.38,-1.563 9.016,-4.725 9.025,-13.061 C 66.7,30.67 59.73,24.955 53.868,23.72 48.014,22.529 41.665,23.324 37.169,28.281 c -4.042,4.396 -4.892,7.892 -4.905,15.603 h 9.07 v -1.799 c -0.014,-4.103 0.458,-8.438 6.312,-9.64 3.222,-0.631 6.226,0.375 8.018,2.103 2.024,2.007 2.042,6.496 -1.222,8.722 l -5.09,3.465 c -2.959,1.919 -3.977,4.038 -3.983,7.142 v 10.472 l 10e-4,0 z"
id="path4329" /><polygon
style="fill:#464646;fill-opacity:1"
points="45.325,67.903 54.484,67.903 54.484,77.194 45.325,77.194 "
id="polygon4331" /></g><g
style="opacity:0.4;fill:#464646;fill-opacity:1"
transform="matrix(0.25404736,0,0,0.25404736,384.37987,15.991112)"
id="g4333"><g
style="fill:#464646;fill-opacity:1"
id="g4335">
<path
style="fill:#464646;fill-opacity:1"
inkscape:connector-curvature="0"
d="m 28.793,71.207 c -5.062,-5.065 -7.6,-11.705 -7.62,-18.356 l -6.515,-0.002 c 0.021,8.32 3.193,16.635 9.526,22.967 6.335,6.331 14.647,9.504 22.967,9.526 L 47.15,78.827 C 40.5,78.806 33.856,76.268 28.793,71.207 z"
id="path4337" />
<path
style="fill:#464646;fill-opacity:1"
inkscape:connector-curvature="0"
d="M 18.423,81.575 C 10.501,73.654 6.535,63.251 6.514,52.85 L 0,52.846 c 0.02,12.074 4.623,24.145 13.815,33.34 9.193,9.188 21.261,13.796 33.337,13.812 V 93.483 C 36.745,93.467 26.346,89.495 18.423,81.575 z"
id="path4339" />
</g><path
style="fill:#464646;fill-opacity:1"
inkscape:connector-curvature="0"
d="M 76.157,43.675 73.294,43.334 C 77.075,38.692 76.803,31.847 72.475,27.523 68.154,23.196 61.309,22.924 56.664,26.705 L 56.325,23.843 32.482,0 11.531,20.949 l 23.842,23.843 2.864,0.341 c -3.779,4.643 -3.506,11.485 0.819,15.811 4.325,4.325 11.167,4.596 15.81,0.819 L 55.205,64.625 79.05,88.466 100,67.519 76.157,43.675 z M 38.384,38.586 20.749,20.949 32.482,9.218 l 17.637,17.636 0.669,5.64 -6.762,6.761 -5.642,-0.669 z M 79.05,79.249 61.412,61.613 l -0.668,-5.64 6.761,-6.761 5.642,0.668 17.633,17.639 -11.73,11.73 z"
id="path4341" /></g><rect
style="opacity:0.8;fill:#464646;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none"
id="rect3039"
width="250.00003"
height="60"
x="490"
y="-1.7162162e-06" /><g
transform="matrix(0.84510875,0,0,0.84510875,492.46665,4.1596899)"
id="g3041"
style="fill:#ffffff"><path
style="fill:#ffffff;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none"
d="m 19.02918,27.70898 0,-1.42397 1.52567,0 1.52569,0 0,-4.78047 0,-4.78046 -1.6274,0 -1.62738,0 0,1.52568 0,1.52568 -1.52567,0 -1.52569,0 0,-3.05136 0,-3.05135 7.83182,0 7.83182,0 0,3.05135 0,3.05136 -1.52569,0 -1.52567,0 0,-1.52568 0,-1.52568 -1.62739,0 -1.62739,0 0,4.78046 0,4.78047 1.52568,0 1.52567,0 0,1.42397 0,1.42396 -4.57703,0 -4.57704,0 0,-1.42396 z"
id="path3043"
inkscape:connector-curvature="0" /><path
style="fill:#ffffff;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none"
d="m 19.64356,39.48975 0,-5.51027 1.35498,0 1.35497,0 0,4.15529 0,4.15527 12.64649,0 12.6465,0 0,-9.8462 0,-9.84619 -5.60059,0 -5.60059,0 0,-1.26465 0,-1.26465 6.95558,0 6.95556,0 0,12.46582 0,12.46583 L 35,45 l -15.35644,0 0,-5.51025 z"
id="path3045"
inkscape:connector-curvature="0" /></g><g
style="fill:#ffffff;fill-opacity:1"
transform="matrix(0.27873303,0,0,0.27873303,618.96272,15.125216)"
id="g3047">
<g
style="fill:#ffffff;fill-opacity:1"
id="g3049">
<rect
id="rect3051"
height="20.318001"
width="20.32"
clip-rule="evenodd"
y="10.951"
x="-114.388"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd" />
<rect
id="rect3053"
height="20.318001"
width="20.32"
clip-rule="evenodd"
y="36.349998"
x="-114.388"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd" />
<rect
id="rect3055"
height="20.319"
width="20.32"
clip-rule="evenodd"
y="61.748001"
x="-114.388"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd" />
<rect
id="rect3057"
height="20.318001"
width="20.318001"
clip-rule="evenodd"
y="10.951"
x="-139.785"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd" />
<rect
id="rect3059"
height="20.318001"
width="20.318001"
clip-rule="evenodd"
y="36.349998"
x="-139.785"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd" />
<rect
id="rect3061"
height="20.319"
width="20.318001"
clip-rule="evenodd"
y="61.748001"
x="-139.785"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd" />
<rect
id="rect3063"
height="20.318001"
width="20.32"
clip-rule="evenodd"
y="10.951"
x="-165.187"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd" />
<rect
id="rect3065"
height="20.318001"
width="20.32"
clip-rule="evenodd"
y="36.349998"
x="-165.187"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd" />
<rect
id="rect3067"
height="20.319"
width="20.32"
clip-rule="evenodd"
y="61.748001"
x="-165.187"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd" />
</g>
<path
id="path3069"
d="m -175.144,0.991 v 90.855 h 91.032 V 0.991 h -91.032 z m 84.395,84.217 h -77.757 V 7.63 h 77.757 v 77.578 z"
clip-rule="evenodd"
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd" />
</g><g
style="fill:#ffffff;fill-opacity:1"
transform="matrix(0.25404736,0,0,0.25404736,630.09747,15.002146)"
id="g3071"><g
style="fill:#ffffff;fill-opacity:1"
id="g3073">
<path
style="fill:#ffffff;fill-opacity:1"
inkscape:connector-curvature="0"
d="m 28.793,71.207 c -5.062,-5.065 -7.6,-11.705 -7.62,-18.356 l -6.515,-0.002 c 0.021,8.32 3.193,16.635 9.526,22.967 6.335,6.331 14.647,9.504 22.967,9.526 L 47.15,78.827 C 40.5,78.806 33.856,76.268 28.793,71.207 z"
id="path3075" />
<path
style="fill:#ffffff;fill-opacity:1"
inkscape:connector-curvature="0"
d="M 18.423,81.575 C 10.501,73.654 6.535,63.251 6.514,52.85 L 0,52.846 c 0.02,12.074 4.623,24.145 13.815,33.34 9.193,9.188 21.261,13.796 33.337,13.812 V 93.483 C 36.745,93.467 26.346,89.495 18.423,81.575 z"
id="path3077" />
</g><path
style="fill:#ffffff;fill-opacity:1"
inkscape:connector-curvature="0"
d="M 76.157,43.675 73.294,43.334 C 77.075,38.692 76.803,31.847 72.475,27.523 68.154,23.196 61.309,22.924 56.664,26.705 L 56.325,23.843 32.482,0 11.531,20.949 l 23.842,23.843 2.864,0.341 c -3.779,4.643 -3.506,11.485 0.819,15.811 4.325,4.325 11.167,4.596 15.81,0.819 L 55.205,64.625 79.05,88.466 100,67.519 76.157,43.675 z M 38.384,38.586 20.749,20.949 32.482,9.218 l 17.637,17.636 0.669,5.64 -6.762,6.761 -5.642,-0.669 z M 79.05,79.249 61.412,61.613 l -0.668,-5.64 6.761,-6.761 5.642,0.668 17.633,17.639 -11.73,11.73 z"
id="path3079" /></g><g
style="fill:#ffffff;fill-opacity:1"
transform="matrix(0.24999998,0,0,0.24999998,690.32253,15.514412)"
id="g3081"><path
style="fill:#ffffff;fill-opacity:1"
inkscape:connector-curvature="0"
d="M 49.541,0 C 22.198,-0.019 0.027,22.376 0,49.978 0.027,77.621 22.198,100.01 49.541,100 76.894,100.011 99.064,77.621 99.085,49.979 99.064,22.376 76.894,-0.019 49.541,0 z m 0,88.483 C 28.503,88.483 11.445,71.252 11.462,49.971 11.441,28.742 28.503,11.514 49.541,11.52 70.589,11.514 87.65,28.742 87.673,49.978 87.65,71.251 70.589,88.483 49.541,88.483 z"
id="path3083" /><path
style="fill:#ffffff;fill-opacity:1"
inkscape:connector-curvature="0"
d="m 45.37,64.349 9.073,-0.041 v -7.015 c -0.023,-1.901 0.863,-3.704 3.242,-5.261 2.38,-1.563 9.016,-4.725 9.025,-13.061 C 66.7,30.67 59.73,24.955 53.868,23.72 48.014,22.529 41.665,23.324 37.169,28.281 c -4.042,4.396 -4.892,7.892 -4.905,15.603 h 9.07 v -1.799 c -0.014,-4.103 0.458,-8.438 6.312,-9.64 3.222,-0.631 6.226,0.375 8.018,2.103 2.024,2.007 2.042,6.496 -1.222,8.722 l -5.09,3.465 c -2.959,1.919 -3.977,4.038 -3.983,7.142 v 10.472 l 10e-4,0 z"
id="path3085" /><polygon
style="fill:#ffffff;fill-opacity:1"
points="45.325,77.194 45.325,67.903 54.484,67.903 54.484,77.194 "
id="polygon3087" /></g></svg>

After

Width:  |  Height:  |  Size: 21 KiB

BIN
gui-src/css/maps/images/icons-404040.png vendored Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 849 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
gui-src/css/maps/images/icons-ffffff.png vendored Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

35
gui-src/css/maps/images/icons.svg vendored Normal file
View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="260" viewBox="0 0 26 260" >
<g id="sprite" fill="#000000">
<path
id="zoomIn"
d="m 12.5,8.99999 c -0.277,0 -0.5,0.223 -0.5,0.5 l 0,2.50002 -2.5,0 c -0.277,0 -0.5,0.223 -0.5,0.5 l 0,1 c 0,0.277 0.223,0.5 0.5,0.5 l 2.5,0 0,2.5 c 0,0.277 0.223,0.5 0.5,0.5 l 1,0 c 0.277,0 0.5,-0.223 0.5,-0.5 l 0,-2.5 2.5,0 c 0.277,0 0.5,-0.223 0.5,-0.5 l 0,-1 c 0,-0.277 -0.223,-0.5 -0.5,-0.5 l -2.5,0 0,-2.50002 c 0,-0.277 -0.223,-0.5 -0.5,-0.5 z" />
<path
id="zoomOut"
d="M 9.5,38 C 9.223,38 9,38.223 9,38.5 l 0,1 C 9,39.777 9.223,40 9.5,40 l 7,0 c 0.277,0 0.5,-0.223 0.5,-0.5 l 0,-1 C 17,38.223 16.777,38 16.5,38 Z" />
<path
id="close"
d="m 10,61 -1,1 3,3 -3,3 1,1 3,-3 3,3 1,-1 -3,-3 3,-3 -1,-1 -3,3 z" />
<path
id="info"
d="m 13,83.99999 c -3.866,0 -7,3.134 -7,7.00002 0,3.866 3.134,7 7,7 3.8659,0 7,-3.134 7,-7 0,-3.86602 -3.1341,-7.00002 -7,-7.00002 z m -0.5,3 1,0 c 0.277,0 0.5,0.223 0.5,0.5 l 0,1 c 0,0.27702 -0.223,0.50002 -0.5,0.50002 l -1,0 c -0.277,0 -0.5,-0.223 -0.5,-0.50002 l 0,-1 c 0,-0.277 0.223,-0.5 0.5,-0.5 z m 0,3.00002 1,0 c 0.277,0 0.5,0.223 0.5,0.5 l 0,4 c 0,0.277 -0.223,0.5 -0.5,0.5 l -1,0 c -0.277,0 -0.5,-0.223 -0.5,-0.5 l 0,-4 c 0,-0.277 0.223,-0.5 0.5,-0.5 z" />
<path
id="layers"
d="m 13,110.96875 c -0.1012,-5e-4 -0.19265,0.0145 -0.28125,0.0625 L 6,113 l 0,1 6.71875,1.9375 C 12.80675,115.9855 12.8995,116 13,116 c 0.1001,0 0.19325,-0.0145 0.28125,-0.0625 L 20,114 l 0,-1 -6.71875,-1.96875 c -0.088,-0.048 -0.18155,-0.0625 -0.28125,-0.0625 z M 6,118 l 6.71875,1.9375 C 12.80675,119.9855 12.8995,120 13,120 c 0.1001,0 0.19325,-0.0145 0.28125,-0.0625 L 20,118 l 0,-2 -6.71875,1.9375 C 13.19325,117.9855 13.1001,118 13,118 c -0.1005,0 -0.19325,-0.0145 -0.28125,-0.0625 L 6,116 Z m 0,4 6.71875,1.9375 C 12.80675,123.9855 12.8995,124 13,124 c 0.1001,0 0.19325,-0.0145 0.28125,-0.0625 L 20,122 l 0,-2 -6.71875,1.9375 C 13.19325,121.9855 13.1001,122 13,122 c -0.1005,0 -0.19325,-0.0145 -0.28125,-0.0625 L 6,120 Z" />
<path
id="share"
d="m 14.3438,136.99999 2.125,2.125 -4.25,4.25002 1.4062,1.4062 4.25,-4.25002 2.125,2.12502 0,-5.65622 z m -6.3438,1 -1,1 0,9.00002 1,1 10,0 1,-1 0,-4 -1,-1 -1,1 0,3 -8,0 0,-7.00002 4,0 1,-1 -1,-1 z" />
<path
id="search"
d="m 11.5,162.99999 c -2.4853,0 -4.5,2.0147 -4.5,4.50002 0,2.4853 2.0147,4.5 4.5,4.5 0.854,0 1.6635,-0.2431 2.3437,-0.6563 l 3.6563,3.6563 1.5,-1.5 -3.6563,-3.6563 c 0.4132,-0.6802 0.6563,-1.4897 0.6563,-2.3437 0,-2.48532 -2.0147,-4.50002 -4.5,-4.50002 z m 0,1.5 c 1.6568,0 3,1.3431 3,3.00002 0,1.6568 -1.3432,3 -3,3 -1.6569,0 -3,-1.3432 -3,-3 0,-1.65692 1.3431,-3.00002 3,-3.00002 z" />
<path
id="facebook"
d="m 7,186.99998 -1,1 0,12 1,1 6.81812,1e-5 0,-5.00001 -1.8245,0 0,-2 1.8245,0 0,-2.09264 c 0,-1.80824 1.10439,-2.79288 2.7175,-2.79288 0.77272,0 1.09654,0.0575 1.29005,0.0832 l 0,1.80232 -0.77851,5.2e-4 C 16.1699,191.0005 16,191.41736 16,192.0291 l 0,1.97088 2.09228,0 -0.2724,2 -1.81988,0 0,5.00001 3,-1e-5 1,-1 0,-12 -1,-1 z" />
<path
id="twitter"
d="m 19.99957,216.12602 c -0.51509,0.22492 -1.06868,0.37693 -1.64967,0.44524 0.59299,-0.34993 1.04838,-0.90408 1.26288,-1.56444 -0.55499,0.32413 -1.16968,0.55945 -1.82397,0.68616 C 17.26502,215.14343 16.51853,214.8 15.69245,214.8 c -1.58627,0 -2.87235,1.26611 -2.87235,2.82775 0,0.22164 0.025,0.43756 0.075,0.64448 -2.38705,-0.11791 -4.50341,-1.24373 -5.91999,-2.95458 -0.24719,0.41763 -0.38889,0.90338 -0.38889,1.42162 0,0.98111 0.50699,1.84658 1.27768,2.35373 -0.4708,-0.015 -0.91369,-0.14191 -1.30088,-0.35363 -3e-4,0.012 -3e-4,0.024 -3e-4,0.035 0,1.37002 0.99008,2.51291 2.30396,2.77274 -0.241,0.065 -0.49469,0.099 -0.75669,0.099 -0.1851,0 -0.36499,-0.018 -0.54029,-0.051 0.36539,1.1234 1.42607,1.94097 2.68295,1.96377 -0.98298,0.75847 -2.22136,1.21061 -3.56713,1.21061 -0.2318,0 -0.46039,-0.013 -0.68509,-0.04 C 7.27151,225.53176 8.78128,226 10.40325,226 c 5.2831,0 8.17205,-4.30888 8.17205,-8.0457 0,-0.12261 0,-0.24462 -0.01,-0.36585 0.56129,-0.39874 1.04818,-0.89668 1.43327,-1.46383" />
<path
id="pinterest"
d="M 13.50024,238.9996 C 9.35822,238.9996 6,242.35751 6,246.49969 c 0,3.07113 1.84674,5.70949 4.48939,6.86948 -0.0211,-0.5237 -0.004,-1.15239 0.13052,-1.7222 0.14421,-0.60892 0.96507,-4.08682 0.96507,-4.08682 0,0 -0.23961,-0.47889 -0.23961,-1.18669 0,-1.11141 0.64421,-1.94155 1.44648,-1.94155 0.68215,0 1.01169,0.51241 1.01169,1.12601 0,0.68581 -0.43735,1.71156 -0.66231,2.66165 -0.18789,0.79559 0.39892,1.44451 1.1838,1.44451 1.42105,0 2.37808,-1.82512 2.37808,-3.98753 0,-1.64383 -1.10715,-2.87415 -3.12081,-2.87415 -2.27506,0 -3.69243,1.69664 -3.69243,3.59178 0,0.6534 0.19268,1.11426 0.49445,1.47102 0.13874,0.1639 0.15803,0.22983 0.10778,0.418 -0.0359,0.13804 -0.11858,0.47026 -0.15277,0.60191 -0.05,0.18998 -0.20384,0.25786 -0.37553,0.18774 -1.04789,-0.4278 -1.53596,-1.5754 -1.53596,-2.86536 0,-2.13055 1.79685,-4.68521 5.36034,-4.68521 2.86349,0 4.74808,2.0721 4.74808,4.29635 0,2.94222 -1.63569,5.14028 -4.04684,5.14028 -0.8097,0 -1.57134,-0.43774 -1.83228,-0.9349 0,0 -0.43543,1.72808 -0.52766,2.06171 -0.15897,0.57829 -0.47026,1.1562 -0.75486,1.60673 0.67461,0.19909 1.3871,0.30755 2.12562,0.30755 4.1417,0 7.49977,-3.35795 7.49977,-7.50031 0,-4.14218 -3.35807,-7.50009 -7.49977,-7.50009" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
gui-src/css/maps/images/spritesheet.png vendored Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

297
gui-src/css/maps/images/spritesheet.svg vendored Normal file
View File

@@ -0,0 +1,297 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="1080"
height="60"
viewBox="0 0 1080 59.999999"
enable-background="new 0 0 100 100"
xml:space="preserve"
inkscape:version="0.48.2 r9819"
sodipodi:docname="spritesheet_new.svg"
inkscape:export-filename="/Users/aaronr/github/bboxfinder.com/css/maps/images/spritesheet_new.png"
inkscape:export-xdpi="45"
inkscape:export-ydpi="45"><metadata
id="metadata51"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs49"><inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 50 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="100 : 50 : 1"
inkscape:persp3d-origin="50 : 33.333333 : 1"
id="perspective5373" /></defs><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1226"
inkscape:window-height="844"
id="namedview47"
showgrid="true"
inkscape:zoom="0.83039936"
inkscape:cx="502.47411"
inkscape:cy="27.069218"
inkscape:window-x="197"
inkscape:window-y="15"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
borderlayer="false"><inkscape:grid
type="xygrid"
id="grid6480"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" /></sodipodi:namedview>
<path
inkscape:connector-curvature="0"
id="path6172"
d=""
style="fill:#bbbbbb;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none" /><path
inkscape:connector-curvature="0"
id="path6178"
d=""
style="fill:#bbbbbb;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none" /><path
inkscape:connector-curvature="0"
id="path6184"
d=""
style="fill:#bbbbbb;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none" /><path
inkscape:connector-curvature="0"
id="path6186"
d=""
style="fill:#bbbbbb;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none" /><path
inkscape:connector-curvature="0"
id="path6270"
d=""
style="fill:#bbbbbb;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none" /><path
inkscape:connector-curvature="0"
id="path6288"
d=""
style="fill:#bbbbbb;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none" /><path
inkscape:connector-curvature="0"
id="path6682"
d=""
style="fill:#bbbbbb;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none" /><path
inkscape:connector-curvature="0"
id="path6684"
d=""
style="fill:#bbbbbb;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none" /><g
style="fill:#464646;fill-opacity:1"
id="g3558"
transform="translate(-1.07,-5e-7)">
<path
style="fill:#464646;fill-opacity:1"
inkscape:connector-curvature="0"
d="m 18,36 v 6 h 6 v -6 h -6 z m 4,4 h -2 v -2 h 2 v 2 z"
id="path3560" />
<path
style="fill:#464646;fill-opacity:1"
inkscape:connector-curvature="0"
d="m 36,18 v 6 h 6 v -6 h -6 z m 4,4 h -2 v -2 h 2 v 2 z"
id="path3562" />
<polygon
style="fill:#464646;fill-opacity:1"
points="20.857,36.854 36.857,20.857 39.142,23.142 23.142,39.145 "
id="polygon3564" />
</g><polygon
style="fill:#464646;fill-opacity:1"
points="100,24.565 97.904,39.396 83.07,42 76,28.773 86.463,18 "
id="polygon3566"
transform="translate(-1.07,-5e-7)" /><rect
style="fill:#464646;fill-opacity:1"
x="138.92999"
y="20"
width="20"
height="20"
id="rect3568" /><path
style="fill:#464646;fill-opacity:1"
inkscape:connector-curvature="0"
d="m 219.93,30 c 0,6.078 -4.926,11 -11,11 -6.074,0 -11,-4.922 -11,-11 0,-6.074 4.926,-11 11,-11 6.074,0 11,4.926 11,11 z"
id="path3570" /><path
style="fill:#464646;fill-opacity:1"
inkscape:connector-curvature="0"
d="m 268.93,19 c -4.971,0 -9,4.028999 -9,9 0,4.971 5.001,12 9,14 4.001,-2 9,-9.029 9,-14 0,-4.971001 -4.029,-9 -9,-9 z m 0,12.5 c -2.484,0 -4.5,-2.014 -4.5,-4.5 0,-2.484001 2.016,-4.5 4.5,-4.5 2.485,0 4.5,2.015999 4.5,4.5 0,2.486 -2.015,4.5 -4.5,4.5 z"
id="path3572" /><g
style="fill:#464646;fill-opacity:1"
id="g3574"
transform="translate(-1.07,-5e-7)">
<path
style="fill:#464646;fill-opacity:1"
inkscape:connector-curvature="0"
d="m 337,30.156 v 0.407 5.604 c 0,1.658 -1.344,3 -3,3 h -10 c -1.655,0 -3,-1.342 -3,-3 v -10 c 0,-1.657 1.345,-3 3,-3 h 6.345 l 3.19,-3.17 H 324 c -3.313,0 -6,2.687 -6,6 v 10 c 0,3.313 2.687,6 6,6 h 10 c 3.314,0 6,-2.687 6,-6 v -8.809 l -3,2.968"
id="path3576" />
<polygon
style="fill:#464646;fill-opacity:1"
points="335.891,21.809 338.719,24.637 329.828,33.529 327,33.529 327,30.699 "
id="polygon3578" />
<rect
style="fill:#464646;fill-opacity:1"
x="338.69699"
y="17.826"
transform="matrix(-0.707,-0.7072,0.7072,-0.707,567.5655,274.7729)"
width="4"
height="4"
id="rect3580" />
</g><g
style="fill:#464646;fill-opacity:1"
id="g3582"
transform="translate(-1.07,-5e-7)">
<path
style="fill:#464646;fill-opacity:1"
inkscape:connector-curvature="0"
d="m 381,42 h 18 V 24 h -18 v 18 z m 14,-16 h 2 v 14 h -2 V 26 z m -4,0 h 2 v 14 h -2 V 26 z m -4,0 h 2 v 14 h -2 V 26 z m -4,0 h 2 v 14 h -2 V 26 z"
id="path3584" />
<path
style="fill:#464646;fill-opacity:1"
inkscape:connector-curvature="0"
d="m 395,20 v -2 -2 h -10 v 2 2 h -6 v 2 h 22 v -2 h -6 z m -2,0 h -6 v -2 h 6 v 2 z"
id="path3586" />
</g><g
style="opacity:0.4;fill:#464646;fill-opacity:1"
id="g3588"
transform="translate(-1.07,-5e-7)">
<path
style="fill:#464646;fill-opacity:1"
inkscape:connector-curvature="0"
d="m 458,30.156 v 0.407 5.604 c 0,1.658 -1.344,3 -3,3 h -10 c -1.655,0 -3,-1.342 -3,-3 v -10 c 0,-1.657 1.345,-3 3,-3 h 6.345 l 3.19,-3.17 H 445 c -3.313,0 -6,2.687 -6,6 v 10 c 0,3.313 2.687,6 6,6 h 10 c 3.314,0 6,-2.687 6,-6 v -8.809 l -3,2.968"
id="path3590" />
<polygon
style="fill:#464646;fill-opacity:1"
points="456.891,21.809 459.719,24.637 450.828,33.529 448,33.529 448,30.699 "
id="polygon3592" />
<rect
style="fill:#464646;fill-opacity:1"
x="459.69699"
y="17.826"
transform="matrix(-0.707,-0.7072,0.7072,-0.707,774.118,360.3402)"
width="4"
height="4"
id="rect3594" />
</g><g
style="opacity:0.4;fill:#464646;fill-opacity:1"
id="g3596"
transform="translate(-1.07,-5e-7)">
<path
style="fill:#464646;fill-opacity:1"
inkscape:connector-curvature="0"
d="m 501,42 h 18 V 24 h -18 v 18 z m 14,-16 h 2 v 14 h -2 V 26 z m -4,0 h 2 v 14 h -2 V 26 z m -4,0 h 2 v 14 h -2 V 26 z m -4,0 h 2 v 14 h -2 V 26 z"
id="path3598" />
<path
style="fill:#464646;fill-opacity:1"
inkscape:connector-curvature="0"
d="m 515,20 v -2 -2 h -10 v 2 2 h -6 v 2 h 22 v -2 h -6 z m -2,0 h -6 v -2 h 6 v 2 z"
id="path3600" />
</g><rect
style="opacity:0.4;fill:#464646;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none"
id="rect3684"
width="540"
height="60"
x="542"
y="1.9999995" /><path
style="opacity:0.8;fill:#464646;fill-opacity:1;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none"
d="m 542.50845,29.920029 0,-29.0322577 268.74579,0 268.74576,0 0,29.0322577 0,29.032258 -268.74576,0 -268.74579,0 0,-29.032258 z"
id="path3686"
inkscape:connector-curvature="0" /><g
transform="translate(540,-1.0000005)"
id="g3654"
style="fill:#ffffff;fill-opacity:1">
<path
id="path3656"
d="m 18,36 v 6 h 6 v -6 h -6 z m 4,4 h -2 v -2 h 2 v 2 z"
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1" />
<path
id="path3658"
d="m 36,18 v 6 h 6 v -6 h -6 z m 4,4 h -2 v -2 h 2 v 2 z"
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1" />
<polygon
id="polygon3660"
points="36.857,20.857 39.142,23.142 23.142,39.145 20.857,36.854 "
style="fill:#ffffff;fill-opacity:1" />
</g><polygon
transform="translate(540,-1.0000005)"
id="polygon3662"
points="100,24.565 97.904,39.396 83.07,42 76,28.773 86.463,18 "
style="fill:#ffffff;fill-opacity:1" /><rect
id="rect3664"
height="20"
width="20"
y="19"
x="680"
style="fill:#ffffff;fill-opacity:1" /><path
id="path3666"
d="m 761,29 c 0,6.078001 -4.926,11 -11,11 -6.074,0 -11,-4.921999 -11,-11 0,-6.073999 4.926,-10.999999 11,-10.999999 6.074,0 11,4.926 11,10.999999 z"
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1" /><path
id="path3668"
d="m 810,18.000001 c -4.971,0 -9,4.028999 -9,8.999999 0,4.971001 5.001,12 9,14 4.001,-2 9,-9.028999 9,-14 0,-4.971 -4.029,-8.999999 -9,-8.999999 z M 810,30.5 c -2.484,0 -4.5,-2.013999 -4.5,-4.5 0,-2.483999 2.016,-4.5 4.5,-4.5 2.485,0 4.5,2.016001 4.5,4.5 0,2.486001 -2.015,4.5 -4.5,4.5 z"
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1" /><g
transform="translate(540,-1.0000005)"
id="g3670"
style="fill:#ffffff;fill-opacity:1">
<path
id="path3672"
d="m 337,30.156 v 0.407 5.604 c 0,1.658 -1.344,3 -3,3 h -10 c -1.655,0 -3,-1.342 -3,-3 v -10 c 0,-1.657 1.345,-3 3,-3 h 6.345 l 3.19,-3.17 H 324 c -3.313,0 -6,2.687 -6,6 v 10 c 0,3.313 2.687,6 6,6 h 10 c 3.314,0 6,-2.687 6,-6 v -8.809 l -3,2.968"
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1" />
<polygon
id="polygon3674"
points="335.891,21.809 338.719,24.637 329.828,33.529 327,33.529 327,30.699 "
style="fill:#ffffff;fill-opacity:1" />
<rect
id="rect3676"
height="4"
width="4"
transform="matrix(-0.707,-0.7072,0.7072,-0.707,567.5655,274.7729)"
y="17.826"
x="338.69699"
style="fill:#ffffff;fill-opacity:1" />
</g><g
transform="translate(540,-1.0000005)"
id="g3678"
style="fill:#ffffff;fill-opacity:1">
<path
id="path3680"
d="m 381,42 h 18 V 24 h -18 v 18 z m 14,-16 h 2 v 14 h -2 V 26 z m -4,0 h 2 v 14 h -2 V 26 z m -4,0 h 2 v 14 h -2 V 26 z m -4,0 h 2 v 14 h -2 V 26 z"
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1" />
<path
id="path3682"
d="m 395,20 v -2 -2 h -10 v 2 2 h -6 v 2 h 22 v -2 h -6 z m -2,0 h -6 v -2 h 6 v 2 z"
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1" />
</g></svg>

After

Width:  |  Height:  |  Size: 11 KiB

478
gui-src/css/maps/leaflet.css vendored Normal file
View File

@@ -0,0 +1,478 @@
/* required styles */
.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-container {
overflow: hidden;
-ms-touch-action: none;
}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
-webkit-user-drag: none;
}
.leaflet-marker-icon,
.leaflet-marker-shadow {
display: block;
}
/* 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;
}
.leaflet-tile {
filter: inherit;
visibility: hidden;
}
.leaflet-tile-loaded {
visibility: inherit;
}
.leaflet-zoom-box {
width: 0;
height: 0;
}
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
.leaflet-overlay-pane svg {
-moz-user-select: none;
}
.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-vml-shape {
width: 1px;
height: 1px;
}
.lvml {
behavior: url(#default#VML);
display: inline-block;
position: absolute;
}
/* control positioning */
.leaflet-control {
position: relative;
z-index: 7;
pointer-events: auto;
}
.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;
}
.leaflet-control {
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;
}
/* 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 */
.leaflet-clickable {
cursor: pointer;
}
.leaflet-container {
cursor: -webkit-grab;
cursor: -moz-grab;
}
.leaflet-popup-pane,
.leaflet-control {
cursor: auto;
}
.leaflet-dragging .leaflet-container,
.leaflet-dragging .leaflet-clickable {
cursor: move;
cursor: -webkit-grabbing;
cursor: -moz-grabbing;
}
/* visual tweaks */
.leaflet-container {
background: #ddd;
outline: 0;
}
.leaflet-container a {
color: #0078A8;
}
.leaflet-container a.leaflet-active {
outline: 2px solid orange;
}
.leaflet-zoom-box {
border: 2px dotted #38f;
background: rgba(255,255,255,0.5);
}
/* general typography */
.leaflet-container {
font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
}
/* general toolbar styles */
.leaflet-bar {
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
border-radius: 4px;
}
.leaflet-bar a,
.leaflet-bar a:hover {
background-color: #fff;
border-bottom: 1px solid #ccc;
width: 26px;
height: 26px;
line-height: 26px;
display: block;
text-align: center;
text-decoration: none;
color: black;
}
.leaflet-bar a,
.leaflet-control-layers-toggle {
background-position: 50% 50%;
background-repeat: no-repeat;
display: block;
}
.leaflet-bar a:hover {
background-color: #f4f4f4;
}
.leaflet-bar a:first-child {
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
.leaflet-bar a:last-child {
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-bottom: none;
}
.leaflet-bar a.leaflet-disabled {
cursor: default;
background-color: #f4f4f4;
color: #bbb;
}
.leaflet-touch .leaflet-bar a {
width: 30px;
height: 30px;
line-height: 30px;
}
/* zoom control */
.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
font: bold 18px 'Lucida Console', Monaco, monospace;
text-indent: 1px;
}
.leaflet-control-zoom-out {
font-size: 20px;
}
.leaflet-touch .leaflet-control-zoom-in {
font-size: 22px;
}
.leaflet-touch .leaflet-control-zoom-out {
font-size: 24px;
}
/* layers control */
.leaflet-control-layers {
box-shadow: 0 1px 5px rgba(0,0,0,0.4);
background: #fff;
border-radius: 5px;
}
.leaflet-control-layers-toggle {
background-image: url(images/layers.png);
width: 36px;
height: 36px;
}
.leaflet-retina .leaflet-control-layers-toggle {
background-image: url(images/layers-2x.png);
background-size: 26px 26px;
}
.leaflet-touch .leaflet-control-layers-toggle {
width: 44px;
height: 44px;
}
.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 {
padding: 6px 10px 6px 6px;
color: #333;
background: #fff;
}
.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;
margin: 5px -10px 5px -6px;
}
/* attribution and scale controls */
.leaflet-container .leaflet-control-attribution {
background: #fff;
background: rgba(255, 255, 255, 0.7);
margin: 0;
}
.leaflet-control-attribution,
.leaflet-control-scale-line {
padding: 0 5px;
color: #333;
}
.leaflet-control-attribution a {
text-decoration: none;
}
.leaflet-control-attribution a:hover {
text-decoration: underline;
}
.leaflet-container .leaflet-control-attribution,
.leaflet-container .leaflet-control-scale {
font-size: 11px;
}
.leaflet-left .leaflet-control-scale {
margin-left: 5px;
}
.leaflet-bottom .leaflet-control-scale {
margin-bottom: 5px;
}
.leaflet-control-scale-line {
border: 2px solid #777;
border-top: none;
line-height: 1.1;
padding: 2px 5px 1px;
font-size: 11px;
white-space: nowrap;
overflow: hidden;
-moz-box-sizing: content-box;
box-sizing: content-box;
background: #fff;
background: rgba(255, 255, 255, 0.5);
}
.leaflet-control-scale-line:not(:first-child) {
border-top: 2px solid #777;
border-bottom: none;
margin-top: -2px;
}
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
border-bottom: 2px solid #777;
}
.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
box-shadow: none;
}
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
border: 2px solid rgba(0,0,0,0.2);
background-clip: padding-box;
}
/* popup */
.leaflet-popup {
position: absolute;
text-align: center;
}
.leaflet-popup-content-wrapper {
padding: 1px;
text-align: left;
border-radius: 12px;
}
.leaflet-popup-content {
margin: 13px 19px;
line-height: 1.4;
}
.leaflet-popup-content p {
margin: 18px 0;
}
.leaflet-popup-tip-container {
margin: 0 auto;
width: 40px;
height: 20px;
position: relative;
overflow: hidden;
}
.leaflet-popup-tip {
width: 17px;
height: 17px;
padding: 1px;
margin: -10px auto 0;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
background: white;
box-shadow: 0 3px 14px rgba(0,0,0,0.4);
}
.leaflet-container a.leaflet-popup-close-button {
position: absolute;
top: 0;
right: 0;
padding: 4px 4px 0 0;
text-align: center;
width: 18px;
height: 14px;
font: 16px/14px Tahoma, Verdana, sans-serif;
color: #c3c3c3;
text-decoration: none;
font-weight: bold;
background: transparent;
}
.leaflet-container a.leaflet-popup-close-button:hover {
color: #999;
}
.leaflet-popup-scrolled {
overflow: auto;
border-bottom: 1px solid #ddd;
border-top: 1px solid #ddd;
}
.leaflet-oldie .leaflet-popup-content-wrapper {
zoom: 1;
}
.leaflet-oldie .leaflet-popup-tip {
width: 24px;
margin: 0 auto;
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
}
.leaflet-oldie .leaflet-popup-tip-container {
margin-top: -1px;
}
.leaflet-oldie .leaflet-control-zoom,
.leaflet-oldie .leaflet-control-layers,
.leaflet-oldie .leaflet-popup-content-wrapper,
.leaflet-oldie .leaflet-popup-tip {
border: 1px solid #999;
}
/* div icon */
.leaflet-div-icon {
background: #fff;
border: 1px solid #666;
}

248
gui-src/css/maps/leaflet.draw.css vendored Normal file
View File

@@ -0,0 +1,248 @@
/* ================================================================== */
/* Toolbars
/* ================================================================== */
.leaflet-draw-section {
position: relative;
}
.leaflet-draw-toolbar {
margin-top: 12px;
}
.leaflet-draw-toolbar-top {
margin-top: 0;
}
.leaflet-draw-toolbar-notop a:first-child {
border-top-right-radius: 0;
}
.leaflet-draw-toolbar-nobottom a:last-child {
border-bottom-right-radius: 0;
}
.leaflet-draw-toolbar a {
background-image: url('images/spritesheet.png');
background-repeat: no-repeat;
}
.leaflet-retina .leaflet-draw-toolbar a {
background-image: url('images/spritesheet-2x.png');
background-size: 210px 30px;
}
.leaflet-draw a {
display: block;
text-align: center;
text-decoration: none;
}
/* ================================================================== */
/* Toolbar actions menu
/* ================================================================== */
.leaflet-draw-actions {
display: none;
list-style: none;
margin: 0;
padding: 0;
position: absolute;
left: 26px; /* leaflet-draw-toolbar.left + leaflet-draw-toolbar.width */
top: 0;
}
.leaflet-right .leaflet-draw-actions {
right:26px;
left:auto;
}
.leaflet-draw-actions li {
display: inline-block;
}
/* APR */
.leaflet-draw-actions li a {
color: #ffffff;
}
.leaflet-draw-actions li:first-child a {
border-left: none;
}
.leaflet-draw-actions li:last-child a {
-webkit-border-radius: 0 4px 4px 0;
border-radius: 0 4px 4px 0;
}
.leaflet-right .leaflet-draw-actions li:last-child a {
-webkit-border-radius: 0;
border-radius: 0;
}
.leaflet-right .leaflet-draw-actions li:first-child a {
-webkit-border-radius: 4px 0 0 4px;
border-radius: 4px 0 0 4px;
}
.leaflet-draw-actions a {
background-color: #919187;
border-left: 1px solid #AAA;
color: #FFF;
font: 11px/19px "Helvetica Neue", Arial, Helvetica, sans-serif;
line-height: 28px;
text-decoration: none;
padding-left: 10px;
padding-right: 10px;
height: 28px;
}
.leaflet-draw-actions-bottom {
margin-top: 0;
white-space: nowrap;
}
.leaflet-draw-actions-top {
margin-top: 1px;
white-space: nowrap;
}
.leaflet-draw-actions-top a,
.leaflet-draw-actions-bottom a {
height: 27px;
line-height: 27px;
}
.leaflet-draw-actions a:hover {
background-color: #A0A098;
}
.leaflet-draw-actions-top.leaflet-draw-actions-bottom a {
height: 26px;
line-height: 26px;
}
/* ================================================================== */
/* Draw toolbar
/* ================================================================== */
.leaflet-draw-toolbar .leaflet-draw-draw-polyline {
background-position: -2px -2px;
}
.leaflet-draw-toolbar .leaflet-draw-draw-polygon {
background-position: -31px -2px;
}
.leaflet-draw-toolbar .leaflet-draw-draw-rectangle {
background-position: -62px -2px;
}
.leaflet-draw-toolbar .leaflet-draw-draw-circle {
background-position: -92px -2px;
}
.leaflet-draw-toolbar .leaflet-draw-draw-marker {
background-position: -122px -2px;
}
/* ================================================================== */
/* Edit toolbar
/* ================================================================== */
.leaflet-draw-toolbar .leaflet-draw-edit-edit {
background-position: -152px -2px;
}
.leaflet-draw-toolbar .leaflet-draw-edit-remove {
background-position: -182px -2px;
}
.leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled {
background-position: -212px -2px;
}
.leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled {
background-position: -242px -2px;
}
/* ================================================================== */
/* Drawing styles
/* ================================================================== */
.leaflet-mouse-marker {
background-color: #fff;
cursor: crosshair;
}
.leaflet-draw-tooltip {
background: rgb(54, 54, 54);
background: rgba(0, 0, 0, 0.5);
border: 1px solid transparent;
-webkit-border-radius: 4px;
border-radius: 4px;
color: #fff;
font: 12px/18px "Helvetica Neue", Arial, Helvetica, sans-serif;
margin-left: 20px;
margin-top: -21px;
padding: 4px 8px;
position: absolute;
white-space: nowrap;
z-index: 6;
}
.leaflet-draw-tooltip:before {
border-right: 6px solid black;
border-right-color: rgba(0, 0, 0, 0.5);
border-top: 6px solid transparent;
border-bottom: 6px solid transparent;
content: "";
position: absolute;
top: 7px;
left: -7px;
}
.leaflet-error-draw-tooltip {
background-color: #F2DEDE;
border: 1px solid #E6B6BD;
color: #B94A48;
}
.leaflet-error-draw-tooltip:before {
border-right-color: #E6B6BD;
}
.leaflet-draw-tooltip-single {
margin-top: -12px
}
.leaflet-draw-tooltip-subtext {
color: #f8d5e4;
}
.leaflet-draw-guide-dash {
font-size: 1%;
opacity: 0.6;
position: absolute;
width: 5px;
height: 5px;
}
/* ================================================================== */
/* Edit styles
/* ================================================================== */
.leaflet-edit-marker-selected {
background: rgba(254, 87, 161, 0.1);
border: 4px dashed rgba(254, 87, 161, 0.6);
-webkit-border-radius: 4px;
border-radius: 4px;
}
.leaflet-edit-move {
cursor: move;
}
.leaflet-edit-resize {
cursor: pointer;
}

159
gui-src/css/maps/leaflet.sidebar.css vendored Normal file
View File

@@ -0,0 +1,159 @@
.leaflet-sidebar {
position: absolute;
height: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 10px;
z-index: 20000;
}
.leaflet-sidebar.left {
left: -700px;
transition: left 0.5s, width 0.5s;
padding-right: 0;
}
.leaflet-sidebar.right {
right: -700px;
transition: right 0.5s, width 0.5s;
padding-left: 0;
}
.leaflet-sidebar.left.visible {
left: 0;
}
.leaflet-sidebar.right.visible {
right: 0;
}
.leaflet-left {
transition: left 0.5s;
}
.leaflet-right {
transition: right 0.5s;
}
.leaflet-sidebar > .leaflet-control {
height: 100%;
width: 100%;
overflow: auto;
-webkit-overflow-scrolling: touch;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 8px 24px;
font-size: 1.1em;
background: white;
box-shadow: 0 1px 7px rgba(0,0,0,0.65);
-webkit-border-radius: 4px;
border-radius: 4px;
}
@media(max-width:767px){
.leaflet-sidebar {
width: 100%;
padding: 0;
}
.leaflet-sidebar.left {
left: -100%;
}
.leaflet-sidebar.right {
right: -100%;
}
.leaflet-sidebar.left.visible {
left: 0;
}
.leaflet-sidebar.right.visible {
right: 0;
}
.leaflet-sidebar > .leaflet-control {
box-shadow: none;
-webkit-border-radius: 0;
border-radius: 0;
}
.leaflet-sidebar.left.visible ~ .leaflet-left {
left: 100%;
}
.leaflet-sidebar.right.visible ~ .leaflet-right {
right: 100%;
}
}
@media(min-width:768px) and (max-width:991px){
.leaflet-sidebar {
width: 505px;
}
.leaflet-sidebar.left.visible ~ .leaflet-left {
left: 505px;
}
.leaflet-sidebar.right.visible ~ .leaflet-right {
right: 505px;
}
}
@media(min-width:992px) and (max-width:1199px){
.leaflet-sidebar {
width: 590px;
}
.leaflet-sidebar.left.visible ~ .leaflet-left {
left: 590px;
}
.leaflet-sidebar.right.visible ~ .leaflet-right {
right: 590px;
}
}
@media(min-width:1200px){
.leaflet-sidebar {
width: 660px;
}
.leaflet-sidebar.left.visible ~ .leaflet-left {
left: 660px;
}
.leaflet-sidebar.right.visible ~ .leaflet-right {
right: 660px;
}
}
.leaflet-sidebar .close {
position: absolute;
right: 20px;
top: 20px;
width: 31px;
height: 31px;
color: #333;
font-size: 25pt;
line-height: 1em;
text-align: center;
background: white;
-webkit-border-radius: 16px;
border-radius: 16px;
cursor: pointer;
z-index: 8;
}

97
gui-src/css/search.css vendored Normal file
View File

@@ -0,0 +1,97 @@
/* City Search Box Styles */
#search-container {
position: absolute;
top: 5px;
right: 5px;
z-index: 1000;
font-family: Arial, sans-serif;
}
#search-box {
display: flex;
align-items: center;
padding: 0;
}
#city-search {
border: 1px solid #ddd;
border-radius: 3px 0 0 3px;
padding: 6px 10px;
font-size: 13px;
width: 200px;
outline: none;
border-right: none;
}
#city-search:focus {
border-color: #007cbb;
box-shadow: 0 0 5px rgba(0, 124, 187, 0.3);
}
#search-btn {
background: #007cbb;
color: white;
border: 1px solid #007cbb;
border-radius: 0 3px 3px 0;
padding: 4.5px 10px;
cursor: pointer;
font-size: 12px;
transition: background-color 0.2s;
}
#search-results {
max-height: 200px;
max-width: 238px;
overflow-y: auto;
border-top: 1px solid #eee;
display: none;
background: white;
border-radius: 0 0 3px 3px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.search-result-item {
padding: 10px 12px;
cursor: pointer;
border-bottom: 1px solid #f0f0f0;
font-size: 13px;
color: #333;
word-wrap: break-word;
overflow-wrap: break-word;
}
.search-result-item:hover {
background-color: #f5f5f5;
}
.search-result-item:last-child {
border-bottom: none;
}
.search-result-name {
font-weight: bold;
color: #007cbb;
word-wrap: break-word;
overflow-wrap: break-word;
}
.search-result-details {
color: #666;
font-size: 11px;
margin-top: 2px;
word-wrap: break-word;
overflow-wrap: break-word;
}
.search-loading {
padding: 10px 12px;
text-align: center;
color: #666;
font-style: italic;
}
.search-no-results {
padding: 10px 12px;
text-align: center;
color: #999;
}

507
gui-src/css/styles.css vendored Normal file
View File

@@ -0,0 +1,507 @@
: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%;
/* CSS Variables for consistent theming */
--primary-accent: #fecc44;
--primary-accent-dark: #e6b73d;
--primary-accent-light: #fff2cc;
}
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: var(--primary-accent);
text-decoration: inherit;
transition: color 0.3s ease;
}
a:hover {
color: var(--primary-accent-dark);
}
.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;
}
#fillground-toggle {
accent-color: #fecc44;
}
.fillground-toggle-container, .scale-slider-container {
margin: 15px 0;
}
#interior-toggle {
accent-color: #fecc44;
}
.interior-toggle-container, .scale-slider-container {
margin: 15px 0;
}
#roof-toggle {
accent-color: #fecc44;
}
.roof-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;
}
/* Settings Modal Layout */
.settings-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
}
.settings-row label {
text-align: left;
flex: 1;
}
.settings-control {
flex: 1;
display: flex;
justify-content: flex-end;
align-items: center;
}
.settings-control input[type="range"] {
width: 60%;
}
.settings-control input[type="text"],
.settings-control input[type="number"] {
width: 100%;
max-width: 180px;
padding: 5px;
border-radius: 4px;
border: 1px solid #fecc44;
}
.license-button-row {
justify-content: center;
margin-top: 10px;
}
.license-button {
width: 80% !important;
}
/* Buy Me a Coffee and Discord styling */
.buymeacoffee-row {
justify-content: center;
align-items: center;
gap: 15px;
margin-top: 10px;
margin-bottom: -10px;
}
.buymeacoffee-link,
.discord-link {
display: inline-block;
transition: transform 0.3s ease, opacity 0.3s ease;
}
.buymeacoffee-link:hover,
.discord-link:hover {
transform: scale(1.05);
opacity: 0.8;
}
.buymeacoffee-logo,
.discord-logo {
height: 35px;
width: auto;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
/* Language dropdown styling */
.language-dropdown {
width: 100%;
max-width: 180px;
padding: 5px 8px;
border-radius: 4px;
border: 1px solid #fecc44;
background-color: #ffffff;
color: #0f0f0f;
appearance: menulist;
cursor: pointer;
font-size: 15px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.language-dropdown option {
padding: 5px;
font-size: 15px;
}
@media (prefers-color-scheme: dark) {
.language-dropdown {
background-color: #0f0f0f98;
color: #ffffff;
border: 1px solid #fecc44;
}
}
/* Theme dropdown styling */
.theme-dropdown {
width: 100%;
max-width: 180px;
padding: 5px 8px;
border-radius: 4px;
border: 1px solid #fecc44;
background-color: #ffffff;
color: #0f0f0f;
appearance: menulist;
cursor: pointer;
font-size: 15px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.theme-dropdown option {
padding: 5px;
font-size: 15px;
}
@media (prefers-color-scheme: dark) {
.theme-dropdown {
background-color: #0f0f0f98;
color: #ffffff;
border: 1px solid #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) rotate(-10deg);
animation: zoomInLogo 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
/* Keyframe Animation */
@keyframes zoomInLogo {
0% {
transform: scale(0) rotate(-10deg);
opacity: 0;
}
60% {
transform: scale(1.05) rotate(2deg);
opacity: 0.8;
}
100% {
transform: scale(1) rotate(0deg);
opacity: 1;
}
}

BIN
gui-src/images/buymeacoffee.png vendored Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
gui-src/images/crosshair.png vendored Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

BIN
gui-src/images/discord.png vendored Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
gui-src/images/logo.png vendored Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

BIN
gui-src/images/marker-icon.png vendored Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

BIN
gui-src/images/tile.png vendored Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 811 B

221
gui-src/index.html vendored Normal file
View File

@@ -0,0 +1,221 @@
<!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>
<script type="module" src="./js/language-selector.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()">&times;</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()">&times;</span>
<h2 data-localize="customization_settings">Customization Settings</h2>
<!-- Terrain Toggle Button -->
<div class="settings-row">
<label for="terrain-toggle" data-localize="terrain">Terrain</label>
<div class="settings-control">
<input type="checkbox" id="terrain-toggle" name="terrain-toggle" checked>
</div>
</div>
<!-- Interior Toggle Button -->
<div class="settings-row">
<label for="interior-toggle" data-localize="interior">Interior Generation</label>
<div class="settings-control">
<input type="checkbox" id="interior-toggle" name="interior-toggle" checked>
</div>
</div>
<!-- Roof Toggle Button -->
<div class="settings-row">
<label for="roof-toggle" data-localize="roof">Roof Generation</label>
<div class="settings-control">
<input type="checkbox" id="roof-toggle" name="roof-toggle" checked>
</div>
</div>
<!-- Fill ground Toggle Button -->
<div class="settings-row">
<label for="fillground-toggle" data-localize="fillground">Fill Ground</label>
<div class="settings-control">
<input type="checkbox" id="fillground-toggle" name="fillground-toggle">
</div>
</div>
<!-- World Scale Slider -->
<div class="settings-row">
<label for="scale-value-slider" data-localize="world_scale">World Scale</label>
<div class="settings-control">
<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>
</div>
<!-- Bounding Box Input -->
<div class="settings-row">
<label for="bbox-coords" data-localize="custom_bounding_box">Custom Bounding Box</label>
<div class="settings-control">
<input type="text" id="bbox-coords" name="bbox-coords" maxlength="55" placeholder="Format: lat,lng,lat,lng">
</div>
</div>
<!-- Floodfill Timeout Input -->
<div class="settings-row">
<label for="floodfill-timeout" data-localize="floodfill_timeout">Floodfill Timeout (sec)</label>
<div class="settings-control">
<input type="number" id="floodfill-timeout" name="floodfill-timeout" min="0" step="1" value="20" placeholder="Seconds">
</div>
</div>
<!-- Map Theme Selector -->
<div class="settings-row">
<label for="tile-theme-select" data-localize="map_theme">Map Theme</label>
<div class="settings-control">
<select id="tile-theme-select" name="tile-theme-select" class="theme-dropdown">
<option value="osm">Standard</option>
<option value="esri-imagery">Satellite</option>
<option value="opentopomap">Topographic</option>
<option value="stadia-bright">Smooth Bright</option>
<option value="stadia-dark">Smooth Dark</option>
</select>
</div>
</div>
<!-- Language Selector -->
<div class="settings-row">
<label for="language-select" data-localize="language">Language</label>
<div class="settings-control">
<select id="language-select" name="language-select" class="language-dropdown">
<option value="en">English</option>
<option value="de">Deutsch</option>
<option value="es">Español</option>
<option value="fr-FR">Français</option>
<option value="ru">Русский</option>
<option value="zh-CN">中文 (简体)</option>
<option value="ko">한국어</option>
<option value="pl">Polski</option>
<option value="sv">Svenska</option>
<option value="ar">العربية</option>
<option value="fi">Suomi</option>
<option value="hu">Magyar</option>
<option value="lt">Lietuvių</option>
<option value="ua">Українська</option>
</select>
</div>
</div>
<!-- License and Credits Button -->
<div class="settings-row license-button-row">
<button type="button" id="license-button" class="license-button" onclick="openLicense()" data-localize="license_and_credits">License and Credits</button>
</div>
<!-- Buy Me a Coffee and Discord -->
<div class="settings-row buymeacoffee-row">
<a href="https://buymeacoffee.com/louisdev" target="_blank" class="buymeacoffee-link">
<img src="./images/buymeacoffee.png" alt="Buy Me a Coffee" class="buymeacoffee-logo">
</a>
<a href="https://discord.gg/mA2g69Fhxq" target="_blank" class="discord-link">
<img src="./images/discord.png" alt="Discord" class="discord-logo">
</a>
</div>
</div>
</div>
<!-- License Modal -->
<div id="license-modal" class="modal" style="display: none;">
<div class="modal-content">
<span class="close-button" onclick="closeLicense()">&times;</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>

885
gui-src/js/bbox.js vendored Normal file
View File

@@ -0,0 +1,885 @@
var map, rsidebar, lsidebar, drawControl, drawnItems = null;
// Where we keep the big list of proj defs from the server
var proj4defs = null;
// Where we keep the proj objects we are using in this session
var projdefs = { "4326": L.CRS.EPSG4326, "3857": L.CRS.EPSG3857 };
var currentproj = "3857";
var currentmouse = L.latLng(0, 0);
/*
**
** override L.Rectangle
** to fire an event after setting
**
** the base parent object L.Path
** includes the L.Mixin.Events
**
** ensures bbox box is always
** the topmost SVG feature
**
*/
L.Rectangle.prototype.setBounds = function (latLngBounds) {
this.setLatLngs(this._boundsToLatLngs(latLngBounds));
this.fire('bounds-set');
}
var FormatSniffer = (function () { // execute immediately
'use strict';
/*
**
** constructor
**
*/
var FormatSniffer = function (options) {
options || (options = {});
if (!this || !(this instanceof FormatSniffer)) {
return new FormatSniffer(options);
}
this.regExes = {
ogrinfoExtent: /Extent\:\s\((.*)\)/,
bbox: /^\(([\s|\-|0-9]*\.[0-9]*,[\s|\-|0-9]*\.[0-9]*,[\s|\-|0-9]*\.[0-9]*,[\s|\-|0-9]*\.[0-9|\s]*)\)$/
};
this.data = options.data || "";
this.parse_type = null;
};
/*
**
** functions
**
*/
FormatSniffer.prototype.sniff = function () {
return this._sniffFormat();
};
FormatSniffer.prototype._is_ogrinfo = function () {
var match = this.regExes.ogrinfoExtent.exec(this.data.trim());
var extent = [];
if (match) {
var pairs = match[1].split(") - (");
for (var indx = 0; indx < pairs.length; indx++) {
var coords = pairs[indx].trim().split(",");
extent = (extent.concat([parseFloat(coords[0].trim()), parseFloat(coords[1].trim())]));
}
}
this.parse_type = "ogrinfo";
return extent;
};
FormatSniffer.prototype._is_normal_bbox = function () {
var match = this.regExes.bbox.exec(this.data.trim());
var extent = [];
if (match) {
var bbox = match[1].split(",");
for (var indx = 0; indx < bbox.length; indx++) {
var coord = bbox[indx].trim();
extent = (extent.concat([parseFloat(coord)]));
}
}
this.parse_type = "bbox";
return extent;
};
FormatSniffer.prototype._is_geojson = function () {
try {
// try JSON
var json = JSON.parse(this.data);
// try GeoJSON
var parsed_data = new L.geoJson(json)
} catch (err) {
return null;
}
this.parse_type = "geojson";
return parsed_data;
};
FormatSniffer.prototype._is_wkt = function () {
if (this.data === "") {
throw new Error("empty -- nothing to parse");
}
try {
var parsed_data = new Wkt.Wkt(this.data);
} catch (err) {
return null;
}
this.parse_type = "wkt";
return parsed_data;
};
FormatSniffer.prototype._sniffFormat = function () {
var parsed_data = null;
var fail = false;
try {
var next = true;
// try ogrinfo
parsed_data = this._is_ogrinfo()
if (parsed_data.length > 0) {
next = false;
}
// try normal bbox
if (next) {
parsed_data = this._is_normal_bbox();
if (parsed_data.length > 0) next = false;
}
// try GeoJSON
if (next) {
parsed_data = this._is_geojson();
if (parsed_data) next = false;
}
// try WKT
if (next) {
parsed_data = this._is_wkt();
if (parsed_data) next = false;
}
// no matches, throw error
if (next) {
fail = true;
/*
** sorry, this block needs to be left aligned
** to make the alert more readable
** which means, we probably shouldn't use alerts ;-)
*/
throw {
"name": "NoTypeMatchError",
"message": "The data is not a recognized format:\n \
1. ogrinfo extent output\n \
2. bbox as (xMin,yMin,xMax,yMax )\n \
3. GeoJSON\n \
4. WKT\n\n "
}
}
} catch (err) {
alert("Your paste is not parsable:\n" + err.message);
fail = true;
}
// delegate to format handler
if (!fail) {
this._formatHandler[this.parse_type].call(this._formatHandler, parsed_data);
}
return (fail ? false : true);
};
/*
** an object with functions as property names.
** if we need to add another format
** we can do so here as a property name
** to enforce reusability
**
** to add different formats as L.FeatureGroup layer
** so they work with L.Draw edit and delete options
** we fake passing event information
** and triggering draw:created for L.Draw
*/
FormatSniffer.prototype._formatHandler = {
// coerce event objects to work with L.Draw types
coerce: function (lyr, type_obj) {
var event_obj = {
layer: lyr,
layerType: null,
}
// coerce to L.Draw types
if (/point/i.test(type_obj)) {
event_obj.layerType = "marker";
}
else if (/linestring/i.test(type_obj)) {
event_obj.layerType = "polyline";
}
else if (/polygon/i.test(type_obj)) {
event_obj.layerType = "polygon";
}
return event_obj;
},
reduce_layers: function (lyr) {
var lyr_parts = [];
if (typeof lyr['getLayers'] === 'undefined') {
return [lyr];
}
else {
var all_layers = lyr.getLayers();
for (var i = 0; i < all_layers.length; i++) {
lyr_parts = lyr_parts.concat(this.reduce_layers(all_layers[i]));
}
}
return lyr_parts;
},
get_leaflet_bounds: function (data) {
/*
** data comes in an extent ( xMin,yMin,xMax,yMax )
** we need to swap lat/lng positions
** because leaflet likes it hard
*/
var sw = [data[1], data[0]];
var ne = [data[3], data[2]];
return new L.LatLngBounds(sw, ne);
},
wkt: function (data) {
var wkt_layer = data.construct[data.type].call(data);
var all_layers = this.reduce_layers(wkt_layer);
for (var indx = 0; indx < all_layers.length; indx++) {
var lyr = all_layers[indx];
var evt = this.coerce(lyr, data.type);
// call L.Draw.Feature.prototype._fireCreatedEvent
map.fire('draw:created', evt);
}
},
geojson: function (geojson_layer) {
var all_layers = this.reduce_layers(geojson_layer);
for (var indx = 0; indx < all_layers.length; indx++) {
var lyr = all_layers[indx];
var geom_type = geojson_layer.getLayers()[0].feature.geometry.type;
var evt = this.coerce(lyr, geom_type);
// call L.Draw.Feature.prototype._fireCreatedEvent
map.fire('draw:created', evt);
}
},
ogrinfo: function (data) {
var lBounds = this.get_leaflet_bounds(data);
// create a rectangle layer
var lyr = new L.Rectangle(lBounds);
var evt = this.coerce(lyr, 'polygon');
// call L.Draw.Feature.prototype._fireCreatedEvent
map.fire('draw:created', evt);
},
bbox: function (data) {
var lBounds = this.get_leaflet_bounds(data);
// create a rectangle layer
var lyr = new L.Rectangle(lBounds);
var evt = this.coerce(lyr, 'polygon');
// call L.Draw.Feature.prototype._fireCreatedEvent
map.fire('draw:created', evt);
}
};
return FormatSniffer; // return class def
})(); // end FormatSniffer
function addLayer(layer, name, title, zIndex, on) {
if (on) {
layer.setZIndex(zIndex).addTo(map);
} else {
layer.setZIndex(zIndex);
}
// Create a simple layer switcher that toggles layers on and off.
var ui = document.getElementById('map-ui');
var item = document.createElement('li');
var link = document.createElement('a');
link.href = '#';
if (on) {
link.className = 'enabled';
} else {
link.className = '';
}
link.innerHTML = name;
link.title = title;
link.onclick = function (e) {
e.preventDefault();
e.stopPropagation();
if (map.hasLayer(layer)) {
map.removeLayer(layer);
this.className = '';
} else {
map.addLayer(layer);
this.className = 'enabled';
}
};
item.appendChild(link);
ui.appendChild(item);
};
function formatBounds(bounds, proj) {
var gdal = $("input[name='gdal-checkbox']").prop('checked');
var lngLat = $("input[name='coord-order']").prop('checked');
var formattedBounds = '';
var southwest = bounds.getSouthWest();
var northeast = bounds.getNorthEast();
var xmin = 0;
var ymin = 0;
var xmax = 0;
var ymax = 0;
if (proj == '4326') {
xmin = southwest.lng.toFixed(6);
ymin = southwest.lat.toFixed(6);
xmax = northeast.lng.toFixed(6);
ymax = northeast.lat.toFixed(6);
} else {
var proj_to_use = null;
if (typeof (projdefs[proj]) !== 'undefined') {
// we have it already, then grab it and use it...
proj_to_use = projdefs[proj];
} else {
// We have not used this one yet... make it and store it...
projdefs[proj] = new L.Proj.CRS(proj, proj4defs[proj][1]);
proj_to_use = projdefs[proj];
}
southwest = proj_to_use.project(southwest)
northeast = proj_to_use.project(northeast)
xmin = southwest.x.toFixed(4);
ymin = southwest.y.toFixed(4);
xmax = northeast.x.toFixed(4);
ymax = northeast.y.toFixed(4);
}
if (gdal) {
if (lngLat) {
formattedBounds = xmin + ',' + ymin + ',' + xmax + ',' + ymax;
} else {
formattedBounds = ymin + ',' + xmin + ',' + ymax + ',' + xmax;
}
} else {
if (lngLat) {
formattedBounds = xmin + ' ' + ymin + ' ' + xmax + ' ' + ymax;
} else {
formattedBounds = ymin + ' ' + xmin + ' ' + ymax + ' ' + xmax;
}
}
return formattedBounds
}
function formatTile(point, zoom) {
var xTile = Math.floor((point.lng + 180) / 360 * Math.pow(2, zoom));
var yTile = Math.floor((1 - Math.log(Math.tan(point.lat * Math.PI / 180) + 1 / Math.cos(point.lat * Math.PI / 180)) / Math.PI) / 2 * Math.pow(2, zoom));
return xTile.toString() + ',' + yTile.toString();
}
function formatPoint(point, proj) {
var gdal = $("input[name='gdal-checkbox']").prop('checked');
var lngLat = $("input[name='coord-order']").prop('checked');
var formattedPoint = '';
if (proj == '4326') {
x = point.lng.toFixed(6);
y = point.lat.toFixed(6);
} else {
var proj_to_use = null;
if (typeof (projdefs[proj]) !== 'undefined') {
// we have it already, then grab it and use it...
proj_to_use = projdefs[proj];
} else {
// We have not used this one yet... make it and store it...
projdefs[proj] = new L.Proj.CRS(proj, proj4defs[proj][1]);
proj_to_use = projdefs[proj];
}
point = proj_to_use.project(point)
x = point.x.toFixed(4);
y = point.y.toFixed(4);
}
if (gdal) {
if (lngLat) {
formattedBounds = x + ',' + y;
} else {
formattedBounds = y + ',' + x;
}
} else {
if (lngLat) {
formattedBounds = x + ' ' + y;
} else {
formattedBounds = y + ' ' + x;
}
}
return formattedPoint
}
function validateStringAsBounds(bounds) {
var splitBounds = bounds ? bounds.split(',') : null;
return ((splitBounds !== null) &&
(splitBounds.length == 4) &&
((-90.0 <= parseFloat(splitBounds[0]) <= 90.0) &&
(-180.0 <= parseFloat(splitBounds[1]) <= 180.0) &&
(-90.0 <= parseFloat(splitBounds[2]) <= 90.0) &&
(-180.0 <= parseFloat(splitBounds[3]) <= 180.0)) &&
(parseFloat(splitBounds[0]) < parseFloat(splitBounds[2]) &&
parseFloat(splitBounds[1]) < parseFloat(splitBounds[3])))
}
$(document).ready(function () {
/*
**
** make sure all textarea inputs
** are selected once they are clicked
** because some people might not
** have flash enabled or installed
** and yes...
** there's a fucking Flash movie floating
** on top of your DOM
**
*/
// init the projection input box as it is used to format the initial values
$('input[type="textarea"]').on('click', function (evt) { this.select() });
$("#projection").val(currentproj);
// Initialize map
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: '&copy; <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 &copy; Esri &mdash; 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: &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, <a href="http://viewfinderpanoramas.org">SRTM</a> | Map style: &copy; <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: '&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> &copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> &copy; <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: '&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> &copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> &copy; <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 >= 3 && !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);
// Listen for theme changes from parent window (settings modal)
window.addEventListener('message', function(event) {
if (event.data && event.data.type === 'changeTileTheme') {
changeTileTheme(event.data.theme);
}
});
// 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;
}
}
rsidebar = L.control.sidebar('rsidebar', {
position: 'right',
closeButton: true
});
rsidebar.on("sidebar-show", function (e) {
$("#map .leaflet-tile-loaded").addClass("blurred");
});
rsidebar.on("sidebar-hide", function (e) {
$('#map .leaflet-tile-loaded').removeClass('blurred');
$('#map .leaflet-tile-loaded').addClass('unblurred');
setTimeout(function () {
$('#map .leaflet-tile-loaded').removeClass('unblurred');
}, 7000);
});
map.addControl(rsidebar);
lsidebar = L.control.sidebar('lsidebar', {
position: 'left'
});
map.addControl(lsidebar);
// Add in a crosshair for the map
var crosshairIcon = L.icon({
iconUrl: 'images/crosshair.png',
iconSize: [20, 20], // size of the icon
iconAnchor: [10, 10], // point of the icon which will correspond to marker's location
});
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]
});
drawControl = new L.Control.Draw({
edit: {
featureGroup: drawnItems
},
draw: {
rectangle: {
shapeOptions: {
color: '#fe57a1',
opacity: 0.6,
weight: 3,
fillColor: '#fe57a1',
fillOpacity: 0.1,
dashArray: '10, 10',
lineCap: 'round',
lineJoin: 'round'
},
repeatMode: false
},
polyline: false,
polygon: false,
circle: false,
marker: {
icon: customMarkerIcon
}
}
});
map.addControl(drawControl);
/*
**
** create bounds layer
** and default it at first
** to draw on null island
** so it's not seen onload
**
*/
startBounds = new L.LatLngBounds([0.0, 0.0], [0.0, 0.0]);
var bounds = new L.Rectangle(startBounds, {
color: '#3778d4',
opacity: 1.0,
weight: 3,
fill: '#3778d4',
lineCap: 'round',
lineJoin: 'round'
});
bounds.on('bounds-set', function (e) {
// move it to the end of the parent if renderer exists
if (e.target._renderer && e.target._renderer._container) {
var parent = e.target._renderer._container.parentElement;
$(parent).append(e.target._renderer._container);
}
// Set the hash
var southwest = this.getBounds().getSouthWest();
var northeast = this.getBounds().getNorthEast();
var xmin = southwest.lng.toFixed(6);
var ymin = southwest.lat.toFixed(6);
var xmax = northeast.lng.toFixed(6);
var ymax = northeast.lat.toFixed(6);
location.hash = ymin + ',' + xmin + ',' + ymax + ',' + xmax;
});
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);
}
});
}
// Check if it's a rectangle and set proper styles before adding it to the layer
if (e.layerType === 'rectangle') {
e.layer.setStyle({
color: '#3778d4',
opacity: 1.0,
weight: 3,
fill: '#3778d4',
lineCap: 'round',
lineJoin: 'round'
});
}
drawnItems.addLayer(e.layer);
// 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();
}
}
if (!e.geojson &&
!((drawnItems.getLayers().length == 1) && (drawnItems.getLayers()[0] instanceof L.Marker))) {
map.fitBounds(bounds.getBounds());
} else {
if ((drawnItems.getLayers().length == 1) && (drawnItems.getLayers()[0] instanceof L.Marker)) {
map.panTo(drawnItems.getLayers()[0].getLatLng());
}
}
});
map.on('draw:deleted', function (e) {
e.layers.eachLayer(function (l) {
drawnItems.removeLayer(l);
});
if (drawnItems.getLayers().length > 0 &&
!((drawnItems.getLayers().length == 1) && (drawnItems.getLayers()[0] instanceof L.Marker))) {
bounds.setBounds(drawnItems.getBounds())
$('#boxbounds').text(formatBounds(bounds.getBounds(), '4326'));
$('#boxboundsmerc').text(formatBounds(bounds.getBounds(), currentproj));
notifyBboxUpdate();
map.fitBounds(bounds.getBounds());
} else {
bounds.setBounds(new L.LatLngBounds([0.0, 0.0], [0.0, 0.0]));
$('#boxbounds').text(formatBounds(bounds.getBounds(), '4326'));
$('#boxboundsmerc').text(formatBounds(bounds.getBounds(), currentproj));
notifyBboxUpdate();
if (drawnItems.getLayers().length == 1) {
map.panTo(drawnItems.getLayers()[0].getLatLng());
}
}
});
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);
}
$('#boxbounds').text(formatBounds(bounds.getBounds(), '4326'));
$('#boxboundsmerc').text(formatBounds(bounds.getBounds(), currentproj));
notifyBboxUpdate();
map.fitBounds(bounds.getBounds());
});
function display() {
$('#boxbounds').text(formatBounds(bounds.getBounds(), '4326'));
$('#boxboundsmerc').text(formatBounds(bounds.getBounds(), currentproj));
notifyBboxUpdate();
}
display();
map.on('move', function (e) {
crosshair.setLatLng(map.getCenter());
});
// handle geolocation click events
$('#geolocation').click(function () {
map.locate({ setView: true, maxZoom: 8 });
$('#geolocation a').toggleClass('active');
$('#geolocation a').toggleClass('active', 350);
});
$('button#add').on('click', function (evt) {
var sniffer = FormatSniffer({ data: $('div#rsidebar textarea').val() });
var is_valid = sniffer.sniff();
if (is_valid) {
rsidebar.hide();
$('#create-geojson a').toggleClass('enabled');
map.fitBounds(bounds.getBounds());
}
});
$('button#clear').on('click', function (evt) {
$('div#rsidebar textarea').val('');
});
var initialBBox = location.hash ? location.hash.replace(/^#/, '') : null;
if (initialBBox) {
if (validateStringAsBounds(initialBBox)) {
var splitBounds = initialBBox.split(',');
startBounds = new L.LatLngBounds([splitBounds[0], splitBounds[1]],
[splitBounds[2], splitBounds[3]]);
var lyr = new L.Rectangle(startBounds, {
color: '#3778d4',
opacity: 1.0,
weight: 3,
fill: '#3778d4',
lineCap: 'round',
lineJoin: 'round'
});
var evt = {
layer: lyr,
layerType: "polygon",
}
map.fire('draw:created', evt);
//map.fitBounds(bounds.getBounds());
} else {
// This will reset the hash if the original hash was not valid
bounds.setBounds(bounds.getBounds());
}
} else {
// Initially set the hash if there was not one set by the user
bounds.setBounds(bounds.getBounds());
}
$("input").click(function (e) {
display();
});
});
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;

45
gui-src/js/language-selector.js vendored Normal file
View File

@@ -0,0 +1,45 @@
// Wait for DOM to be fully loaded
document.addEventListener('DOMContentLoaded', function () {
// Get language selector
const languageSelect = document.getElementById('language-select');
if (languageSelect) {
// Set initial value based on saved preference or browser language
const savedLanguage = localStorage.getItem('arnis-language');
const currentLang = savedLanguage || navigator.language;
const availableOptions = Array.from(languageSelect.options).map(opt => opt.value);
// Try to match the exact language code first
if (availableOptions.includes(currentLang)) {
languageSelect.value = currentLang;
}
// Try to match just the base language code
else if (availableOptions.includes(currentLang.split('-')[0])) {
languageSelect.value = currentLang.split('-')[0];
}
// Handle language change
languageSelect.addEventListener('change', function () {
const selectedLanguage = languageSelect.value;
// Store selection in localStorage
localStorage.setItem('arnis-language', selectedLanguage);
// Reload localization with the new language
if (window.fetchLanguage) {
window.fetchLanguage(selectedLanguage).then(localization => {
if (window.applyLocalization) {
window.applyLocalization(localization);
// Re-initialize the footer to ensure year and version are properly displayed
if (window.initFooter) {
window.initFooter();
}
}
});
} else {
// If the fetchLanguage function isn't exposed to window, just reload the page
window.location.reload();
}
});
}
});

33
gui-src/js/language.js vendored Normal file
View File

@@ -0,0 +1,33 @@
const DEFAULT_LOCALE_PATH = `./locales/en.json`;
/**
* 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
*/
export function invalidJSON(response) {
return !response.ok || response.headers.get("Content-Type") === "text/html";
}
/**
* Fetches a specific language file
* @param {string} languageCode - The language code to fetch
* @returns {Promise<Object>} The localization JSON object
*/
export async function fetchLanguage(languageCode) {
let response = await fetch(`./locales/${languageCode}.json`);
// Try with only first part of language code if not found
if (invalidJSON(response)) {
response = await fetch(`./locales/${languageCode.split('-')[0]}.json`);
// Fallback to default English localization
if (invalidJSON(response)) {
response = await fetch(DEFAULT_LOCALE_PATH);
}
}
const localization = await response.json();
return localization;
}

9597
gui-src/js/libs/jquery-1.9.1.js vendored Normal file
View File

File diff suppressed because it is too large Load Diff

5
gui-src/js/libs/jquery-1.9.1.min.js vendored Normal file
View File

File diff suppressed because one or more lines are too long

14971
gui-src/js/libs/jquery-ui-1.10.3.custom.js vendored Normal file
View File

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because one or more lines are too long

88
gui-src/js/license.js vendored Normal file
View File

@@ -0,0 +1,88 @@
export const licenseText = `
<b>Made with ♥️ in Munich by Louis Erbkamm</b>
<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 style="color: #ff8686;"><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>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>
<p><b>License:</b></p>
<pre style="white-space: pre-wrap; font-family: inherit;">
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"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.
"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.
"You" (or "Your") shall mean an individual or Legal Entityexercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,including but not limited to software source code, documentationsource, and configuration files.
"Object" form shall mean any form resulting from mechanicaltransformation or translation of a Source form, including butnot limited to compiled object code, generated documentation,and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source orObject form, made available under the License, as indicated by acopyright notice that is included in or attached to the work(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Objectform, that is based on (or derived from) the Work and for which theeditorial revisions, annotations, elaborations, or other modificationsrepresent, as a whole, an original work of authorship. For the purposesof this License, Derivative Works shall not include works that remainseparable from, or merely link (or bind by name) to the interfaces of,the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, includingthe original version of the Work and any modifications or additionsto that Work or Derivative Works thereof, that is intentionallysubmitted to Licensor for inclusion in the Work by the copyright owneror by an individual or Legal Entity authorized to submit on behalf ofthe copyright owner. For the purposes of this definition, "submitted"means any form of electronic, verbal, or written communication sentto the Licensor or its representatives, including but not limited tocommunication on electronic mailing lists, source code control systems,and issue tracking systems that are managed by, or on behalf of, theLicensor for the purpose of discussing and improving the Work, butexcluding communication that is conspicuously marked or otherwisedesignated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entityon behalf of whom a Contribution has been received by Licensor andsubsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions ofthis License, each Contributor hereby grants to You a perpetual,worldwide, non-exclusive, no-charge, royalty-free, irrevocablecopyright license to reproduce, prepare Derivative Works of,publicly display, publicly perform, sublicense, and distribute theWork and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions ofthis License, each Contributor hereby grants to You a perpetual,worldwide, non-exclusive, no-charge, royalty-free, irrevocable(except as stated in this section) patent license to make, have made,use, offer to sell, sell, import, and otherwise transfer the Work,where such license applies only to those patent claims licensableby such Contributor that are necessarily infringed by theirContribution(s) alone or by combination of their Contribution(s)with the Work to which such Contribution(s) was submitted. If Youinstitute patent litigation against any entity (including across-claim or counterclaim in a lawsuit) alleging that the Workor a Contribution incorporated within the Work constitutes director contributory patent infringement, then any patent licensesgranted to You under this License for that Work shall terminateas of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of theWork or Derivative Works thereof in any medium, with or withoutmodifications, and in Source or Object form, provided that Youmeet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications andmay provide additional or different license terms and conditionsfor use, reproduction, or distribution of Your modifications, orfor any such Derivative Works as a whole, provided Your use,reproduction, and distribution of the Work otherwise complies withthe conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,any Contribution intentionally submitted for inclusion in the Workby You to the Licensor shall be under the terms and conditions ofthis License, without any additional terms or conditions.Notwithstanding the above, nothing herein shall supersede or modifythe terms of any separate license agreement you may have executedwith Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the tradenames, trademarks, service marks, or product names of the Licensor,except as required for reasonable and customary use in describing theorigin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law oragreed to in writing, Licensor provides the Work (and eachContributor provides its Contributions) on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express orimplied, including, without limitation, any warranties or conditionsof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR APARTICULAR PURPOSE. You are solely responsible for determining theappropriateness of using or redistributing the Work and assume anyrisks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,whether in tort (including negligence), contract, or otherwise,unless required by applicable law (such as deliberate and grosslynegligent acts) or agreed to in writing, shall any Contributor beliable to You for damages, including any direct, indirect, special,incidental, or consequential damages of any character arising as aresult of this License or out of the use or inability to use theWork (including but not limited to damages for loss of goodwill,work stoppage, computer failure or malfunction, or any and allother commercial damages or losses), even if such Contributorhas been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributingthe Work or Derivative Works thereof, You may choose to offer,and charge a fee for, acceptance of support, warranty, indemnity,or other liability obligations and/or rights consistent with thisLicense. However, in accepting such obligations, You may act onlyon Your own behalf and on Your sole responsibility, not on behalfof any other Contributor, and only if You agree to indemnify,defend, and hold each Contributor harmless for any liabilityincurred by, or claims asserted against, such Contributor by reasonof your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
Copyright ${new Date().getFullYear()} Louis Erbkamm
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions andlimitations under the License.
</pre>
`;

633
gui-src/js/main.js vendored Normal file
View File

@@ -0,0 +1,633 @@
import { licenseText } from './license.js';
import { fetchLanguage, invalidJSON } from './language.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();
});
// Expose language functions to window for use by language-selector.js
window.fetchLanguage = fetchLanguage;
window.applyLocalization = applyLocalization;
window.initFooter = initFooter;
/**
* 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() {
// Check if user has a saved language preference
const savedLanguage = localStorage.getItem('arnis-language');
// If there's a saved preference, use it
if (savedLanguage) {
return await fetchLanguage(savedLanguage);
}
// Otherwise use the browser's language
const lang = navigator.language;
return await fetchLanguage(lang);
}
/**
* 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 defaultJson = await fetchLanguage('en');
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='world_scale']": "world_scale",
"label[data-localize='custom_bounding_box']": "custom_bounding_box",
"label[data-localize='floodfill_timeout']": "floodfill_timeout",
// DEPRECATED: Ground level localization removed
// "label[data-localize='ground_level']": "ground_level",
"label[data-localize='language']": "language",
"label[data-localize='terrain']": "terrain",
"label[data-localize='interior']": "interior",
"label[data-localize='roof']": "roof",
"label[data-localize='fillground']": "fillground",
"label[data-localize='map_theme']": "map_theme",
".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",
// DEPRECATED: Ground level placeholder removed
// "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) {
// Get the original text from localization if available, or use the current text
let footerText = footerElement.textContent;
// Check if the text is from localization and contains placeholders
if (window.localization && window.localization.footer_text) {
footerText = window.localization.footer_text;
}
// Replace placeholders with actual values
footerElement.textContent = footerText
.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);
});
// Language selector
const languageSelect = document.getElementById("language-select");
const availableOptions = Array.from(languageSelect.options).map(opt => opt.value);
// Check for saved language preference first
const savedLanguage = localStorage.getItem('arnis-language');
let languageToSet = 'en'; // Default to English
if (savedLanguage && availableOptions.includes(savedLanguage)) {
// Use saved language if it exists and is available
languageToSet = savedLanguage;
} else {
// Otherwise use browser language
const currentLang = navigator.language;
// Try to match the exact language code first
if (availableOptions.includes(currentLang)) {
languageToSet = currentLang;
}
// Try to match just the base language code
else if (availableOptions.includes(currentLang.split('-')[0])) {
languageToSet = currentLang.split('-')[0];
}
// languageToSet remains 'en' as default
}
languageSelect.value = languageToSet;
// Handle language change
languageSelect.addEventListener("change", async () => {
const selectedLanguage = languageSelect.value;
// Store the selected language in localStorage for persistence
localStorage.setItem('arnis-language', selectedLanguage);
// Reload localization with the new language
const localization = await fetchLanguage(selectedLanguage);
await applyLocalization(localization);
});
// Tile theme selector
const tileThemeSelect = document.getElementById("tile-theme-select");
// Load saved tile theme preference
const savedTileTheme = localStorage.getItem('selectedTileTheme') || 'osm';
tileThemeSelect.value = savedTileTheme;
// Handle tile theme change
tileThemeSelect.addEventListener("change", () => {
const selectedTheme = tileThemeSelect.value;
// Store the selected theme in localStorage for persistence
localStorage.setItem('selectedTileTheme', selectedTheme);
// Send message to map iframe to change tile theme
const mapIframe = document.querySelector('iframe[src="maps.html"]');
if (mapIframe && mapIframe.contentWindow) {
mapIframe.contentWindow.postMessage({
type: 'changeTileTheme',
theme: selectedTheme
}, '*');
}
});
/// 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 === "") {
// Empty input - revert to map selection if available
customBBoxValid = false;
selectedBBox = mapSelectedBBox;
// Clear the info text only if no map selection exists
if (!mapSelectedBBox) {
bboxInfo.textContent = "";
bboxInfo.style.color = "";
} else {
// Restore map selection display
displayBboxInfoText(mapSelectedBBox);
}
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 with consistent comma-separated format
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 and mark custom input as valid
customBBoxValid = true;
selectedBBox = bboxText.replace(/,/g, ' '); // Convert to space format for consistency
localizeElement(window.localization, { element: bboxInfo }, "custom_selection_confirmed");
bboxInfo.style.color = "#7bd864";
} else {
// Valid numbers but invalid order or range
customBBoxValid = false;
// Don't clear selectedBBox - keep map selection if available
if (!mapSelectedBBox) {
selectedBBox = "";
} else {
selectedBBox = mapSelectedBBox;
}
localizeElement(window.localization, { element: bboxInfo }, "error_coordinates_out_of_range");
bboxInfo.style.color = "#fecc44";
}
} else {
// Input doesn't match the required format
customBBoxValid = false;
// Don't clear selectedBBox - keep map selection if available
if (!mapSelectedBBox) {
selectedBBox = "";
} else {
selectedBBox = mapSelectedBBox;
}
localizeElement(window.localization, { element: bboxInfo }, "invalid_format");
bboxInfo.style.color = "#fecc44";
}
});
}
/**
* 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 = "";
let mapSelectedBBox = ""; // Tracks bbox from map selection
let customBBoxValid = false; // Tracks if custom input is valid
// 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));
mapSelectedBBox = `${lng1} ${lat1} ${lng2} ${lat2}`;
// Map selection always takes priority - clear custom input and update selectedBBox
selectedBBox = mapSelectedBBox;
customBBoxValid = false;
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 = "";
mapSelectedBBox = "";
if (!customBBoxValid) {
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 = "";
let isNewWorld = false;
async function selectWorld(generate_new_world) {
try {
const worldName = await invoke('gui_select_world', { generateNew: generate_new_world });
if (worldName) {
worldPath = worldName;
isNewWorld = generate_new_world;
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;
}
// Get the map iframe reference
const mapFrame = document.querySelector('.map-container');
// Get spawn point coordinates if marker exists
let spawnPoint = null;
if (mapFrame && mapFrame.contentWindow && mapFrame.contentWindow.getSpawnPointCoords) {
const coords = mapFrame.contentWindow.getSpawnPointCoords();
// Convert object format to tuple format if coordinates exist
if (coords) {
spawnPoint = [coords.lat, coords.lng];
}
}
var terrain = document.getElementById("terrain-toggle").checked;
var interior = document.getElementById("interior-toggle").checked;
var roof = document.getElementById("roof-toggle").checked;
var fill_ground = document.getElementById("fillground-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);
// DEPRECATED: Ground level input removed from UI
var ground_level = -62;
// 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 selected options to the Rust backend
await invoke("gui_start_generation", {
bboxText: selectedBBox,
selectedWorld: worldPath,
worldScale: scale,
groundLevel: ground_level,
floodfillTimeout: floodfill_timeout,
terrainEnabled: terrain,
interiorEnabled: interior,
roofEnabled: roof,
fillgroundEnabled: fill_ground,
isNewWorld: isNewWorld,
spawnPoint: spawnPoint
});
console.log("Generation process started.");
generationButtonEnabled = false;
} catch (error) {
console.error("Error starting generation:", error);
generationButtonEnabled = true;
}
}

10
gui-src/js/maps/leaflet.draw.js vendored Normal file
View File

File diff suppressed because one or more lines are too long

9
gui-src/js/maps/leaflet.js vendored Normal file
View File

File diff suppressed because one or more lines are too long

122
gui-src/js/maps/leaflet.sidebar.js vendored Normal file
View File

@@ -0,0 +1,122 @@
L.Control.Sidebar = L.Control.extend({
includes: L.Mixin.Events,
options: {
closeButton: true,
position: 'left'
},
initialize: function (placeholder, options) {
L.setOptions(this, options);
// Find content container
var content = this._contentContainer = L.DomUtil.get(placeholder);
// Remove the content container from its original parent
content.parentNode.removeChild(content);
// Make sure we don't drag the map when we interact with the content
var stop = L.DomEvent.stopPropagation;
L.DomEvent
.on(content, 'click', stop)
.on(content, 'mousedown', stop)
.on(content, 'touchstart', stop)
.on(content, 'dblclick', stop)
.on(content, 'mousewheel', stop)
.on(content, 'MozMousePixelScroll', stop);
},
addTo: function (map) {
var sidebar = this;
var l = 'leaflet-';
// Create sidebar container
var container = this._container =
L.DomUtil.create('div', l + 'sidebar ' + this.options.position);
// Style and attach content container
var content = this._contentContainer;
L.DomUtil.addClass(content, l + 'control');
container.appendChild(content);
// Create close button and attach it if configured
if (this.options.closeButton) {
var close = L.DomUtil.create('a', 'close', container);
close.innerHTML = '&times;';
L.DomEvent.on(close, 'click', function (e) {
sidebar.hide();
L.DomEvent.stopPropagation(e);
});
}
// Attach sidebar container to controls container
var controlContainer = map._controlContainer;
controlContainer.insertBefore(container, controlContainer.firstChild);
this._map = map;
return this;
},
removeFrom: function (map) {
// Remove sidebar container from controls container
var controlContainer = map._controlContainer;
controlContainer.removeChild(this._container);
return this;
},
isVisible: function () {
return L.DomUtil.hasClass(this._container, 'visible');
},
show: function () {
if (!this.isVisible()) {
L.DomUtil.addClass(this._container, 'visible');
//this._map.panBy([-this.getOffset() / 2, 0], {
// duration: 0.5
//});
this.fire("sidebar-show");
}
},
hide: function () {
if (this.isVisible()) {
L.DomUtil.removeClass(this._container, 'visible');
//this._map.panBy([this.getOffset() / 2, 0], {
// duration: 0.5
//});
this.fire("sidebar-hide");
}
},
toggle: function () {
if (this.isVisible()) {
this.hide();
} else {
this.show();
}
},
getContainer: function () {
return this._contentContainer;
},
setContent: function (content) {
this.getContainer().innerHTML = content;
return this;
},
getOffset: function () {
if (this.options.position === 'right') {
return -this._container.offsetWidth;
} else {
return this._container.offsetWidth;
}
}
});
L.control.sidebar = function (placeholder, options) {
return new L.Control.Sidebar(placeholder, options);
};

5733
gui-src/js/maps/proj4-src.js vendored Normal file
View File

File diff suppressed because it is too large Load Diff

227
gui-src/js/maps/proj4leaflet.js vendored Normal file
View File

@@ -0,0 +1,227 @@
(function (factory) {
var L, proj4;
if (typeof define === 'function' && define.amd) {
// AMD
define(['leaflet', 'proj4'], factory);
} else if (typeof module !== 'undefined') {
// Node/CommonJS
L = require('leaflet');
proj4 = require('proj4');
module.exports = factory(L, proj4);
} else {
// Browser globals
if (typeof window.L === 'undefined' || typeof window.proj4 === 'undefined')
throw "Leaflet and proj4 must be loaded first";
factory(window.L, window.proj4);
}
}(function (L, proj4) {
L.Proj = {};
L.Proj._isProj4Obj = function(a) {
return (typeof a['inverse'] !== 'undefined'
&& typeof a['forward'] !== 'undefined');
};
L.Proj.ScaleDependantTransformation = function(scaleTransforms) {
this.scaleTransforms = scaleTransforms;
}
L.Proj.ScaleDependantTransformation.prototype.transform = function(point, scale) {
return this.scaleTransforms[scale].transform(point, scale);
};
L.Proj.ScaleDependantTransformation.prototype.untransform = function(point, scale) {
return this.scaleTransforms[scale].untransform(point, scale);
};
L.Proj.Projection = L.Class.extend({
initialize: function(a, def) {
if (L.Proj._isProj4Obj(a)) {
this._proj = a;
} else {
var code = a;
if (def) {
proj4.defs(code, def);
} else if (proj4.defs[code] === undefined) {
var urn = code.split(':');
if (urn.length > 3)
code = urn[urn.length - 3] + ':' + urn[urn.length - 1];
if (proj4.defs[code] === undefined)
throw "No projection definition for code " + code;
}
this._proj = proj4(code);
}
},
project: function (latlng) {
var point = this._proj.forward([latlng.lng, latlng.lat]);
return new L.Point(point[0], point[1]);
},
unproject: function (point, unbounded) {
var point2 = this._proj.inverse([point.x, point.y]);
return new L.LatLng(point2[1], point2[0], unbounded);
}
});
L.Proj.CRS = L.Class.extend({
includes: L.CRS,
options: {
transformation: new L.Transformation(1, 0, -1, 0)
},
initialize: function(a, b, c) {
var code, proj, def, options;
if (L.Proj._isProj4Obj(a)) {
proj = a;
code = proj.srsCode;
options = b || {};
this.projection = new L.Proj.Projection(proj);
} else {
code = a;
def = b;
options = c || {};
this.projection = new L.Proj.Projection(code, def);
}
L.Util.setOptions(this, options);
this.code = code;
this.transformation = this.options.transformation;
if (this.options.origin) {
this.transformation =
new L.Transformation(1, -this.options.origin[0],
-1, this.options.origin[1]);
}
if (this.options.scales) {
this.scale = function(zoom) {
return this.options.scales[zoom];
}
} else if (this.options.resolutions) {
this.scale = function(zoom) {
return 1 / this.options.resolutions[zoom];
}
}
}
});
L.Proj.CRS.TMS = L.Proj.CRS.extend({
initialize: function(a, b, c, d) {
if (L.Proj._isProj4Obj(a)) {
var proj = a,
projectedBounds = b,
options = c || {};
options.origin = [projectedBounds[0], projectedBounds[3]];
L.Proj.CRS.prototype.initialize.call(this, proj, options);
} else {
var code = a,
def = b,
projectedBounds = c,
options = d || {};
options.origin = [projectedBounds[0], projectedBounds[3]];
L.Proj.CRS.prototype.initialize.call(this, code, def, options);
}
this.projectedBounds = projectedBounds;
}
});
L.Proj.TileLayer = {};
L.Proj.TileLayer.TMS = L.TileLayer.extend({
options: {
tms: true,
continuousWorld: true
},
initialize: function(urlTemplate, crs, options) {
var boundsMatchesGrid = true,
scaleTransforms,
upperY,
crsBounds;
if (!(crs instanceof L.Proj.CRS.TMS)) {
throw new Error("CRS is not L.Proj.CRS.TMS.");
}
L.TileLayer.prototype.initialize.call(this, urlTemplate, options);
this.crs = crs;
crsBounds = this.crs.projectedBounds;
// Verify grid alignment
for (var i = this.options.minZoom; i < this.options.maxZoom && boundsMatchesGrid; i++) {
var gridHeight = (crsBounds[3] - crsBounds[1]) /
this._projectedTileSize(i);
boundsMatchesGrid = Math.abs(gridHeight - Math.round(gridHeight)) > 1e-3;
}
if (!boundsMatchesGrid) {
scaleTransforms = {};
for (var i = this.options.minZoom; i < this.options.maxZoom; i++) {
upperY = crsBounds[1] + Math.ceil((crsBounds[3] - crsBounds[1]) /
this._projectedTileSize(i)) * this._projectedTileSize(i);
scaleTransforms[this.crs.scale(i)] = new L.Transformation(1, -crsBounds[0], -1, upperY);
}
this.crs = new L.Proj.CRS.TMS(this.crs.projection._proj, crsBounds, this.crs.options);
this.crs.transformation = new L.Proj.ScaleDependantTransformation(scaleTransforms);
}
},
getTileUrl: function(tilePoint, zoom) {
var gridHeight = Math.ceil(
(this.crs.projectedBounds[3] - this.crs.projectedBounds[1]) /
this._projectedTileSize(zoom)
);
return L.Util.template(this._url, L.Util.extend({
s: this._getSubdomain(tilePoint),
z: zoom,
x: tilePoint.x,
y: gridHeight - tilePoint.y - 1
}, this.options));
},
_projectedTileSize: function(zoom) {
return (this.options.tileSize / this.crs.scale(zoom));
}
});
L.Proj.GeoJSON = L.GeoJSON.extend({
initialize: function(geojson, options) {
if (geojson.crs && geojson.crs.type == 'name') {
var crs = new L.Proj.CRS(geojson.crs.properties.name)
options = options || {};
options.coordsToLatLng = function(coords) {
var point = L.point(coords[0], coords[1]);
return crs.projection.unproject(point);
};
}
L.GeoJSON.prototype.initialize.call(this, geojson, options);
}
});
L.Proj.geoJson = function(geojson, options) {
return new L.Proj.GeoJSON(geojson, options);
};
if (typeof L.CRS !== 'undefined') {
// This is left here for backwards compatibility
L.CRS.proj4js = (function () {
return function (code, def, transformation, options) {
options = options || {};
if (transformation) options.transformation = transformation;
return new L.Proj.CRS(code, def, options);
};
}());
}
return L.Proj;
}));

549
gui-src/js/maps/wkt.parser.js vendored Normal file
View File

@@ -0,0 +1,549 @@
/*
**
** taking only necessary pieces from
** https://raw.github.com/arthur-e/Wicket/master/wicket.src.js
**
*/
var Wkt = (function () { // Execute function immediately
var beginsWith, endsWith;
/**
* Returns true if the substring is found at the beginning of the string.
* @param str {String} The String to search
* @param sub {String} The substring of interest
* @return {Boolean}
* @private
*/
beginsWith = function (str, sub) {
return str.substring(0, sub.length) === sub;
};
/**
* Returns true if the substring is found at the end of the string.
* @param str {String} The String to search
* @param sub {String} The substring of interest
* @return {Boolean}
* @private
*/
endsWith = function (str, sub) {
return str.substring(str.length - sub.length) === sub;
};
return {
/**
* The default delimiter for separating components of atomic geometry (coordinates)
* @ignore
*/
delimiter: ' ',
/**
* Determines whether or not the passed Object is an Array.
* @param obj {Object} The Object in question
* @return {Boolean}
* @member Wkt.isArray
* @method
*/
isArray: function (obj) {
return !!(obj && obj.constructor === Array);
},
/**
* Removes given character String(s) from a String.
* @param str {String} The String to search
* @param sub {String} The String character(s) to trim
* @return {String} The trimmed string
* @member Wkt.trim
* @method
*/
trim: function (str, sub) {
sub = sub || ' '; // Defaults to trimming spaces
// Trim beginning spaces
while (beginsWith(str, sub)) {
str = str.substring(1);
}
// Trim ending spaces
while (endsWith(str, sub)) {
str = str.substring(0, str.length - 1);
}
return str;
},
/**
* An object for reading WKT strings and writing geographic features
* @constructor Wkt.Wkt
* @param initializer {String} An optional WKT string for immediate read
* @property {Array} components - Holder for atomic geometry objects (internal representation of geometric components)
* @property {String} delimiter - The default delimiter for separating components of atomic geometry (coordinates)
* @property {Object} regExes - Some regular expressions copied from OpenLayers.Format.WKT.js
* @property {String} type - The Well-Known Text name (e.g. 'point') of the geometry
* @property {Boolean} wrapVerticies - True to wrap vertices in MULTIPOINT geometries; If true: MULTIPOINT((30 10),(10 30),(40 40)); If false: MULTIPOINT(30 10,10 30,40 40)
* @return {Wkt.Wkt}
* @memberof Wkt
*/
Wkt: function (initializer) {
/**
* The default delimiter between X and Y coordinates.
* @ignore
*/
this.delimiter = Wkt.delimiter;
/**
* Configuration parameter for controlling how Wicket seralizes
* MULTIPOINT strings. Examples; both are valid WKT:
* If true: MULTIPOINT((30 10),(10 30),(40 40))
* If false: MULTIPOINT(30 10,10 30,40 40)
* @ignore
*/
this.wrapVertices = true;
/**
* Some regular expressions copied from OpenLayers.Format.WKT.js
* @ignore
*/
this.regExes = {
'typeStr': /^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,
'spaces': /\s+|\+/, // Matches the '+' or the empty space
'numeric': /-*\d+(\.*\d+)?/,
'comma': /\s*,\s*/,
'parenComma': /\)\s*,\s*\(/,
'coord': /-*\d+\.*\d+ -*\d+\.*\d+/, // e.g. "24 -14"
'doubleParenComma': /\)\s*\)\s*,\s*\(\s*\(/,
'trimParens': /^\s*\(?(.*?)\)?\s*$/
};
/**
* The internal representation of geometry--the "components" of geometry.
* @ignore
*/
this.components = undefined;
// An initial WKT string may be provided
if (initializer && typeof initializer === 'string') {
this.read(initializer);
} else if (initializer && typeof initializer !== undefined) {
this.fromObject(initializer);
}
}
};
}());
/**
* Returns true if the internal geometry is a collection of geometries.
* @return {Boolean} Returns true when it is a collection
* @memberof Wkt.Wkt
* @method
*/
Wkt.Wkt.prototype.isCollection = function () {
switch (this.type.slice(0, 5)) {
case 'multi':
// Trivial; any multi-geometry is a collection
return true;
case 'polyg':
// Polygons with holes are "collections" of rings
return true;
default:
// Any other geometry is not a collection
return false;
}
};
/**
* Compares two x,y coordinates for equality.
* @param a {Object} An object with x and y properties
* @param b {Object} An object with x and y properties
* @return {Boolean}
* @memberof Wkt.Wkt
* @method
*/
Wkt.Wkt.prototype.sameCoords = function (a, b) {
return (a.x === b.x && a.y === b.y);
};
/**
* Sets internal geometry (components) from framework geometry (e.g.
* Google Polygon objects or google.maps.Polygon).
* @param obj {Object} The framework-dependent geometry representation
* @return {Wkt.Wkt} The object itself
* @memberof Wkt.Wkt
* @method
*/
Wkt.Wkt.prototype.fromObject = function (obj) {
var result = this.deconstruct.call(this, obj);
this.components = result.components;
this.isRectangle = result.isRectangle || false;
this.type = result.type;
return this;
};
/**
* Creates external geometry objects based on a plug-in framework's
* construction methods and available geometry classes.
* @param config {Object} An optional framework-dependent properties specification
* @return {Object} The framework-dependent geometry representation
* @memberof Wkt.Wkt
* @method
*/
Wkt.Wkt.prototype.toObject = function (config) {
return this.construct[this.type].call(this, config);
};
/**
* Absorbs the geometry of another Wkt.Wkt instance, merging it with its own,
* creating a collection (MULTI-geometry) based on their types, which must agree.
* For example, creates a MULTIPOLYGON from a POLYGON type merged with another
<<<<<<< HEAD
* POLYGON type.
=======
* POLYGON type, or adds a POLYGON instance to a MULTIPOLYGON instance.
>>>>>>> dev
* @memberof Wkt.Wkt
* @method
*/
Wkt.Wkt.prototype.merge = function (wkt) {
var prefix = this.type.slice(0, 5);
if (this.type !== wkt.type) {
if (this.type.slice(5, this.type.length) !== wkt.type) {
throw TypeError('The input geometry types must agree or the calling Wkt.Wkt instance must be a multigeometry of the other');
}
}
switch (prefix) {
case 'point':
this.components = [this.components.concat(wkt.components)];
break;
case 'multi':
this.components = this.components.concat((wkt.type.slice(0, 5) === 'multi') ? wkt.components : [wkt.components]);
break;
default:
this.components = [
this.components,
wkt.components
]
break;
}
if (prefix !== 'multi') {
this.type = 'multi' + this.type;
}
};
/**
* Reads a WKT string, validating and incorporating it.
* @param wkt {String} A WKT string
* @return {Array} An Array of internal geometry objects
* @memberof Wkt.Wkt
* @method
*/
Wkt.Wkt.prototype.read = function (wkt) {
var matches;
matches = this.regExes.typeStr.exec(wkt);
if (matches) {
this.type = matches[1].toLowerCase();
this.base = matches[2];
if (this.ingest[this.type]) {
this.components = this.ingest[this.type].apply(this, [this.base]);
}
} else {
console.log("Invalid WKT string provided to read()");
throw {
name: "WKTError",
message: "Invalid WKT string provided to read()"
};
}
return this.components;
}; // eo readWkt
/**
* This object contains functions as property names that ingest WKT
* strings into the internal representation.
* @memberof Wkt.Wkt
* @namespace Wkt.Wkt.ingest
* @instance
*/
Wkt.Wkt.prototype.ingest = {
/**
* Return point feature given a point WKT fragment.
* @param str {String} A WKT fragment representing the point
* @memberof Wkt.Wkt.ingest
* @instance
*/
point: function (str) {
var coords = Wkt.trim(str).split(this.regExes.spaces);
// In case a parenthetical group of coordinates is passed...
return [{ // ...Search for numeric substrings
x: parseFloat(this.regExes.numeric.exec(coords[0])[0]),
y: parseFloat(this.regExes.numeric.exec(coords[1])[0])
}];
},
/**
* Return a multipoint feature given a multipoint WKT fragment.
* @param str {String} A WKT fragment representing the multipoint
* @memberof Wkt.Wkt.ingest
* @instance
*/
multipoint: function (str) {
var i, components, points;
components = [];
points = Wkt.trim(str).split(this.regExes.comma);
for (i = 0; i < points.length; i += 1) {
components.push(this.ingest.point.apply(this, [points[i]]));
}
return components;
},
/**
* Return a linestring feature given a linestring WKT fragment.
* @param str {String} A WKT fragment representing the linestring
* @memberof Wkt.Wkt.ingest
* @instance
*/
linestring: function (str) {
var i, multipoints, components;
// In our x-and-y representation of components, parsing
// multipoints is the same as parsing linestrings
multipoints = this.ingest.multipoint.apply(this, [str]);
// However, the points need to be joined
components = [];
for (i = 0; i < multipoints.length; i += 1) {
components = components.concat(multipoints[i]);
}
return components;
},
/**
* Return a multilinestring feature given a multilinestring WKT fragment.
* @param str {String} A WKT fragment representing the multilinestring
* @memberof Wkt.Wkt.ingest
* @instance
*/
multilinestring: function (str) {
var i, components, line, lines;
components = [];
lines = Wkt.trim(str).split(this.regExes.doubleParenComma);
if (lines.length === 1) { // If that didn't work...
lines = Wkt.trim(str).split(this.regExes.parenComma);
}
for (i = 0; i < lines.length; i += 1) {
line = lines[i].replace(this.regExes.trimParens, '$1');
components.push(this.ingest.linestring.apply(this, [line]));
}
return components;
},
/**
* Return a polygon feature given a polygon WKT fragment.
* @param str {String} A WKT fragment representing the polygon
* @memberof Wkt.Wkt.ingest
* @instance
*/
polygon: function (str) {
var i, j, components, subcomponents, ring, rings;
rings = Wkt.trim(str).split(this.regExes.parenComma);
components = []; // Holds one or more rings
for (i = 0; i < rings.length; i += 1) {
ring = rings[i].replace(this.regExes.trimParens, '$1').split(this.regExes.comma);
subcomponents = []; // Holds the outer ring and any inner rings (holes)
for (j = 0; j < ring.length; j += 1) {
// Split on the empty space or '+' character (between coordinates)
subcomponents.push({
x: parseFloat(ring[j].split(this.regExes.spaces)[0]),
y: parseFloat(ring[j].split(this.regExes.spaces)[1])
});
}
components.push(subcomponents);
}
return components;
},
/**
* Return a multipolygon feature given a multipolygon WKT fragment.
* @param str {String} A WKT fragment representing the multipolygon
* @memberof Wkt.Wkt.ingest
* @instance
*/
multipolygon: function (str) {
var i, components, polygon, polygons;
components = [];
polygons = Wkt.trim(str).split(this.regExes.doubleParenComma);
for (i = 0; i < polygons.length; i += 1) {
polygon = polygons[i].replace(this.regExes.trimParens, '$1');
components.push(this.ingest.polygon.apply(this, [polygon]));
}
return components;
},
/**
* Return an array of features given a geometrycollection WKT fragment.
* @param str {String} A WKT fragment representing the geometry collection
* @memberof Wkt.Wkt.ingest
* @instance
*/
geometrycollection: function (str) {
console.log('The geometrycollection WKT type is not yet supported.');
}
}; // eo ingest
/**
* @augments Wkt.Wkt
* Truncates an Array of coordinates by the closing coordinate when it is
* equal to the first coordinate given--this is only to be used for closed
* geometries in order to provide merely an "implied" closure to Leaflet.
* @param coords {Array} An Array of x,y coordinates (objects)
* @return {Array}
*/
Wkt.Wkt.prototype.trunc = function (coords) {
var i, verts = [];
for (i = 0; i < coords.length; i += 1) {
if (Wkt.isArray(coords[i])) {
verts.push(this.trunc(coords[i]));
} else {
// Add the first coord, but skip the last if it is identical
if (i === 0 || !this.sameCoords(coords[0], coords[i])) {
verts.push(coords[i]);
}
}
}
return verts;
};
/**
* @augments Wkt.Wkt
* An object of framework-dependent construction methods used to generate
* objects belonging to the various geometry classes of the framework.
*/
Wkt.Wkt.prototype.construct = {
/**
* Creates the framework's equivalent point geometry object.
* @param config {Object} An optional properties hash the object should use
* @param component {Object} An optional component to build from
* @return {L.marker}
*/
point: function (config, component) {
var coord = component || this.components;
if (coord instanceof Array) {
coord = coord[0];
}
return L.marker(this.coordsToLatLng(coord), config);
},
/**
* Creates the framework's equivalent multipoint geometry object.
* @param config {Object} An optional properties hash the object should use
* @return {L.featureGroup}
*/
multipoint: function (config) {
var i,
layers = [],
coords = this.components;
for (i = 0; i < coords.length; i += 1) {
layers.push(this.construct.point.call(this, config, coords[i]));
}
return L.featureGroup(layers, config);
},
/**
* Creates the framework's equivalent linestring geometry object.
* @param config {Object} An optional properties hash the object should use
* @param component {Object} An optional component to build from
* @return {L.polyline}
*/
linestring: function (config, component) {
var coords = component || this.components,
latlngs = this.coordsToLatLngs(coords);
return L.polyline(latlngs, config);
},
/**
* Creates the framework's equivalent multilinestring geometry object.
* @param config {Object} An optional properties hash the object should use
* @return {L.multiPolyline}
*/
multilinestring: function (config) {
var coords = this.components,
latlngs = this.coordsToLatLngs(coords, 1);
return L.multiPolyline(latlngs, config);
},
/**
* Creates the framework's equivalent polygon geometry object.
* @param config {Object} An optional properties hash the object should use
* @return {L.multiPolygon}
*/
polygon: function (config) {
// Truncate the coordinates to remove the closing coordinate
var coords = this.trunc(this.components),
latlngs = this.coordsToLatLngs(coords, 1);
return L.polygon(latlngs, config);
},
/**
* Creates the framework's equivalent multipolygon geometry object.
* @param config {Object} An optional properties hash the object should use
* @return {L.multiPolygon}
*/
multipolygon: function (config) {
// Truncate the coordinates to remove the closing coordinate
var coords = this.trunc(this.components),
latlngs = this.coordsToLatLngs(coords, 2);
return L.multiPolygon(latlngs, config);
},
/**
* Creates the framework's equivalent collection of geometry objects.
* @param config {Object} An optional properties hash the object should use
* @return {L.featureGroup}
*/
geometrycollection: function (config) {
var comps, i, layers;
comps = this.trunc(this.components);
layers = [];
for (i = 0; i < this.components.length; i += 1) {
layers.push(this.construct[comps[i].type].call(this, comps[i]));
}
return L.featureGroup(layers, config);
}
};
L.Util.extend(Wkt.Wkt.prototype, {
coordsToLatLngs: L.GeoJSON.coordsToLatLngs,
// TODO Why doesn't the coordsToLatLng function in L.GeoJSON already suffice?
coordsToLatLng: function (coords, reverse) {
var lat = reverse ? coords.x : coords.y,
lng = reverse ? coords.y : coords.x;
return L.latLng(lat, lng, true);
}
});

184
gui-src/js/search.js vendored Normal file
View File

@@ -0,0 +1,184 @@
// City Search Functionality
var citySearch = {
searchTimeout: null,
init: function() {
this.bindEvents();
},
bindEvents: function() {
var self = this;
// Search on button click
$('#search-btn').on('click', function() {
self.performSearch();
});
// Search on Enter key
$('#city-search').on('keypress', function(e) {
if (e.which === 13) { // Enter key
self.performSearch();
}
});
// Search as user types (debounced)
$('#city-search').on('input', function() {
clearTimeout(self.searchTimeout);
var query = $(this).val().trim();
if (query.length >= 3) {
self.searchTimeout = setTimeout(function() {
self.performSearch(query);
}, 500);
} else {
self.hideResults();
}
});
// Hide results when clicking outside
$(document).on('click', function(e) {
if (!$(e.target).closest('#search-container').length) {
self.hideResults();
}
});
},
performSearch: function(query) {
var self = this;
query = query || $('#city-search').val().trim();
if (query.length < 2) {
return;
}
this.showLoading();
// Use Nominatim geocoding service
var url = 'https://nominatim.openstreetmap.org/search';
var params = {
q: query,
format: 'json',
limit: 5,
addressdetails: 1,
extratags: 1,
'accept-language': 'en'
};
$.ajax({
url: url,
data: params,
method: 'GET',
timeout: 10000,
success: function(data) {
self.displayResults(data);
},
error: function() {
self.showError('Search failed. Please try again.');
}
});
},
showLoading: function() {
$('#search-results').html('<div class="search-loading">Searching...</div>').show();
},
showError: function(message) {
$('#search-results').html('<div class="search-no-results">' + message + '</div>').show();
},
hideResults: function() {
$('#search-results').hide();
},
displayResults: function(results) {
var self = this;
var $results = $('#search-results');
if (results.length === 0) {
$results.html('<div class="search-no-results">No cities found</div>').show();
return;
}
var html = '';
results.forEach(function(result) {
var displayName = result.display_name;
var nameParts = displayName.split(',');
var mainName = nameParts[0];
var details = nameParts.slice(1, 3).join(',');
html += '<div class="search-result-item" data-lat="' + result.lat + '" data-lon="' + result.lon + '">';
html += '<div class="search-result-name">' + self.escapeHtml(mainName) + '</div>';
html += '<div class="search-result-details">' + self.escapeHtml(details) + '</div>';
html += '</div>';
});
$results.html(html).show();
// Bind click events to results
$('.search-result-item').on('click', function() {
var lat = parseFloat($(this).data('lat'));
var lon = parseFloat($(this).data('lon'));
var name = $(this).find('.search-result-name').text();
self.goToLocation(lat, lon, name);
self.hideResults();
});
},
goToLocation: function(lat, lon, name) {
if (typeof map !== 'undefined' && map) {
// Clear existing bbox selection and spawn points
if (typeof drawnItems !== 'undefined' && drawnItems) {
drawnItems.clearLayers();
}
// Try to access bounds through the map layers or find the bounds rectangle
var boundsLayer = null;
map.eachLayer(function(layer) {
if (layer instanceof L.Rectangle && layer.options.color === '#3778d4') {
boundsLayer = layer;
}
});
if (boundsLayer) {
boundsLayer.setBounds(new L.LatLngBounds([0.0, 0.0], [0.0, 0.0]));
// Update the bbox display
if (typeof formatBounds === 'function') {
$('#boxbounds').text(formatBounds(boundsLayer.getBounds(), '4326'));
if (typeof currentproj !== 'undefined') {
$('#boxboundsmerc').text(formatBounds(boundsLayer.getBounds(), currentproj));
}
}
// Notify parent window of bbox update
if (typeof notifyBboxUpdate === 'function') {
notifyBboxUpdate();
}
}
// Simply zoom to location without adding markers or popups
map.setView([lat, lon], 12);
// Clear search box
$('#city-search').val('');
}
},
escapeHtml: function(text) {
var div = document.createElement('div');
div.textContent = text;
return div.innerHTML;
}
};
// Initialize search when document is ready
$(document).ready(function() {
// Wait a bit for the map to be initialized
setTimeout(function() {
if (typeof map !== 'undefined') {
citySearch.init();
}
}, 1000);
});

44
gui-src/locales/ar.json vendored Normal file
View File

@@ -0,0 +1,44 @@
{
"select_location": "اختيار موقع",
"zoom_in_and_choose": "قم بالتكبير واختر منطقتك باستخدام أداة المستطيل",
"select_world": "تحديد عالم",
"choose_world": "اختيار عالم",
"no_world_selected": "لم يتم تحديد عالم",
"start_generation": "بدء البناء",
"progress": "التقدم",
"custom_selection_confirmed": "تم تأكيد التحديد المخصص!",
"error_coordinates_out_of_range": "خطأ: الإحداثيات خارج النطاق أو مرتبة بشكل غير صحيح (مطلوب خط العرض قبل خط الطول).",
"invalid_format": "تنسيق غير صالح. استخدم 'lat,lng,lat,lng' أو 'lat lng lat lng'.",
"generation_process_started": "بدأت عملية البناء.",
"winter_mode": "وضع الشتاء",
"world_scale": "مقياس العالم",
"custom_bounding_box": "مربع الحدود المخصص",
"floodfill_timeout": "مهلة ملء الفيضان (ثواني)",
"ground_level": "مستوى الأرض",
"choose_world_modal_title": "اختيار عالم",
"select_existing_world": "اختيار عالم موجود مسبقًا",
"generate_new_world": "إنشاء عالم جديد",
"customization_settings": "إعدادات التخصيص",
"footer_text": "© {year} Arnis v{version} من louis-e",
"new_version_available": "هناك نسخة جديدة متاحة! انقر هنا لتنزيلها.",
"minecraft_directory_not_found": "لم يتم العثور على مجلد ماين كرافت",
"world_in_use": "العالم المحدد قيد الاستخدام حاليًا",
"failed_to_create_world": "حدث خطأ عند محاولة إنشاء عالم جديد",
"no_world_selected_error": "لم يتم تحديد عالم",
"select_minecraft_world_first": "يرجى تحديد عالم ماين كرافت أولاً!",
"select_location_first": "يرجى اختيار موقع أولاً!",
"area_too_large": "تُعتبر هذه المنطقة كبيرة جدًا وقد تتجاوز حدود الحوسبة النموذجية.",
"area_extensive": "المنطقة واسعة جدًا وقد تتطلب الكثير من الوقت والموارد.",
"selection_confirmed": "تم تأكيد التحديد!",
"unknown_error": "خطأ غير معروف",
"license_and_credits": "الرخصة والمساهمون",
"placeholder_bbox": "الصيغة: lat,lng,lat,lng",
"placeholder_floodfill": "ثوانٍ",
"placeholder_ground": "مستوى الأرض",
"language": "اللغة",
"map_theme": "موضوع الخريطة",
"terrain": "التضاريس",
"interior": "توليد الداخلية",
"roof": "توليد السقف",
"fillground": "ملء الأرض"
}

44
gui-src/locales/de.json vendored Normal file
View File

@@ -0,0 +1,44 @@
{
"select_location": "Standort auswählen",
"zoom_in_and_choose": "Zoome hinein und wähle dein Gebiet aus",
"select_world": "Welt auswählen",
"choose_world": "Welt wählen",
"no_world_selected": "Keine Welt ausgewählt",
"start_generation": "Generierung starten",
"progress": "Fortschritt",
"custom_selection_confirmed": "Benutzerdefinierte Auswahl bestätigt!",
"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",
"choose_world_modal_title": "Welt wählen",
"select_existing_world": "Vorhandene Welt auswählen",
"generate_new_world": "Neue Welt generieren",
"customization_settings": "Einstellungen",
"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",
"world_in_use": "Die ausgewählte Welt ist gerade in Benutzung",
"failed_to_create_world": "Neue Welt konnte nicht erstellt werden",
"no_world_selected_error": "Keine Welt ausgewählt",
"select_minecraft_world_first": "Wähle zuerst eine Minecraft Welt aus!",
"select_location_first": "Wähle zuerst einen Standort aus!",
"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",
"placeholder_bbox": "Format: lat,lng,lat,lng",
"placeholder_floodfill": "Sekunden",
"placeholder_ground": "Bodenhöhe",
"language": "Sprache",
"map_theme": "Kartenstil",
"terrain": "Terrain",
"interior": "Innenraum Generierung",
"roof": "Dach Generierung",
"fillground": "Boden füllen"
}

Some files were not shown because too many files have changed in this diff Show More