Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
JadlionHD committed Aug 4, 2023
1 parent 4a87f9e commit 24a1e77
Show file tree
Hide file tree
Showing 31 changed files with 489 additions and 473 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,3 @@ jobs:
- run: npm run build --if-present --build-from-source
- run: npm test
- run: npm run package
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: gtjs-${{github.sha}}
path: /build/stage
2 changes: 1 addition & 1 deletion docs/assets/search.js

Large diffs are not rendered by default.

53 changes: 19 additions & 34 deletions docs/classes/Client.html

Large diffs are not rendered by default.

31 changes: 22 additions & 9 deletions docs/classes/Peer.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><span class="target">Peer</span></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/1113de4/src/structures/Peer.ts#L6">src/structures/Peer.ts:6</a></li></ul></aside>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/4a87f9e/src/structures/Peer.ts#L6">src/structures/Peer.ts:6</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
Expand All @@ -43,6 +43,7 @@ <h3 class="tsd-index-heading">Properties</h3>
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Accessors</h3>
<div class="tsd-index-list"><a href="Peer.html#ping" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-262144"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g></svg><span>ping</span></a>
<a href="Peer.html#state" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>state</span></a>
</div></section>
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Methods</h3>
Expand Down Expand Up @@ -71,32 +72,43 @@ <h5><span class="tsd-kind-parameter">client</span>: <a href="Client.html" class=
<h5><span class="tsd-kind-parameter">netID</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <a href="Peer.html" class="tsd-signature-type tsd-kind-class">Peer</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/1113de4/src/structures/Peer.ts#L9">src/structures/Peer.ts:9</a></li></ul></aside></li></ul></section></section>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/4a87f9e/src/structures/Peer.ts#L9">src/structures/Peer.ts:9</a></li></ul></aside></li></ul></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-is-private"><a id="client" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>client</span><a href="#client" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">client</span><span class="tsd-signature-symbol">:</span> <a href="Client.html" class="tsd-signature-type tsd-kind-class">Client</a></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/1113de4/src/structures/Peer.ts#L9">src/structures/Peer.ts:9</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/4a87f9e/src/structures/Peer.ts#L9">src/structures/Peer.ts:9</a></li></ul></aside></section>
<section class="tsd-panel tsd-member"><a id="data" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>data</span><a href="#data" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">data</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type tsd-kind-type-parameter">T</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/1113de4/src/structures/Peer.ts#L7">src/structures/Peer.ts:7</a></li></ul></aside></section></section>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/4a87f9e/src/structures/Peer.ts#L7">src/structures/Peer.ts:7</a></li></ul></aside></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Accessors</h2>
<section class="tsd-panel tsd-member"><a id="ping" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>ping</span><a href="#ping" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<ul class="tsd-signatures">
<li class="tsd-signature" id="ping.ping-1"><span class="tsd-signature-symbol">get</span> ping<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Get Peer ping (RTT) from server.</p>
<div class="tsd-comment tsd-typography"><p>Get ENetPeer Round Trip Time (RTT).</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/1113de4/src/structures/Peer.ts#L19">src/structures/Peer.ts:19</a></li></ul></aside></li></ul></section></section>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/4a87f9e/src/structures/Peer.ts#L19">src/structures/Peer.ts:19</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member"><a id="state" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>state</span><a href="#state" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<ul class="tsd-signatures">
<li class="tsd-signature" id="state.state-1"><span class="tsd-signature-symbol">get</span> state<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Get <a href="http://enet.bespin.org/enet_8h.html#a058bc368c507eb86cb47f3946f38d558">ENetPeerState</a>.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/4a87f9e/src/structures/Peer.ts#L26">src/structures/Peer.ts:26</a></li></ul></aside></li></ul></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Methods</h2>
<section class="tsd-panel tsd-member"><a id="disconnect" class="tsd-anchor"></a>
Expand All @@ -117,7 +129,7 @@ <h5><span class="tsd-kind-parameter">type</span>: <span class="tsd-signature-typ
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/1113de4/src/structures/Peer.ts#L65">src/structures/Peer.ts:65</a></li></ul></aside></li></ul></section>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/4a87f9e/src/structures/Peer.ts#L72">src/structures/Peer.ts:72</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member"><a id="send" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>send</span><a href="#send" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<ul class="tsd-signatures">
Expand All @@ -136,7 +148,7 @@ <h5><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-sym
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/1113de4/src/structures/Peer.ts#L27">src/structures/Peer.ts:27</a></li></ul></aside></li></ul></section>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/4a87f9e/src/structures/Peer.ts#L34">src/structures/Peer.ts:34</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member"><a id="send-2" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>send</span><a href="#send-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<ul class="tsd-signatures">
Expand Down Expand Up @@ -165,7 +177,7 @@ <h5><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-sym
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/1113de4/src/structures/Peer.ts#L37">src/structures/Peer.ts:37</a></li></ul></aside></li></ul></section></section></div>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/4a87f9e/src/structures/Peer.ts#L44">src/structures/Peer.ts:44</a></li></ul></aside></li></ul></section></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
Expand All @@ -189,6 +201,7 @@ <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon
<li><a href="#client" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>client</span></a></li>
<li><a href="#data" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>data</span></a></li>
<li><a href="#ping" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>ping</span></a></li>
<li><a href="#state" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>state</span></a></li>
<li><a href="#disconnect" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>disconnect</span></a></li>
<li><a href="#send" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>send</span></a></li>
<li><a href="#send-2" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>send</span></a></li></ul></div></details></div>
Expand Down
12 changes: 6 additions & 6 deletions docs/classes/TankPacket.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><span class="target">TankPacket</span></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/1113de4/src/packets/TankPacket.ts#L8">src/packets/TankPacket.ts:8</a></li></ul></aside>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/4a87f9e/src/packets/TankPacket.ts#L8">src/packets/TankPacket.ts:8</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
Expand Down Expand Up @@ -64,7 +64,7 @@ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-
<h4 class="tsd-returns-title">Returns <a href="TankPacket.html" class="tsd-signature-type tsd-kind-class">TankPacket</a></h4>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/1113de4/src/packets/TankPacket.ts#L13">src/packets/TankPacket.ts:13</a></li></ul></aside></li></ul></section></section>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/4a87f9e/src/packets/TankPacket.ts#L13">src/packets/TankPacket.ts:13</a></li></ul></aside></li></ul></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Properties</h2>
<section class="tsd-panel tsd-member"><a id="data" class="tsd-anchor"></a>
Expand All @@ -74,7 +74,7 @@ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code
</div>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/1113de4/src/packets/TankPacket.ts#L13">src/packets/TankPacket.ts:13</a></li></ul></aside></section></section>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/4a87f9e/src/packets/TankPacket.ts#L13">src/packets/TankPacket.ts:13</a></li></ul></aside></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Methods</h2>
<section class="tsd-panel tsd-member"><a id="parse" class="tsd-anchor"></a>
Expand All @@ -87,7 +87,7 @@ <h3 class="tsd-anchor-link"><span>parse</span><a href="#parse" aria-label="Perma
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Buffer</span></h4>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/1113de4/src/packets/TankPacket.ts#L55">src/packets/TankPacket.ts:55</a></li></ul></aside></li></ul></section>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/4a87f9e/src/packets/TankPacket.ts#L55">src/packets/TankPacket.ts:55</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member"><a id="from" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>from</span><a href="#from" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<ul class="tsd-signatures">
Expand All @@ -106,7 +106,7 @@ <h5><span class="tsd-kind-parameter">data</span>: <a href="../interfaces/Tank.ht
<h4 class="tsd-returns-title">Returns <a href="TankPacket.html" class="tsd-signature-type tsd-kind-class">TankPacket</a></h4>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/1113de4/src/packets/TankPacket.ts#L19">src/packets/TankPacket.ts:19</a></li></ul></aside></li></ul></section>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/4a87f9e/src/packets/TankPacket.ts#L19">src/packets/TankPacket.ts:19</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member"><a id="fromBuffer" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>from<wbr/>Buffer</span><a href="#fromBuffer" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<ul class="tsd-signatures">
Expand All @@ -125,7 +125,7 @@ <h5><span class="tsd-kind-parameter">buf</span>: <span class="tsd-signature-type
<h4 class="tsd-returns-title">Returns <a href="TankPacket.html" class="tsd-signature-type tsd-kind-class">TankPacket</a></h4>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/1113de4/src/packets/TankPacket.ts#L27">src/packets/TankPacket.ts:27</a></li></ul></aside></li></ul></section></section></div>
<li>Defined in <a href="https://github.com/JadlionHD/growtopia.js/blob/4a87f9e/src/packets/TankPacket.ts#L27">src/packets/TankPacket.ts:27</a></li></ul></aside></li></ul></section></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
Expand Down
Loading

0 comments on commit 24a1e77

Please sign in to comment.