411 lines
No EOL
20 KiB
HTML
411 lines
No EOL
20 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.5.0</title>
|
|
<meta name="description" content="Documentation for SDF-2D - v0.5.0">
|
|
<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.5.0</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#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#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/77340a1/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>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> <span class="tsd-signature-type">Array</span><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/77340a1/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="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/77340a1/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/77340a1/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/77340a1/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="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/77340a1/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>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/77340a1/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">
|
|
<li class=" tsd-kind-enum">
|
|
<a href="../enums/filteringoptions.html" class="tsd-kind-icon">Filtering<wbr>Options</a>
|
|
</li>
|
|
<li class=" tsd-kind-enum">
|
|
<a href="../enums/wrapoptions.html" class="tsd-kind-icon">Wrap<wbr>Options</a>
|
|
</li>
|
|
<li class=" tsd-kind-class">
|
|
<a href="../classes/circlebase.html" class="tsd-kind-icon">Circle<wbr>Base</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/dropletbase.html" class="tsd-kind-icon">Droplet<wbr>Base</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/invertedtunnelbase.html" class="tsd-kind-icon">Inverted<wbr>Tunnel<wbr>Base</a>
|
|
</li>
|
|
<li class=" tsd-kind-class">
|
|
<a href="../classes/metacirclebase.html" class="tsd-kind-icon">Meta<wbr>Circle<wbr>Base</a>
|
|
</li>
|
|
<li class=" tsd-kind-class">
|
|
<a href="../classes/polygonbase.html" class="tsd-kind-icon">Polygon<wbr>Base</a>
|
|
</li>
|
|
<li class=" tsd-kind-class">
|
|
<a href="../classes/rotatedrectanglebase.html" class="tsd-kind-icon">Rotated<wbr>Rectangle<wbr>Base</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="noisypolygonbase.html" class="tsd-kind-icon">Noisy<wbr>Polygon<wbr>Base</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#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#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">
|
|
<li class=" tsd-kind-interface">
|
|
<a href="startupsettings.html" class="tsd-kind-icon">Startup<wbr>Settings</a>
|
|
</li>
|
|
<li class=" tsd-kind-interface">
|
|
<a href="textureoptions.html" class="tsd-kind-icon">Texture<wbr>Options</a>
|
|
</li>
|
|
<li class=" tsd-kind-type-alias">
|
|
<a href="../globals.html#texturewithoptions" class="tsd-kind-icon">Texture<wbr>With<wbr>Options</a>
|
|
</li>
|
|
<li class=" tsd-kind-function">
|
|
<a href="../globals.html#circlefactory" class="tsd-kind-icon">Circle<wbr>Factory</a>
|
|
</li>
|
|
<li class=" tsd-kind-function">
|
|
<a href="../globals.html#dropletfactory" class="tsd-kind-icon">Droplet<wbr>Factory</a>
|
|
</li>
|
|
<li class=" tsd-kind-function">
|
|
<a href="../globals.html#invertedtunnelfactory" class="tsd-kind-icon">Inverted<wbr>Tunnel<wbr>Factory</a>
|
|
</li>
|
|
<li class=" tsd-kind-function">
|
|
<a href="../globals.html#metacirclefactory" class="tsd-kind-icon">Meta<wbr>Circle<wbr>Factory</a>
|
|
</li>
|
|
<li class=" tsd-kind-function">
|
|
<a href="../globals.html#noisypolygonfactory" class="tsd-kind-icon">Noisy<wbr>Polygon<wbr>Factory</a>
|
|
</li>
|
|
<li class=" tsd-kind-function">
|
|
<a href="../globals.html#polygonfactory" class="tsd-kind-icon">Polygon<wbr>Factory</a>
|
|
</li>
|
|
<li class=" tsd-kind-function">
|
|
<a href="../globals.html#rotatedrectanglefactory" class="tsd-kind-icon">Rotated<wbr>Rectangle<wbr>Factory</a>
|
|
</li>
|
|
<li class=" tsd-kind-function">
|
|
<a href="../globals.html#compile" class="tsd-kind-icon">compile</a>
|
|
</li>
|
|
<li class=" tsd-kind-function">
|
|
<a href="../globals.html#hex" class="tsd-kind-icon">hex</a>
|
|
</li>
|
|
<li class=" tsd-kind-function">
|
|
<a href="../globals.html#hsl" class="tsd-kind-icon">hsl</a>
|
|
</li>
|
|
<li class=" tsd-kind-function">
|
|
<a href="../globals.html#rendernoise" class="tsd-kind-icon">render<wbr>Noise</a>
|
|
</li>
|
|
<li class=" tsd-kind-function">
|
|
<a href="../globals.html#rgb" class="tsd-kind-icon">rgb</a>
|
|
</li>
|
|
<li class=" tsd-kind-function">
|
|
<a href="../globals.html#rgb255" class="tsd-kind-icon">rgb255</a>
|
|
</li>
|
|
<li class=" tsd-kind-function">
|
|
<a href="../globals.html#rgba" class="tsd-kind-icon">rgba</a>
|
|
</li>
|
|
<li class=" tsd-kind-function">
|
|
<a href="../globals.html#rgba255" class="tsd-kind-icon">rgba255</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> |