sdf-2d/docs/interfaces/runtimesettings.html
schmelczerandras 10b59a39be Add metacircle
2020-10-02 17:37:47 +02:00

339 lines
No EOL
16 KiB
HTML

<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>RuntimeSettings | 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" />
</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.5</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="runtimesettings.html">RuntimeSettings</a>
</li>
</ul>
<h1>Interface RuntimeSettings</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>Interface for a configuration object containing the settings
that can be changed during runtime.</p>
</div>
<p>The default values for RuntimeSettings can be found in <a href="../globals.html#defaultruntimesettings">defaultRuntimeSettings</a>.</p>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="target">RuntimeSettings</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="runtimesettings.html#ambientlight" class="tsd-kind-icon">ambient<wbr>Light</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="runtimesettings.html#backgroundcolor" class="tsd-kind-icon">background<wbr>Color</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="runtimesettings.html#colorpalette" class="tsd-kind-icon">color<wbr>Palette</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="runtimesettings.html#enablehighdpirendering" class="tsd-kind-icon">enable<wbr>High<wbr>Dpi<wbr>Rendering</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="runtimesettings.html#isworldinverted" class="tsd-kind-icon">is<wbr>World<wbr>Inverted</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="runtimesettings.html#lightcutoffdistance" class="tsd-kind-icon">light<wbr>Cutoff<wbr>Distance</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="runtimesettings.html#tilemultiplier" class="tsd-kind-icon">tile<wbr>Multiplier</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="ambientlight" class="tsd-anchor"></a>
<h3>ambient<wbr>Light</h3>
<div class="tsd-signature tsd-kind-icon">ambient<wbr>Light<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">vec3</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/158d2f4/src/graphics/rendering/settings/runtime-settings.ts#L58">graphics/rendering/settings/runtime-settings.ts:58</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>A light affecting every pixel (even the ones inside objects).</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="backgroundcolor" class="tsd-anchor"></a>
<h3>background<wbr>Color</h3>
<div class="tsd-signature tsd-kind-icon">background<wbr>Color<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">vec3</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">vec4</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/158d2f4/src/graphics/rendering/settings/runtime-settings.ts#L43">graphics/rendering/settings/runtime-settings.ts:43</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The default background color of the scene, can have transparency.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="colorpalette" class="tsd-anchor"></a>
<h3>color<wbr>Palette</h3>
<div class="tsd-signature tsd-kind-icon">color<wbr>Palette<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">vec3</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">vec4</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/158d2f4/src/graphics/rendering/settings/runtime-settings.ts#L53">graphics/rendering/settings/runtime-settings.ts:53</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Its length should be less than the one specified in <a href="startupsettings.html">StartupSettings</a>.paletteSize.</p>
</div>
<p>The possible colors for the objects. Each color is referenced by its index in the
palette.</p>
<p>Can have transparency.</p>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="enablehighdpirendering" class="tsd-anchor"></a>
<h3>enable<wbr>High<wbr>Dpi<wbr>Rendering</h3>
<div class="tsd-signature tsd-kind-icon">enable<wbr>High<wbr>Dpi<wbr>Rendering<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/158d2f4/src/graphics/rendering/settings/runtime-settings.ts#L13">graphics/rendering/settings/runtime-settings.ts:13</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>When set to <code>true</code> rendering will be done on the screen&#39;s real resolution.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="isworldinverted" class="tsd-anchor"></a>
<h3>is<wbr>World<wbr>Inverted</h3>
<div class="tsd-signature tsd-kind-icon">is<wbr>World<wbr>Inverted<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/158d2f4/src/graphics/rendering/settings/runtime-settings.ts#L32">graphics/rendering/settings/runtime-settings.ts:32</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>By default, every pixel is outside of objects. Flipping this value to <code>true</code> will
result in every pixel being inside a large object. From then it only makes sense to
draw inverted objects.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="lightcutoffdistance" class="tsd-anchor"></a>
<h3>light<wbr>Cutoff<wbr>Distance</h3>
<div class="tsd-signature tsd-kind-icon">light<wbr>Cutoff<wbr>Distance<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/158d2f4/src/graphics/rendering/settings/runtime-settings.ts#L38">graphics/rendering/settings/runtime-settings.ts:38</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>When lights reach the end of the display, they are slowly faded out. The length
of this phaseout can be set through this value.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="tilemultiplier" class="tsd-anchor"></a>
<h3>tile<wbr>Multiplier</h3>
<div class="tsd-signature tsd-kind-icon">tile<wbr>Multiplier<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/158d2f4/src/graphics/rendering/settings/runtime-settings.ts#L25">graphics/rendering/settings/runtime-settings.ts:25</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>First, the SDF of the scene is evaluated at every single pixel.
For speeding this process up, the screen is divided up into tiles,
this way each having to deal with a fewer objects.</p>
</div>
<p>For each tile, it is decided which objects are near its close vicinity.
This comes with some overhead for the CPU, while saving the GPU from loads of
calculations. The workload can be balanced between the CPU and the GPU by setting
this number.</p>
</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/droplet.html" class="tsd-kind-icon">Droplet</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/metacircle.html" class="tsd-kind-icon">Meta<wbr>Circle</a>
</li>
<li class=" tsd-kind-class">
<a href="../classes/rotatedrectangle.html" class="tsd-kind-icon">Rotated<wbr>Rectangle</a>
</li>
<li class=" tsd-kind-interface">
<a href="drawabledescriptor.html" class="tsd-kind-icon">Drawable<wbr>Descriptor</a>
</li>
<li class=" tsd-kind-interface">
<a href="renderer.html" class="tsd-kind-icon">Renderer</a>
</li>
</ul>
<ul class="current">
<li class="current tsd-kind-interface">
<a href="runtimesettings.html" class="tsd-kind-icon">Runtime<wbr>Settings</a>
<ul>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="runtimesettings.html#ambientlight" class="tsd-kind-icon">ambient<wbr>Light</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="runtimesettings.html#backgroundcolor" class="tsd-kind-icon">background<wbr>Color</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="runtimesettings.html#colorpalette" class="tsd-kind-icon">color<wbr>Palette</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="runtimesettings.html#enablehighdpirendering" class="tsd-kind-icon">enable<wbr>High<wbr>Dpi<wbr>Rendering</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="runtimesettings.html#isworldinverted" class="tsd-kind-icon">is<wbr>World<wbr>Inverted</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="runtimesettings.html#lightcutoffdistance" class="tsd-kind-icon">light<wbr>Cutoff<wbr>Distance</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="runtimesettings.html#tilemultiplier" class="tsd-kind-icon">tile<wbr>Multiplier</a>
</li>
</ul>
</li>
</ul>
<ul class="after-current">
<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>