Skip to content

Commit

Permalink
fix: hotfix for frames not having a parent by the time an API that us…
Browse files Browse the repository at this point in the history
…es it is called
  • Loading branch information
doubleactii committed Aug 27, 2024
1 parent 7a590eb commit 7606f83
Show file tree
Hide file tree
Showing 11 changed files with 8,669 additions and 8,669 deletions.
3,821 changes: 2,038 additions & 1,783 deletions docs/ast/source/frame.mjs.json

Large diffs are not rendered by default.

13,311 changes: 6,528 additions & 6,783 deletions docs/ast/source/icon.mjs.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions docs/class/src/frame.mjs~Frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ <h3 data-ice="anchor" id="instance-method-getDataURL">
<span class="right-info">


<span data-ice="source"><span><a href="file/src/frame.mjs.html#lineNumber106">source</a></span></span>
<span data-ice="source"><span><a href="file/src/frame.mjs.html#lineNumber107">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -901,7 +901,7 @@ <h3 data-ice="anchor" id="instance-method-getDelay">
<span class="right-info">


<span data-ice="source"><span><a href="file/src/frame.mjs.html#lineNumber84">source</a></span></span>
<span data-ice="source"><span><a href="file/src/frame.mjs.html#lineNumber85">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -958,7 +958,7 @@ <h3 data-ice="anchor" id="instance-method-setDataURL">
<span class="right-info">


<span data-ice="source"><span><a href="file/src/frame.mjs.html#lineNumber92">source</a></span></span>
<span data-ice="source"><span><a href="file/src/frame.mjs.html#lineNumber93">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -1032,7 +1032,7 @@ <h3 data-ice="anchor" id="instance-method-setDelay">
<span class="right-info">


<span data-ice="source"><span><a href="file/src/frame.mjs.html#lineNumber70">source</a></span></span>
<span data-ice="source"><span><a href="file/src/frame.mjs.html#lineNumber71">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -1108,7 +1108,7 @@ <h3 data-ice="anchor" id="instance-method-export">
<span class="right-info">


<span data-ice="source"><span><a href="file/src/frame.mjs.html#lineNumber114">source</a></span></span>
<span data-ice="source"><span><a href="file/src/frame.mjs.html#lineNumber115">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -1165,7 +1165,7 @@ <h3 data-ice="anchor" id="instance-method-parse">
<span class="right-info">


<span data-ice="source"><span><a href="file/src/frame.mjs.html#lineNumber56">source</a></span></span>
<span data-ice="source"><span><a href="file/src/frame.mjs.html#lineNumber57">source</a></span></span>
</span>
</h3>

Expand Down
22 changes: 11 additions & 11 deletions docs/class/src/icon.mjs~Icon.html
Original file line number Diff line number Diff line change
Expand Up @@ -1841,7 +1841,7 @@ <h3 data-ice="anchor" id="instance-method-getFrame">
<span class="right-info">


<span data-ice="source"><span><a href="file/src/icon.mjs.html#lineNumber395">source</a></span></span>
<span data-ice="source"><span><a href="file/src/icon.mjs.html#lineNumber394">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -1917,7 +1917,7 @@ <h3 data-ice="anchor" id="instance-method-getFrames">
<span class="right-info">


<span data-ice="source"><span><a href="file/src/icon.mjs.html#lineNumber406">source</a></span></span>
<span data-ice="source"><span><a href="file/src/icon.mjs.html#lineNumber405">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -2088,7 +2088,7 @@ <h3 data-ice="anchor" id="instance-method-getState">
<span class="right-info">


<span data-ice="source"><span><a href="file/src/icon.mjs.html#lineNumber426">source</a></span></span>
<span data-ice="source"><span><a href="file/src/icon.mjs.html#lineNumber425">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -2162,7 +2162,7 @@ <h3 data-ice="anchor" id="instance-method-getStates">
<span class="right-info">


<span data-ice="source"><span><a href="file/src/icon.mjs.html#lineNumber443">source</a></span></span>
<span data-ice="source"><span><a href="file/src/icon.mjs.html#lineNumber442">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -2219,7 +2219,7 @@ <h3 data-ice="anchor" id="instance-method-removeFrame">
<span class="right-info">


<span data-ice="source"><span><a href="file/src/icon.mjs.html#lineNumber302">source</a></span></span>
<span data-ice="source"><span><a href="file/src/icon.mjs.html#lineNumber301">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -2455,7 +2455,7 @@ <h3 data-ice="anchor" id="instance-method-reorderFrame">
<span class="right-info">


<span data-ice="source"><span><a href="file/src/icon.mjs.html#lineNumber347">source</a></span></span>
<span data-ice="source"><span><a href="file/src/icon.mjs.html#lineNumber346">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -2843,7 +2843,7 @@ <h3 data-ice="anchor" id="instance-method-export">
<span class="right-info">


<span data-ice="source"><span><a href="file/src/icon.mjs.html#lineNumber486">source</a></span></span>
<span data-ice="source"><span><a href="file/src/icon.mjs.html#lineNumber485">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -2900,7 +2900,7 @@ <h3 data-ice="anchor" id="instance-method-exportAsState">
<span class="right-info">


<span data-ice="source"><span><a href="file/src/icon.mjs.html#lineNumber464">source</a></span></span>
<span data-ice="source"><span><a href="file/src/icon.mjs.html#lineNumber463">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -2957,7 +2957,7 @@ <h3 data-ice="anchor" id="instance-method-getFramesData">
<span class="right-info">


<span data-ice="source"><span><a href="file/src/icon.mjs.html#lineNumber414">source</a></span></span>
<span data-ice="source"><span><a href="file/src/icon.mjs.html#lineNumber413">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -3014,7 +3014,7 @@ <h3 data-ice="anchor" id="instance-method-getStatesData">
<span class="right-info">


<span data-ice="source"><span><a href="file/src/icon.mjs.html#lineNumber451">source</a></span></span>
<span data-ice="source"><span><a href="file/src/icon.mjs.html#lineNumber450">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -3071,7 +3071,7 @@ <h3 data-ice="anchor" id="instance-method-indexFrames">
<span class="right-info">


<span data-ice="source"><span><a href="file/src/icon.mjs.html#lineNumber333">source</a></span></span>
<span data-ice="source"><span><a href="file/src/icon.mjs.html#lineNumber332">source</a></span></span>
</span>
</h3>

Expand Down
1 change: 1 addition & 0 deletions docs/file/src/frame.mjs.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
*/
constructor(pFrameData, pParentIcon) {
this.vyi = pParentIcon.vyi;
this.parent = pParentIcon;
this.parse(pFrameData);
}
/**
Expand Down
1 change: 0 additions & 1 deletion docs/file/src/icon.mjs.html
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@
if (pFrameData) {
if (pFrameData instanceof Object) {
const frame = new Frame(pFrameData, this);
frame.parent = this;
// Add the frame to the frames array.
this.frames.push(frame);
// Re-index frames after a change
Expand Down
154 changes: 77 additions & 77 deletions docs/index.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions docs/source.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@
<td data-ice="filePath"><span><a href="file/src/frame.mjs.html">src/frame.mjs</a></span></td>
<td data-ice="identifier" class="identifiers"><span><a href="class/src/frame.mjs~Frame.html">Frame</a></span></td>
<td class="coverage"><span data-ice="coverage">-</span></td>
<td style="display: none;" data-ice="size">3588 byte</td>
<td style="display: none;" data-ice="lines">125</td>
<td style="display: none;" data-ice="updated">2024-08-03 14:34:59 (UTC)</td>
<td style="display: none;" data-ice="size">3624 byte</td>
<td style="display: none;" data-ice="lines">126</td>
<td style="display: none;" data-ice="updated">2024-08-03 15:04:37 (UTC)</td>
</tr>
<tr data-ice="file">
<td data-ice="filePath"><span><a href="file/src/icon.mjs.html">src/icon.mjs</a></span></td>
<td data-ice="identifier" class="identifiers"><span><a href="class/src/icon.mjs~Icon.html">Icon</a></span></td>
<td class="coverage"><span data-ice="coverage">-</span></td>
<td style="display: none;" data-ice="size">18037 byte</td>
<td style="display: none;" data-ice="lines">510</td>
<td style="display: none;" data-ice="updated">2024-08-03 14:49:31 (UTC)</td>
<td style="display: none;" data-ice="size">17999 byte</td>
<td style="display: none;" data-ice="lines">509</td>
<td style="display: none;" data-ice="updated">2024-08-03 15:04:46 (UTC)</td>
</tr>
<tr data-ice="file">
<td data-ice="filePath"><span><a href="file/src/vyi.mjs.html">src/vyi.mjs</a></span></td>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vyi",
"version": "1.2.0",
"version": "1.2.1",
"description": "A lightweight module to read / manage .vyi files created in the Vylocity Game Engine.",
"main": "src/vyi.mjs",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions src/frame.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export class Frame {
*/
constructor(pFrameData, pParentIcon) {
this.vyi = pParentIcon.vyi;
this.parent = pParentIcon;
this.parse(pFrameData);
}
/**
Expand Down
1 change: 0 additions & 1 deletion src/icon.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ export class Icon {
if (pFrameData) {
if (pFrameData instanceof Object) {
const frame = new Frame(pFrameData, this);
frame.parent = this;
// Add the frame to the frames array.
this.frames.push(frame);
// Re-index frames after a change
Expand Down

0 comments on commit 7606f83

Please sign in to comment.