This commit is contained in:
dabreegster 2020-12-18 00:27:27 +00:00
parent b2a89ba3e5
commit 9ec9882e4a
25 changed files with 285 additions and 48 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
<!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 `animation` mod in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, animation"><title>experiment::animation - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module animation</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><p class='location'><a href='../index.html'>experiment</a></p><script>window.sidebarCurrent = {name: 'animation', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/animation.rs.html#1-187' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>experiment</a>::<wbr><a class="mod" href=''>animation</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/animation.rs.html#1-233' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>experiment</a>::<wbr><a class="mod" href=''>animation</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table><tr class='module-item'><td><a class="struct" href="struct.Animation.html" title='experiment::animation::Animation struct'>Animation</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Animator.html" title='experiment::animation::Animator struct'>Animator</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.SnowEffect.html" title='experiment::animation::SnowEffect struct'>SnowEffect</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Snowflake.html" title='experiment::animation::Snowflake struct'>Snowflake</a></td><td class='docblock-short'></td></tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
<table><tr class='module-item'><td><a class="enum" href="enum.Effect.html" title='experiment::animation::Effect enum'>Effect</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1,12 +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="API documentation for the Rust `Animation` struct in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, Animation"><title>experiment::animation::Animation - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct Animation</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.effect">effect</a><a href="#structfield.end">end</a><a href="#structfield.start">start</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>animation</a></p><script>window.sidebarCurrent = {name: 'Animation', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/animation.rs.html#12-16' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>animation</a>::<wbr><a class="struct" href=''>Animation</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>struct Animation {
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct Animation</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.effect">effect</a><a href="#structfield.end">end</a><a href="#structfield.screenspace">screenspace</a><a href="#structfield.start">start</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>animation</a></p><script>window.sidebarCurrent = {name: 'Animation', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/animation.rs.html#13-18' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>animation</a>::<wbr><a class="struct" href=''>Animation</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>struct Animation {
start: <a class="struct" href="../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>,
end: <a class="struct" href="../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>,
effect: <a class="enum" href="../../experiment/animation/enum.Effect.html" title="enum experiment::animation::Effect">Effect</a>,
screenspace: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
}</pre></div><h2 id='fields' class='fields small-section-header'>
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.start" class="structfield small-section-header"><a href="#structfield.start" class="anchor field"></a><code>start: <a class="struct" href="../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a></code></span><span id="structfield.end" class="structfield small-section-header"><a href="#structfield.end" class="anchor field"></a><code>end: <a class="struct" href="../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a></code></span><span id="structfield.effect" class="structfield small-section-header"><a href="#structfield.effect" class="anchor field"></a><code>effect: <a class="enum" href="../../experiment/animation/enum.Effect.html" title="enum experiment::animation::Effect">Effect</a></code></span><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../experiment/animation/struct.Animation.html" title="struct experiment::animation::Animation">Animation</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../experiment/animation/struct.Animation.html" title="struct experiment::animation::Animation">Animation</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../experiment/animation/struct.Animation.html" title="struct experiment::animation::Animation">Animation</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../experiment/animation/struct.Animation.html" title="struct experiment::animation::Animation">Animation</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../experiment/animation/struct.Animation.html" title="struct experiment::animation::Animation">Animation</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.start" class="structfield small-section-header"><a href="#structfield.start" class="anchor field"></a><code>start: <a class="struct" href="../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a></code></span><span id="structfield.end" class="structfield small-section-header"><a href="#structfield.end" class="anchor field"></a><code>end: <a class="struct" href="../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a></code></span><span id="structfield.effect" class="structfield small-section-header"><a href="#structfield.effect" class="anchor field"></a><code>effect: <a class="enum" href="../../experiment/animation/enum.Effect.html" title="enum experiment::animation::Effect">Effect</a></code></span><span id="structfield.screenspace" class="structfield small-section-header"><a href="#structfield.screenspace" class="anchor field"></a><code>screenspace: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../experiment/animation/struct.Animation.html" title="struct experiment::animation::Animation">Animation</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../experiment/animation/struct.Animation.html" title="struct experiment::animation::Animation">Animation</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../experiment/animation/struct.Animation.html" title="struct experiment::animation::Animation">Animation</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../experiment/animation/struct.Animation.html" title="struct experiment::animation::Animation">Animation</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../experiment/animation/struct.Animation.html" title="struct experiment::animation::Animation">Animation</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id='impl-Downcast' class='impl'><code class='in-band'>impl&lt;T&gt; Downcast for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>,&nbsp;</span></code><a href='#impl-Downcast' class='anchor'></a></h3><div class='impl-items'><h4 id='method.into_any' class="method hidden"><code>fn <a href='#method.into_any' class='fnname'>into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;T&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static&gt;</code></h4><div class='docblock hidden'><p>Convert <code>Box&lt;dyn Trait&gt;</code> (where <code>Trait: Downcast</code>) to <code>Box&lt;dyn Any&gt;</code>. <code>Box&lt;dyn Any&gt;</code> can

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

View File

@ -1,6 +1,6 @@
<!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 `game` mod in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, game"><title>experiment::game - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module game</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li></ul></div><p class='location'><a href='../index.html'>experiment</a></p><script>window.sidebarCurrent = {name: 'game', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#1-631' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>experiment</a>::<wbr><a class="mod" href=''>game</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#1-699' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>experiment</a>::<wbr><a class="mod" href=''>game</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table><tr class='module-item'><td><a class="struct" href="struct.EnergylessArrow.html" title='experiment::game::EnergylessArrow struct'>EnergylessArrow</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Game.html" title='experiment::game::Game struct'>Game</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.GameState.html" title='experiment::game::GameState struct'>GameState</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.MinimapController.html" title='experiment::game::MinimapController struct'>MinimapController</a></td><td class='docblock-short'></td></tr></table><h2 id='constants' class='section-header'><a href="#constants">Constants</a></h2>
<table><tr class='module-item'><td><a class="constant" href="constant.ACQUIRE_BOOST_RATE.html" title='experiment::game::ACQUIRE_BOOST_RATE constant'>ACQUIRE_BOOST_RATE</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="constant" href="constant.BOOST_SPEED_MULTIPLIER.html" title='experiment::game::BOOST_SPEED_MULTIPLIER constant'>BOOST_SPEED_MULTIPLIER</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="constant" href="constant.HANGRY_SPEED_MULTIPLIER.html" title='experiment::game::HANGRY_SPEED_MULTIPLIER constant'>HANGRY_SPEED_MULTIPLIER</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="constant" href="constant.MAX_BOOST.html" title='experiment::game::MAX_BOOST constant'>MAX_BOOST</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

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

View File

@ -1,9 +1,9 @@
<!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 `MinimapController` struct in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, MinimapController"><title>experiment::game::MinimapController - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct MinimapController</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-MinimapControls%3CSimpleApp%3CSession%3E%3E">MinimapControls&lt;SimpleApp&lt;Session&gt;&gt;</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>game</a></p><script>window.sidebarCurrent = {name: 'MinimapController', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#616' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>game</a>::<wbr><a class="struct" href=''>MinimapController</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>struct MinimapController;</pre></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-MinimapControls%3CSimpleApp%3CSession%3E%3E' class='impl'><code class='in-band'>impl <a class="trait" href="../../map_gui/tools/minimap/trait.MinimapControls.html" title="trait map_gui::tools::minimap::MinimapControls">MinimapControls</a>&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;&gt; for <a class="struct" href="../../experiment/game/struct.MinimapController.html" title="struct experiment::game::MinimapController">MinimapController</a></code><a href='#impl-MinimapControls%3CSimpleApp%3CSession%3E%3E' class='anchor'></a><a class='srclink' href='../../src/experiment/game.rs.html#618-631' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.has_zorder' class="method hidden"><code>fn <a href='../../map_gui/tools/minimap/trait.MinimapControls.html#tymethod.has_zorder' class='fnname'>has_zorder</a>(&amp;self, _: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/experiment/game.rs.html#619-621' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Should the user be able to control the z-order visible? The control is only present when
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#684' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>game</a>::<wbr><a class="struct" href=''>MinimapController</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>struct MinimapController;</pre></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-MinimapControls%3CSimpleApp%3CSession%3E%3E' class='impl'><code class='in-band'>impl <a class="trait" href="../../map_gui/tools/minimap/trait.MinimapControls.html" title="trait map_gui::tools::minimap::MinimapControls">MinimapControls</a>&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;&gt; for <a class="struct" href="../../experiment/game/struct.MinimapController.html" title="struct experiment::game::MinimapController">MinimapController</a></code><a href='#impl-MinimapControls%3CSimpleApp%3CSession%3E%3E' class='anchor'></a><a class='srclink' href='../../src/experiment/game.rs.html#686-699' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.has_zorder' class="method hidden"><code>fn <a href='../../map_gui/tools/minimap/trait.MinimapControls.html#tymethod.has_zorder' class='fnname'>has_zorder</a>(&amp;self, _: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/experiment/game.rs.html#687-689' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Should the user be able to control the z-order visible? The control is only present when
zoomed in, placed beneath the zoom column. <a href="../../map_gui/tools/minimap/trait.MinimapControls.html#tymethod.has_zorder">Read more</a></p>
</div><h4 id='method.make_legend' class="method hidden"><code>fn <a href='../../map_gui/tools/minimap/trait.MinimapControls.html#method.make_legend' class='fnname'>make_legend</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;<br>) -&gt; Widget</code><a class='srclink' href='../../src/experiment/game.rs.html#623-630' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>A row beneath the minimap in the zoomed view, usually used as a legend for things on the
</div><h4 id='method.make_legend' class="method hidden"><code>fn <a href='../../map_gui/tools/minimap/trait.MinimapControls.html#method.make_legend' class='fnname'>make_legend</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;<br>) -&gt; Widget</code><a class='srclink' href='../../src/experiment/game.rs.html#691-698' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>A row beneath the minimap in the zoomed view, usually used as a legend for things on the
minimap. <a href="../../map_gui/tools/minimap/trait.MinimapControls.html#method.make_legend">Read more</a></p>
</div><h4 id='method.has_layer' class="method hidden"><code>fn <a href='../../map_gui/tools/minimap/trait.MinimapControls.html#method.has_layer' class='fnname'>has_layer</a>(&amp;self, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>A) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/map_gui/tools/minimap.rs.html#38-40' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Is there some additional layer displayed on the minimap? If this changes, the panel gets
recalculated. <a href="../../map_gui/tools/minimap/trait.MinimapControls.html#method.has_layer">Read more</a></p>

View File

@ -1,5 +1,5 @@
<!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 `BUILT_TIME_UTC` constant in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>game::pregame::built_info::BUILT_TIME_UTC - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a></p><script>window.sidebarCurrent = {name: 'BUILT_TIME_UTC', ty: 'constant', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-c1f324f9d3d7e3b2/out/built.rs.html#53' title='goto source code'>[src]</a></span><span class='in-band'>Constant <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a>::<wbr><a class="constant" href=''>BUILT_TIME_UTC</a></span></h1><pre class='rust const'>pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;Thu, 17 Dec 2020 23:28:20 +0000&quot;;</pre><div class='docblock'><p>The built-time in RFC2822, UTC</p>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-c1f324f9d3d7e3b2/out/built.rs.html#53' title='goto source code'>[src]</a></span><span class='in-band'>Constant <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a>::<wbr><a class="constant" href=''>BUILT_TIME_UTC</a></span></h1><pre class='rust const'>pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;Fri, 18 Dec 2020 00:24:44 +0000&quot;;</pre><div class='docblock'><p>The built-time in RFC2822, UTC</p>
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -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 `find_divided_highways` fn in crate `parking_mapper`."><meta name="keywords" content="rust, rustlang, rust-lang, find_divided_highways"><title>parking_mapper::mapper::find_divided_highways - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../parking_mapper/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>parking_mapper</a>::<wbr><a href='index.html'>mapper</a></p><script>window.sidebarCurrent = {name: 'find_divided_highways', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/parking_mapper/mapper.rs.html#602-642' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>parking_mapper</a>::<wbr><a href='index.html'>mapper</a>::<wbr><a class="fn" href=''>find_divided_highways</a></span></h1><pre class='rust fn'>fn find_divided_highways(app: &amp;SimpleApp&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a>&lt;<a class="struct" href="../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "parking_mapper";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/parking_mapper/mapper.rs.html#602-642' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>parking_mapper</a>::<wbr><a href='index.html'>mapper</a>::<wbr><a class="fn" href=''>find_divided_highways</a></span></h1><pre class='rust fn'>fn find_divided_highways(app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a>&lt;<a class="struct" href="../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "parking_mapper";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -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 `find_overlapping_stuff` fn in crate `parking_mapper`."><meta name="keywords" content="rust, rustlang, rust-lang, find_overlapping_stuff"><title>parking_mapper::mapper::find_overlapping_stuff - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../parking_mapper/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>parking_mapper</a>::<wbr><a href='index.html'>mapper</a></p><script>window.sidebarCurrent = {name: 'find_overlapping_stuff', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/parking_mapper/mapper.rs.html#645-686' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>parking_mapper</a>::<wbr><a href='index.html'>mapper</a>::<wbr><a class="fn" href=''>find_overlapping_stuff</a></span></h1><pre class='rust fn'>fn find_overlapping_stuff(<br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;SimpleApp&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;timer: &amp;mut <a class="struct" href="../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a>&lt;'_&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "parking_mapper";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/parking_mapper/mapper.rs.html#645-686' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>parking_mapper</a>::<wbr><a href='index.html'>mapper</a>::<wbr><a class="fn" href=''>find_overlapping_stuff</a></span></h1><pre class='rust fn'>fn find_overlapping_stuff(<br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;timer: &amp;mut <a class="struct" href="../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a>&lt;'_&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "parking_mapper";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -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 `App` type in crate `parking_mapper`."><meta name="keywords" content="rust, rustlang, rust-lang, App"><title>parking_mapper::mapper::App - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc type"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../parking_mapper/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Type Definition App</p><div class="sidebar-elems"><p class='location'><a href='../index.html'>parking_mapper</a>::<wbr><a href='index.html'>mapper</a></p><script>window.sidebarCurrent = {name: 'App', ty: 'type', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/parking_mapper/mapper.rs.html#16' title='goto source code'>[src]</a></span><span class='in-band'>Type Definition <a href='../index.html'>parking_mapper</a>::<wbr><a href='index.html'>mapper</a>::<wbr><a class="type" href=''>App</a></span></h1><pre class='rust typedef'>type App = SimpleApp&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "parking_mapper";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/parking_mapper/mapper.rs.html#16' title='goto source code'>[src]</a></span><span class='in-band'>Type Definition <a href='../index.html'>parking_mapper</a>::<wbr><a href='index.html'>mapper</a>::<wbr><a class="type" href=''>App</a></span></h1><pre class='rust typedef'>type App = <a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "parking_mapper";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

File diff suppressed because one or more lines are too long

View File

@ -188,22 +188,70 @@
<span id="185">185</span>
<span id="186">186</span>
<span id="187">187</span>
<span id="188">188</span>
<span id="189">189</span>
<span id="190">190</span>
<span id="191">191</span>
<span id="192">192</span>
<span id="193">193</span>
<span id="194">194</span>
<span id="195">195</span>
<span id="196">196</span>
<span id="197">197</span>
<span id="198">198</span>
<span id="199">199</span>
<span id="200">200</span>
<span id="201">201</span>
<span id="202">202</span>
<span id="203">203</span>
<span id="204">204</span>
<span id="205">205</span>
<span id="206">206</span>
<span id="207">207</span>
<span id="208">208</span>
<span id="209">209</span>
<span id="210">210</span>
<span id="211">211</span>
<span id="212">212</span>
<span id="213">213</span>
<span id="214">214</span>
<span id="215">215</span>
<span id="216">216</span>
<span id="217">217</span>
<span id="218">218</span>
<span id="219">219</span>
<span id="220">220</span>
<span id="221">221</span>
<span id="222">222</span>
<span id="223">223</span>
<span id="224">224</span>
<span id="225">225</span>
<span id="226">226</span>
<span id="227">227</span>
<span id="228">228</span>
<span id="229">229</span>
<span id="230">230</span>
<span id="231">231</span>
<span id="232">232</span>
<span id="233">233</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">rand</span>::{<span class="ident">Rng</span>, <span class="ident">SeedableRng</span>};
<span class="kw">use</span> <span class="ident">rand_xorshift</span>::<span class="ident">XorShiftRng</span>;
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Distance</span>, <span class="ident">Duration</span>, <span class="ident">PolyLine</span>, <span class="ident">Pt2D</span>, <span class="ident">Time</span>};
<span class="kw">use</span> <span class="ident">widgetry</span>::{<span class="ident">Color</span>, <span class="ident">Drawable</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>};
<span class="kw">use</span> <span class="ident">widgetry</span>::{<span class="ident">Color</span>, <span class="ident">Drawable</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>, <span class="ident">RewriteColor</span>};
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Animator</span> {
<span class="ident">active</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">Animation</span><span class="op">&gt;</span>,
<span class="ident">draw_current</span>: <span class="ident">Drawable</span>,
<span class="ident">draw_mapspace</span>: <span class="ident">Drawable</span>,
<span class="ident">draw_screenspace</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Drawable</span><span class="op">&gt;</span>,
}
<span class="kw">struct</span> <span class="ident">Animation</span> {
<span class="ident">start</span>: <span class="ident">Time</span>,
<span class="ident">end</span>: <span class="ident">Time</span>,
<span class="ident">effect</span>: <span class="ident">Effect</span>,
<span class="ident">screenspace</span>: <span class="ident">bool</span>,
}
<span class="kw">pub</span> <span class="kw">enum</span> <span class="ident">Effect</span> {
@ -217,13 +265,19 @@
<span class="ident">width</span>: <span class="ident">Distance</span>,
<span class="ident">pl</span>: <span class="ident">PolyLine</span>,
},
<span class="ident">Flash</span> {
<span class="ident">orig</span>: <span class="ident">GeomBatch</span>,
<span class="ident">alpha_scale</span>: (<span class="ident">f32</span>, <span class="ident">f32</span>),
<span class="ident">cycles</span>: <span class="ident">usize</span>,
},
}
<span class="kw">impl</span> <span class="ident">Animator</span> {
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Animator</span> {
<span class="ident">Animator</span> {
<span class="ident">active</span>: <span class="ident">Vec</span>::<span class="ident">new</span>(),
<span class="ident">draw_current</span>: <span class="ident">Drawable</span>::<span class="ident">empty</span>(<span class="ident">ctx</span>),
<span class="ident">draw_mapspace</span>: <span class="ident">Drawable</span>::<span class="ident">empty</span>(<span class="ident">ctx</span>),
<span class="ident">draw_screenspace</span>: <span class="prelude-val">None</span>,
}
}
@ -233,6 +287,16 @@
<span class="ident">start</span>: <span class="ident">now</span>,
<span class="ident">end</span>: <span class="ident">now</span> <span class="op">+</span> <span class="ident">duration</span>,
<span class="ident">effect</span>,
<span class="ident">screenspace</span>: <span class="bool-val">false</span>,
});
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">add_screenspace</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">now</span>: <span class="ident">Time</span>, <span class="ident">duration</span>: <span class="ident">Duration</span>, <span class="ident">effect</span>: <span class="ident">Effect</span>) {
<span class="self">self</span>.<span class="ident">active</span>.<span class="ident">push</span>(<span class="ident">Animation</span> {
<span class="ident">start</span>: <span class="ident">now</span>,
<span class="ident">end</span>: <span class="ident">now</span> <span class="op">+</span> <span class="ident">duration</span>,
<span class="ident">effect</span>,
<span class="ident">screenspace</span>: <span class="bool-val">true</span>,
});
}
@ -240,7 +304,8 @@
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">active</span>.<span class="ident">is_empty</span>() {
<span class="kw">return</span>;
}
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">mapspace</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">screenspace</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>();
<span class="self">self</span>.<span class="ident">active</span>.<span class="ident">retain</span>(<span class="op">|</span><span class="ident">anim</span><span class="op">|</span> {
<span class="kw">let</span> <span class="ident">pct</span> <span class="op">=</span> (<span class="ident">now</span> <span class="op">-</span> <span class="ident">anim</span>.<span class="ident">start</span>) <span class="op">/</span> (<span class="ident">anim</span>.<span class="ident">end</span> <span class="op">-</span> <span class="ident">anim</span>.<span class="ident">start</span>);
<span class="kw">if</span> <span class="ident">pct</span> <span class="op">&lt;</span> <span class="number">0.0</span> {
@ -249,15 +314,29 @@
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">pct</span> <span class="op">&gt;</span> <span class="number">1.0</span> {
<span class="bool-val">false</span>
} <span class="kw">else</span> {
<span class="ident">anim</span>.<span class="ident">effect</span>.<span class="ident">render</span>(<span class="ident">pct</span>, <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">batch</span>);
<span class="kw">if</span> <span class="ident">anim</span>.<span class="ident">screenspace</span> {
<span class="ident">anim</span>.<span class="ident">effect</span>.<span class="ident">render</span>(<span class="ident">pct</span>, <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">screenspace</span>);
} <span class="kw">else</span> {
<span class="ident">anim</span>.<span class="ident">effect</span>.<span class="ident">render</span>(<span class="ident">pct</span>, <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">mapspace</span>);
}
<span class="bool-val">true</span>
}
});
<span class="self">self</span>.<span class="ident">draw_current</span> <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">upload</span>(<span class="ident">batch</span>);
<span class="self">self</span>.<span class="ident">draw_mapspace</span> <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">upload</span>(<span class="ident">mapspace</span>);
<span class="kw">if</span> <span class="ident">screenspace</span>.<span class="ident">is_empty</span>() {
<span class="self">self</span>.<span class="ident">draw_screenspace</span> <span class="op">=</span> <span class="prelude-val">None</span>;
} <span class="kw">else</span> {
<span class="self">self</span>.<span class="ident">draw_screenspace</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">ctx</span>.<span class="ident">upload</span>(<span class="ident">screenspace</span>));
}
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>) {
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">draw_current</span>);
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">draw_mapspace</span>);
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="kw-2">ref</span> <span class="ident">d</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">draw_screenspace</span> {
<span class="ident">g</span>.<span class="ident">fork_screenspace</span>();
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="ident">d</span>);
<span class="ident">g</span>.<span class="ident">unfork</span>();
}
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">is_done</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">bool</span> {
@ -285,6 +364,19 @@
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="kw-2">*</span><span class="ident">color</span>, <span class="ident">pl</span>.<span class="ident">make_polygons</span>(<span class="kw-2">*</span><span class="ident">width</span>));
}
}
<span class="ident">Effect</span>::<span class="ident">Flash</span> {
<span class="kw-2">ref</span> <span class="ident">orig</span>,
<span class="ident">alpha_scale</span>,
<span class="ident">cycles</span>,
} <span class="op">=</span><span class="op">&gt;</span> {
<span class="comment">// -1 to 1</span>
<span class="kw">let</span> <span class="ident">shift</span> <span class="op">=</span> (<span class="ident">pct</span> <span class="op">*</span> (<span class="kw-2">*</span><span class="ident">cycles</span> <span class="kw">as</span> <span class="ident">f64</span>) <span class="op">*</span> (<span class="number">2.0</span> <span class="op">*</span> <span class="ident">std</span>::<span class="ident">f64</span>::<span class="ident">consts</span>::<span class="ident">PI</span>)).<span class="ident">sin</span>() <span class="kw">as</span> <span class="ident">f32</span>;
<span class="kw">let</span> <span class="ident">midpt</span> <span class="op">=</span> (<span class="ident">alpha_scale</span>.<span class="number">0</span> <span class="op">+</span> <span class="ident">alpha_scale</span>.<span class="number">1</span>) <span class="op">/</span> <span class="number">2.0</span>;
<span class="kw">let</span> <span class="ident">half_range</span> <span class="op">=</span> (<span class="ident">alpha_scale</span>.<span class="number">1</span> <span class="op">-</span> <span class="ident">alpha_scale</span>.<span class="number">0</span>) <span class="op">/</span> <span class="number">2.0</span>;
<span class="kw">let</span> <span class="ident">alpha</span> <span class="op">=</span> <span class="ident">midpt</span> <span class="op">+</span> <span class="ident">shift</span> <span class="op">*</span> <span class="ident">half_range</span>;
<span class="ident">batch</span>.<span class="ident">append</span>(<span class="ident">orig</span>.<span class="ident">clone</span>().<span class="ident">color</span>(<span class="ident">RewriteColor</span>::<span class="ident">ChangeAlpha</span>(<span class="ident">alpha</span>)));
}
}
}
}

View File

@ -632,6 +632,74 @@
<span id="629">629</span>
<span id="630">630</span>
<span id="631">631</span>
<span id="632">632</span>
<span id="633">633</span>
<span id="634">634</span>
<span id="635">635</span>
<span id="636">636</span>
<span id="637">637</span>
<span id="638">638</span>
<span id="639">639</span>
<span id="640">640</span>
<span id="641">641</span>
<span id="642">642</span>
<span id="643">643</span>
<span id="644">644</span>
<span id="645">645</span>
<span id="646">646</span>
<span id="647">647</span>
<span id="648">648</span>
<span id="649">649</span>
<span id="650">650</span>
<span id="651">651</span>
<span id="652">652</span>
<span id="653">653</span>
<span id="654">654</span>
<span id="655">655</span>
<span id="656">656</span>
<span id="657">657</span>
<span id="658">658</span>
<span id="659">659</span>
<span id="660">660</span>
<span id="661">661</span>
<span id="662">662</span>
<span id="663">663</span>
<span id="664">664</span>
<span id="665">665</span>
<span id="666">666</span>
<span id="667">667</span>
<span id="668">668</span>
<span id="669">669</span>
<span id="670">670</span>
<span id="671">671</span>
<span id="672">672</span>
<span id="673">673</span>
<span id="674">674</span>
<span id="675">675</span>
<span id="676">676</span>
<span id="677">677</span>
<span id="678">678</span>
<span id="679">679</span>
<span id="680">680</span>
<span id="681">681</span>
<span id="682">682</span>
<span id="683">683</span>
<span id="684">684</span>
<span id="685">685</span>
<span id="686">686</span>
<span id="687">687</span>
<span id="688">688</span>
<span id="689">689</span>
<span id="690">690</span>
<span id="691">691</span>
<span id="692">692</span>
<span id="693">693</span>
<span id="694">694</span>
<span id="695">695</span>
<span id="696">696</span>
<span id="697">697</span>
<span id="698">698</span>
<span id="699">699</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">HashSet</span>;
@ -890,6 +958,7 @@
<span class="kw">let</span> <span class="ident">refill</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">vehicle</span>.<span class="ident">max_energy</span> <span class="op">-</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">energy</span>;
<span class="kw">if</span> <span class="ident">refill</span> <span class="op">&gt;</span> <span class="number">0</span> {
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">energy</span> <span class="op">+</span><span class="op">=</span> <span class="ident">refill</span>;
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">warned_low_energy</span> <span class="op">=</span> <span class="bool-val">false</span>;
<span class="kw">let</span> <span class="ident">path_speed</span> <span class="op">=</span> <span class="ident">Duration</span>::<span class="ident">seconds</span>(<span class="number">0.2</span>);
<span class="self">self</span>.<span class="ident">animator</span>.<span class="ident">add</span>(
<span class="ident">app</span>.<span class="ident">time</span>,
@ -1022,6 +1091,69 @@
);
}
<span class="kw">if</span> <span class="op">!</span><span class="self">self</span>.<span class="ident">state</span>.<span class="ident">warned_low_time</span>
<span class="op">&amp;&amp;</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">level</span>.<span class="ident">time_limit</span> <span class="op">-</span> (<span class="ident">app</span>.<span class="ident">time</span> <span class="op">-</span> <span class="ident">Time</span>::<span class="ident">START_OF_DAY</span>)
<span class="op">&lt;</span><span class="op">=</span> <span class="ident">Duration</span>::<span class="ident">seconds</span>(<span class="number">20.0</span>)
{
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">warned_low_time</span> <span class="op">=</span> <span class="bool-val">true</span>;
<span class="self">self</span>.<span class="ident">animator</span>.<span class="ident">add</span>(
<span class="ident">app</span>.<span class="ident">time</span>,
<span class="ident">Duration</span>::<span class="ident">seconds</span>(<span class="number">2.0</span>),
<span class="ident">Effect</span>::<span class="ident">Flash</span> {
<span class="ident">alpha_scale</span>: (<span class="number">0.1</span>, <span class="number">0.5</span>),
<span class="ident">cycles</span>: <span class="number">2</span>,
<span class="ident">orig</span>: <span class="ident">GeomBatch</span>::<span class="ident">from</span>(<span class="macro">vec</span><span class="macro">!</span>[(
<span class="ident">Color</span>::<span class="ident">RED</span>,
<span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_boundary_polygon</span>().<span class="ident">clone</span>(),
)]),
},
);
<span class="self">self</span>.<span class="ident">animator</span>.<span class="ident">add_screenspace</span>(
<span class="ident">app</span>.<span class="ident">time</span>,
<span class="ident">Duration</span>::<span class="ident">seconds</span>(<span class="number">2.0</span>),
<span class="ident">Effect</span>::<span class="ident">Scale</span> {
<span class="ident">lerp_scale</span>: (<span class="number">1.0</span>, <span class="number">4.0</span>),
<span class="ident">center</span>: {
<span class="kw">let</span> <span class="ident">pt</span> <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">center_to_screen_pt</span>();
<span class="ident">Pt2D</span>::<span class="ident">new</span>(<span class="ident">pt</span>.<span class="ident">x</span>, <span class="ident">pt</span>.<span class="ident">y</span> <span class="op">/</span> <span class="number">2.0</span>)
},
<span class="ident">orig</span>: <span class="ident">Text</span>::<span class="ident">from</span>(<span class="ident">Line</span>(<span class="string">&quot;Almost out of time!&quot;</span>))
.<span class="ident">bg</span>(<span class="ident">Color</span>::<span class="ident">RED</span>)
.<span class="ident">render_autocropped</span>(<span class="ident">ctx</span>),
},
);
}
<span class="kw">if</span> <span class="op">!</span><span class="self">self</span>.<span class="ident">state</span>.<span class="ident">warned_low_energy</span> <span class="op">&amp;&amp;</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">energy</span> <span class="op">&lt;</span> <span class="number">30</span> {
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">warned_low_energy</span> <span class="op">=</span> <span class="bool-val">true</span>;
<span class="self">self</span>.<span class="ident">animator</span>.<span class="ident">add</span>(
<span class="ident">app</span>.<span class="ident">time</span>,
<span class="ident">Duration</span>::<span class="ident">seconds</span>(<span class="number">2.0</span>),
<span class="ident">Effect</span>::<span class="ident">Flash</span> {
<span class="ident">alpha_scale</span>: (<span class="number">0.1</span>, <span class="number">0.5</span>),
<span class="ident">cycles</span>: <span class="number">2</span>,
<span class="ident">orig</span>: <span class="ident">GeomBatch</span>::<span class="ident">from</span>(<span class="macro">vec</span><span class="macro">!</span>[(
<span class="ident">Color</span>::<span class="ident">RED</span>,
<span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_boundary_polygon</span>().<span class="ident">clone</span>(),
)]),
},
);
<span class="self">self</span>.<span class="ident">animator</span>.<span class="ident">add_screenspace</span>(
<span class="ident">app</span>.<span class="ident">time</span>,
<span class="ident">Duration</span>::<span class="ident">seconds</span>(<span class="number">2.0</span>),
<span class="ident">Effect</span>::<span class="ident">Scale</span> {
<span class="ident">lerp_scale</span>: (<span class="number">1.0</span>, <span class="number">4.0</span>),
<span class="ident">center</span>: {
<span class="kw">let</span> <span class="ident">pt</span> <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">center_to_screen_pt</span>();
<span class="ident">Pt2D</span>::<span class="ident">new</span>(<span class="ident">pt</span>.<span class="ident">x</span>, <span class="ident">pt</span>.<span class="ident">y</span> <span class="op">/</span> <span class="number">2.0</span>)
},
<span class="ident">orig</span>: <span class="ident">Text</span>::<span class="ident">from</span>(<span class="ident">Line</span>(<span class="string">&quot;Low on blood sugar, refill soon!&quot;</span>))
.<span class="ident">bg</span>(<span class="ident">Color</span>::<span class="ident">RED</span>)
.<span class="ident">render_autocropped</span>(<span class="ident">ctx</span>),
},
);
}
<span class="ident">ctx</span>.<span class="ident">request_update</span>(<span class="ident">UpdateType</span>::<span class="ident">Game</span>);
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Keep</span>;
}
@ -1139,6 +1271,8 @@
<span class="ident">idle_time</span>: <span class="ident">Duration</span>,
<span class="ident">game_over</span>: <span class="ident">bool</span>,
<span class="ident">warned_low_time</span>: <span class="ident">bool</span>,
<span class="ident">warned_low_energy</span>: <span class="ident">bool</span>,
}
<span class="kw">impl</span> <span class="ident">GameState</span> {
@ -1159,6 +1293,8 @@
<span class="ident">idle_time</span>: <span class="ident">Duration</span>::<span class="ident">ZERO</span>,
<span class="ident">game_over</span>: <span class="bool-val">false</span>,
<span class="ident">warned_low_time</span>: <span class="bool-val">false</span>,
<span class="ident">warned_low_energy</span>: <span class="bool-val">false</span>,
}
}

View File

@ -100,7 +100,7 @@
<span class="ident">name</span>: <span class="string">&quot;bike&quot;</span>.<span class="ident">to_string</span>(),
<span class="ident">speed</span>: <span class="ident">Speed</span>::<span class="ident">miles_per_hour</span>(<span class="number">30.0</span>),
<span class="ident">max_energy</span>: <span class="number">100</span>,
<span class="ident">max_energy</span>: <span class="number">50</span>,
<span class="ident">draw_frames</span>: <span class="macro">vec</span><span class="macro">!</span>[<span class="string">&quot;bike1.svg&quot;</span>, <span class="string">&quot;bike2.svg&quot;</span>, <span class="string">&quot;bike1.svg&quot;</span>, <span class="string">&quot;bike3.svg&quot;</span>],
<span class="ident">scale</span>: <span class="number">0.05</span>,

View File

@ -122,7 +122,7 @@
<span class="doccomment">/// The output of `rustdoc -V`</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;rustdoc 1.48.0 (7eac88abb 2020-11-16)&quot;</span>;
<span class="doccomment">/// The built-time in RFC2822, UTC</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Thu, 17 Dec 2020 23:28:20 +0000&quot;</span>;
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Fri, 18 Dec 2020 00:24:44 +0000&quot;</span>;
<span class="doccomment">/// The target architecture, given by `cfg!(target_arch)`.</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;x86_64&quot;</span>;
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>

View File

@ -394,7 +394,7 @@
}
<span class="doccomment">/// True when the batch is empty.</span>
<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn</span> <span class="ident">is_empty</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">bool</span> {
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">is_empty</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">bool</span> {
<span class="self">self</span>.<span class="ident">list</span>.<span class="ident">is_empty</span>()
}

View File

@ -24,7 +24,7 @@ many times later.</p>
</div><h4 id='method.get_bounds' class="method"><code>pub fn <a href='#method.get_bounds' class='fnname'>get_bounds</a>(&amp;self) -&gt; <a class="struct" href="../../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#93-102' title='goto source code'>[src]</a></h4><div class='docblock'><p>Compute the bounds of all polygons in this batch.</p>
</div><h4 id='method.autocrop' class="method"><code>pub fn <a href='#method.autocrop' class='fnname'>autocrop</a>(self) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#105-114' title='goto source code'>[src]</a></h4><div class='docblock'><p>Sets the top-left to 0, 0. Not sure exactly when this should be used.</p>
</div><h4 id='method.unioned_polygon' class="method"><code>pub fn <a href='#method.unioned_polygon' class='fnname'>unioned_polygon</a>(&amp;self) -&gt; <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#117-123' title='goto source code'>[src]</a></h4><div class='docblock'><p>Builds a single polygon covering everything in this batch. Use to create a hitbox.</p>
</div><h4 id='method.is_empty' class="method"><code>pub(crate) fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#126-128' title='goto source code'>[src]</a></h4><div class='docblock'><p>True when the batch is empty.</p>
</div><h4 id='method.is_empty' class="method"><code>pub fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#126-128' title='goto source code'>[src]</a></h4><div class='docblock'><p>True when the batch is empty.</p>
</div><h4 id='method.get_dims' class="method"><code>pub fn <a href='#method.get_dims' class='fnname'>get_dims</a>(&amp;self) -&gt; <a class="struct" href="../../widgetry/struct.ScreenDims.html" title="struct widgetry::ScreenDims">ScreenDims</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#131-139' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the width and height of all geometry contained in the batch.</p>
</div><h4 id='method.from_svg_contents' class="method"><code>pub fn <a href='#method.from_svg_contents' class='fnname'>from_svg_contents</a>(raw: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#142-147' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns a batch containing a parsed SVG string.</p>
</div><h4 id='method.load_svg' class="method"><code>pub fn <a href='#method.load_svg' class='fnname'>load_svg</a>&lt;P:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="../../widgetry/struct.Prerender.html" title="struct widgetry::Prerender">Prerender</a>&gt;&gt;(prerender: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>P, filename: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#150-152' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns a batch containing an SVG from a file.</p>

View File

@ -24,7 +24,7 @@ many times later.</p>
</div><h4 id='method.get_bounds' class="method"><code>pub fn <a href='#method.get_bounds' class='fnname'>get_bounds</a>(&amp;self) -&gt; <a class="struct" href="../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#93-102' title='goto source code'>[src]</a></h4><div class='docblock'><p>Compute the bounds of all polygons in this batch.</p>
</div><h4 id='method.autocrop' class="method"><code>pub fn <a href='#method.autocrop' class='fnname'>autocrop</a>(self) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#105-114' title='goto source code'>[src]</a></h4><div class='docblock'><p>Sets the top-left to 0, 0. Not sure exactly when this should be used.</p>
</div><h4 id='method.unioned_polygon' class="method"><code>pub fn <a href='#method.unioned_polygon' class='fnname'>unioned_polygon</a>(&amp;self) -&gt; <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#117-123' title='goto source code'>[src]</a></h4><div class='docblock'><p>Builds a single polygon covering everything in this batch. Use to create a hitbox.</p>
</div><h4 id='method.is_empty' class="method"><code>pub(crate) fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#126-128' title='goto source code'>[src]</a></h4><div class='docblock'><p>True when the batch is empty.</p>
</div><h4 id='method.is_empty' class="method"><code>pub fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#126-128' title='goto source code'>[src]</a></h4><div class='docblock'><p>True when the batch is empty.</p>
</div><h4 id='method.get_dims' class="method"><code>pub fn <a href='#method.get_dims' class='fnname'>get_dims</a>(&amp;self) -&gt; <a class="struct" href="../widgetry/struct.ScreenDims.html" title="struct widgetry::ScreenDims">ScreenDims</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#131-139' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the width and height of all geometry contained in the batch.</p>
</div><h4 id='method.from_svg_contents' class="method"><code>pub fn <a href='#method.from_svg_contents' class='fnname'>from_svg_contents</a>(raw: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#142-147' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns a batch containing a parsed SVG string.</p>
</div><h4 id='method.load_svg' class="method"><code>pub fn <a href='#method.load_svg' class='fnname'>load_svg</a>&lt;P:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="../widgetry/struct.Prerender.html" title="struct widgetry::Prerender">Prerender</a>&gt;&gt;(prerender: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>P, filename: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#150-152' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns a batch containing an SVG from a file.</p>