Skip to content

Commit

Permalink
fixes plane issue & closes #5
Browse files Browse the repository at this point in the history
  • Loading branch information
doubleactii committed Dec 18, 2024
1 parent 4addbdc commit d9c360d
Show file tree
Hide file tree
Showing 10 changed files with 13,011 additions and 11,685 deletions.
13,890 changes: 7,603 additions & 6,287 deletions docs/ast/source/layer.mjs.json

Large diffs are not rendered by default.

10,756 changes: 5,378 additions & 5,378 deletions docs/ast/source/parallax.mjs.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/class/src/layer.mjs~Layer.html
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ <h3 data-ice="anchor" id="instance-method-remove">
<span class="right-info">


<span data-ice="source"><span><a href="file/src/layer.mjs.html#lineNumber155">source</a></span></span>
<span data-ice="source"><span><a href="file/src/layer.mjs.html#lineNumber160">source</a></span></span>
</span>
</h3>

Expand Down
7 changes: 6 additions & 1 deletion docs/file/src/layer.mjs.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,16 @@
if (this.config.instances.has(pInstance)) return;
this.config.instances.add(pInstance);
const config = pConfig
? pConfig
? {
x: this.config.horizontalSpeed,
y: this.config.verticalSpeed,
loop: pConfig.loop
}
: {
x: this.config.horizontalSpeed,
y: this.config.verticalSpeed
}
pInstance.plane = this.config.plane;
Parallax.add(pInstance, config);
}
/**
Expand Down
18 changes: 9 additions & 9 deletions docs/index.json

Large diffs are not rendered by default.

Empty file modified docs/script/prettify/prettify.js
100644 → 100755
Empty file.
10 changes: 5 additions & 5 deletions docs/source.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,18 @@
<td data-ice="filePath"><span><a href="file/src/layer.mjs.html">src/layer.mjs</a></span></td>
<td data-ice="identifier" class="identifiers"><span><a href="class/src/layer.mjs~Layer.html">Layer</a></span></td>
<td class="coverage"><span data-ice="coverage">-</span></td>
<td style="display: none;" data-ice="size">6998 byte</td>
<td style="display: none;" data-ice="lines">158</td>
<td style="display: none;" data-ice="updated">2024-11-05 18:40:36 (UTC)</td>
<td style="display: none;" data-ice="size">7022 byte</td>
<td style="display: none;" data-ice="lines">163</td>
<td style="display: none;" data-ice="updated">2024-12-04 09:00:09 (UTC)</td>
</tr>
<tr data-ice="file">
<td data-ice="filePath"><span><a href="file/src/parallax.mjs.html">src/parallax.mjs</a></span></td>
<td data-ice="identifier" class="identifiers"><span><a href="variable/index.html#static-variable-Parallax">Parallax</a></span>
<span><a href="class/src/parallax.mjs~ParallaxSingleton.html">ParallaxSingleton</a></span></td>
<td class="coverage"><span data-ice="coverage">-</span></td>
<td style="display: none;" data-ice="size">10294 byte</td>
<td style="display: none;" data-ice="size">10048 byte</td>
<td style="display: none;" data-ice="lines">246</td>
<td style="display: none;" data-ice="updated">2024-11-05 18:40:36 (UTC)</td>
<td style="display: none;" data-ice="updated">2024-12-04 08:51:47 (UTC)</td>
</tr>
</tbody>
</table>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import babel from '@rollup/plugin-babel';
import replace from 'rollup-plugin-replace';
import terser from '@rollup/plugin-terser';
import { cleandir } from 'rollup-plugin-cleandir';
import packageJson from './package.json' assert { type: 'json' };
import packageJson from './package.json' with { type: 'json' };

const fileName = packageJson.name;

Expand Down
7 changes: 6 additions & 1 deletion src/layer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,16 @@ export class Layer {
if (this.config.instances.has(pInstance)) return;
this.config.instances.add(pInstance);
const config = pConfig
? pConfig
? {
x: this.config.horizontalSpeed,
y: this.config.verticalSpeed,
loop: pConfig.loop
}
: {
x: this.config.horizontalSpeed,
y: this.config.verticalSpeed
}
pInstance.plane = this.config.plane;
Parallax.add(pInstance, config);
}
/**
Expand Down

0 comments on commit d9c360d

Please sign in to comment.