mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
Deploying to gh-pages from @ maplibre/maplibre-rs@c7f93b10b7 🚀
This commit is contained in:
parent
b8e5eb4c7e
commit
c3da750fa7
@ -1,14 +1,13 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Provides utilities related to coordinates."><meta name="keywords" content="rust, rustlang, rust-lang, coords"><title>maplibre::coords - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../../maplibre/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../maplibre/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Module coords</a></h2><div class="sidebar-elems"><section><div class="block"><ul><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li><li><a href="#functions">Functions</a></li></ul></div></section></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../maplibre/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">maplibre</a>::<wbr><a class="mod" href="#">coords</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/maplibre/coords.rs.html#1-782">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Provides utilities related to coordinates.</p>
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Provides utilities related to coordinates."><meta name="keywords" content="rust, rustlang, rust-lang, coords"><title>maplibre::coords - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../../maplibre/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../maplibre/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Module coords</a></h2><div class="sidebar-elems"><section><div class="block"><ul><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li><li><a href="#functions">Functions</a></li></ul></div></section></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../maplibre/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">maplibre</a>::<wbr><a class="mod" href="#">coords</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/maplibre/coords.rs.html#1-781">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Provides utilities related to coordinates.</p>
|
||||
</div></details><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.AlignedWorldTileCoords.html" title="maplibre::coords::AlignedWorldTileCoords struct">AlignedWorldTileCoords</a></div><div class="item-right docblock-short">An aligned world tile coordinate aligns a world coordinate at a 4x4 tile raster within the
|
||||
world. The aligned coordinates is defined by the coordinates of the upper left tile in the 4x4
|
||||
tile raster divided by 2 and rounding to the ceiling.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.InnerCoords.html" title="maplibre::coords::InnerCoords struct">InnerCoords</a></div><div class="item-right docblock-short">Within each tile there is a separate coordinate system. Usually this coordinate system is
|
||||
within <a href="constant.EXTENT.html" title="crate::coords::EXTENT"><code>crate::coords::EXTENT</code></a>. Therefore, <code>x</code> and <code>y</code> must be within the bounds of
|
||||
<a href="constant.EXTENT.html" title="crate::coords::EXTENT"><code>crate::coords::EXTENT</code></a>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.LatLon.html" title="maplibre::coords::LatLon struct">LatLon</a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Quadkey.html" title="maplibre::coords::Quadkey struct">Quadkey</a></div><div class="item-right docblock-short">Represents the position of a node within a quad tree. The first u8 defines the <code>ZoomLevel</code> of the node.
|
||||
within <a href="constant.EXTENT.html" title="EXTENT"><code>EXTENT</code></a>. Therefore, <code>x</code> and <code>y</code> must be within the bounds of <a href="constant.EXTENT.html" title="EXTENT"><code>EXTENT</code></a>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.LatLon.html" title="maplibre::coords::LatLon struct">LatLon</a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Quadkey.html" title="maplibre::coords::Quadkey struct">Quadkey</a></div><div class="item-right docblock-short">Represents the position of a node within a quad tree. The first u8 defines the <code>ZoomLevel</code> of the node.
|
||||
The remaining bytes define which part (north west, south west, south east, north east) of each
|
||||
subdivision of the quadtree is concerned.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.TileCoords.html" title="maplibre::coords::TileCoords struct">TileCoords</a></div><div class="item-right docblock-short">Every tile has tile coordinates. These tile coordinates are also called
|
||||
<a href="https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames">Slippy map tilenames</a>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ViewRegion.html" title="maplibre::coords::ViewRegion struct">ViewRegion</a></div><div class="item-right docblock-short">Defines a bounding box on a tiled map with a <a href="struct.ZoomLevel.html" title="ZoomLevel"><code>ZoomLevel</code></a> and a padding.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.WorldCoords.html" title="maplibre::coords::WorldCoords struct">WorldCoords</a></div><div class="item-right docblock-short">Actual coordinates within the 3D world. The <code>z</code> value of the [<code>WorldCoors</code>] is not related to
|
||||
<a href="https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames">Slippy map tile names</a>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ViewRegion.html" title="maplibre::coords::ViewRegion struct">ViewRegion</a></div><div class="item-right docblock-short">Defines a bounding box on a tiled map with a <a href="struct.ZoomLevel.html" title="ZoomLevel"><code>ZoomLevel</code></a> and a padding.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.WorldCoords.html" title="maplibre::coords::WorldCoords struct">WorldCoords</a></div><div class="item-right docblock-short">Actual coordinates within the 3D world. The <code>z</code> value of the [<code>WorldCoors</code>] is not related to
|
||||
the <code>z</code> value of the [<code>WorldTileCoors</code>]. In the 3D world all tiles are rendered at <code>z</code> values
|
||||
which are determined only by the render engine and not by the zoom level.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.WorldTileCoords.html" title="maplibre::coords::WorldTileCoords struct">WorldTileCoords</a></div><div class="item-right docblock-short">Every tile has tile coordinates. Every tile coordinate can be mapped to a coordinate within
|
||||
the world. This provides the freedom to map from <a href="https://wiki.openstreetmap.org/wiki/TMS">TMS</a>
|
||||
to <a href="https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames">Slippy_map_tilenames</a>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Zoom.html" title="maplibre::coords::Zoom struct">Zoom</a></div><div class="item-right docblock-short"><code>Zoom</code> is an exponential scale that defines the zoom of the camera on the map.
|
||||
to <a href="https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames">Slippy map tile names</a>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Zoom.html" title="maplibre::coords::Zoom struct">Zoom</a></div><div class="item-right docblock-short"><code>Zoom</code> is an exponential scale that defines the zoom of the camera on the map.
|
||||
We can derive the <code>ZoomLevel</code> from <code>Zoom</code> by using the <code>[crate::coords::ZOOM_BOUNDS]</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ZoomLevel.html" title="maplibre::coords::ZoomLevel struct">ZoomLevel</a></div></div></div><h2 id="constants" class="small-section-header"><a href="#constants">Constants</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.EXTENT.html" title="maplibre::coords::EXTENT constant">EXTENT</a></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.EXTENT_SINT.html" title="maplibre::coords::EXTENT_SINT constant">EXTENT_SINT</a></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.EXTENT_UINT.html" title="maplibre::coords::EXTENT_UINT constant">EXTENT_UINT</a></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.MAX_ZOOM.html" title="maplibre::coords::MAX_ZOOM constant">MAX_ZOOM</a></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.TILE_SIZE.html" title="maplibre::coords::TILE_SIZE constant">TILE_SIZE</a></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.ZOOM_BOUNDS.html" title="maplibre::coords::ZOOM_BOUNDS constant">ZOOM_BOUNDS</a></div></div></div><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.create_zoom_bounds.html" title="maplibre::coords::create_zoom_bounds fn">create_zoom_bounds</a><span title="Restricted Visibility"> 🔒</span> </div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="maplibre" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0 (897e37553 2022-11-02)" ></div></body></html>
|
||||
@ -1 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"constant":[["EXTENT",""],["EXTENT_SINT",""],["EXTENT_UINT",""],["MAX_ZOOM",""],["TILE_SIZE",""],["ZOOM_BOUNDS",""]],"fn":[["create_zoom_bounds",""]],"struct":[["AlignedWorldTileCoords","An aligned world tile coordinate aligns a world coordinate at a 4x4 tile raster within the world. The aligned coordinates is defined by the coordinates of the upper left tile in the 4x4 tile raster divided by 2 and rounding to the ceiling."],["InnerCoords","Within each tile there is a separate coordinate system. Usually this coordinate system is within [`crate::coords::EXTENT`]. Therefore, `x` and `y` must be within the bounds of [`crate::coords::EXTENT`]."],["LatLon",""],["Quadkey","Represents the position of a node within a quad tree. The first u8 defines the `ZoomLevel` of the node. The remaining bytes define which part (north west, south west, south east, north east) of each subdivision of the quadtree is concerned."],["TileCoords","Every tile has tile coordinates. These tile coordinates are also called Slippy map tilenames."],["ViewRegion","Defines a bounding box on a tiled map with a [`ZoomLevel`] and a padding."],["WorldCoords","Actual coordinates within the 3D world. The `z` value of the [`WorldCoors`] is not related to the `z` value of the [`WorldTileCoors`]. In the 3D world all tiles are rendered at `z` values which are determined only by the render engine and not by the zoom level."],["WorldTileCoords","Every tile has tile coordinates. Every tile coordinate can be mapped to a coordinate within the world. This provides the freedom to map from TMS to Slippy_map_tilenames."],["Zoom","`Zoom` is an exponential scale that defines the zoom of the camera on the map. We can derive the `ZoomLevel` from `Zoom` by using the `[crate::coords::ZOOM_BOUNDS]`."],["ZoomLevel",""]]};
|
||||
window.SIDEBAR_ITEMS = {"constant":[["EXTENT",""],["EXTENT_SINT",""],["EXTENT_UINT",""],["MAX_ZOOM",""],["TILE_SIZE",""],["ZOOM_BOUNDS",""]],"fn":[["create_zoom_bounds",""]],"struct":[["AlignedWorldTileCoords","An aligned world tile coordinate aligns a world coordinate at a 4x4 tile raster within the world. The aligned coordinates is defined by the coordinates of the upper left tile in the 4x4 tile raster divided by 2 and rounding to the ceiling."],["InnerCoords","Within each tile there is a separate coordinate system. Usually this coordinate system is within [`EXTENT`]. Therefore, `x` and `y` must be within the bounds of [`EXTENT`]."],["LatLon",""],["Quadkey","Represents the position of a node within a quad tree. The first u8 defines the `ZoomLevel` of the node. The remaining bytes define which part (north west, south west, south east, north east) of each subdivision of the quadtree is concerned."],["TileCoords","Every tile has tile coordinates. These tile coordinates are also called Slippy map tile names."],["ViewRegion","Defines a bounding box on a tiled map with a [`ZoomLevel`] and a padding."],["WorldCoords","Actual coordinates within the 3D world. The `z` value of the [`WorldCoors`] is not related to the `z` value of the [`WorldTileCoors`]. In the 3D world all tiles are rendered at `z` values which are determined only by the render engine and not by the zoom level."],["WorldTileCoords","Every tile has tile coordinates. Every tile coordinate can be mapped to a coordinate within the world. This provides the freedom to map from TMS to Slippy map tile names."],["Zoom","`Zoom` is an exponential scale that defines the zoom of the camera on the map. We can derive the `ZoomLevel` from `Zoom` by using the `[crate::coords::ZOOM_BOUNDS]`."],["ZoomLevel",""]]};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -2,7 +2,7 @@
|
||||
<p>A multi-platform library for rendering vector tile maps with WebGPU.</p>
|
||||
<p>Maplibre-rs is a map renderer that can run natively on MacOS, Linux, Windows, Android, iOS and the web.
|
||||
It takes advantage of Lyon to tessellate vector tiles and WebGPU to display them efficiently.
|
||||
Maplibre-rs also has an headless mode (<em>work in progress</em>) that can generate rasters.</p>
|
||||
Maplibre-rs also has an headless mode (<em>work in progress</em>) that can generate raster images.</p>
|
||||
<p>The official guide book can be found <a href="https://maplibre.org/maplibre-rs/docs/book/">here</a>.</p>
|
||||
<h4 id="example"><a href="#example">Example</a></h4>
|
||||
<p>To import maplibre-rs in your <code>Cargo.toml</code>:</p>
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `graph` mod in crate `maplibre`."><meta name="keywords" content="rust, rustlang, rust-lang, graph"><title>maplibre::render::graph::graph - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../../../normalize.css"><link rel="stylesheet" href="../../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../../../ayu.css" disabled><link rel="stylesheet" href="../../../../dark.css" disabled><link rel="stylesheet" href="../../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../../storage.js"></script><script defer src="../../../../main.js"></script><noscript><link rel="stylesheet" href="../../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../../favicon.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../../../../maplibre/index.html"><div class="logo-container"><img class="rust-logo" src="../../../../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../../../maplibre/index.html"><div class="logo-container"><img class="rust-logo" src="../../../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Module graph</a></h2><div class="sidebar-elems"><section><div class="block"><ul><li><a href="#structs">Structs</a></li></ul></div></section></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../../maplibre/index.html"><img class="rust-logo" src="../../../../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Module <a href="../../../index.html">maplibre</a>::<wbr><a href="../../index.html">render</a>::<wbr><a href="../index.html">graph</a>::<wbr><a class="mod" href="#">graph</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../../../src/maplibre/render/graph/graph.rs.html#1-761">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.GraphInputNode.html" title="maplibre::render::graph::graph::GraphInputNode struct">GraphInputNode</a></div><div class="item-right docblock-short">A <a href="../node/trait.Node.html" title="Node"><code>Node</code></a> which acts as an entry point for a <a href="struct.RenderGraph.html" title="RenderGraph"><code>RenderGraph</code></a> with custom inputs.
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `graph` mod in crate `maplibre`."><meta name="keywords" content="rust, rustlang, rust-lang, graph"><title>maplibre::render::graph::graph - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../../../normalize.css"><link rel="stylesheet" href="../../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../../../ayu.css" disabled><link rel="stylesheet" href="../../../../dark.css" disabled><link rel="stylesheet" href="../../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../../storage.js"></script><script defer src="../../../../main.js"></script><noscript><link rel="stylesheet" href="../../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../../favicon.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../../../../maplibre/index.html"><div class="logo-container"><img class="rust-logo" src="../../../../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../../../maplibre/index.html"><div class="logo-container"><img class="rust-logo" src="../../../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Module graph</a></h2><div class="sidebar-elems"><section><div class="block"><ul><li><a href="#structs">Structs</a></li></ul></div></section></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../../maplibre/index.html"><img class="rust-logo" src="../../../../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Module <a href="../../../index.html">maplibre</a>::<wbr><a href="../../index.html">render</a>::<wbr><a href="../index.html">graph</a>::<wbr><a class="mod" href="#">graph</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../../../src/maplibre/render/graph/graph.rs.html#1-766">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.GraphInputNode.html" title="maplibre::render::graph::graph::GraphInputNode struct">GraphInputNode</a></div><div class="item-right docblock-short">A <a href="../node/trait.Node.html" title="Node"><code>Node</code></a> which acts as an entry point for a <a href="struct.RenderGraph.html" title="RenderGraph"><code>RenderGraph</code></a> with custom inputs.
|
||||
It has the same input and output slots and simply copies them over when run.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.RenderGraph.html" title="maplibre::render::graph::graph::RenderGraph struct">RenderGraph</a></div><div class="item-right docblock-short">The render graph configures the modular, parallel and re-usable render logic.
|
||||
It is a retained and stateless (nodes itself my have their internal state) structure,
|
||||
which can not be modified while it is executed by the graph runner.</div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="maplibre" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0 (897e37553 2022-11-02)" ></div></body></html>
|
||||
File diff suppressed because one or more lines are too long
@ -779,7 +779,6 @@
|
||||
<span id="779">779</span>
|
||||
<span id="780">780</span>
|
||||
<span id="781">781</span>
|
||||
<span id="782">782</span>
|
||||
</pre><pre class="rust"><code><span class="doccomment">//! Provides utilities related to coordinates.
|
||||
|
||||
</span><span class="kw">use </span>std::{
|
||||
@ -840,7 +839,7 @@
|
||||
}
|
||||
|
||||
<span class="kw">impl </span>fmt::Debug <span class="kw">for </span>Quadkey {
|
||||
<span class="kw">fn </span>fmt(<span class="kw-2">&</span><span class="self">self</span>, f: <span class="kw-2">&mut </span>fmt::Formatter<<span class="lifetime">'_</span>>) -> fmt::Result {
|
||||
<span class="kw">fn </span>fmt(<span class="kw-2">&</span><span class="self">self</span>, f: <span class="kw-2">&mut </span>Formatter<<span class="lifetime">'_</span>>) -> fmt::Result {
|
||||
<span class="kw">let </span>key = <span class="self">self</span>.<span class="number">0</span>;
|
||||
<span class="kw">let </span>ZoomLevel(level) = key[<span class="number">0</span>];
|
||||
<span class="kw">let </span>len = level <span class="kw">as </span>usize;
|
||||
@ -897,8 +896,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl </span>fmt::Display <span class="kw">for </span>ZoomLevel {
|
||||
<span class="kw">fn </span>fmt(<span class="kw-2">&</span><span class="self">self</span>, f: <span class="kw-2">&mut </span>fmt::Formatter<<span class="lifetime">'_</span>>) -> fmt::Result {
|
||||
<span class="kw">impl </span>Display <span class="kw">for </span>ZoomLevel {
|
||||
<span class="kw">fn </span>fmt(<span class="kw-2">&</span><span class="self">self</span>, f: <span class="kw-2">&mut </span>Formatter<<span class="lifetime">'_</span>>) -> fmt::Result {
|
||||
<span class="macro">write!</span>(f, <span class="string">"{}"</span>, <span class="self">self</span>.<span class="number">0</span>)
|
||||
}
|
||||
}
|
||||
@ -968,8 +967,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl </span>fmt::Display <span class="kw">for </span>Zoom {
|
||||
<span class="kw">fn </span>fmt(<span class="kw-2">&</span><span class="self">self</span>, f: <span class="kw-2">&mut </span>fmt::Formatter<<span class="lifetime">'_</span>>) -> fmt::Result {
|
||||
<span class="kw">impl </span>Display <span class="kw">for </span>Zoom {
|
||||
<span class="kw">fn </span>fmt(<span class="kw-2">&</span><span class="self">self</span>, f: <span class="kw-2">&mut </span>Formatter<<span class="lifetime">'_</span>>) -> fmt::Result {
|
||||
<span class="macro">write!</span>(f, <span class="string">"{}"</span>, (<span class="self">self</span>.<span class="number">0 </span>* <span class="number">100.0</span>).round() / <span class="number">100.0</span>)
|
||||
}
|
||||
}
|
||||
@ -1017,8 +1016,7 @@
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Within each tile there is a separate coordinate system. Usually this coordinate system is
|
||||
/// within [`crate::coords::EXTENT`]. Therefore, `x` and `y` must be within the bounds of
|
||||
/// [`crate::coords::EXTENT`].
|
||||
/// within [`EXTENT`]. Therefore, `x` and `y` must be within the bounds of [`EXTENT`].
|
||||
///
|
||||
/// # Coordinate System Origin
|
||||
///
|
||||
@ -1030,7 +1028,7 @@
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Every tile has tile coordinates. These tile coordinates are also called
|
||||
/// [Slippy map tilenames](https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames).
|
||||
/// [Slippy map tile names](https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames).
|
||||
///
|
||||
/// # Coordinate System Origin
|
||||
///
|
||||
@ -1084,7 +1082,7 @@
|
||||
|
||||
<span class="doccomment">/// Every tile has tile coordinates. Every tile coordinate can be mapped to a coordinate within
|
||||
/// the world. This provides the freedom to map from [TMS](https://wiki.openstreetmap.org/wiki/TMS)
|
||||
/// to [Slippy_map_tilenames](https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames).
|
||||
/// to [Slippy map tile names](https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames).
|
||||
///
|
||||
/// # Coordinate System Origin
|
||||
///
|
||||
@ -1436,8 +1434,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl </span>fmt::Display <span class="kw">for </span>TileCoords {
|
||||
<span class="kw">fn </span>fmt(<span class="kw-2">&</span><span class="self">self</span>, f: <span class="kw-2">&mut </span>fmt::Formatter<<span class="lifetime">'_</span>>) -> fmt::Result {
|
||||
<span class="kw">impl </span>Display <span class="kw">for </span>TileCoords {
|
||||
<span class="kw">fn </span>fmt(<span class="kw-2">&</span><span class="self">self</span>, f: <span class="kw-2">&mut </span>Formatter<<span class="lifetime">'_</span>>) -> fmt::Result {
|
||||
<span class="macro">write!</span>(
|
||||
f,
|
||||
<span class="string">"T(x={x},y={y},z={z})"</span>,
|
||||
@ -1448,8 +1446,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl </span>fmt::Display <span class="kw">for </span>WorldTileCoords {
|
||||
<span class="kw">fn </span>fmt(<span class="kw-2">&</span><span class="self">self</span>, f: <span class="kw-2">&mut </span>fmt::Formatter<<span class="lifetime">'_</span>>) -> fmt::Result {
|
||||
<span class="kw">impl </span>Display <span class="kw">for </span>WorldTileCoords {
|
||||
<span class="kw">fn </span>fmt(<span class="kw-2">&</span><span class="self">self</span>, f: <span class="kw-2">&mut </span>Formatter<<span class="lifetime">'_</span>>) -> fmt::Result {
|
||||
<span class="macro">write!</span>(
|
||||
f,
|
||||
<span class="string">"WT(x={x},y={y},z={z})"</span>,
|
||||
@ -1459,8 +1457,8 @@
|
||||
)
|
||||
}
|
||||
}
|
||||
<span class="kw">impl </span>fmt::Display <span class="kw">for </span>WorldCoords {
|
||||
<span class="kw">fn </span>fmt(<span class="kw-2">&</span><span class="self">self</span>, f: <span class="kw-2">&mut </span>fmt::Formatter<<span class="lifetime">'_</span>>) -> fmt::Result {
|
||||
<span class="kw">impl </span>Display <span class="kw">for </span>WorldCoords {
|
||||
<span class="kw">fn </span>fmt(<span class="kw-2">&</span><span class="self">self</span>, f: <span class="kw-2">&mut </span>Formatter<<span class="lifetime">'_</span>>) -> fmt::Result {
|
||||
<span class="macro">write!</span>(f, <span class="string">"W(x={x},y={y})"</span>, x = <span class="self">self</span>.x, y = <span class="self">self</span>.y,)
|
||||
}
|
||||
}
|
||||
|
||||
@ -413,7 +413,7 @@
|
||||
|
||||
<span class="kw">impl </span>TileIndex {
|
||||
<span class="kw">pub fn </span>point_query(<span class="kw-2">&</span><span class="self">self</span>, inner_coords: InnerCoords) -> Vec<<span class="kw-2">&</span>IndexedGeometry<f64>> {
|
||||
<span class="kw">let </span>point = geo_types::Point::new(inner_coords.x, inner_coords.y);
|
||||
<span class="kw">let </span>point = Point::new(inner_coords.x, inner_coords.y);
|
||||
<span class="kw">let </span>coordinate: Coord<<span class="kw">_</span>> = point.into();
|
||||
|
||||
<span class="comment">// FIXME: Respect layer order of style
|
||||
|
||||
@ -63,7 +63,7 @@
|
||||
//!
|
||||
//! Maplibre-rs is a map renderer that can run natively on MacOS, Linux, Windows, Android, iOS and the web.
|
||||
//! It takes advantage of Lyon to tessellate vector tiles and WebGPU to display them efficiently.
|
||||
//! Maplibre-rs also has an headless mode (*work in progress*) that can generate rasters.
|
||||
//! Maplibre-rs also has an headless mode (*work in progress*) that can generate raster images.
|
||||
//!
|
||||
//! The official guide book can be found [here](https://maplibre.org/maplibre-rs/docs/book/).
|
||||
//!
|
||||
|
||||
@ -307,7 +307,7 @@
|
||||
renderer,
|
||||
});
|
||||
}
|
||||
InitializationResult::Uninizalized(UninitializedRenderer { .. }) => {}
|
||||
InitializationResult::Uninitialized(UninitializedRenderer { .. }) => {}
|
||||
<span class="kw">_ </span>=> <span class="macro">panic!</span>(<span class="string">"Rendering context gone"</span>),
|
||||
};
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
|
||||
@ -175,7 +175,7 @@
|
||||
|
||||
<span class="kw">pub enum </span>InitializationResult {
|
||||
Initialized(InitializedRenderer),
|
||||
Uninizalized(UninitializedRenderer),
|
||||
Uninitialized(UninitializedRenderer),
|
||||
Gone,
|
||||
}
|
||||
|
||||
@ -186,10 +186,10 @@
|
||||
}
|
||||
|
||||
<span class="kw">impl </span>InitializationResult {
|
||||
<span class="kw">pub fn </span>unwarp_renderer(<span class="self">self</span>) -> InitializedRenderer {
|
||||
<span class="kw">pub fn </span>unwrap_renderer(<span class="self">self</span>) -> InitializedRenderer {
|
||||
<span class="kw">match </span><span class="self">self </span>{
|
||||
InitializationResult::Initialized(renderer) => renderer,
|
||||
InitializationResult::Uninizalized(<span class="kw">_</span>) => <span class="macro">panic!</span>(<span class="string">"Renderer is not initialized"</span>),
|
||||
InitializationResult::Uninitialized(<span class="kw">_</span>) => <span class="macro">panic!</span>(<span class="string">"Renderer is not initialized"</span>),
|
||||
InitializationResult::Gone => <span class="macro">panic!</span>(<span class="string">"Initialization context is gone"</span>),
|
||||
}
|
||||
}
|
||||
@ -199,7 +199,7 @@
|
||||
InitializationResult::Initialized(InitializedRenderer { renderer, .. }) => {
|
||||
<span class="prelude-val">Some</span>(renderer)
|
||||
}
|
||||
InitializationResult::Uninizalized(<span class="kw">_</span>) => <span class="prelude-val">None</span>,
|
||||
InitializationResult::Uninitialized(<span class="kw">_</span>) => <span class="prelude-val">None</span>,
|
||||
InitializationResult::Gone => <span class="macro">panic!</span>(<span class="string">"Initialization context is gone"</span>),
|
||||
}
|
||||
}
|
||||
|
||||
@ -598,8 +598,8 @@
|
||||
<span class="attribute">#[derive(Debug, Clone)]
|
||||
</span><span class="kw">pub struct </span>Camera {
|
||||
position: Point3<f64>, <span class="comment">// The z axis never changes, the zoom is used instead
|
||||
</span>yaw: cgmath::Rad<f64>,
|
||||
pitch: cgmath::Rad<f64>,
|
||||
</span>yaw: Rad<f64>,
|
||||
pitch: Rad<f64>,
|
||||
|
||||
width: f64,
|
||||
height: f64,
|
||||
@ -650,7 +650,7 @@
|
||||
ViewProjection(FLIP_Y * perspective.current_projection * <span class="self">self</span>.calc_matrix())
|
||||
}
|
||||
|
||||
<span class="doccomment">/// A transform which can be used to transfrom between clip and window space.
|
||||
<span class="doccomment">/// A transform which can be used to transform between clip and window space.
|
||||
/// Adopted from [here](https://docs.microsoft.com/en-us/windows/win32/direct3d9/viewports-and-clipping#viewport-rectangle) (Direct3D).
|
||||
</span><span class="kw">fn </span>clip_to_window_transform(<span class="kw-2">&</span><span class="self">self</span>) -> Matrix4<f64> {
|
||||
<span class="kw">let </span>min_depth = <span class="number">0.0</span>;
|
||||
@ -881,7 +881,7 @@
|
||||
<span class="self">self</span>.position
|
||||
}
|
||||
|
||||
<span class="kw">pub fn </span>yaw(<span class="kw-2">&</span><span class="self">self</span>) -> cgmath::Rad<f64> {
|
||||
<span class="kw">pub fn </span>yaw(<span class="kw-2">&</span><span class="self">self</span>) -> Rad<f64> {
|
||||
<span class="self">self</span>.yaw
|
||||
}
|
||||
|
||||
@ -889,7 +889,7 @@
|
||||
<span class="self">self</span>.yaw += delta.into();
|
||||
}
|
||||
|
||||
<span class="kw">pub fn </span>pitch(<span class="kw-2">&</span><span class="self">self</span>) -> cgmath::Rad<f64> {
|
||||
<span class="kw">pub fn </span>pitch(<span class="kw-2">&</span><span class="self">self</span>) -> Rad<f64> {
|
||||
<span class="self">self</span>.pitch
|
||||
}
|
||||
|
||||
|
||||
@ -759,6 +759,11 @@
|
||||
<span id="759">759</span>
|
||||
<span id="760">760</span>
|
||||
<span id="761">761</span>
|
||||
<span id="762">762</span>
|
||||
<span id="763">763</span>
|
||||
<span id="764">764</span>
|
||||
<span id="765">765</span>
|
||||
<span id="766">766</span>
|
||||
</pre><pre class="rust"><code><span class="kw">use </span>std::{borrow::Cow, collections::HashMap, fmt::Debug};
|
||||
|
||||
<span class="kw">use super</span>::{
|
||||
@ -1420,28 +1425,33 @@
|
||||
}
|
||||
|
||||
<span class="macro">assert!</span>(input_nodes(<span class="string">"A"</span>, <span class="kw-2">&</span>graph).is_empty(), <span class="string">"A has no inputs"</span>);
|
||||
<span class="macro">assert!</span>(
|
||||
output_nodes(<span class="string">"A"</span>, <span class="kw-2">&</span>graph) == HashSet::from_iter(<span class="macro">vec!</span>[c_id]),
|
||||
<span class="macro">assert_eq!</span>(
|
||||
output_nodes(<span class="string">"A"</span>, <span class="kw-2">&</span>graph),
|
||||
HashSet::from_iter(<span class="macro">vec!</span>[c_id]),
|
||||
<span class="string">"A outputs to C"
|
||||
</span>);
|
||||
|
||||
<span class="macro">assert!</span>(input_nodes(<span class="string">"B"</span>, <span class="kw-2">&</span>graph).is_empty(), <span class="string">"B has no inputs"</span>);
|
||||
<span class="macro">assert!</span>(
|
||||
output_nodes(<span class="string">"B"</span>, <span class="kw-2">&</span>graph) == HashSet::from_iter(<span class="macro">vec!</span>[c_id]),
|
||||
<span class="macro">assert_eq!</span>(
|
||||
output_nodes(<span class="string">"B"</span>, <span class="kw-2">&</span>graph),
|
||||
HashSet::from_iter(<span class="macro">vec!</span>[c_id]),
|
||||
<span class="string">"B outputs to C"
|
||||
</span>);
|
||||
|
||||
<span class="macro">assert!</span>(
|
||||
input_nodes(<span class="string">"C"</span>, <span class="kw-2">&</span>graph) == HashSet::from_iter(<span class="macro">vec!</span>[a_id, b_id]),
|
||||
<span class="macro">assert_eq!</span>(
|
||||
input_nodes(<span class="string">"C"</span>, <span class="kw-2">&</span>graph),
|
||||
HashSet::from_iter(<span class="macro">vec!</span>[a_id, b_id]),
|
||||
<span class="string">"A and B input to C"
|
||||
</span>);
|
||||
<span class="macro">assert!</span>(
|
||||
output_nodes(<span class="string">"C"</span>, <span class="kw-2">&</span>graph) == HashSet::from_iter(<span class="macro">vec!</span>[d_id]),
|
||||
<span class="macro">assert_eq!</span>(
|
||||
output_nodes(<span class="string">"C"</span>, <span class="kw-2">&</span>graph),
|
||||
HashSet::from_iter(<span class="macro">vec!</span>[d_id]),
|
||||
<span class="string">"C outputs to D"
|
||||
</span>);
|
||||
|
||||
<span class="macro">assert!</span>(
|
||||
input_nodes(<span class="string">"D"</span>, <span class="kw-2">&</span>graph) == HashSet::from_iter(<span class="macro">vec!</span>[c_id]),
|
||||
<span class="macro">assert_eq!</span>(
|
||||
input_nodes(<span class="string">"D"</span>, <span class="kw-2">&</span>graph),
|
||||
HashSet::from_iter(<span class="macro">vec!</span>[c_id]),
|
||||
<span class="string">"C inputs to D"
|
||||
</span>);
|
||||
<span class="macro">assert!</span>(output_nodes(<span class="string">"D"</span>, <span class="kw-2">&</span>graph).is_empty(), <span class="string">"D has no outputs"</span>);
|
||||
|
||||
@ -683,7 +683,7 @@
|
||||
/// For example during this phase textures are created, buffers are allocated and written.
|
||||
</span>Prepare,
|
||||
|
||||
<span class="doccomment">/// Queues [PhaseItems](crate::render::render_phase::PhaseItem) that depend on
|
||||
<span class="doccomment">/// Queues [PhaseItems](render_phase::PhaseItem) that depend on
|
||||
/// [`Prepare`](RenderStageLabel::Prepare) data and queue up draw calls to run during the
|
||||
/// [`Render`](RenderStageLabel::Render) stage.
|
||||
/// For example data is uploaded to the GPU in this stage.
|
||||
|
||||
@ -74,7 +74,7 @@
|
||||
<span id="74">74</span>
|
||||
</pre><pre class="rust"><code><span class="doccomment">//! Executes the [`RenderGraph`] current render graph.
|
||||
|
||||
</span><span class="kw">use </span>std::borrow::Cow;
|
||||
</span><span class="kw">use </span>std::{borrow::Cow, error::Error};
|
||||
|
||||
<span class="kw">use </span>log::error;
|
||||
|
||||
@ -113,7 +113,7 @@
|
||||
<span class="kw">if let </span><span class="prelude-val">Err</span>(e) = RenderGraphRunner::run(render_graph, device, queue, state, world) {
|
||||
<span class="macro">error!</span>(<span class="string">"Error running render graph:"</span>);
|
||||
{
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>src: <span class="kw-2">&</span><span class="kw">dyn </span>std::error::Error = <span class="kw-2">&</span>e;
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>src: <span class="kw-2">&</span><span class="kw">dyn </span>Error = <span class="kw-2">&</span>e;
|
||||
<span class="kw">loop </span>{
|
||||
<span class="macro">error!</span>(<span class="string">"> {}"</span>, src);
|
||||
<span class="kw">match </span>src.source() {
|
||||
|
||||
@ -152,7 +152,7 @@ the format of the network requests. The maplibre-rs library is not introducing a
|
||||
honor HTTP headers which configure caching. This is very important for fetched tiles, as they can have an expiry date.</p>
|
||||
<ul>
|
||||
<li>On the web the browser is automatically caching raw tiles.</li>
|
||||
<li>On Linux, MacOs, iOS and Android we are
|
||||
<li>On Linux, macOS, iOS and Android we are
|
||||
utilizing <a href="https://crates.io/crates/reqwest-middleware-cache/">reqwest-middleware-cache</a>, which writes raw network
|
||||
requests to disk.</li>
|
||||
</ul>
|
||||
|
||||
@ -149,15 +149,15 @@
|
||||
<script src="https://unpkg.com/@panzoom/panzoom@4.5.0/dist/panzoom.min.js"></script>
|
||||
<h2 id="domain-model"><a class="header" href="#domain-model">Domain Model</a></h2>
|
||||
<div style="overflow: hidden; border-style: solid; width: 110%">
|
||||
<img src="./figures/domain-model.drawio.svg" class="diagram" />
|
||||
<img src="./figures/domain-model.drawio.svg" class="diagram" alt="diagram" />
|
||||
</div>
|
||||
<h2 id="data-model"><a class="header" href="#data-model">Data Model</a></h2>
|
||||
<div style="overflow: hidden; border-style: solid; width: 110%">
|
||||
<img src="./figures/data-model.drawio.svg" class="diagram" />
|
||||
<img src="./figures/data-model.drawio.svg" class="diagram" alt="diagram" />
|
||||
</div>
|
||||
<h2 id="crate-and-project-structure"><a class="header" href="#crate-and-project-structure">Crate and Project Structure</a></h2>
|
||||
<div style="overflow: hidden; border-style: solid; width: 110%">
|
||||
<img src="./figures/crate-and-projects-structure.drawio.svg" class="diagram" />
|
||||
<img src="./figures/crate-and-projects-structure.drawio.svg" class="diagram" alt="diagram" />
|
||||
</div>
|
||||
<script>
|
||||
Array.from(document.getElementsByClassName('diagram')).forEach(e => {
|
||||
|
||||
@ -170,7 +170,7 @@ these libraries have to specify where WASM or non-inlined WebWorkers are located
|
||||
<p>Both assets could be inlined theoretically. This is common for WebWorkers, but not for WASM files.</p>
|
||||
<h3 id="umd"><a class="header" href="#umd">UMD</a></h3>
|
||||
<blockquote>
|
||||
<p>UMD modules are needed when creating a library which should run in Node as well as browsers. This is not a usecase
|
||||
<p>UMD modules are needed when creating a library which should run in Node as well as browsers. This is not a use case
|
||||
for maplibre-rs. If we support node, then we probably would ship a separate package called "maplibre-rs-node" which
|
||||
bundles to CJS directly.</p>
|
||||
</blockquote>
|
||||
|
||||
@ -150,8 +150,8 @@
|
||||
There are multiple demos of maplibre-rs for different targets. Some targets have prerequisites
|
||||
depending on your operating system.</p>
|
||||
<ul>
|
||||
<li><strong>maplibre-demo</strong> - targets Windows, MacOS and Linux, it is built directly with cargo.</li>
|
||||
<li><strong>apple</strong> - targets iOS and MacOS and relies on the xcode IDE.</li>
|
||||
<li><strong>maplibre-demo</strong> - targets Windows, macOS and Linux, it is built directly with cargo.</li>
|
||||
<li><strong>apple</strong> - targets iOS and macOS and relies on the xcode IDE.</li>
|
||||
<li><strong>android</strong> - targets Android devices and builds in Android Studio.</li>
|
||||
<li><strong>web</strong> - targets the web using a WASM binary.</li>
|
||||
<li><strong>maplibre-headless</strong> - <em>TBD</em></li>
|
||||
@ -162,7 +162,7 @@ depending on your operating system.</p>
|
||||
active toolchain. If you want to change the target of the build manually, use the cargo <code>--target</code> parameter.</p>
|
||||
</blockquote>
|
||||
<h2 id="maplibre-demo"><a class="header" href="#maplibre-demo">Maplibre-demo</a></h2>
|
||||
<h3 id="linuxmacos"><a class="header" href="#linuxmacos">Linux/MacOS</a></h3>
|
||||
<h3 id="linuxmacos"><a class="header" href="#linuxmacos">Linux/macOS</a></h3>
|
||||
<p>The build for desktop is very simple, you just have to run the following command from the root of the
|
||||
maplibre-rs project:</p>
|
||||
<pre><code class="language-bash">cargo run -p maplibre-demo
|
||||
@ -190,10 +190,10 @@ you to use C and C++ code with Android. You have to install manually the version
|
||||
<pre><code>ANDROID STUDIO -> tools -> SDK manager -> SDK tools -> tick show package details -> ndk (side by side)
|
||||
</code></pre>
|
||||
<p>Open the project within <code>./android/gradle</code> and create a new virtual device with the device manager. Minimum SDK version
|
||||
should be 21. This was tested on a x86_64 emulator. Finally, run the demo configuration. It should open your virtual device and
|
||||
should be 21. This was tested on an x86_64 emulator. Finally, run the demo configuration. It should open your virtual device and
|
||||
run the maplibre-rs Android demo on it. Alternatively you can also run it on your own Android device.</p>
|
||||
<blockquote>
|
||||
<p>Note: If you are building for a x86 Android device, you probably need to install the following target using<br />
|
||||
<p>Note: If you are building for an x86 Android device, you probably need to install the following target using<br />
|
||||
rustup with the following command <code>rustup target add i686-linux-android</code>.</p>
|
||||
</blockquote>
|
||||
<blockquote>
|
||||
@ -213,13 +213,13 @@ Start by installing XCode and open the project within <code>./apple/xcode</code>
|
||||
<p>You can use XCode to run on a iOS Simulator or a real device. Install a simulator in XCode.
|
||||
Version 9 is the minimum version supported theoretically.</p>
|
||||
<p>Select the scheme called <em>example (iOS)</em> and click on run. This will start the iOS application.</p>
|
||||
<h3 id="macos"><a class="header" href="#macos">MacOS</a></h3>
|
||||
<h3 id="macos"><a class="header" href="#macos">macOS</a></h3>
|
||||
<p>As you might have seen in the maplibre-demo section, you can build Unix executables directly with Cargo.
|
||||
In order to build a proper MacOS application (in OSX terminology) you have to use the <code>./apple/xcode</code> project.</p>
|
||||
In order to build a proper macOS application (in OSX terminology) you have to use the <code>./apple/xcode</code> project.</p>
|
||||
<p>Open the project from the folder <code>./apple/xcode</code> with XCode. Select the scheme called <em>example (macOS)</em> and
|
||||
click on run. This will start the MacOS application. </p>
|
||||
click on run. This will start the macOS application. </p>
|
||||
<blockquote>
|
||||
<p>The minimum target OSX version for the MacOS build is defined inside <em>Build settings -> Deployment -> MacOS deployment target</em>.
|
||||
<p>The minimum target OSX version for the macOS build is defined inside <em>Build settings -> Deployment -> macOS deployment target</em>.
|
||||
If you are using a lower version of OSX, you will not be able to run the application on your computer.</p>
|
||||
</blockquote>
|
||||
<h2 id="web-webgl-webgpu"><a class="header" href="#web-webgl-webgpu">Web (WebGL, WebGPU)</a></h2>
|
||||
@ -236,7 +236,7 @@ with WebGPU:</p>
|
||||
<pre><code class="language-bash">just web-lib build --webgl # WebGL
|
||||
just web-lib build --webgl --multithreaded # WebGL + multithreaded
|
||||
</code></pre>
|
||||
<p>Instead of building it is also possible to watch for changes. The same flags like with <code>web-lib build</code> are supported:</p>
|
||||
<p>Instead of building it is also possible to watch for changes. The same flags as with <code>web-lib build</code> are supported:</p>
|
||||
<pre><code class="language-bash">just web-lib watch --webgl
|
||||
</code></pre>
|
||||
<p>After building the library you can run the demo server:</p>
|
||||
|
||||
@ -209,8 +209,8 @@ in progress</p>
|
||||
There are multiple demos of maplibre-rs for different targets. Some targets have prerequisites
|
||||
depending on your operating system.</p>
|
||||
<ul>
|
||||
<li><strong>maplibre-demo</strong> - targets Windows, MacOS and Linux, it is built directly with cargo.</li>
|
||||
<li><strong>apple</strong> - targets iOS and MacOS and relies on the xcode IDE.</li>
|
||||
<li><strong>maplibre-demo</strong> - targets Windows, macOS and Linux, it is built directly with cargo.</li>
|
||||
<li><strong>apple</strong> - targets iOS and macOS and relies on the xcode IDE.</li>
|
||||
<li><strong>android</strong> - targets Android devices and builds in Android Studio.</li>
|
||||
<li><strong>web</strong> - targets the web using a WASM binary.</li>
|
||||
<li><strong>maplibre-headless</strong> - <em>TBD</em></li>
|
||||
@ -221,7 +221,7 @@ depending on your operating system.</p>
|
||||
active toolchain. If you want to change the target of the build manually, use the cargo <code>--target</code> parameter.</p>
|
||||
</blockquote>
|
||||
<h2 id="maplibre-demo"><a class="header" href="#maplibre-demo">Maplibre-demo</a></h2>
|
||||
<h3 id="linuxmacos"><a class="header" href="#linuxmacos">Linux/MacOS</a></h3>
|
||||
<h3 id="linuxmacos"><a class="header" href="#linuxmacos">Linux/macOS</a></h3>
|
||||
<p>The build for desktop is very simple, you just have to run the following command from the root of the
|
||||
maplibre-rs project:</p>
|
||||
<pre><code class="language-bash">cargo run -p maplibre-demo
|
||||
@ -249,10 +249,10 @@ you to use C and C++ code with Android. You have to install manually the version
|
||||
<pre><code>ANDROID STUDIO -> tools -> SDK manager -> SDK tools -> tick show package details -> ndk (side by side)
|
||||
</code></pre>
|
||||
<p>Open the project within <code>./android/gradle</code> and create a new virtual device with the device manager. Minimum SDK version
|
||||
should be 21. This was tested on a x86_64 emulator. Finally, run the demo configuration. It should open your virtual device and
|
||||
should be 21. This was tested on an x86_64 emulator. Finally, run the demo configuration. It should open your virtual device and
|
||||
run the maplibre-rs Android demo on it. Alternatively you can also run it on your own Android device.</p>
|
||||
<blockquote>
|
||||
<p>Note: If you are building for a x86 Android device, you probably need to install the following target using<br />
|
||||
<p>Note: If you are building for an x86 Android device, you probably need to install the following target using<br />
|
||||
rustup with the following command <code>rustup target add i686-linux-android</code>.</p>
|
||||
</blockquote>
|
||||
<blockquote>
|
||||
@ -272,13 +272,13 @@ Start by installing XCode and open the project within <code>./apple/xcode</code>
|
||||
<p>You can use XCode to run on a iOS Simulator or a real device. Install a simulator in XCode.
|
||||
Version 9 is the minimum version supported theoretically.</p>
|
||||
<p>Select the scheme called <em>example (iOS)</em> and click on run. This will start the iOS application.</p>
|
||||
<h3 id="macos"><a class="header" href="#macos">MacOS</a></h3>
|
||||
<h3 id="macos"><a class="header" href="#macos">macOS</a></h3>
|
||||
<p>As you might have seen in the maplibre-demo section, you can build Unix executables directly with Cargo.
|
||||
In order to build a proper MacOS application (in OSX terminology) you have to use the <code>./apple/xcode</code> project.</p>
|
||||
In order to build a proper macOS application (in OSX terminology) you have to use the <code>./apple/xcode</code> project.</p>
|
||||
<p>Open the project from the folder <code>./apple/xcode</code> with XCode. Select the scheme called <em>example (macOS)</em> and
|
||||
click on run. This will start the MacOS application. </p>
|
||||
click on run. This will start the macOS application. </p>
|
||||
<blockquote>
|
||||
<p>The minimum target OSX version for the MacOS build is defined inside <em>Build settings -> Deployment -> MacOS deployment target</em>.
|
||||
<p>The minimum target OSX version for the macOS build is defined inside <em>Build settings -> Deployment -> macOS deployment target</em>.
|
||||
If you are using a lower version of OSX, you will not be able to run the application on your computer.</p>
|
||||
</blockquote>
|
||||
<h2 id="web-webgl-webgpu"><a class="header" href="#web-webgl-webgpu">Web (WebGL, WebGPU)</a></h2>
|
||||
@ -295,7 +295,7 @@ with WebGPU:</p>
|
||||
<pre><code class="language-bash">just web-lib build --webgl # WebGL
|
||||
just web-lib build --webgl --multithreaded # WebGL + multithreaded
|
||||
</code></pre>
|
||||
<p>Instead of building it is also possible to watch for changes. The same flags like with <code>web-lib build</code> are supported:</p>
|
||||
<p>Instead of building it is also possible to watch for changes. The same flags as with <code>web-lib build</code> are supported:</p>
|
||||
<pre><code class="language-bash">just web-lib watch --webgl
|
||||
</code></pre>
|
||||
<p>After building the library you can run the demo server:</p>
|
||||
@ -354,15 +354,15 @@ specified in a working draft to WebAssembly. Threads are simulated using WebWork
|
||||
<script src="https://unpkg.com/@panzoom/panzoom@4.5.0/dist/panzoom.min.js"></script>
|
||||
<h2 id="domain-model"><a class="header" href="#domain-model">Domain Model</a></h2>
|
||||
<div style="overflow: hidden; border-style: solid; width: 110%">
|
||||
<img src="development-documents/./figures/domain-model.drawio.svg" class="diagram" />
|
||||
<img src="development-documents/./figures/domain-model.drawio.svg" class="diagram" alt="diagram" />
|
||||
</div>
|
||||
<h2 id="data-model"><a class="header" href="#data-model">Data Model</a></h2>
|
||||
<div style="overflow: hidden; border-style: solid; width: 110%">
|
||||
<img src="development-documents/./figures/data-model.drawio.svg" class="diagram" />
|
||||
<img src="development-documents/./figures/data-model.drawio.svg" class="diagram" alt="diagram" />
|
||||
</div>
|
||||
<h2 id="crate-and-project-structure"><a class="header" href="#crate-and-project-structure">Crate and Project Structure</a></h2>
|
||||
<div style="overflow: hidden; border-style: solid; width: 110%">
|
||||
<img src="development-documents/./figures/crate-and-projects-structure.drawio.svg" class="diagram" />
|
||||
<img src="development-documents/./figures/crate-and-projects-structure.drawio.svg" class="diagram" alt="diagram" />
|
||||
</div>
|
||||
<script>
|
||||
Array.from(document.getElementsByClassName('diagram')).forEach(e => {
|
||||
@ -377,7 +377,7 @@ the format of the network requests. The maplibre-rs library is not introducing a
|
||||
honor HTTP headers which configure caching. This is very important for fetched tiles, as they can have an expiry date.</p>
|
||||
<ul>
|
||||
<li>On the web the browser is automatically caching raw tiles.</li>
|
||||
<li>On Linux, MacOs, iOS and Android we are
|
||||
<li>On Linux, macOS, iOS and Android we are
|
||||
utilizing <a href="https://crates.io/crates/reqwest-middleware-cache/">reqwest-middleware-cache</a>, which writes raw network
|
||||
requests to disk.</li>
|
||||
</ul>
|
||||
@ -4070,7 +4070,7 @@ these libraries have to specify where WASM or non-inlined WebWorkers are located
|
||||
<p>Both assets could be inlined theoretically. This is common for WebWorkers, but not for WASM files.</p>
|
||||
<h3 id="umd"><a class="header" href="#umd">UMD</a></h3>
|
||||
<blockquote>
|
||||
<p>UMD modules are needed when creating a library which should run in Node as well as browsers. This is not a usecase
|
||||
<p>UMD modules are needed when creating a library which should run in Node as well as browsers. This is not a use case
|
||||
for maplibre-rs. If we support node, then we probably would ship a separate package called "maplibre-rs-node" which
|
||||
bundles to CJS directly.</p>
|
||||
</blockquote>
|
||||
@ -4563,9 +4563,9 @@ makes it through the entire process to implementation is considered
|
||||
<p>Retain the current informal RFC process. The newly proposed RFC process is
|
||||
designed to improve over the informal process in the following ways:</p>
|
||||
<ul>
|
||||
<li>Discourage unactionable or vague RFCs</li>
|
||||
<li>Discourage non-actionable or vague RFCs</li>
|
||||
<li>Ensure that all serious RFCs are considered equally</li>
|
||||
<li>Give confidence to those with a stake in maplibre-rs's development that they
|
||||
<li>Give confidence to those with a stake in maplibre-rs development that they
|
||||
understand why new features are being merged</li>
|
||||
</ul>
|
||||
<p>As an alternative, we could adopt an even stricter RFC process than the one proposed here.
|
||||
@ -4588,7 +4588,7 @@ informal RFC process?</li>
|
||||
<h1 id="motivation-1"><a class="header" href="#motivation-1">Motivation</a></h1>
|
||||
<p>Why are we doing this? What use cases does it support? What is the expected outcome?</p>
|
||||
<h1 id="guide-level-explanation"><a class="header" href="#guide-level-explanation">Guide-level explanation</a></h1>
|
||||
<p>Explain the proposal as if it was already included in the project and you were teaching it to another maplibre-rs user.
|
||||
<p>Explain the proposal as if it was already included in the project, and you were teaching it to another maplibre-rs user.
|
||||
That generally means:</p>
|
||||
<ul>
|
||||
<li>Introducing new named concepts.</li>
|
||||
@ -4596,7 +4596,7 @@ That generally means:</p>
|
||||
<li>Explaining how maplibre-rs users should <em>think</em> about the feature, and how it should impact the way they use
|
||||
maplibre-rs. It should explain the impact as concretely as possible.</li>
|
||||
<li>If applicable, provide sample error messages, deprecation warnings, or migration guidance.</li>
|
||||
<li>If applicable, describe the differences between teaching this to existing maplibre-rs users and new maplibre-rs users.</li>
|
||||
<li>If applicable, describe the differences between teaching this to the existing maplibre-rs users and new maplibre-rs users.</li>
|
||||
</ul>
|
||||
<p>For implementation-oriented RFCs (e.g. for internals), this section should focus on how maplibre-rs contributors should
|
||||
think about the change, and give examples of its concrete impact. For policy RFCs, this section should provide an
|
||||
@ -4745,9 +4745,9 @@ makes it through the entire process to implementation is considered
|
||||
<p>Retain the current informal RFC process. The newly proposed RFC process is
|
||||
designed to improve over the informal process in the following ways:</p>
|
||||
<ul>
|
||||
<li>Discourage unactionable or vague RFCs</li>
|
||||
<li>Discourage non-actionable or vague RFCs</li>
|
||||
<li>Ensure that all serious RFCs are considered equally</li>
|
||||
<li>Give confidence to those with a stake in maplibre-rs's development that they
|
||||
<li>Give confidence to those with a stake in maplibre-rs development that they
|
||||
understand why new features are being merged</li>
|
||||
</ul>
|
||||
<p>As an alternative, we could adopt an even stricter RFC process than the one proposed here.
|
||||
|
||||
@ -156,7 +156,7 @@
|
||||
<h1 id="motivation"><a class="header" href="#motivation">Motivation</a></h1>
|
||||
<p>Why are we doing this? What use cases does it support? What is the expected outcome?</p>
|
||||
<h1 id="guide-level-explanation"><a class="header" href="#guide-level-explanation">Guide-level explanation</a></h1>
|
||||
<p>Explain the proposal as if it was already included in the project and you were teaching it to another maplibre-rs user.
|
||||
<p>Explain the proposal as if it was already included in the project, and you were teaching it to another maplibre-rs user.
|
||||
That generally means:</p>
|
||||
<ul>
|
||||
<li>Introducing new named concepts.</li>
|
||||
@ -164,7 +164,7 @@ That generally means:</p>
|
||||
<li>Explaining how maplibre-rs users should <em>think</em> about the feature, and how it should impact the way they use
|
||||
maplibre-rs. It should explain the impact as concretely as possible.</li>
|
||||
<li>If applicable, provide sample error messages, deprecation warnings, or migration guidance.</li>
|
||||
<li>If applicable, describe the differences between teaching this to existing maplibre-rs users and new maplibre-rs users.</li>
|
||||
<li>If applicable, describe the differences between teaching this to the existing maplibre-rs users and new maplibre-rs users.</li>
|
||||
</ul>
|
||||
<p>For implementation-oriented RFCs (e.g. for internals), this section should focus on how maplibre-rs contributors should
|
||||
think about the change, and give examples of its concrete impact. For policy RFCs, this section should provide an
|
||||
|
||||
@ -235,9 +235,9 @@ makes it through the entire process to implementation is considered
|
||||
<p>Retain the current informal RFC process. The newly proposed RFC process is
|
||||
designed to improve over the informal process in the following ways:</p>
|
||||
<ul>
|
||||
<li>Discourage unactionable or vague RFCs</li>
|
||||
<li>Discourage non-actionable or vague RFCs</li>
|
||||
<li>Ensure that all serious RFCs are considered equally</li>
|
||||
<li>Give confidence to those with a stake in maplibre-rs's development that they
|
||||
<li>Give confidence to those with a stake in maplibre-rs development that they
|
||||
understand why new features are being merged</li>
|
||||
</ul>
|
||||
<p>As an alternative, we could adopt an even stricter RFC process than the one proposed here.
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user