Skip to content

Commit 0221b10

Browse files
Add pixelart styling to showcase screenshots
1 parent 5e1cd82 commit 0221b10

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

scripts/showcase-filters.js

+11
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@ function add_to_screen(game, container) {
1616
gameDiv.className = 'showcase-link-image';
1717
gameDiv.style.backgroundImage = "url('" + BannerPath + game.screenshot + "')";
1818

19+
if (game.pixelart == true)
20+
{
21+
gameDiv.style["image-rendering"] = "pixelated";
22+
gameDiv.style["-ms-interpolation-mode"] = "nearest-neighbor";
23+
}
24+
else
25+
{
26+
gameDiv.style["image-rendering"] = "auto";
27+
gameDiv.style["-ms-interpolation-mode"] = "bicubic";
28+
}
29+
1930
var link = document.createElement('a');
2031
link.href = game.url;
2132

0 commit comments

Comments
 (0)