~starkingdoms/starkingdoms

6c4ea9f06cb8ff6f6e86100223cc2491616a97d7 — TerraMaster85 2 years ago 73ab0fe
background parallax
1 files changed, 2 insertions(+), 2 deletions(-)

M client/src/index.ts
M client/src/index.ts => client/src/index.ts +2 -2
@@ 156,7 156,7 @@ async function client_main(server: string, username: string, texture_quality: st
        let viewer_size_x = global.canvas.width;
        let viewer_size_y = global.canvas.height;

        global.canvas.style.setProperty("background-position", `${-global.me?.x!}px ${-global.me?.y!}px`);
        global.canvas.style.setProperty("background-position", `${-global.me?.x!/5}px ${-global.me?.y!/5}px`);

        global.context.setTransform(1, 0, 0, 1, 0, 0);
        global.context.clearRect(0, 0, viewer_size_x, viewer_size_y);


@@ 253,4 253,4 @@ function planet_type_to_tex_id(ty: PlanetType): string {
        return "moon.png"
    }
    return "unknown.png"
}
\ No newline at end of file
}