mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
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
35 lines
979 B
Nix
35 lines
979 B
Nix
# This nix-shell only supports macOS right now. Soon I will also add support for Linux
|
|
# The repository supports direnv (https://direnv.net/). If your IDE supports direnv,
|
|
# then you do not need to care about dependencies.
|
|
|
|
{ pkgs ? import <nixpkgs> { } }:
|
|
with pkgs;
|
|
let
|
|
unstable = import
|
|
(builtins.fetchTarball {
|
|
url = "https://github.com/NixOS/nixpkgs/archive/075dce259f6ced5cee1226dd76474d0674b54e64.tar.gz";
|
|
})
|
|
{ };
|
|
in
|
|
pkgs.mkShell {
|
|
nativeBuildInputs = [
|
|
# Tools
|
|
unstable.rustup
|
|
unstable.just
|
|
unstable.nodejs
|
|
unstable.mdbook
|
|
unstable.wasm-bindgen-cli
|
|
unstable.tracy
|
|
unstable.nixpkgs-fmt # To format this file: nixpkgs-fmt *.nix
|
|
# System dependencies
|
|
unstable.flatbuffers
|
|
unstable.protobuf
|
|
]
|
|
++ lib.optionals stdenv.isDarwin [
|
|
unstable.libiconv
|
|
pkgs.darwin.apple_sdk.frameworks.ApplicationServices
|
|
pkgs.darwin.apple_sdk.frameworks.CoreVideo
|
|
pkgs.darwin.apple_sdk.frameworks.AppKit
|
|
];
|
|
}
|