Merge branch 'develop' into fix-issue-1835

This commit is contained in:
Hanusiak Piotr 2022-02-09 09:35:43 +01:00
commit 20267d3483
4 changed files with 161 additions and 0 deletions

View file

@ -85,6 +85,7 @@ export class GameMap {
phaserMap
.createLayer(layer.name, terrains, (layer.x || 0) * 32, (layer.y || 0) * 32)
.setDepth(depth)
.setScrollFactor(layer.parallaxx ?? 1, layer.parallaxy ?? 1)
.setAlpha(layer.opacity)
.setVisible(layer.visible)
.setSize(layer.width, layer.height)

View file

@ -78,6 +78,8 @@ export interface ITiledMapTileLayer {
width: number;
x: number;
y: number;
parallaxx?: number;
parallaxy?: number;
/**
* Draw order (topdown (default), index)

View file

@ -32,6 +32,14 @@
<a href="#" class="testLink" data-testmap="jitsi_custom_url.json" target="_blank">Testing jitsiUrl property</a>
</td>
</tr>
<tr>
<td>
<input type="radio" name="test-animated-tiles"> Success <input type="radio" name="test-animated-tiles"> Failure <input type="radio" name="test-animated-tiles" checked> Pending
</td>
<td>
<a href="#" class="testLink" data-testmap="parallax.json" target="_blank">Test parallax effect</a>
</td>
</tr>
<tr>
<td>
<input type="radio" name="test-animated-tiles"> Success <input type="radio" name="test-animated-tiles"> Failure <input type="radio" name="test-animated-tiles" checked> Pending

150
maps/tests/parallax.json Normal file

File diff suppressed because one or more lines are too long