sdf-2d/docs/interfaces/drawabledescriptor.html
2020-09-28 17:39:07 +02:00

298 lines
No EOL
14 KiB
HTML

<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<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">
<link rel="icon" href="../favicon.ico" />
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<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.2</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="drawabledescriptor.html">DrawableDescriptor</a>
</li>
</ul>
<h1>Interface DrawableDescriptor</h1>
</div>
</div>
</header>
<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">
<li>
<span class="target">DrawableDescriptor</span>
</li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Properties</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="drawabledescriptor.html#empty" class="tsd-kind-icon">empty</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="drawabledescriptor.html#propertyuniformmapping" class="tsd-kind-icon">property<wbr>Uniform<wbr>Mapping</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="drawabledescriptor.html#sdf" class="tsd-kind-icon">sdf</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="drawabledescriptor.html#shadercombinationsteps" class="tsd-kind-icon">shader<wbr>Combination<wbr>Steps</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="drawabledescriptor.html#uniformcountmacroname" class="tsd-kind-icon">uniform<wbr>Count<wbr>Macro<wbr>Name</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="empty" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagReadonly">Readonly</span> empty</h3>
<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/31fcfd3/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>
<h3>property<wbr>Uniform<wbr>Mapping</h3>
<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/31fcfd3/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">
<li class="tsd-parameter-index-signature">
<h5><span class="tsd-signature-symbol">[</span>property: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><span class="tsd-signature-type">string</span></h5>
</li>
</ul>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="sdf" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> sdf</h3>
<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/31fcfd3/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> <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/31fcfd3/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>
<h3>uniform<wbr>Count<wbr>Macro<wbr>Name</h3>
<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/31fcfd3/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>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Globals</em></a>
</li>
</ul>
</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">
<a href="drawabledescriptor.html" class="tsd-kind-icon">Drawable<wbr>Descriptor</a>
<ul>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="drawabledescriptor.html#empty" class="tsd-kind-icon">empty</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="drawabledescriptor.html#propertyuniformmapping" class="tsd-kind-icon">property<wbr>Uniform<wbr>Mapping</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="drawabledescriptor.html#sdf" class="tsd-kind-icon">sdf</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="drawabledescriptor.html#shadercombinationsteps" class="tsd-kind-icon">shader<wbr>Combination<wbr>Steps</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="drawabledescriptor.html#uniformcountmacroname" class="tsd-kind-icon">uniform<wbr>Count<wbr>Macro<wbr>Name</a>
</li>
</ul>
</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>
</div>
</div>
<footer>
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
<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-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-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>
</ul>
</div>
</div>
</footer>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>