Publish package with updated documentation and rotated rectangle

This commit is contained in:
schmelczerandras 2020-09-28 18:22:07 +02:00
parent 0fed4f4220
commit 39bd55144f
16 changed files with 687 additions and 137 deletions

View file

@ -128,7 +128,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/31fcfd3/src/drawables/shapes/inverted-tunnel.ts#L56">drawables/shapes/inverted-tunnel.ts:56</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/0fed4f4/src/drawables/shapes/inverted-tunnel.ts#L56">drawables/shapes/inverted-tunnel.ts:56</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
@ -159,7 +159,7 @@
<div class="tsd-signature tsd-kind-icon">from<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">vec2</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/31fcfd3/src/drawables/shapes/inverted-tunnel.ts#L59">drawables/shapes/inverted-tunnel.ts:59</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/0fed4f4/src/drawables/shapes/inverted-tunnel.ts#L59">drawables/shapes/inverted-tunnel.ts:59</a></li>
</ul>
</aside>
</section>
@ -169,7 +169,7 @@
<div class="tsd-signature tsd-kind-icon">from<wbr>Radius<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/31fcfd3/src/drawables/shapes/inverted-tunnel.ts#L61">drawables/shapes/inverted-tunnel.ts:61</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/0fed4f4/src/drawables/shapes/inverted-tunnel.ts#L61">drawables/shapes/inverted-tunnel.ts:61</a></li>
</ul>
</aside>
</section>
@ -179,7 +179,7 @@
<div class="tsd-signature tsd-kind-icon">to<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">vec2</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/31fcfd3/src/drawables/shapes/inverted-tunnel.ts#L60">drawables/shapes/inverted-tunnel.ts:60</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/0fed4f4/src/drawables/shapes/inverted-tunnel.ts#L60">drawables/shapes/inverted-tunnel.ts:60</a></li>
</ul>
</aside>
</section>
@ -189,7 +189,7 @@
<div class="tsd-signature tsd-kind-icon">to<wbr>Radius<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/31fcfd3/src/drawables/shapes/inverted-tunnel.ts#L62">drawables/shapes/inverted-tunnel.ts:62</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/0fed4f4/src/drawables/shapes/inverted-tunnel.ts#L62">drawables/shapes/inverted-tunnel.ts:62</a></li>
</ul>
</aside>
</section>
@ -207,7 +207,7 @@
<aside class="tsd-sources">
<p>Overrides <a href="drawable.html">Drawable</a>.<a href="drawable.html#getobjecttoserialize">getObjectToSerialize</a></p>
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/31fcfd3/src/drawables/shapes/inverted-tunnel.ts#L81">drawables/shapes/inverted-tunnel.ts:81</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/0fed4f4/src/drawables/shapes/inverted-tunnel.ts#L81">drawables/shapes/inverted-tunnel.ts:81</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
@ -234,7 +234,7 @@
<aside class="tsd-sources">
<p>Overrides <a href="drawable.html">Drawable</a>.<a href="drawable.html#mindistance">minDistance</a></p>
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/31fcfd3/src/drawables/shapes/inverted-tunnel.ts#L67">drawables/shapes/inverted-tunnel.ts:67</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/0fed4f4/src/drawables/shapes/inverted-tunnel.ts#L67">drawables/shapes/inverted-tunnel.ts:67</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
@ -258,7 +258,7 @@
<aside class="tsd-sources">
<p>Inherited from <a href="drawable.html">Drawable</a>.<a href="drawable.html#serializetouniforms">serializeToUniforms</a></p>
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/31fcfd3/src/drawables/drawable.ts#L36">drawables/drawable.ts:36</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/0fed4f4/src/drawables/drawable.ts#L36">drawables/drawable.ts:36</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
@ -287,7 +287,7 @@
<aside class="tsd-sources">
<p>Overrides <a href="drawable.html">Drawable</a>.<a href="drawable.html#descriptor">descriptor</a></p>
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/31fcfd3/src/drawables/shapes/inverted-tunnel.ts#L11">drawables/shapes/inverted-tunnel.ts:11</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/0fed4f4/src/drawables/shapes/inverted-tunnel.ts#L11">drawables/shapes/inverted-tunnel.ts:11</a></li>
</ul>
</aside>
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-object-literal">
@ -296,7 +296,7 @@
<div class="tsd-signature tsd-kind-icon">empty<span class="tsd-signature-symbol">:</span> <a href="invertedtunnel.html" class="tsd-signature-type">InvertedTunnel</a><span class="tsd-signature-symbol"> = new InvertedTunnel(vec2.fromValues(0, 0), vec2.fromValues(0, 0), 0, 0)</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/31fcfd3/src/drawables/shapes/inverted-tunnel.ts#L55">drawables/shapes/inverted-tunnel.ts:55</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/0fed4f4/src/drawables/shapes/inverted-tunnel.ts#L55">drawables/shapes/inverted-tunnel.ts:55</a></li>
</ul>
</aside>
</section>
@ -306,7 +306,7 @@
<div class="tsd-signature tsd-kind-icon">shader<wbr>Combination<wbr>Steps<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = [0, 1, 4, 16, 32]</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/31fcfd3/src/drawables/shapes/inverted-tunnel.ts#L54">drawables/shapes/inverted-tunnel.ts:54</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/0fed4f4/src/drawables/shapes/inverted-tunnel.ts#L54">drawables/shapes/inverted-tunnel.ts:54</a></li>
</ul>
</aside>
</section>
@ -316,7 +316,7 @@
<div class="tsd-signature tsd-kind-icon">uniform<wbr>Count<wbr>Macro<wbr>Name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &quot;INVERTED_TUNNEL_COUNT&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/31fcfd3/src/drawables/shapes/inverted-tunnel.ts#L53">drawables/shapes/inverted-tunnel.ts:53</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/0fed4f4/src/drawables/shapes/inverted-tunnel.ts#L53">drawables/shapes/inverted-tunnel.ts:53</a></li>
</ul>
</aside>
</section>
@ -326,7 +326,7 @@
<div class="tsd-signature tsd-kind-icon">property<wbr>Uniform<wbr>Mapping<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/31fcfd3/src/drawables/shapes/inverted-tunnel.ts#L47">drawables/shapes/inverted-tunnel.ts:47</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/0fed4f4/src/drawables/shapes/inverted-tunnel.ts#L47">drawables/shapes/inverted-tunnel.ts:47</a></li>
</ul>
</aside>
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-object-literal">
@ -335,7 +335,7 @@
<div class="tsd-signature tsd-kind-icon">from<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &quot;froms&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/31fcfd3/src/drawables/shapes/inverted-tunnel.ts#L48">drawables/shapes/inverted-tunnel.ts:48</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/0fed4f4/src/drawables/shapes/inverted-tunnel.ts#L48">drawables/shapes/inverted-tunnel.ts:48</a></li>
</ul>
</aside>
</section>
@ -345,7 +345,7 @@
<div class="tsd-signature tsd-kind-icon">from<wbr>Radius<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &quot;fromRadii&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/31fcfd3/src/drawables/shapes/inverted-tunnel.ts#L50">drawables/shapes/inverted-tunnel.ts:50</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/0fed4f4/src/drawables/shapes/inverted-tunnel.ts#L50">drawables/shapes/inverted-tunnel.ts:50</a></li>
</ul>
</aside>
</section>
@ -355,7 +355,7 @@
<div class="tsd-signature tsd-kind-icon">to<wbr>From<wbr>Delta<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &quot;toFromDeltas&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/31fcfd3/src/drawables/shapes/inverted-tunnel.ts#L49">drawables/shapes/inverted-tunnel.ts:49</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/0fed4f4/src/drawables/shapes/inverted-tunnel.ts#L49">drawables/shapes/inverted-tunnel.ts:49</a></li>
</ul>
</aside>
</section>
@ -365,7 +365,7 @@
<div class="tsd-signature tsd-kind-icon">to<wbr>Radius<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &quot;toRadii&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/31fcfd3/src/drawables/shapes/inverted-tunnel.ts#L51">drawables/shapes/inverted-tunnel.ts:51</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/0fed4f4/src/drawables/shapes/inverted-tunnel.ts#L51">drawables/shapes/inverted-tunnel.ts:51</a></li>
</ul>
</aside>
</section>
@ -376,7 +376,7 @@
<div class="tsd-signature tsd-kind-icon">sdf<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/31fcfd3/src/drawables/shapes/inverted-tunnel.ts#L12">drawables/shapes/inverted-tunnel.ts:12</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/0fed4f4/src/drawables/shapes/inverted-tunnel.ts#L12">drawables/shapes/inverted-tunnel.ts:12</a></li>
</ul>
</aside>
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-object-literal">
@ -385,7 +385,7 @@
<div class="tsd-signature tsd-kind-icon">distance<wbr>Function<wbr>Name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &quot;invertedTunnelMinDistance&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/31fcfd3/src/drawables/shapes/inverted-tunnel.ts#L45">drawables/shapes/inverted-tunnel.ts:45</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/0fed4f4/src/drawables/shapes/inverted-tunnel.ts#L45">drawables/shapes/inverted-tunnel.ts:45</a></li>
</ul>
</aside>
</section>
@ -395,7 +395,7 @@
<div class="tsd-signature tsd-kind-icon">is<wbr>Inverted<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">true</span><span class="tsd-signature-symbol"> = true</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/31fcfd3/src/drawables/shapes/inverted-tunnel.ts#L44">drawables/shapes/inverted-tunnel.ts:44</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/0fed4f4/src/drawables/shapes/inverted-tunnel.ts#L44">drawables/shapes/inverted-tunnel.ts:44</a></li>
</ul>
</aside>
</section>
@ -405,7 +405,7 @@
<div class="tsd-signature tsd-kind-icon">shader<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &#x60;uniform vec2 froms[INVERTED_TUNNEL_COUNT];uniform vec2 toFromDeltas[INVERTED_TUNNEL_COUNT];uniform float fromRadii[INVERTED_TUNNEL_COUNT];uniform float toRadii[INVERTED_TUNNEL_COUNT];float invertedTunnelMinDistance(vec2 target, out float colorIndex) {colorIndex &#x3D; 3.0;float minDistance &#x3D; 1000.0;for (int i &#x3D; 0; i &lt; INVERTED_TUNNEL_COUNT; i++) {vec2 targetFromDelta &#x3D; target - froms[i];float h &#x3D; clamp(dot(targetFromDelta, toFromDeltas[i])/ dot(toFromDeltas[i], toFromDeltas[i]),0.0, 1.0);float currentDistance &#x3D; -mix(fromRadii[i], toRadii[i], h) + distance(targetFromDelta, toFromDeltas[i] * h);minDistance &#x3D; min(minDistance, currentDistance);}return -minDistance;}&#x60;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/31fcfd3/src/drawables/shapes/inverted-tunnel.ts#L13">drawables/shapes/inverted-tunnel.ts:13</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/0fed4f4/src/drawables/shapes/inverted-tunnel.ts#L13">drawables/shapes/inverted-tunnel.ts:13</a></li>
</ul>
</aside>
</section>
@ -471,6 +471,9 @@
</li>
</ul>
<ul class="after-current">
<li class=" tsd-kind-class">
<a href="rotatedrectangle.html" class="tsd-kind-icon">Rotated<wbr>Rectangle</a>
</li>
<li class=" tsd-kind-class">
<a href="tunnel.html" class="tsd-kind-icon">Tunnel</a>
</li>