profectus-docs/assets/api_interfaces_game_layers.BaseLayer.md.57810f96.js

1 line
6.9 KiB
JavaScript

import{_ as e,c as a,o as t,a as r}from"./app.ab34650d.js";const m=JSON.parse('{"title":"Interface: BaseLayer","description":"","frontmatter":{"editLink":false},"headers":[{"level":2,"title":"Properties","slug":"properties"},{"level":3,"title":"emit","slug":"emit"},{"level":3,"title":"emitter","slug":"emitter"},{"level":3,"title":"id","slug":"id"},{"level":3,"title":"minimized","slug":"minimized"},{"level":3,"title":"nodes","slug":"nodes"},{"level":3,"title":"on","slug":"on"}],"relativePath":"api/interfaces/game/layers.BaseLayer.md","lastUpdated":null}'),n={name:"api/interfaces/game/layers.BaseLayer.md"},d=r('<h1 id="interface-baselayer" tabindex="-1">Interface: BaseLayer <a class="header-anchor" href="#interface-baselayer" aria-hidden="true">#</a></h1><p><a href="./../../modules/game/layers.html">game/layers</a>.BaseLayer</p><p>The properties that are added onto a processed <a href="./layers.LayerOptions">LayerOptions</a> to create a <a href="./../../modules/game/layers.html#layer">Layer</a></p><h2 id="properties" tabindex="-1">Properties <a class="header-anchor" href="#properties" aria-hidden="true">#</a></h2><h3 id="emit" tabindex="-1">emit <a class="header-anchor" href="#emit" aria-hidden="true">#</a></h3><p>\u2022 <strong>emit</strong>: &lt;K&gt;(...<code>args</code>: [<code>K</code>, ...Parameters&lt;LayerEvents[K]&gt;[]]) =&gt; <code>void</code></p><h4 id="type-declaration" tabindex="-1">Type declaration <a class="header-anchor" href="#type-declaration" aria-hidden="true">#</a></h4><p>\u25B8 &lt;<code>K</code>&gt;(...<code>args</code>): <code>void</code></p><p>A function to emit a <a href="./layers.LayerEvents">LayerEvents</a> event to this layer.</p><h5 id="type-parameters" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters" aria-hidden="true">#</a></h5><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>K</code></td><td style="text-align:left;">extends keyof <a href="./layers.LayerEvents"><code>LayerEvents</code></a></td></tr></tbody></table><h5 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-hidden="true">#</a></h5><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>...args</code></td><td style="text-align:left;">[<code>K</code>, ...Parameters&lt;LayerEvents[K]&gt;[]]</td></tr></tbody></table><h5 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-hidden="true">#</a></h5><p><code>void</code></p><h4 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/013092f/src/game/layers.tsx#L157" target="_blank" rel="noopener noreferrer">profectus/src/game/layers.tsx:157</a></p><hr><h3 id="emitter" tabindex="-1">emitter <a class="header-anchor" href="#emitter" aria-hidden="true">#</a></h3><p>\u2022 <strong>emitter</strong>: <code>Emitter</code>&lt;<a href="./layers.LayerEvents"><code>LayerEvents</code></a>&gt;</p><p>An emitter for sending <a href="./layers.LayerEvents">LayerEvents</a> events for this layer.</p><h4 id="defined-in-1" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-1" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/013092f/src/game/layers.tsx#L153" target="_blank" rel="noopener noreferrer">profectus/src/game/layers.tsx:153</a></p><hr><h3 id="id" tabindex="-1">id <a class="header-anchor" href="#id" aria-hidden="true">#</a></h3><p>\u2022 <strong>id</strong>: <code>string</code></p><p>The ID of the layer. Populated from the <a href="./../../modules/game/layers.html#createlayer">createLayer</a> parameters. Used for saving and tracking open tabs.</p><h4 id="defined-in-2" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-2" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/013092f/src/game/layers.tsx#L149" target="_blank" rel="noopener noreferrer">profectus/src/game/layers.tsx:149</a></p><hr><h3 id="minimized" tabindex="-1">minimized <a class="header-anchor" href="#minimized" aria-hidden="true">#</a></h3><p>\u2022 <strong>minimized</strong>: <a href="./../../modules/game/persistence.html#persistent"><code>Persistent</code></a>&lt;<code>boolean</code>&gt;</p><p>A persistent ref tracking if the tab is minimized or not.</p><h4 id="defined-in-3" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-3" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/013092f/src/game/layers.tsx#L151" target="_blank" rel="noopener noreferrer">profectus/src/game/layers.tsx:151</a></p><hr><h3 id="nodes" tabindex="-1">nodes <a class="header-anchor" href="#nodes" aria-hidden="true">#</a></h3><p>\u2022 <strong>nodes</strong>: <code>Ref</code>&lt;<code>Record</code>&lt;<code>string</code>, <code>undefined</code> | <a href="./layers.FeatureNode"><code>FeatureNode</code></a>&gt;&gt;</p><p>A map of <a href="./layers.FeatureNode">FeatureNode</a>s present in this layer&#39;s ContextComponent component.</p><h4 id="defined-in-4" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-4" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/013092f/src/game/layers.tsx#L159" target="_blank" rel="noopener noreferrer">profectus/src/game/layers.tsx:159</a></p><hr><h3 id="on" tabindex="-1">on <a class="header-anchor" href="#on" aria-hidden="true">#</a></h3><p>\u2022 <strong>on</strong>: (...<code>args</code>: [event: keyof LayerEvents, cb: Function | Function | Function]) =&gt; <code>Unsubscribe</code></p><h4 id="type-declaration-1" tabindex="-1">Type declaration <a class="header-anchor" href="#type-declaration-1" aria-hidden="true">#</a></h4><p>\u25B8 (...<code>args</code>): <code>Unsubscribe</code></p><p>A function to register an event listener on <a href="./layers.BaseLayer.html#emitter">emitter</a>.</p><h5 id="parameters-1" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-1" aria-hidden="true">#</a></h5><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>...args</code></td><td style="text-align:left;">[event: keyof LayerEvents, cb: Function | Function | Function]</td></tr></tbody></table><h5 id="returns-1" tabindex="-1">Returns <a class="header-anchor" href="#returns-1" aria-hidden="true">#</a></h5><p><code>Unsubscribe</code></p><h4 id="defined-in-5" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-5" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/013092f/src/game/layers.tsx#L155" target="_blank" rel="noopener noreferrer">profectus/src/game/layers.tsx:155</a></p>',53),s=[d];function i(o,h,c,l,f,p){return t(),a("div",null,s)}var y=e(n,[["render",i]]);export{m as __pageData,y as default};