372 lines
No EOL
19 KiB
HTML
372 lines
No EOL
19 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.7.4</title>
|
|
<meta name="description" content="Documentation for SDF-2D - v0.7.4">
|
|
<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.7.4</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#colorpalette" class="tsd-kind-icon">color<wbr>Palette</a></li>
|
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="runtimesettings.html#distancerenderscale" class="tsd-kind-icon">distance<wbr>Render<wbr>Scale</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#lightsrenderscale" class="tsd-kind-icon">lights<wbr>Render<wbr>Scale</a></li>
|
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="runtimesettings.html#motionblur" class="tsd-kind-icon">motion<wbr>Blur</a></li>
|
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="runtimesettings.html#textures" class="tsd-kind-icon">textures</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/96e3361/src/graphics/rendering/settings/runtime-settings.ts#L91">graphics/rendering/settings/runtime-settings.ts:91</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="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> <a href="__global.array.html" class="tsd-signature-type">Array</a><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><span class="tsd-signature-symbol">></span></div>
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/schmelczerandras/sdf-2d/blob/96e3361/src/graphics/rendering/settings/runtime-settings.ts#L49">graphics/rendering/settings/runtime-settings.ts:49</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, but only if WebGL2 support is enabled.</p>
|
|
</div>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
|
<a name="distancerenderscale" class="tsd-anchor"></a>
|
|
<h3>distance<wbr>Render<wbr>Scale</h3>
|
|
<div class="tsd-signature tsd-kind-icon">distance<wbr>Render<wbr>Scale<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/96e3361/src/graphics/rendering/settings/runtime-settings.ts#L59">graphics/rendering/settings/runtime-settings.ts:59</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>The resolution of the distance field rendering will be scaled up or down with this value.</p>
|
|
</div>
|
|
<p>Because of interpolation, this can be set much lower than the <code>lightsRenderScale</code>, while
|
|
maintaining closely the same perceived quality.</p>
|
|
<p>Setting this is a great way to balance quality and performance.</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/96e3361/src/graphics/rendering/settings/runtime-settings.ts#L14">graphics/rendering/settings/runtime-settings.ts:14</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'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/96e3361/src/graphics/rendering/settings/runtime-settings.ts#L33">graphics/rendering/settings/runtime-settings.ts:33</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/96e3361/src/graphics/rendering/settings/runtime-settings.ts#L39">graphics/rendering/settings/runtime-settings.ts:39</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="lightsrenderscale" class="tsd-anchor"></a>
|
|
<h3>lights<wbr>Render<wbr>Scale</h3>
|
|
<div class="tsd-signature tsd-kind-icon">lights<wbr>Render<wbr>Scale<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/96e3361/src/graphics/rendering/settings/runtime-settings.ts#L66">graphics/rendering/settings/runtime-settings.ts:66</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>The resolution of the final frame will be scaled by this value.</p>
|
|
</div>
|
|
<p>Setting this is a great way to balance quality and performance.</p>
|
|
</div>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
|
<a name="motionblur" class="tsd-anchor"></a>
|
|
<h3>motion<wbr>Blur</h3>
|
|
<div class="tsd-signature tsd-kind-icon">motion<wbr>Blur<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/96e3361/src/graphics/rendering/settings/runtime-settings.ts#L74">graphics/rendering/settings/runtime-settings.ts:74</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Set the extent of the motion blur.</p>
|
|
</div>
|
|
<p>The values must be between 0 and 1. Where 0 means no motion blur,
|
|
and values just below 1 mean an extreme amount of motion blur.</p>
|
|
</div>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
|
<a name="textures" class="tsd-anchor"></a>
|
|
<h3>textures</h3>
|
|
<div class="tsd-signature tsd-kind-icon">textures<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/96e3361/src/graphics/rendering/settings/runtime-settings.ts#L84">graphics/rendering/settings/runtime-settings.ts:84</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>It is possible to use your own textures in your SDF definitions.</p>
|
|
</div>
|
|
<p>The keys of the object should be the name used to reference them in the GLSL code,
|
|
and the values should be the textures themselves or a TextureWithOptions specifying
|
|
the texture's <a href="textureoptions.html">TextureOptions</a>.
|
|
It can be a canvas, img element, Image and so on.</p>
|
|
</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>textureName: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><span class="tsd-signature-type">TexImageSource</span><span class="tsd-signature-symbol"> | </span><a href="../globals.html#texturewithoptions" class="tsd-signature-type">TextureWithOptions</a></h5>
|
|
</li>
|
|
</ul>
|
|
</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/96e3361/src/graphics/rendering/settings/runtime-settings.ts#L26">graphics/rendering/settings/runtime-settings.ts:26</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">
|
|
</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#colorpalette" class="tsd-kind-icon">color<wbr>Palette</a>
|
|
</li>
|
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
|
<a href="runtimesettings.html#distancerenderscale" class="tsd-kind-icon">distance<wbr>Render<wbr>Scale</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#lightsrenderscale" class="tsd-kind-icon">lights<wbr>Render<wbr>Scale</a>
|
|
</li>
|
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
|
<a href="runtimesettings.html#motionblur" class="tsd-kind-icon">motion<wbr>Blur</a>
|
|
</li>
|
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
|
<a href="runtimesettings.html#textures" class="tsd-kind-icon">textures</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">
|
|
</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> |