Publish new version

This commit is contained in:
schmelczerandras 2020-10-02 14:32:33 +02:00
parent 81eb0220d2
commit 158d2f462f
15 changed files with 197 additions and 430 deletions

View file

@ -3,8 +3,8 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>RotatedRectangle | SDF-2D - v0.3.4</title>
<meta name="description" content="Documentation for SDF-2D - v0.3.4">
<title>RotatedRectangle | SDF-2D - v0.3.5</title>
<meta name="description" content="Documentation for SDF-2D - v0.3.5">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
<link rel="icon" href="../favicon.ico" />
@ -23,7 +23,7 @@
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">SDF-2D - v0.3.4</a>
<a href="../index.html" class="title">SDF-2D - v0.3.5</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
@ -103,7 +103,6 @@
<ul class="tsd-index-list">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><a href="rotatedrectangle.html#getobjecttoserialize" class="tsd-kind-icon">get<wbr>Object<wbr>ToSerialize</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="rotatedrectangle.html#mindistance" class="tsd-kind-icon">min<wbr>Distance</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="rotatedrectangle.html#serializetouniforms" class="tsd-kind-icon">serialize<wbr>ToUniforms</a></li>
</ul>
</section>
<section class="tsd-index-section ">
@ -127,7 +126,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/d241f36/src/drawables/shapes/rotated-rectangle.ts#L46">drawables/shapes/rotated-rectangle.ts:46</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/81eb022/src/drawables/shapes/rotated-rectangle.ts#L46">drawables/shapes/rotated-rectangle.ts:46</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
@ -155,7 +154,7 @@
<div class="tsd-signature tsd-kind-icon">center<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/d241f36/src/drawables/shapes/rotated-rectangle.ts#L48">drawables/shapes/rotated-rectangle.ts:48</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/81eb022/src/drawables/shapes/rotated-rectangle.ts#L48">drawables/shapes/rotated-rectangle.ts:48</a></li>
</ul>
</aside>
</section>
@ -165,7 +164,7 @@
<div class="tsd-signature tsd-kind-icon">rotation<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/d241f36/src/drawables/shapes/rotated-rectangle.ts#L48">drawables/shapes/rotated-rectangle.ts:48</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/81eb022/src/drawables/shapes/rotated-rectangle.ts#L48">drawables/shapes/rotated-rectangle.ts:48</a></li>
</ul>
</aside>
</section>
@ -175,7 +174,7 @@
<div class="tsd-signature tsd-kind-icon">size<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/d241f36/src/drawables/shapes/rotated-rectangle.ts#L48">drawables/shapes/rotated-rectangle.ts:48</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/81eb022/src/drawables/shapes/rotated-rectangle.ts#L48">drawables/shapes/rotated-rectangle.ts:48</a></li>
</ul>
</aside>
</section>
@ -193,7 +192,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/d241f36/src/drawables/shapes/rotated-rectangle.ts#L60">drawables/shapes/rotated-rectangle.ts:60</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/81eb022/src/drawables/shapes/rotated-rectangle.ts#L60">drawables/shapes/rotated-rectangle.ts:60</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
@ -220,7 +219,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/d241f36/src/drawables/shapes/rotated-rectangle.ts#L56">drawables/shapes/rotated-rectangle.ts:56</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/81eb022/src/drawables/shapes/rotated-rectangle.ts#L56">drawables/shapes/rotated-rectangle.ts:56</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -240,36 +239,6 @@
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="serializetouniforms" class="tsd-anchor"></a>
<h3>serialize<wbr>ToUniforms</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">serialize<wbr>ToUniforms<span class="tsd-signature-symbol">(</span>uniforms<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, transform2d<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">mat2d</span>, transform1d<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<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/d241f36/src/drawables/drawable.ts#L36">drawables/drawable.ts:36</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>uniforms: <span class="tsd-signature-type">any</span></h5>
</li>
<li>
<h5>transform2d: <span class="tsd-signature-type">mat2d</span></h5>
</li>
<li>
<h5>transform1d: <span class="tsd-signature-type">number</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Object literals</h2>
@ -280,7 +249,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/d241f36/src/drawables/shapes/rotated-rectangle.ts#L9">drawables/shapes/rotated-rectangle.ts:9</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/81eb022/src/drawables/shapes/rotated-rectangle.ts#L9">drawables/shapes/rotated-rectangle.ts:9</a></li>
</ul>
</aside>
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-object-literal">
@ -289,7 +258,7 @@
<div class="tsd-signature tsd-kind-icon">empty<span class="tsd-signature-symbol">:</span> <a href="rotatedrectangle.html" class="tsd-signature-type">RotatedRectangle</a><span class="tsd-signature-symbol"> = new RotatedRectangle(vec2.create(), vec2.create(), 0)</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/d241f36/src/drawables/shapes/rotated-rectangle.ts#L45">drawables/shapes/rotated-rectangle.ts:45</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/81eb022/src/drawables/shapes/rotated-rectangle.ts#L45">drawables/shapes/rotated-rectangle.ts:45</a></li>
</ul>
</aside>
</section>
@ -299,7 +268,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, 2, 3, 8, 16]</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/d241f36/src/drawables/shapes/rotated-rectangle.ts#L44">drawables/shapes/rotated-rectangle.ts:44</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/81eb022/src/drawables/shapes/rotated-rectangle.ts#L44">drawables/shapes/rotated-rectangle.ts:44</a></li>
</ul>
</aside>
</section>
@ -309,7 +278,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;ROTATED_RECTANGLE_COUNT&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/d241f36/src/drawables/shapes/rotated-rectangle.ts#L43">drawables/shapes/rotated-rectangle.ts:43</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/81eb022/src/drawables/shapes/rotated-rectangle.ts#L43">drawables/shapes/rotated-rectangle.ts:43</a></li>
</ul>
</aside>
</section>
@ -319,7 +288,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/d241f36/src/drawables/shapes/rotated-rectangle.ts#L38">drawables/shapes/rotated-rectangle.ts:38</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/81eb022/src/drawables/shapes/rotated-rectangle.ts#L38">drawables/shapes/rotated-rectangle.ts:38</a></li>
</ul>
</aside>
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-object-literal">
@ -328,7 +297,7 @@
<div class="tsd-signature tsd-kind-icon">bottom<wbr>Center<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &quot;rotatedRectangleBottomCenters&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/d241f36/src/drawables/shapes/rotated-rectangle.ts#L40">drawables/shapes/rotated-rectangle.ts:40</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/81eb022/src/drawables/shapes/rotated-rectangle.ts#L40">drawables/shapes/rotated-rectangle.ts:40</a></li>
</ul>
</aside>
</section>
@ -338,7 +307,7 @@
<div class="tsd-signature tsd-kind-icon">top<wbr>Center<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &quot;rotatedRectangleTopCenters&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/d241f36/src/drawables/shapes/rotated-rectangle.ts#L39">drawables/shapes/rotated-rectangle.ts:39</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/81eb022/src/drawables/shapes/rotated-rectangle.ts#L39">drawables/shapes/rotated-rectangle.ts:39</a></li>
</ul>
</aside>
</section>
@ -348,7 +317,7 @@
<div class="tsd-signature tsd-kind-icon">width<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &quot;rotatedRectangleWidths&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/d241f36/src/drawables/shapes/rotated-rectangle.ts#L41">drawables/shapes/rotated-rectangle.ts:41</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/81eb022/src/drawables/shapes/rotated-rectangle.ts#L41">drawables/shapes/rotated-rectangle.ts:41</a></li>
</ul>
</aside>
</section>
@ -359,7 +328,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/d241f36/src/drawables/shapes/rotated-rectangle.ts#L10">drawables/shapes/rotated-rectangle.ts:10</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/81eb022/src/drawables/shapes/rotated-rectangle.ts#L10">drawables/shapes/rotated-rectangle.ts:10</a></li>
</ul>
</aside>
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-object-literal">
@ -368,7 +337,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;rotatedRectangleMinDistance&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/d241f36/src/drawables/shapes/rotated-rectangle.ts#L36">drawables/shapes/rotated-rectangle.ts:36</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/81eb022/src/drawables/shapes/rotated-rectangle.ts#L36">drawables/shapes/rotated-rectangle.ts:36</a></li>
</ul>
</aside>
</section>
@ -378,7 +347,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 rotatedRectangleTopCenters[ROTATED_RECTANGLE_COUNT];uniform vec2 rotatedRectangleBottomCenters[ROTATED_RECTANGLE_COUNT];uniform float rotatedRectangleWidths[ROTATED_RECTANGLE_COUNT];float rotatedRectangleMinDistance(vec2 target, out float colorIndex) {colorIndex &#x3D; 4.0;float minDistance &#x3D; 1000.0;for (int i &#x3D; 0; i &lt; ROTATED_RECTANGLE_COUNT; i++) {vec2 top &#x3D; rotatedRectangleTopCenters[i];vec2 bottom &#x3D; rotatedRectangleBottomCenters[i];float height &#x3D; length(bottom - top);vec2 d &#x3D; (bottom - top) / height;vec2 q &#x3D; (target - (top + bottom) * 0.5);q &#x3D; mat2(d.x, -d.y, d.y, d.x) * q;q &#x3D; abs(q) - vec2(height, rotatedRectangleWidths[i]) * 0.5;float dist &#x3D; length(max(q, 0.0)) + min(max(q.x, q.y), 0.0);minDistance &#x3D; min(minDistance, dist);}return minDistance;}&#x60;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/d241f36/src/drawables/shapes/rotated-rectangle.ts#L12">drawables/shapes/rotated-rectangle.ts:12</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/81eb022/src/drawables/shapes/rotated-rectangle.ts#L12">drawables/shapes/rotated-rectangle.ts:12</a></li>
</ul>
</aside>
</section>
@ -434,9 +403,6 @@
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
<a href="rotatedrectangle.html#mindistance" class="tsd-kind-icon">min<wbr>Distance</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="rotatedrectangle.html#serializetouniforms" class="tsd-kind-icon">serialize<wbr>ToUniforms</a>
</li>
<li class=" tsd-kind-object-literal tsd-parent-kind-class tsd-is-overwrite tsd-is-static">
<a href="rotatedrectangle.html#descriptor" class="tsd-kind-icon">descriptor</a>
</li>