PlanetX Lite 0.22.0 - a 3D globe in Rust and wgpu for desktop and WebAssembly, now with GIS file layers

2026-11-05来源 Rust Users ForumEnglish
PlanetX Lite 0.22.0 - a 3D globe in Rust and wgpu for desktop and WebAssembly, now with GIS file layers

PlanetX Lite is a 3D globe viewer. One Cargo workspace builds a desktop program for Windows, Linux and macOS and the same program for wasm32-unknown-unknown as a web page:

It shows terrain, imagery and labels, opens KML/KMZ and scenes from our QGIS plugin, plays tours and shows point clouds and 3D models. Version 0.22.0 adds vector file layers - GeoPackage, Shapefile, GeoJSON, GPX, GML, MapInfo, FlatGeobuf, DXF and DWG - with styles, labels by a field and extrusion by a number field.

Some details that may be of interest:

  • Rendering is wgpu, the same code on desktop and in the browser.
    • World coordinates are ECEF on WGS84 in f64. The GPU only gets offsets from tile centres and an eye-relative matrix, so there is no float32 jitter at street level.
    • XYZ Web Mercator tiles, levels chosen by screen-space error with a 1.5 px threshold, skirts at tile edges. A tile is replaced by its children only when they are ready, so there are no holes by construction.
    • Camera flights use the van Wijk-Nuij method.
    • Network never blocks the main thread, also on the web. Time is web_time, not std::time.
    • Add-ins are WebAssembly modules run by wasmi in a sandbox with a narrow versioned API, in the program and on the page.
    • Input files are treated as hostile. There is no unsafe, unwrap, expect or panic! in production code.
    • File formats are read with the terrio crate.
      License Apache 2.0. Builds are not signed yet, so Windows and macOS warn on first start.

Source and downloads: GitHub - Valery35/planetx-lite: 3D globe in Rust for Windows, Linux, macOS and the browser - terrain, imagery, KML/KMZ, tours, GeoPackage, Shapefile, GeoJSON, DXF layers, point clouds and 3D models · GitHub

Feedback on the architecture is welcome.

1 post - 1 participant

Read full topic

原文:https://www.a8q9.cn/en/article/planetx-lite-0-22-0-a-3d-globe-in-rust-and-wgpu-for-desktop-and-webassembly-now--d7fdd9.html

相关文章