895 Commits

Author SHA1 Message Date
Birk Skyum
d05143abd2
onboarding checklist (#323) 2024-11-29 05:43:33 +01:00
Max Ammann
5146e6a36d
Fix WASM loading (#320)
* Rename send to send_back and remove use of Promise

* Fix bug where wasm loading fails

* Bump memory for multi threading
2024-11-07 00:56:45 +01:00
Max Ammann
a9dc4a066b
Update GH actions (#321) 2024-11-06 21:39:47 +00:00
Max Ammann
f31e18a1f1
Update NDK (#322)
* Update NDK
2024-11-06 21:01:12 +01:00
Max Ammann
c0032f9597
Update ndk version (#318) 2024-09-01 16:27:55 +01:00
Kyler Chin
9b295f2993
Small spelling correction (#317) 2024-08-29 15:37:05 +01:00
Max Ammann
c3201f79e0
Handle zero width or height (#315)
* Avoid resizing when width or height is zero
2024-08-05 21:01:15 +01:00
Max Ammann
3dcec8f07b
Document minimum Safari version (#313) 2024-07-26 15:41:25 +00:00
Max Ammann
2635a424c9
Upgrade dependencies (#312)
* Upgrade dependencies

* Update npm libraries
2024-07-23 22:12:53 +00:00
Max Ammann
74d76a1460
Fix the control flow exception on web (#309) 2024-07-23 22:23:13 +02:00
Max Ammann
b5f5f9712f
Upgrade wgpu to 22 (#311) 2024-07-23 22:22:38 +02:00
Max Ammann
784604e0b9
Update Rust to 1.79 (#310) 2024-07-23 16:02:07 +00:00
Max Ammann
151ee9fb77
Improve and fix http cache & add offscreen kernel config (#307)
* Switch HTTP cache crate

* Set compiler on linux

* Start work on offscreen kernel sharing

* Finish basic config sharing mechanism on web and native; not really used on web so far though
2024-07-23 16:08:57 +02:00
Brian Misiak
972fd528c9
Update README to mention Safari TP (#304)
Happy to report that it works in Safari Technology Preview now.
2024-07-06 14:07:45 +02:00
Max Ammann
de7d18103a
Update winit and wgpu (#303)
* Update winit and wgpu which both target rwh 0.6

* Upgrade to winit 0.30 to fix android crash https://github.com/bevyengine/bevy/issues/13331

* Add Carbon framework to desktop builds and improve build script to use nix if available

* Fix swift package and compilaiton with Nix

* Cleanup nix shell

* Avoid setting the size on the canvas, winit resizes now

* Handle fetch errors for web
2024-07-05 00:48:42 +02:00
Max Ammann
c974e22aa2
Fix builds (#301)
* Update and fix nix shell

* Upgrade NDK to a version available on GitHub Actions

* Fix web wasm-bindgen script

* Update nightly version aswell

* Fix wasm-bindgen version and lint

* Fix imports

* Upgrade wgpu to be compatible with new web-sys version, which was required due to the bump in the rust version which was required due to clap

* Fix tests
2024-03-14 12:14:17 +00:00
Salvatore Testa
a8be3cf736
Demo working again (#300)
* Bump to Rust 1.76

Closes https://github.com/maplibre/maplibre-rs/issues/298

* Remove unused import `super::noweb::trace::*`

When trying to compile, the following error pops up.

```
error: unused import: `super::noweb::trace::*`
  --> maplibre/src/platform/mod.rs:26:13
   |
26 |     pub use super::noweb::trace::*;
   |             ^^^^^^^^^^^^^^^^^^^^^^
   |
```
2024-03-13 20:31:35 +00:00
Max Ammann
095d5fbbfb
Disable right clicks on canvas (#295) 2023-10-20 20:29:49 +00:00
Max Ammann
8b3c9ef7d0
Fix hidpi on web (#294)
* Set wasm-bindgen version

* Expose scaling factor
2023-10-12 21:04:30 +02:00
Max Ammann
ad95f7665f
Initial support for hidpi (#293)
* Start work on hidpi support

* Introduce maplibre physical and logical size types
2023-10-12 11:42:58 +02:00
Max Ammann
10b0e10ad3
Remove links 2023-10-12 10:01:48 +02:00
Max Ammann
c45cc55bcd
Render fixes (#292)
* Simplify message logging

* Fix setting Z in shaders

* Update debug plugin usage

* Log up to trace messages when run through jetbrains

* Filter duplicate tiles in tile patterns

* Add trace statement
2023-10-09 13:04:51 +01:00
Max Ammann
9d075527c6
Update npm packages (#290)
* Updated dependencies
* Removed watch mode because of esbuild update
* Set spectorjs to fixed version because of https://github.com/BabylonJS/Spector.js/issues/286
2023-10-06 12:44:43 +02:00
Max Ammann
1222790c76
Bump Rust to 0.73 (#289) 2023-10-06 12:43:20 +02:00
Max Ammann
fa2c436f74
Transform improvements (#233)
This fundamentally reworks how the far distance plane is calculated. First I wanted to implement it like in maplibre-gl-js. Though that appraoch did not allow yaw AND pitch in both directions. It only allowed pitch in a single direction (only 90°, not the full 180°).

The new approach is dicussed here: https://gamedev.stackexchange.com/questions/207328/calculation-of-far-distance-plane-based-on-yaw-and-pitch-for-a-map-renderer

It works in all directions and should also be way faster to calculate.

This PR also fixes the amount of tiles that are whown for the current zoom. If calculates the appropriate zoom level based on the current zoom and takes into account the resolution of tiles.

* Introduce tile size based zoom level

* Add debug handler for testing insets

* Adjust handlers

* Set fov to that of maplibre-gl-js

* Move view projection calculation to view_state

* Increase thickness of debug lines

* Increase DEFAULT_TILE_VIEW_PATTERN_SIZE

* Fix mdbook script

* Enable debug plugin only in debug-like modes

* Move view_state to render module

* Remove 3D terrain specific code for transform

* Remove overwriting z

* Start to change camera movement

* Change camera transformation to rotate around (x,y,0) instead of (x,y,camera_height)

* Add all insets to debug handler

* First completely working version which can yaw, pitch and roll

* Update distance calculation

* Set max/min pitch/yaw to 30

* Test stackoverflow approach

* Fix far z with moved center

* Use default instead of ::new
2023-10-06 12:42:38 +02:00
Max Ammann
db2acb1fce
Upgrade winit to window resizing on macOS and upgrade Android setup (#287)
* Upgrade winit to window resizes on macOS

* Use native activity feature

* Update intellij file

* Configure winit correctly

* Fix android

* Fix android backend to GL

* Depend on SystemConfiguration in swift and example target

* Rename functions
2023-10-05 03:04:42 +00:00
Yuri Astrakhan
04ff0882a3
Chore: upgrade deps (#286)
* upgrade deps, fix keywords/categories

* just fmt

* remove backends in wgpu
2023-09-24 10:11:29 +02:00
Yuri Astrakhan
e3c398b9a9
chore: bump all deps to latest versions (#282) 2023-06-03 10:04:36 +02:00
Yuri Astrakhan
6945ca0fd0
chore: Consolidate dependency version mgmt (#281)
Move all dependencies to workspace so that we can keep all versions across packages in one spot.

See https://doc.rust-lang.org/cargo/reference/workspaces.html#the-dependencies-table
2023-05-31 10:12:07 +02:00
Yuri Astrakhan
2109477daa
chore: Inline format args (#285) 2023-05-30 22:14:44 +02:00
Yuri Astrakhan
a6bd26ad9c
Merge pull request #280 from nyurik/fmt-just
Format justfile using just's own --fmt
2023-05-26 14:49:43 -04:00
Yuri Astrakhan
3e2dab0a3d add fmt to just 2023-05-26 14:02:24 -04:00
Yuri Astrakhan
72d75e9561 Run just --fmt
Ran `just --fmt --unstable` to normalize justfile
2023-05-26 14:00:20 -04:00
Yuri Astrakhan
229ff6fa09 add spaces in just param 2023-05-26 14:00:20 -04:00
Yuri Astrakhan
b03a397126
Fix apache license file (#279)
This makes github detect license correctly.
Note that our Martin, as well as Rust lang itself has exactly this
approach
2023-05-24 09:09:08 +02:00
Max Ammann
90872eb0c4
Update wgpu to 0.16 (#277) 2023-04-22 11:03:05 -04:00
Yuri Astrakhan
c7f93b10b7
Spell fixes, possibly breaking "Uninizalized" rename (#271)
* Spell fixes, possibly breaking "Uninizalized" rename

A few minor tweaks, including `InitializationResult` enum and `unwarp_renderer` spelling fixes

---------

Co-authored-by: Max Ammann <max@maxammann.org>
2023-04-12 21:22:03 +00:00
Max Ammann
7d1fb6e663
Fix webgpu demo (https://github.com/gfx-rs/wgpu/pull/3670) (#275) 2023-04-12 19:35:19 +00:00
Max Ammann
4945edcd0b
Upgrade to wgpu from this PR: gfx-rs/wgpu#3657 (#272) 2023-04-10 23:53:19 +00:00
Max Ammann
bca19c8ace
Upgrade wgpu to 0.15.1 (#250)
* Apply changes for wgpu 0.15

* Add msaa detection

* Enable msaa by default

* Add simplified diagram

* Resolve some unwraps
2023-04-09 02:54:40 +00:00
Max Ammann
28573ce470
Fix shaders for Chrome 113 (#270) 2023-04-08 22:27:39 +00:00
Max Ammann
04eca4b196
Add basic nix shell and direnv config (working on macOS) (#268)
* Add basic nix shell (working on macOS)

* Add direnv format
2023-04-08 17:28:28 -04:00
Max Ammann
e390884221
Upgrade Rust to nightly-2023-03-29 and 1.68 (#269) 2023-04-08 16:48:15 -04:00
Tristram Gräbener
669ccef4c6
Dead code: MinMaxBoundingBox (#266)
* remove unused struct 

* remove unused destructured parameters
2023-02-27 10:50:20 -04:00
Tristram Gräbener
5cd3e503cc
Remove unwrap from write_png (#261)
* Remove unwrap from write_png

---------

Co-authored-by: Max Ammann <maximilian.ammann@trailofbits.com>
2023-02-27 14:38:15 +01:00
Tristram Gräbener
1fc7c4f7a9
Debug line now have same pixel width (#255)
Closes #230
2023-02-18 21:06:24 +01:00
Max Ammann
63da707210
Introduce Plugin API along with Raster Tiles (#253)
* Implement basic raster rendering

* Fix web builds for raster rendering (e.g. APC)

* Implement plugin system using a "Tile Component System" pattern heavily inspired by bevy

* Remove tile_repository and integrate into world structures

* Migrate from specific stages to systems

* Introduce a RasterPlugin and VectorPlugin

* Add feature gate for headless rendering to demo

* Remove pipelines for simplicity

* Add message tags using Labels

* Add run config

* Add show bash path for Windows CI

* Do not use symlinks for cargo binstall

* Introduce DebugPlugin

* Introduce HeadlessPlugin

* Add more layers to vector processing benchmark

---------

Co-authored-by: Quillasp <soulaymane.lamrani@heig-vd.ch>
Co-authored-by: Antoine Drabble <antoine.drabble@gmail.com>
2023-02-18 12:56:56 +01:00
Max Ammann
f57ddef09f
Use post Message from geozero (#249) 2023-01-29 16:13:38 +01:00
Yuri Astrakhan
5b9bcbd0b0
Make warning more detailed (#243) 2023-01-23 11:10:00 +01:00
Tristram Gräbener
021376acaf
Simplify and move Stencil reference functions (#241)
* TileViewPattern: simplify the stencil_reference matching

* Move stencil_reference_value_?d from TileViewPattern to WorldTileCoords

* Remove no longer used stencil_reference_value_2d function

The 2d version of calculating the stencil value is only valid for cases where only tiles from exactly one zoom level are displayed at once.
As soon as multiple zoom levels are presented at once, the stencil value needs to be distinct across zoom levels
2023-01-16 21:38:47 +01:00