1
0
forked from 0ad/0ad

Fix the kush background stuttering.

Patch by: @Polakrity
Reviewed by: @Stan
Differential Revision: https://code.wildfiregames.com/D1758
This was SVN commit r22259.
This commit is contained in:
Stan 2019-05-09 17:46:48 +00:00
parent ca37b0fb0e
commit 9e44b9867b
2 changed files with 25 additions and 13 deletions

View File

@ -1,23 +1,23 @@
g_BackgroundLayerData.push(
[
{
"offset": (time, width) => 0.02 * width * Math.cos(0.05 * time),
"offset": (time, width) => 0.07 * width * Math.cos(0.1 * time),
"sprite": "background-kush1-1",
"tiling": true,
"tiling": true
},
{
"offset": (time, width) => 0.04 * width * Math.cos(0.1 * time),
"offset": (time, width) => 0.05 * width * Math.cos(0.1 * time),
"sprite": "background-kush1-2",
"tiling": true,
"tiling": true
},
{
"offset": (time, width) => 0.04 * width * Math.cos(0.15 * time),
"offset": (time, width) => 0.04 * width * Math.cos(0.1 * time) + 0.01 * width * Math.cos(0.04 * time),
"sprite": "background-kush1-3",
"tiling": true,
"tiling": true
},
{
"offset": (time, width) => -40,
"offset": (time, width) => -0.1,
"sprite": "background-kush1-4",
"tiling": false,
},
"tiling": true
}
]);

View File

@ -1,15 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<sprites>
<sprite name="background-kush1-1">
<image texture="pregame/backgrounds/kush1_1.png" fixed_h_aspect_ratio="2"/>
<image
texture="pregame/backgrounds/kush1_1.png"
fixed_h_aspect_ratio="2"
round_coordinates="false"
/>
</sprite>
<sprite name="background-kush1-2">
<image texture="pregame/backgrounds/kush1_2.png" fixed_h_aspect_ratio="2"/>
<image
texture="pregame/backgrounds/kush1_2.png"
fixed_h_aspect_ratio="2"
round_coordinates="false"
/>
</sprite>
<sprite name="background-kush1-3">
<image texture="pregame/backgrounds/kush1_3.png" fixed_h_aspect_ratio="2"/>
<image
texture="pregame/backgrounds/kush1_3.png"
fixed_h_aspect_ratio="2"
round_coordinates="false"
/>
</sprite>
<sprite name="background-kush1-4">
<image texture="pregame/backgrounds/kush1_4.png" fixed_h_aspect_ratio="2"/>
<image texture="pregame/backgrounds/kush1_4.png"/>
</sprite>
</sprites>