Update doc gen
All checks were successful
Check / check (push) Successful in 37s
Publish / build (push) Successful in 30s
Publish / publish-npm (push) Has been skipped

This commit is contained in:
Andras Schmelczer 2026-10-27 21:58:52 +00:00
commit b390a04667
68 changed files with 285 additions and 1398 deletions

View file

@ -1 +1 @@
window.hierarchyData = "eJyNjs0KgzAQhN9lztHiD1JytW8hImmSYmhMSjbSg+Tdi1WhPbWXYRnmm50FwftI4F1Z9QxB36yW0XhH4AvKalUnJg2OSxBPcbUaDHfjFHhRnhnmYMEhrSDSdFJ7hobjyg8sH+NkwbYoOCKpbO3JNoNBjsaqoB14V9RNnxiKuvn433rrw222rQny3xU0ioemQe5oJt9s/l31Y1lK6QWJ4mRz"
window.hierarchyData = "eJyNjkEKwyAURO8ya5Oii1DcprcIIVg1RGq0+A1dBO9e0ibQrtrN8BnmzZ8VKcZMkJ0QPUOyo7c6uxgIcoUQmwY1W0hcknqoq7dguLlgILk4MyzJQ0J7RWTpZPYMDcdVH1g95dmDvaOQyGSqrad6Gwx6ct4kGyA7zpu+MHDefPxvo49pXHzrkv53BU3qbmnQO1rpF1t/V/1YVkp5AoR7ZGs="

View file

@ -1 +1 @@
window.navigationData = "eJytmttu3DYQht9le2umiWOnje/SBEED9OgEyEUQLGYlakWUIlWSsr0o8u6FTrs8DUXt5soLa+b7Z0hqxNOX/zaGPpnN3aaQTcs43VxtWjD15m7TyLLjVP84PXhWm4Zvrjb/MFFu7q6vNkXNeKmo2Nx9wSFVJwrDpDhhorhXN9++frs6YkoFj7DjVG/iMvPzMNij53b+lRX3uwBYcNA6DnwXJb+4/jmaAympLhRrjVQ54VrmqyJ/F1FhwlBVQbEoFEI87dtXTm60ac2B5PSCa+lRLSJn+9pg3V0wVXBKBpuU2AjZ2uZZbfh2cPjNxYcDIIa3XNPDoeKg69wMTsZZ8b+PsNHwLfZ7RMaPfTDJ6u5Jw3Xwe91G6xpa9DWfWrqCwkh1SOmOmK3rsKLv3/sSp7q1JOIAklWtkFyqquNkJOTk43rkJTT5vPVEwgGBiLiApSInW07Nii7yPDJr3OCzppN8GReR7KaaPsFeihU5eR5ZOf06+qzJyZdxEcmcmHigytCSmE4Iylfkhnhm5fhh8v00uK5JFVONEpOZN9QAWV1IIl5ZGf9ODayvKDG1gJTMUkimD6SV/LBu5Eb9sjL9o/f8a3Rck2tcMUJL5rs+03NynAL6BXROHfUVLO+wiF75ImvaEFHKaTglDfTvlaKFAbFf9VKgvlmNeT9638/OaxLGlRFqpA2+Ou2wV9DWrMBmHvNjwtlOwRBlfLkj+l+ES20IfSpo2ycQNuWM2/rcbZyAz5MrBQ0lu66qqMIWR7SCjhvimWaHZPttY7Ds6M6TzJMa1jYNLRkY+n1SRYmp+WtNeYv2BBXDQsvpY82ajkN0MYjHOapskzy8qSY3+mSo0CvHp6t8ROBie2pIDap8BEUJE5U8Qy1gJNaNEkrSCVZJ1ZyhZLvjItrI9hFMUZ+hcPRNjaIWFHBOOZk2R1YNjsAZT6RVcq+gQYZrpWDfUGGIrqGkikjBD+Tkkh/Q6LJN8RIv9iWSbJl/AX2RPY0kAkrBgUBnpC6AM7G/JKdFaGpk9X86RdHvF5eKnGyyY5tctg4Ab5eSaQOioJdI+YxEDwOnxlwk5iFwrQs0ctlEDnMCfYHGjMjbTWLcUMXE/k9fl4quOUfVJ7ph2JPhzwra7yZrwXDFT6NTIGrtna5XdqHhXmog/5mZOgjBHNpL1C2mF8Hz1z+9uL32ZsSdYA9UaeBEUVEO3TXPNNaMvAQmVaeOxti3qdXk3w44M6cSmPxMHoHbuGveq9Dqv0fPNxHNeSWYrxnjpTfYRiRpQaNnIXNddE2X28Wy38YgS5v1FwmGCFzuEp2EQNjM6ER+nnHDMCO1jHODoWobZ+BZ9xsl52q5vllDfTTu92Gip3cr1CxSeivirNRWJXUfSMTKekrlPi7nnYfN5oQ1Laf9nBcWNgISmh5k6b3oHdLLrKRWuLpKN+UHR2tlc45yNirWrs75EDWGiT1a/KbtCdUJwxpKLPPl1piNtxglq2Em5/vR92MQwAMoNmxmnRdCHO9G9tItZjNLG1Cmay9sFJ+yplE+jr6XNkoQQhyfbJTLRshZIwMdEum3BhdNDgK/Jl3W+2f1OtrdmQkHoskODovFtFLW/cL4gZWZn5bAK5woZO/4DWv0UHXaCxqe4vW84NC0qPPwNOEsS0oqqci4JIeioLHp0gyLWafgwzJfEm2mOTqGdewWgFhRr+lTWmE4Cs0akQ7qNJuJwHygfyis+WJMmufFZKPQmHqYD/QnUPvdUkxqv8ub/dkoLKYeFgDDmK5vbzPCur69zY3MASaC65ExchgiZAQIueFBVnDwLGRGAstrPFjRepDbfDC1Xwifzs/sGQY3QIaPUwG8wA40Jomodd7Fj97zE2vo24jKvPxOqkQI6QU3fWqloMIw4KSkRaKaB5aJczGpGugPbPDSeTJJn60UstkxAciOoHWAYhsmlvKgI9s78+kI6GDTxrpZwfAy3TC/PtuOOuNTYhslFslds6PDF2fPNScVl4CnEzPG0Y/AcFT/MLWf0ACLrP76/15yKS3g/DBeGjkd4Y/Umxevb14+v7Hiid5wxHDzTUIUhtwwi/Amy+OFNwyJXj62WbMJBklWixA4FIy+XjglDIWjtx8t4slmCRO7rosDnSvEODp+Sy6GHSyXhw1+FBBCq9n2dFyBYhN3YS2gbYWhonPFE2N8jDljd/CinN5yucWi80SLo3nCeeG+XIibr8mNt+SWo0tcTwvh/a203PqSvA0WoodLYNMtpmV49BpWCJ14u9FsAZYRZHZ84S5jCLM2OzFMdAcWI4nJDIXF1gYWZHiccI7OQx3/0SKBiEyyHQAsuC+HAOkYFm+cRaCjy/Ge2XLnq068EaxB9nstcifAssNw2HFkCJxO/ZarbeqIEcU+MlMvo6PHtSHzUUGLwbw9OgJ4YzqP85Y/0c45rYFcom0dWwD9D65qAkA="
window.navigationData = "eJytWVtP2zAU/i95bmDrVrb1bQOhIe2mgsQDQtFp6ibWHCdyHEY18d+nxAn1vXa7JxDxdzvHOYnDw9+Eo2eeLJO8rhpMUDJLGuBlskyqetMR1J6PF85KXpFklvzGdJMs57MkLzHZMEST5YObZNvRnOOa7mmsdBfvXx5fZq80GwZ/YE1Qm9hlpuum2VdkNv0W5PvKIMwJtK2d8MrK/Hb+0Zoh3aA2Z7jhNQuxKy2Pcn5lUcGUI7aF/KCQSaJpLy6UbAQXJXc1J8csJygd1vgSC5JMXh6U+HIAfFPpzXbZ6CWov3lbAm0ZmmC/OMj/tYXbaV/ivnbICO+y+7aExnnvjAXZQs5rtvPFEzSZCoho0bUusR8Gh0QUAu+oyGtSs21HUsEQkkdFhAUaMZeaiNk3h4hKcGhy1A1BPKJFGiJwcAyYmCbpMiqFt00leoaiphGZNERQpq8CE5NJl1EpvJkwfUKMo03KO0oRicjmQAZlvBmxdwM0JqpL1croTV4hDmn0ILGgghJ/RxziJ4pNzWDypqQ1bndpU5Nd3M614oKS/uiRvwQwJqtd0cLmzRuf9JiMo6Ev0IbMUV1BQptDdKaLxNTQoRRSOFZz6O8rhnIOtIi6KZzYoGKuBHo1gWMCu5UdrJYaqO8dBYOmxLnrzWO6nBK8ZsB25/3fO4amn2ndDFbNqk3ITKfIRmimUYS9iGHCEcO0+KnrItpVx6jqjKoNeYPeM2j+m6xE5la8EyBDVDokxCurpOahwZC/x7w0LPBdc4q6xKk5ePPpw9vFXL1XEd0MLXJsUnEdMcflftKiVFrk2qmvOtm0OFOxQVtULO4HufVMHaEmMfln2VHRokKtDAnbHvSprOxy2il1Wp5iuq2PyzNAo0LdKFqRwYScTGVLqBz1EOeYFs4PJWgLHeEp6yjHFUql5YerMS3OXCxBhRnBK4G9NQw8AcPDc+k4C3Z61dk7dQRMXC0HxrvmxKLoLDFFuRXYU4tiWLDTe4ty2g45amc4t4T/rnGLejeBPh1O6/5RXXe2OzCwIept8DQsHrWDOGmcT7fhq4VrlpTo2ayRoBOfO4bDdFAhFKr948xCphPqnxVactBTS8I8yVROTz2ZTqg/QYv1IU+sWIc9/mUql6eezCA0Pc0XiwBb88Ui1JlC6DHXU9qYTYsQYBBC7UGQOTgzOS3GwooHEdWD0PLBWD+TfDyByQ82wiEdZmIOJO8IWP/pMEpYV4d9OuyRd7hClxaV6SjvVbEwHPqozTqaAsUV9HUyQymXw5rQ0c8m374TKqO82taGfwyX2Wo="

File diff suppressed because one or more lines are too long

View file

@ -18,7 +18,7 @@
<p>Although lights are also subclasses of Drawable, you cannot create your own light sources.</p>
</blockquote>
</div></section>
<section class="tsd-panel tsd-hierarchy" data-refl="23">
<section class="tsd-panel tsd-hierarchy" data-refl="22">
<h4>Hierarchy (<a href="../hierarchy.html#drawables/drawable.Drawable">View Summary</a>)</h4>
<ul class="tsd-hierarchy">
<li class="tsd-hierarchy-item"><span class="tsd-hierarchy-target">Drawable</span>

View file

@ -10,7 +10,13 @@
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
<li><a href="../modules/drawables_lights_circle-light.html">drawables/lights/circle-light</a></li>
<li><a href="" aria-current="page">CircleLight</a></li></ul>
<h1>Class CircleLight</h1></div><aside class="tsd-sources">
<h1>Class CircleLight</h1></div>
<section class="tsd-panel tsd-hierarchy" data-refl="54">
<h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li class="tsd-hierarchy-item"><span class="tsd-signature-type">LightDrawable</span>
<ul class="tsd-hierarchy">
<li class="tsd-hierarchy-item"><span class="tsd-hierarchy-target">CircleLight</span></li></ul></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in drawables/lights/circle-light.ts:8</li></ul></aside>
<section class="tsd-panel-group tsd-index-group">

View file

@ -10,7 +10,13 @@
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
<li><a href="../modules/drawables_lights_flashlight.html">drawables/lights/flashlight</a></li>
<li><a href="" aria-current="page">Flashlight</a></li></ul>
<h1>Class Flashlight</h1></div><aside class="tsd-sources">
<h1>Class Flashlight</h1></div>
<section class="tsd-panel tsd-hierarchy" data-refl="81">
<h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li class="tsd-hierarchy-item"><span class="tsd-signature-type">LightDrawable</span>
<ul class="tsd-hierarchy">
<li class="tsd-hierarchy-item"><span class="tsd-hierarchy-target">Flashlight</span></li></ul></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in drawables/lights/flashlight.ts:8</li></ul></aside>
<section class="tsd-panel-group tsd-index-group">

View file

@ -18,7 +18,7 @@
<p>Although lights are also subclasses of Drawable, you cannot create your own light sources.</p>
</blockquote>
</div></section>
<section class="tsd-panel tsd-hierarchy" data-refl="146">
<section class="tsd-panel tsd-hierarchy" data-refl="116">
<h4>Hierarchy (<a href="../hierarchy.html#drawables/shapes/colorful-circle.ColorfulCircle">View Summary</a>)</h4>
<ul class="tsd-hierarchy">
<li class="tsd-hierarchy-item"><a href="drawables_drawable.Drawable.html" class="tsd-signature-type tsd-kind-class">Drawable</a>

View file

@ -10,9 +10,19 @@
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
<li><a href="../modules/drawables_shapes_polygon-factory.html">drawables/shapes/polygon-factory</a></li>
<li><a href="" aria-current="page">PolygonBase</a></li></ul>
<h1>Class PolygonBase</h1></div><aside class="tsd-sources">
<h1>Class PolygonBase</h1></div>
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography"><p>Constructor and vertex storage shared by classes returned by <a href="../functions/drawables_shapes_polygon-factory.PolygonFactory.html" class="tsd-kind-function">drawables/shapes/polygon-factory!PolygonFactory</a>
and <a href="../functions/drawables_shapes_noisy-polygon-factory.NoisyPolygonFactory.html" class="tsd-kind-function">drawables/shapes/noisy-polygon-factory!NoisyPolygonFactory</a>. Create drawable classes through those factories.</p>
</div></section>
<section class="tsd-panel tsd-hierarchy" data-refl="161">
<h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li class="tsd-hierarchy-item"><span class="tsd-signature-type">EmptyDrawable</span>
<ul class="tsd-hierarchy">
<li class="tsd-hierarchy-item"><span class="tsd-hierarchy-target">PolygonBase</span></li></ul></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in drawables/shapes/polygon-factory.ts:11</li></ul></aside>
<li>Defined in drawables/shapes/polygon-factory.ts:14</li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
@ -44,19 +54,23 @@
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li><span><span class="tsd-kind-parameter">vertices</span>: <span class="tsd-signature-type">vec2</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div>
<li><span><span class="tsd-kind-parameter">vertices</span>: <span class="tsd-signature-type">vec2</span><span class="tsd-signature-symbol">[]</span></span>
<div class="tsd-comment tsd-typography"><p>Positions in world coordinates, ordered around the polygon's outline.</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <a href="" class="tsd-signature-type tsd-kind-class">PolygonBase</a></h4><aside class="tsd-sources">
<p>Overrides EmptyDrawable.constructor</p>
<ul>
<li>Defined in drawables/shapes/polygon-factory.ts:12</li></ul></aside></div></li></ul></section></section></details>
<li>Defined in drawables/shapes/polygon-factory.ts:18</li></ul></aside></div></li></ul></section></section></details>
<details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
<h2 class="tsd-anchor-link" id="properties-1">Properties<a href="#properties-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2></summary>
<section>
<section class="tsd-panel tsd-member">
<h3 class="tsd-anchor-link" id="vertices"><span>vertices</span><a href="#vertices" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">vertices</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">vec2</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources">
<div class="tsd-signature"><span class="tsd-kind-property">vertices</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">vec2</span><span class="tsd-signature-symbol">[]</span></div>
<div class="tsd-comment tsd-typography"><p>Positions in world coordinates, ordered around the polygon's outline.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in drawables/shapes/polygon-factory.ts:12</li></ul></aside></section>
<li>Defined in drawables/shapes/polygon-factory.ts:18</li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-is-inherited">
<h3 class="tsd-anchor-link" id="descriptor"><code class="tsd-tag">Static</code> <code class="tsd-tag">Readonly</code><span>descriptor</span><a href="#descriptor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">descriptor</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/drawables_drawable-descriptor.DrawableDescriptor.html" class="tsd-signature-type tsd-kind-interface">DrawableDescriptor</a></div>

View file

@ -1,142 +0,0 @@
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>FpsQualityAutoscaler | SDF-2D - v0.8.0</title><link rel="icon" href="../assets/favicon.ico"/><meta name="description" content="Documentation for SDF-2D"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar">
<div class="tsd-toolbar-contents container"><a href="../index.html" class="title">SDF-2D - v0.8.0</a>
<div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/>
<ul role="listbox" id="tsd-search-results"></ul>
<div id="tsd-search-status" aria-live="polite" aria-atomic="true">
<div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header>
<div class="container container-main">
<div class="col-content">
<div class="tsd-page-title">
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
<li><a href="../modules/graphics_rendering_fps-quality-autoscaler.html">graphics/rendering/fps-quality-autoscaler</a></li>
<li><a href="" aria-current="page">FpsQualityAutoscaler</a></li></ul>
<h1>Class FpsQualityAutoscaler</h1></div>
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography"><p>Set the quality of rendering based on FPS values.</p>
<p>When using this, the size of the canvas must be fixed with CSS.</p>
<p>The <code>addDeltaTime</code> method should be called once every frame.</p>
<p>Usage:</p>
<pre><code class="js"><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-9">renderer</span><span class="hl-1"> = </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-8">compile</span><span class="hl-1">(...);</span><br/><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-9">autoscaler</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-8">FpsQualityAutoscaler</span><span class="hl-1">(</span><span class="hl-2">renderer</span><span class="hl-1">);</span>
</code><button type="button">Copy</button></pre>
</div></section><aside class="tsd-sources">
<ul>
<li>Defined in graphics/rendering/fps-quality-autoscaler.ts:19</li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
<h5 class="tsd-index-heading uppercase">Index</h5></summary>
<div class="tsd-accordion-details">
<section class="tsd-index-section">
<h3 class="tsd-index-heading tsd-anchor-link" id="constructors">Constructors<a href="#constructors" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<div class="tsd-index-list"><a href="#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
</div></section>
<section class="tsd-index-section">
<h3 class="tsd-index-heading tsd-anchor-link" id="properties">Properties<a href="#properties" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<div class="tsd-index-list"><a href="#fpshysteresis" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>fps<wbr/>Hysteresis</span></a>
<a href="#scalingenabled" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>scaling<wbr/>Enabled</span></a>
<a href="#fpstarget" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>fps<wbr/>Target</span></a>
</div></section>
<section class="tsd-index-section">
<h3 class="tsd-index-heading tsd-anchor-link" id="accessors">Accessors<a href="#accessors" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<div class="tsd-index-list"><a href="#fps" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Accessor"><use href="../assets/icons.svg#icon-262144"></use></svg><span>FPS</span></a>
</div></section>
<section class="tsd-index-section">
<h3 class="tsd-index-heading tsd-anchor-link" id="methods">Methods<a href="#methods" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<div class="tsd-index-list"><a href="#adddeltatime" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Delta<wbr/>Time</span></a>
</div></section></div></details></section></section>
<details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
<h2 class="tsd-anchor-link" id="constructors-1">Constructors<a href="#constructors-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2></summary>
<section>
<section class="tsd-panel tsd-member">
<h3 class="tsd-anchor-link" id="constructor"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<ul class="tsd-signatures">
<li class="">
<div class="tsd-signature tsd-anchor-link" id="constructorfpsqualityautoscaler"><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">FpsQualityAutoscaler</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">renderer</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/graphics_rendering_renderer_renderer.Renderer.html" class="tsd-signature-type tsd-kind-interface">Renderer</a><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">initialScales</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><br/>        <span class="tsd-signature-type">Pick</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/graphics_rendering_settings_runtime-settings.RuntimeSettings.html" class="tsd-signature-type tsd-kind-interface">RuntimeSettings</a><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">&quot;distanceRenderScale&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;lightsRenderScale&quot;</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="" class="tsd-signature-type tsd-kind-class">FpsQualityAutoscaler</a><a href="#constructorfpsqualityautoscaler" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
<div class="tsd-description">
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li><span><span class="tsd-kind-parameter">renderer</span>: <a href="../interfaces/graphics_rendering_renderer_renderer.Renderer.html" class="tsd-signature-type tsd-kind-interface">Renderer</a></span></li>
<li><span><span class="tsd-kind-parameter">initialScales</span>: <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Pick</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/graphics_rendering_settings_runtime-settings.RuntimeSettings.html" class="tsd-signature-type tsd-kind-interface">RuntimeSettings</a><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">&quot;distanceRenderScale&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;lightsRenderScale&quot;</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> = {}</span></span></li></ul></div>
<h4 class="tsd-returns-title">Returns <a href="" class="tsd-signature-type tsd-kind-class">FpsQualityAutoscaler</a></h4><aside class="tsd-sources">
<ul>
<li>Defined in graphics/rendering/fps-quality-autoscaler.ts:33</li></ul></aside></div></li></ul></section></section></details>
<details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
<h2 class="tsd-anchor-link" id="properties-1">Properties<a href="#properties-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2></summary>
<section>
<section class="tsd-panel tsd-member">
<h3 class="tsd-anchor-link" id="fpshysteresis"><span>fps<wbr/>Hysteresis</span><a href="#fpshysteresis" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">fpsHysteresis</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 5</span></div><aside class="tsd-sources">
<ul>
<li>Defined in graphics/rendering/fps-quality-autoscaler.ts:26</li></ul></aside></section>
<section class="tsd-panel tsd-member">
<h3 class="tsd-anchor-link" id="scalingenabled"><span>scaling<wbr/>Enabled</span><a href="#scalingenabled" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">scalingEnabled</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></div>
<div class="tsd-comment tsd-typography"><p>When <code>false</code>, FPS is still measured but the render scales are left alone.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in graphics/rendering/fps-quality-autoscaler.ts:31</li></ul></aside></section>
<section class="tsd-panel tsd-member">
<h3 class="tsd-anchor-link" id="fpstarget"><code class="tsd-tag">Static</code><span>fps<wbr/>Target</span><a href="#fpstarget" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">fpsTarget</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 30</span></div><aside class="tsd-sources">
<ul>
<li>Defined in graphics/rendering/fps-quality-autoscaler.ts:25</li></ul></aside></section></section></details>
<details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Accessors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
<h2 class="tsd-anchor-link" id="accessors-1">Accessors<a href="#accessors-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2></summary>
<section>
<section class="tsd-panel tsd-member">
<h3 class="tsd-anchor-link" id="fps"><span>FPS</span><a href="#fps" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<ul class="tsd-signatures">
<li>
<div class="tsd-signature" id="fpsfps"><span class="tsd-signature-keyword">get</span> <span class="tsd-kind-get-signature">FPS</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<div class="tsd-description">
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in graphics/rendering/fps-quality-autoscaler.ts:47</li></ul></aside></div></li></ul></section></section></details>
<details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
<h2 class="tsd-anchor-link" id="methods-1">Methods<a href="#methods-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2></summary>
<section>
<section class="tsd-panel tsd-member">
<h3 class="tsd-anchor-link" id="adddeltatime"><span>add<wbr/>Delta<wbr/>Time</span><a href="#adddeltatime" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<ul class="tsd-signatures">
<li class="">
<div class="tsd-signature tsd-anchor-link" id="adddeltatime-1"><span class="tsd-kind-call-signature">addDeltaTime</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">deltaTimeInMilliseconds</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#adddeltatime-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
<div class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Record the time taken by the latest frame. Autoscaling is also performed
as part of this call.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li><span><span class="tsd-kind-parameter">deltaTimeInMilliseconds</span>: <span class="tsd-signature-type">number</span></span></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in graphics/rendering/fps-quality-autoscaler.ts:59</li></ul></aside></div></li></ul></section></section></details></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
<details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
<h3>Settings</h3></summary>
<div class="tsd-accordion-details">
<div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span>
<ul id="tsd-filter-options">
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div>
<div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
<details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
<h3>On This Page</h3></summary>
<div class="tsd-accordion-details">
<details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary>
<div><a href="#constructor"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details>
<details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary>
<div><a href="#fpshysteresis"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>fps<wbr/>Hysteresis</span></a><a href="#scalingenabled"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>scaling<wbr/>Enabled</span></a><a href="#fpstarget"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>fps<wbr/>Target</span></a></div></details>
<details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Accessors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Accessors</summary>
<div><a href="#fps"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Accessor"><use href="../assets/icons.svg#icon-262144"></use></svg><span>FPS</span></a></div></details>
<details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary>
<div><a href="#adddeltatime"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Delta<wbr/>Time</span></a></div></details></div></details></div>
<div class="site-menu">
<nav class="tsd-navigation"><a href="../modules.html">SDF-2D - v0.8.0</a>
<ul class="tsd-small-nested-navigation" id="tsd-nav-container">
<li>Loading...</li></ul></nav></div></div></div><footer></footer>
<div class="overlay"></div></body></html>

View file

@ -16,13 +16,27 @@
<li class="">
<div class="tsd-signature tsd-anchor-link" id="circlefactory"><span class="tsd-kind-call-signature">CircleFactory</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">color</span><span class="tsd-signature-symbol">:</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">IndexedCollection</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">CircleBase</span><a href="#circlefactory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
<div class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Creates a drawable circle class with a shared color.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li><span><span class="tsd-kind-parameter">color</span>: <br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">IndexedCollection</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></span></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">CircleBase</span></h4><aside class="tsd-sources">
<li><span><span class="tsd-kind-parameter">color</span>: <br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">IndexedCollection</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></span>
<div class="tsd-comment tsd-typography"><p>RGB or RGBA color, or an index into <a href="../interfaces/graphics_rendering_settings_runtime-settings.RuntimeSettings.html#colorpalette" class="tsd-kind-property">graphics/rendering/settings/runtime-settings!RuntimeSettings.colorPalette</a>.</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">CircleBase</span></h4><p>A class with constructor <code>new Circle(center: vec2, radius: number)</code>.
<code>center</code> is the position in world coordinates; <code>radius</code> is in world units.
Pass the class's static <code>descriptor</code> to <a href="compile.compile.html" class="tsd-kind-function">compile!compile</a>, then pass instances to
<a href="../interfaces/graphics_rendering_renderer_renderer.Renderer.html#adddrawable" class="tsd-kind-method">graphics/rendering/renderer/renderer!Renderer.addDrawable</a>.</p>
<div class="tsd-comment tsd-typography">
<div class="tsd-tag-example">
<h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">CircleFactory</span><span class="hl-1">, </span><span class="hl-2">compile</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;sdf-2d&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-9">Circle</span><span class="hl-1"> = </span><span class="hl-8">CircleFactory</span><span class="hl-1">([</span><span class="hl-6">1</span><span class="hl-1">, </span><span class="hl-6">0.5</span><span class="hl-1">, </span><span class="hl-6">0</span><span class="hl-1">]);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-9">circle</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-8">Circle</span><span class="hl-1">([</span><span class="hl-6">160</span><span class="hl-1">, </span><span class="hl-6">120</span><span class="hl-1">], </span><span class="hl-6">30</span><span class="hl-1">);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-9">canvas</span><span class="hl-1"> = </span><span class="hl-2">document</span><span class="hl-1">.</span><span class="hl-8">createElement</span><span class="hl-1">(</span><span class="hl-3">&#39;canvas&#39;</span><span class="hl-1">);</span><br/><span class="hl-2">document</span><span class="hl-1">.</span><span class="hl-2">body</span><span class="hl-1">.</span><span class="hl-8">appendChild</span><span class="hl-1">(</span><span class="hl-2">canvas</span><span class="hl-1">);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-9">renderer</span><span class="hl-1"> = </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-8">compile</span><span class="hl-1">(</span><span class="hl-2">canvas</span><span class="hl-1">, [</span><span class="hl-2">Circle</span><span class="hl-1">.</span><span class="hl-2">descriptor</span><span class="hl-1">]);</span><br/><span class="hl-2">renderer</span><span class="hl-1">.</span><span class="hl-8">addDrawable</span><span class="hl-1">(</span><span class="hl-2">circle</span><span class="hl-1">);</span><br/><span class="hl-2">renderer</span><span class="hl-1">.</span><span class="hl-8">renderDrawables</span><span class="hl-1">();</span>
</code><button type="button">Copy</button></pre>
</div></div><aside class="tsd-sources">
<ul>
<li>Defined in drawables/shapes/circle-factory.ts:23</li></ul></aside></div></li></ul></section></div>
<li>Defined in drawables/shapes/circle-factory.ts:44</li></ul></aside></div></li></ul></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">

View file

@ -16,13 +16,29 @@
<li class="">
<div class="tsd-signature tsd-anchor-link" id="dropletfactory"><span class="tsd-kind-call-signature">DropletFactory</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">color</span><span class="tsd-signature-symbol">:</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">IndexedCollection</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">DropletBase</span><a href="#dropletfactory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
<div class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Creates a drawable droplet class with a shared color.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li><span><span class="tsd-kind-parameter">color</span>: <br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">IndexedCollection</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></span></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">DropletBase</span></h4><aside class="tsd-sources">
<li><span><span class="tsd-kind-parameter">color</span>: <br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">IndexedCollection</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></span>
<div class="tsd-comment tsd-typography"><p>RGB or RGBA color, or an index into <a href="../interfaces/graphics_rendering_settings_runtime-settings.RuntimeSettings.html#colorpalette" class="tsd-kind-property">graphics/rendering/settings/runtime-settings!RuntimeSettings.colorPalette</a>.</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">DropletBase</span></h4><p>A class with constructor
<code>new Droplet(from: vec2, to: vec2, fromRadius: number, toRadius: number)</code>.
<code>from</code> and <code>to</code> are endpoint positions in world coordinates; <code>fromRadius</code> and
<code>toRadius</code> are the radii at those endpoints in world units.
Pass the class's static <code>descriptor</code> to <a href="compile.compile.html" class="tsd-kind-function">compile!compile</a>, then pass instances to
<a href="../interfaces/graphics_rendering_renderer_renderer.Renderer.html#adddrawable" class="tsd-kind-method">graphics/rendering/renderer/renderer!Renderer.addDrawable</a>.</p>
<div class="tsd-comment tsd-typography">
<div class="tsd-tag-example">
<h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">DropletFactory</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;sdf-2d&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-9">Droplet</span><span class="hl-1"> = </span><span class="hl-8">DropletFactory</span><span class="hl-1">([</span><span class="hl-6">1</span><span class="hl-1">, </span><span class="hl-6">0.5</span><span class="hl-1">, </span><span class="hl-6">0</span><span class="hl-1">]);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-9">droplet</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-8">Droplet</span><span class="hl-1">([</span><span class="hl-6">100</span><span class="hl-1">, </span><span class="hl-6">100</span><span class="hl-1">], [</span><span class="hl-6">200</span><span class="hl-1">, </span><span class="hl-6">140</span><span class="hl-1">], </span><span class="hl-6">30</span><span class="hl-1">, </span><span class="hl-6">10</span><span class="hl-1">);</span>
</code><button type="button">Copy</button></pre>
</div></div><aside class="tsd-sources">
<ul>
<li>Defined in drawables/shapes/droplet-factory.ts:27</li></ul></aside></div></li></ul></section></div>
<li>Defined in drawables/shapes/droplet-factory.ts:45</li></ul></aside></div></li></ul></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">

View file

@ -16,13 +16,27 @@
<li class="">
<div class="tsd-signature tsd-anchor-link" id="hexagonfactory"><span class="tsd-kind-call-signature">HexagonFactory</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">color</span><span class="tsd-signature-symbol">:</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">IndexedCollection</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">HexagonBase</span><a href="#hexagonfactory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
<div class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Creates a drawable hexagon class with a shared color.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li><span><span class="tsd-kind-parameter">color</span>: <br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">IndexedCollection</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></span></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">HexagonBase</span></h4><aside class="tsd-sources">
<li><span><span class="tsd-kind-parameter">color</span>: <br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">IndexedCollection</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></span>
<div class="tsd-comment tsd-typography"><p>RGB or RGBA color, or an index into <a href="../interfaces/graphics_rendering_settings_runtime-settings.RuntimeSettings.html#colorpalette" class="tsd-kind-property">graphics/rendering/settings/runtime-settings!RuntimeSettings.colorPalette</a>.</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">HexagonBase</span></h4><p>A class with constructor <code>new Hexagon(center: vec2, radius: number)</code>.
<code>center</code> is the position in world coordinates; <code>radius</code> controls the size in world units.
Pass the class's static <code>descriptor</code> to <a href="compile.compile.html" class="tsd-kind-function">compile!compile</a>, then pass instances to
<a href="../interfaces/graphics_rendering_renderer_renderer.Renderer.html#adddrawable" class="tsd-kind-method">graphics/rendering/renderer/renderer!Renderer.addDrawable</a>.</p>
<div class="tsd-comment tsd-typography">
<div class="tsd-tag-example">
<h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">HexagonFactory</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;sdf-2d&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-9">Hexagon</span><span class="hl-1"> = </span><span class="hl-8">HexagonFactory</span><span class="hl-1">([</span><span class="hl-6">1</span><span class="hl-1">, </span><span class="hl-6">0.5</span><span class="hl-1">, </span><span class="hl-6">0</span><span class="hl-1">]);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-9">hexagon</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-8">Hexagon</span><span class="hl-1">([</span><span class="hl-6">160</span><span class="hl-1">, </span><span class="hl-6">120</span><span class="hl-1">], </span><span class="hl-6">30</span><span class="hl-1">);</span>
</code><button type="button">Copy</button></pre>
</div></div><aside class="tsd-sources">
<ul>
<li>Defined in drawables/shapes/hexagon-factory.ts:23</li></ul></aside></div></li></ul></section></div>
<li>Defined in drawables/shapes/hexagon-factory.ts:39</li></ul></aside></div></li></ul></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">

View file

@ -16,15 +16,31 @@
<li class="">
<div class="tsd-signature tsd-anchor-link" id="invertedtunnelfactory"><span class="tsd-kind-call-signature">InvertedTunnelFactory</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">color</span><span class="tsd-signature-symbol">:</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">IndexedCollection</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">InvertedTunnelBase</span><a href="#invertedtunnelfactory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
<div class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Providing a noise texture is required for this drawable.</p>
<div class="tsd-comment tsd-typography"><p>Creates a drawable inverted tunnel class with a shared color.</p>
<p>Providing a <code>noiseTexture</code> in <a href="../interfaces/graphics_rendering_settings_runtime-settings.RuntimeSettings.html#textures" class="tsd-kind-property">graphics/rendering/settings/runtime-settings!RuntimeSettings.textures</a> is required for this
drawable. A noise texture can be generated with <a href="graphics_rendering_renderer_noise-renderer.renderNoise.html" class="tsd-kind-function">graphics/rendering/renderer/noise-renderer!renderNoise</a>.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li><span><span class="tsd-kind-parameter">color</span>: <br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">IndexedCollection</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></span></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">InvertedTunnelBase</span></h4><aside class="tsd-sources">
<li><span><span class="tsd-kind-parameter">color</span>: <br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">IndexedCollection</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></span>
<div class="tsd-comment tsd-typography"><p>RGB or RGBA color, or an index into <a href="../interfaces/graphics_rendering_settings_runtime-settings.RuntimeSettings.html#colorpalette" class="tsd-kind-property">graphics/rendering/settings/runtime-settings!RuntimeSettings.colorPalette</a>.</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">InvertedTunnelBase</span></h4><p>A class with constructor
<code>new InvertedTunnel(from: vec2, to: vec2, fromRadius: number, toRadius: number)</code>.
<code>from</code> and <code>to</code> are endpoint positions in world coordinates; <code>fromRadius</code> and
<code>toRadius</code> are the radii at those endpoints in world units.
Pass the class's static <code>descriptor</code> to <a href="compile.compile.html" class="tsd-kind-function">compile!compile</a>, then pass instances to
<a href="../interfaces/graphics_rendering_renderer_renderer.Renderer.html#adddrawable" class="tsd-kind-method">graphics/rendering/renderer/renderer!Renderer.addDrawable</a>.</p>
<div class="tsd-comment tsd-typography">
<div class="tsd-tag-example">
<h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">InvertedTunnelFactory</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;sdf-2d&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-9">InvertedTunnel</span><span class="hl-1"> = </span><span class="hl-8">InvertedTunnelFactory</span><span class="hl-1">([</span><span class="hl-6">1</span><span class="hl-1">, </span><span class="hl-6">0.5</span><span class="hl-1">, </span><span class="hl-6">0</span><span class="hl-1">]);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-9">tunnel</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-8">InvertedTunnel</span><span class="hl-1">([</span><span class="hl-6">100</span><span class="hl-1">, </span><span class="hl-6">100</span><span class="hl-1">], [</span><span class="hl-6">200</span><span class="hl-1">, </span><span class="hl-6">140</span><span class="hl-1">], </span><span class="hl-6">30</span><span class="hl-1">, </span><span class="hl-6">20</span><span class="hl-1">);</span>
</code><button type="button">Copy</button></pre>
</div></div><aside class="tsd-sources">
<ul>
<li>Defined in drawables/shapes/inverted-tunnel-factory.ts:29</li></ul></aside></div></li></ul></section></div>
<li>Defined in drawables/shapes/inverted-tunnel-factory.ts:48</li></ul></aside></div></li></ul></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">

View file

@ -16,14 +16,30 @@
<li class="">
<div class="tsd-signature tsd-anchor-link" id="metacirclefactory"><span class="tsd-kind-call-signature">MetaCircleFactory</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">color</span><span class="tsd-signature-symbol">:</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">IndexedCollection</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">k</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">MetaCircleBase</span><a href="#metacirclefactory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
<div class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Creates a drawable class of smoothly merging circles with a shared color.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li><span><span class="tsd-kind-parameter">color</span>: <br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">IndexedCollection</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></span></li>
<li><span><span class="tsd-kind-parameter">k</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 32</span></span></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">MetaCircleBase</span></h4><aside class="tsd-sources">
<li><span><span class="tsd-kind-parameter">color</span>: <br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">IndexedCollection</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></span>
<div class="tsd-comment tsd-typography"><p>RGB or RGBA color, or an index into <a href="../interfaces/graphics_rendering_settings_runtime-settings.RuntimeSettings.html#colorpalette" class="tsd-kind-property">graphics/rendering/settings/runtime-settings!RuntimeSettings.colorPalette</a>.</p>
</div></li>
<li><span><span class="tsd-kind-parameter">k</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 32</span></span>
<div class="tsd-comment tsd-typography"><p>Smooth union factor. Larger values produce sharper joins. Defaults to 32.</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">MetaCircleBase</span></h4><p>A class with constructor <code>new MetaCircle(center: vec2, radius: number)</code>.
<code>center</code> is the position in world coordinates; <code>radius</code> is in world units.
Pass the class's static <code>descriptor</code> to <a href="compile.compile.html" class="tsd-kind-function">compile!compile</a>, then pass instances to
<a href="../interfaces/graphics_rendering_renderer_renderer.Renderer.html#adddrawable" class="tsd-kind-method">graphics/rendering/renderer/renderer!Renderer.addDrawable</a>.</p>
<div class="tsd-comment tsd-typography">
<div class="tsd-tag-example">
<h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">MetaCircleFactory</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;sdf-2d&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-9">MetaCircle</span><span class="hl-1"> = </span><span class="hl-8">MetaCircleFactory</span><span class="hl-1">([</span><span class="hl-6">1</span><span class="hl-1">, </span><span class="hl-6">0.5</span><span class="hl-1">, </span><span class="hl-6">0</span><span class="hl-1">], </span><span class="hl-6">32</span><span class="hl-1">);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-9">circle</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-8">MetaCircle</span><span class="hl-1">([</span><span class="hl-6">160</span><span class="hl-1">, </span><span class="hl-6">120</span><span class="hl-1">], </span><span class="hl-6">30</span><span class="hl-1">);</span>
</code><button type="button">Copy</button></pre>
</div></div><aside class="tsd-sources">
<ul>
<li>Defined in drawables/shapes/meta-circle-factory.ts:24</li></ul></aside></div></li></ul></section></div>
<li>Defined in drawables/shapes/meta-circle-factory.ts:41</li></ul></aside></div></li></ul></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">

View file

@ -16,14 +16,34 @@
<li class="">
<div class="tsd-signature tsd-anchor-link" id="noisypolygonfactory"><span class="tsd-kind-call-signature">NoisyPolygonFactory</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">vertexCount</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">color</span><span class="tsd-signature-symbol">:</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">IndexedCollection</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <a href="../classes/drawables_shapes_polygon-factory.PolygonBase.html" class="tsd-signature-type tsd-kind-class">PolygonBase</a> <span class="tsd-signature-symbol">&amp;</span> <span class="tsd-signature-type">NoisyPolygonBase</span><a href="#noisypolygonfactory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
<div class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Creates a drawable polygon class with a noisy outline and a shared color.</p>
<p>Providing a <code>noiseTexture</code> in <a href="../interfaces/graphics_rendering_settings_runtime-settings.RuntimeSettings.html#textures" class="tsd-kind-property">graphics/rendering/settings/runtime-settings!RuntimeSettings.textures</a> is required for this
drawable. A noise texture can be generated with <a href="graphics_rendering_renderer_noise-renderer.renderNoise.html" class="tsd-kind-function">graphics/rendering/renderer/noise-renderer!renderNoise</a>.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li><span><span class="tsd-kind-parameter">vertexCount</span>: <span class="tsd-signature-type">number</span></span></li>
<li><span><span class="tsd-kind-parameter">color</span>: <br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">IndexedCollection</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></span></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-keyword">typeof</span> <a href="../classes/drawables_shapes_polygon-factory.PolygonBase.html" class="tsd-signature-type tsd-kind-class">PolygonBase</a> <span class="tsd-signature-symbol">&amp;</span> <span class="tsd-signature-type">NoisyPolygonBase</span></h4><aside class="tsd-sources">
<li><span><span class="tsd-kind-parameter">vertexCount</span>: <span class="tsd-signature-type">number</span></span>
<div class="tsd-comment tsd-typography"><p>Maximum number of vertices per polygon.</p>
</div></li>
<li><span><span class="tsd-kind-parameter">color</span>: <br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">IndexedCollection</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></span>
<div class="tsd-comment tsd-typography"><p>RGB or RGBA color, or an index into <a href="../interfaces/graphics_rendering_settings_runtime-settings.RuntimeSettings.html#colorpalette" class="tsd-kind-property">graphics/rendering/settings/runtime-settings!RuntimeSettings.colorPalette</a>.</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-keyword">typeof</span> <a href="../classes/drawables_shapes_polygon-factory.PolygonBase.html" class="tsd-signature-type tsd-kind-class">PolygonBase</a> <span class="tsd-signature-symbol">&amp;</span> <span class="tsd-signature-type">NoisyPolygonBase</span></h4><p>A class with constructor <code>new NoisyPolygon(vertices: Array&lt;vec2&gt;)</code>.
<code>vertices</code> contains between one and <code>vertexCount</code> positions in world coordinates,
ordered around the polygon's outline. Instances also have a <code>randomOffset</code> property
(default 0) for varying the sampled noise.
Pass the class's static <code>descriptor</code> to <a href="compile.compile.html" class="tsd-kind-function">compile!compile</a>, then pass instances to
<a href="../interfaces/graphics_rendering_renderer_renderer.Renderer.html#adddrawable" class="tsd-kind-method">graphics/rendering/renderer/renderer!Renderer.addDrawable</a>.</p>
<div class="tsd-comment tsd-typography">
<div class="tsd-tag-example">
<h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">NoisyPolygonFactory</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;sdf-2d&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-9">NoisyPolygon</span><span class="hl-1"> = </span><span class="hl-8">NoisyPolygonFactory</span><span class="hl-1">(</span><span class="hl-6">3</span><span class="hl-1">, [</span><span class="hl-6">1</span><span class="hl-1">, </span><span class="hl-6">0.5</span><span class="hl-1">, </span><span class="hl-6">0</span><span class="hl-1">]);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-9">polygon</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-8">NoisyPolygon</span><span class="hl-1">([[</span><span class="hl-6">100</span><span class="hl-1">, </span><span class="hl-6">100</span><span class="hl-1">], [</span><span class="hl-6">200</span><span class="hl-1">, </span><span class="hl-6">100</span><span class="hl-1">], [</span><span class="hl-6">150</span><span class="hl-1">, </span><span class="hl-6">180</span><span class="hl-1">]]);</span>
</code><button type="button">Copy</button></pre>
</div></div><aside class="tsd-sources">
<ul>
<li>Defined in drawables/shapes/noisy-polygon-factory.ts:16</li></ul></aside></div></li></ul></section></div>
<li>Defined in drawables/shapes/noisy-polygon-factory.ts:38</li></ul></aside></div></li></ul></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">

View file

@ -16,14 +16,31 @@
<li class="">
<div class="tsd-signature tsd-anchor-link" id="polygonfactory"><span class="tsd-kind-call-signature">PolygonFactory</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">vertexCount</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">color</span><span class="tsd-signature-symbol">:</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">IndexedCollection</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <a href="../classes/drawables_shapes_polygon-factory.PolygonBase.html" class="tsd-signature-type tsd-kind-class">PolygonBase</a><a href="#polygonfactory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
<div class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Creates a drawable polygon class with a shared color.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li><span><span class="tsd-kind-parameter">vertexCount</span>: <span class="tsd-signature-type">number</span></span></li>
<li><span><span class="tsd-kind-parameter">color</span>: <br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">IndexedCollection</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></span></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-keyword">typeof</span> <a href="../classes/drawables_shapes_polygon-factory.PolygonBase.html" class="tsd-signature-type tsd-kind-class">PolygonBase</a></h4><aside class="tsd-sources">
<li><span><span class="tsd-kind-parameter">vertexCount</span>: <span class="tsd-signature-type">number</span></span>
<div class="tsd-comment tsd-typography"><p>Maximum number of vertices per polygon.</p>
</div></li>
<li><span><span class="tsd-kind-parameter">color</span>: <br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">IndexedCollection</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></span>
<div class="tsd-comment tsd-typography"><p>RGB or RGBA color, or an index into <a href="../interfaces/graphics_rendering_settings_runtime-settings.RuntimeSettings.html#colorpalette" class="tsd-kind-property">graphics/rendering/settings/runtime-settings!RuntimeSettings.colorPalette</a>.</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-keyword">typeof</span> <a href="../classes/drawables_shapes_polygon-factory.PolygonBase.html" class="tsd-signature-type tsd-kind-class">PolygonBase</a></h4><p>A class with constructor <code>new Polygon(vertices: Array&lt;vec2&gt;)</code>.
<code>vertices</code> contains between one and <code>vertexCount</code> positions in world coordinates,
ordered around the polygon's outline. Fewer vertices are padded automatically.
Pass the class's static <code>descriptor</code> to <a href="compile.compile.html" class="tsd-kind-function">compile!compile</a>, then pass instances to
<a href="../interfaces/graphics_rendering_renderer_renderer.Renderer.html#adddrawable" class="tsd-kind-method">graphics/rendering/renderer/renderer!Renderer.addDrawable</a>.</p>
<div class="tsd-comment tsd-typography">
<div class="tsd-tag-example">
<h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">PolygonFactory</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;sdf-2d&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-9">Polygon</span><span class="hl-1"> = </span><span class="hl-8">PolygonFactory</span><span class="hl-1">(</span><span class="hl-6">3</span><span class="hl-1">, [</span><span class="hl-6">1</span><span class="hl-1">, </span><span class="hl-6">0.5</span><span class="hl-1">, </span><span class="hl-6">0</span><span class="hl-1">]);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-9">polygon</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-8">Polygon</span><span class="hl-1">([[</span><span class="hl-6">100</span><span class="hl-1">, </span><span class="hl-6">100</span><span class="hl-1">], [</span><span class="hl-6">200</span><span class="hl-1">, </span><span class="hl-6">100</span><span class="hl-1">], [</span><span class="hl-6">150</span><span class="hl-1">, </span><span class="hl-6">180</span><span class="hl-1">]]);</span>
</code><button type="button">Copy</button></pre>
</div></div><aside class="tsd-sources">
<ul>
<li>Defined in drawables/shapes/polygon-factory.ts:22</li></ul></aside></div></li></ul></section></div>
<li>Defined in drawables/shapes/polygon-factory.ts:46</li></ul></aside></div></li></ul></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">

View file

@ -16,13 +16,29 @@
<li class="">
<div class="tsd-signature tsd-anchor-link" id="rotatedrectanglefactory"><span class="tsd-kind-call-signature">RotatedRectangleFactory</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">color</span><span class="tsd-signature-symbol">:</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">IndexedCollection</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">RotatedRectangleBase</span><a href="#rotatedrectanglefactory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
<div class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Creates a drawable rotated rectangle class with a shared color.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li><span><span class="tsd-kind-parameter">color</span>: <br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">IndexedCollection</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></span></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">RotatedRectangleBase</span></h4><aside class="tsd-sources">
<li><span><span class="tsd-kind-parameter">color</span>: <br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">IndexedCollection</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></span>
<div class="tsd-comment tsd-typography"><p>RGB or RGBA color, or an index into <a href="../interfaces/graphics_rendering_settings_runtime-settings.RuntimeSettings.html#colorpalette" class="tsd-kind-property">graphics/rendering/settings/runtime-settings!RuntimeSettings.colorPalette</a>.</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">RotatedRectangleBase</span></h4><p>A class with constructor
<code>new RotatedRectangle(center: vec2, size: vec2, rotation: number)</code>.
<code>center</code> is the position in world coordinates; <code>size</code> is <code>[width, height]</code> in world
units; <code>rotation</code> is the angle in radians.
Pass the class's static <code>descriptor</code> to <a href="compile.compile.html" class="tsd-kind-function">compile!compile</a>, then pass instances to
<a href="../interfaces/graphics_rendering_renderer_renderer.Renderer.html#adddrawable" class="tsd-kind-method">graphics/rendering/renderer/renderer!Renderer.addDrawable</a>.</p>
<div class="tsd-comment tsd-typography">
<div class="tsd-tag-example">
<h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">RotatedRectangleFactory</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;sdf-2d&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-9">RotatedRectangle</span><span class="hl-1"> = </span><span class="hl-8">RotatedRectangleFactory</span><span class="hl-1">([</span><span class="hl-6">1</span><span class="hl-1">, </span><span class="hl-6">0.5</span><span class="hl-1">, </span><span class="hl-6">0</span><span class="hl-1">]);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-9">rectangle</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-8">RotatedRectangle</span><span class="hl-1">([</span><span class="hl-6">160</span><span class="hl-1">, </span><span class="hl-6">120</span><span class="hl-1">], [</span><span class="hl-6">80</span><span class="hl-1">, </span><span class="hl-6">40</span><span class="hl-1">], </span><span class="hl-2">Math</span><span class="hl-1">.</span><span class="hl-9">PI</span><span class="hl-1"> / </span><span class="hl-6">4</span><span class="hl-1">);</span>
</code><button type="button">Copy</button></pre>
</div></div><aside class="tsd-sources">
<ul>
<li>Defined in drawables/shapes/rotated-rectangle-factory.ts:24</li></ul></aside></div></li></ul></section></div>
<li>Defined in drawables/shapes/rotated-rectangle-factory.ts:42</li></ul></aside></div></li></ul></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">

View file

@ -46,10 +46,14 @@ ever needs to be drawn by this renderer has to be given before compiling.</p>
if the animation should be continued. To break out of the animation loop, a <code>false</code> (falsy)
return value must be given.</p>
</div></li>
<li><span><span class="tsd-kind-parameter">settings</span>: <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/graphics_rendering_settings_startup-settings.StartupSettings.html" class="tsd-signature-type tsd-kind-interface">StartupSettings</a> <span class="tsd-signature-symbol">&amp;</span> <a href="../interfaces/graphics_rendering_settings_runtime-settings.RuntimeSettings.html" class="tsd-signature-type tsd-kind-interface">RuntimeSettings</a><span class="tsd-signature-symbol">&gt;</span> <span class="tsd-signature-symbol">&amp;</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">enableAutoscaler</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = {}</span></span></li></ul></div>
<li><span><span class="tsd-kind-parameter">settings</span>: <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/graphics_rendering_settings_startup-settings.StartupSettings.html" class="tsd-signature-type tsd-kind-interface">StartupSettings</a> <span class="tsd-signature-symbol">&amp;</span> <a href="../interfaces/graphics_rendering_settings_runtime-settings.RuntimeSettings.html" class="tsd-signature-type tsd-kind-interface">RuntimeSettings</a><span class="tsd-signature-symbol">&gt;</span> <span class="tsd-signature-symbol">&amp;</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">enableAutoscaler</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = {}</span></span>
<div class="tsd-comment tsd-typography"><p>Startup and runtime settings overrides. Sensible defaults are provided.
Set <code>enableAutoscaler</code> to <code>false</code> to keep the render scales exactly as configured
instead of letting the FPS-based autoscaler adjust them.</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in run-animation.ts:48</li></ul></aside></div></li></ul></section></div>
<li>Defined in run-animation.ts:47</li></ul></aside></div></li></ul></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">

View file

@ -10,9 +10,9 @@
<h1>SDF-2D - v0.8.0</h1></div>
<h2>Hierarchy Summary</h2>
<ul class="tsd-full-hierarchy">
<li data-refl="23" id="drawables/drawable.Drawable"><a href="classes/drawables_drawable.Drawable.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="assets/icons.svg#icon-128"></use></svg>Drawable</a>
<li data-refl="22" id="drawables/drawable.Drawable"><a href="classes/drawables_drawable.Drawable.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="assets/icons.svg#icon-128"></use></svg>Drawable</a>
<ul>
<li data-refl="146" id="drawables/shapes/colorful-circle.ColorfulCircle"><a href="classes/drawables_shapes_colorful-circle.ColorfulCircle.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="assets/icons.svg#icon-128"></use></svg>ColorfulCircle</a></li></ul></li></ul></div>
<li data-refl="116" id="drawables/shapes/colorful-circle.ColorfulCircle"><a href="classes/drawables_shapes_colorful-circle.ColorfulCircle.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="assets/icons.svg#icon-128"></use></svg>ColorfulCircle</a></li></ul></li></ul></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show more