Finish documentation

This commit is contained in:
schmelczerandras 2020-09-28 16:26:55 +02:00
parent 49473bf905
commit 31fcfd3d6b
86 changed files with 1383 additions and 8485 deletions

View file

@ -3,8 +3,8 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>DrawableDescriptor | SDF-2D - v0.3.1</title>
<meta name="description" content="Documentation for SDF-2D - v0.3.1">
<title>DrawableDescriptor | SDF-2D - v0.3.2</title>
<meta name="description" content="Documentation for SDF-2D - v0.3.2">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
@ -22,7 +22,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.1</a>
<a href="../index.html" class="title">SDF-2D - v0.3.2</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
@ -62,6 +62,17 @@
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Used for containing the required information to compile drawables into
shader code.</p>
</div>
<p>Each <a href="../classes/drawable.html">Drawable</a> must have a static property of this type, called descriptor.</p>
<p>For more information on how to create your own DrawableDescriptor-s, look at the
code of <a href="../classes/circle.html">Circle</a> or <a href="../classes/invertedtunnel.html">InvertedTunnel</a>.</p>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
@ -95,9 +106,15 @@
<div class="tsd-signature tsd-kind-icon">empty<span class="tsd-signature-symbol">:</span> <a href="../classes/drawable.html" class="tsd-signature-type">Drawable</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/48490b3/src/drawables/drawable-descriptor.ts#L12">drawables/drawable-descriptor.ts:12</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/49473bf/src/drawables/drawable-descriptor.ts#L62">drawables/drawable-descriptor.ts:62</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>When no shaderCombinationStep matches the current number of drawables exactly,
the value of <code>empty</code> is used to pad out arrays.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="propertyuniformmapping" class="tsd-anchor"></a>
@ -105,9 +122,15 @@
<div class="tsd-signature tsd-kind-icon">property<wbr>Uniform<wbr>Mapping<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{}</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/48490b3/src/drawables/drawable-descriptor.ts#L4">drawables/drawable-descriptor.ts:4</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/49473bf/src/drawables/drawable-descriptor.ts#L17">drawables/drawable-descriptor.ts:17</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>An object describing the relationship between the object returned by a <a href="../classes/drawable.html">Drawable</a>&#39;s
getObjectToSerialize and the name of the arrays used in the GLSL code.</p>
</div>
</div>
<div class="tsd-type-declaration">
<h4>Type declaration</h4>
<ul class="tsd-parameters">
@ -123,19 +146,31 @@
<div class="tsd-signature tsd-kind-icon">sdf<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>distanceFunctionName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>isInverted<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">false</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">true</span><span class="tsd-signature-symbol">; </span>shader<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> }</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/48490b3/src/drawables/drawable-descriptor.ts#L6">drawables/drawable-descriptor.ts:6</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/49473bf/src/drawables/drawable-descriptor.ts#L28">drawables/drawable-descriptor.ts:28</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Required property for shapes having physical dimensions.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="shadercombinationsteps" class="tsd-anchor"></a>
<h3>shader<wbr>Combination<wbr>Steps</h3>
<div class="tsd-signature tsd-kind-icon">shader<wbr>Combination<wbr>Steps<span class="tsd-signature-symbol">:</span> <a href="__global.array.html" class="tsd-signature-type">Array</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></div>
<div class="tsd-signature tsd-kind-icon">shader<wbr>Combination<wbr>Steps<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Array</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/48490b3/src/drawables/drawable-descriptor.ts#L11">drawables/drawable-descriptor.ts:11</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/49473bf/src/drawables/drawable-descriptor.ts#L56">drawables/drawable-descriptor.ts:56</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Number of possible drawables around each tile.</p>
</div>
<p>For each step, a shader will be generated. And at runtime the closes matching
shader will be used to render a given part of the scene.</p>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="uniformcountmacroname" class="tsd-anchor"></a>
@ -143,9 +178,15 @@
<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></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/48490b3/src/drawables/drawable-descriptor.ts#L5">drawables/drawable-descriptor.ts:5</a></li>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/49473bf/src/drawables/drawable-descriptor.ts#L23">drawables/drawable-descriptor.ts:23</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The name of the uniform int used in the code to refer to the
number of drawables of this type.</p>
</div>
</div>
</section>
</section>
</div>
@ -159,6 +200,24 @@
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-class">
<a href="../classes/circle.html" class="tsd-kind-icon">Circle</a>
</li>
<li class=" tsd-kind-class">
<a href="../classes/circlelight.html" class="tsd-kind-icon">Circle<wbr>Light</a>
</li>
<li class=" tsd-kind-class">
<a href="../classes/drawable.html" class="tsd-kind-icon">Drawable</a>
</li>
<li class=" tsd-kind-class">
<a href="../classes/flashlight.html" class="tsd-kind-icon">Flashlight</a>
</li>
<li class=" tsd-kind-class">
<a href="../classes/invertedtunnel.html" class="tsd-kind-icon">Inverted<wbr>Tunnel</a>
</li>
<li class=" tsd-kind-class">
<a href="../classes/tunnel.html" class="tsd-kind-icon">Tunnel</a>
</li>
</ul>
<ul class="current">
<li class="current tsd-kind-interface">
@ -183,6 +242,24 @@
</li>
</ul>
<ul class="after-current">
<li class=" tsd-kind-interface">
<a href="renderer.html" class="tsd-kind-icon">Renderer</a>
</li>
<li class=" tsd-kind-interface">
<a href="runtimesettings.html" class="tsd-kind-icon">Runtime<wbr>Settings</a>
</li>
<li class=" tsd-kind-interface">
<a href="startupsettings.html" class="tsd-kind-icon">Startup<wbr>Settings</a>
</li>
<li class=" tsd-kind-function">
<a href="../globals.html#compile" class="tsd-kind-icon">compile</a>
</li>
<li class=" tsd-kind-object-literal">
<a href="../globals.html#defaultruntimesettings" class="tsd-kind-icon">default<wbr>Runtime<wbr>Settings</a>
</li>
<li class=" tsd-kind-object-literal">
<a href="../globals.html#defaultstartupsettings" class="tsd-kind-icon">default<wbr>Startup<wbr>Settings</a>
</li>
</ul>
</nav>
</div>
@ -197,22 +274,19 @@
<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
</ul>
</div>
</div>