Pixelate skins if we ever show them full size or greater

This commit is contained in:
Jordan Eldredge 2018-12-03 21:24:02 -08:00
parent b9d5a968a1
commit e51a59f7aa

View file

@ -1,5 +1,6 @@
import React from "react";
import * as Utils from "./utils";
import { SCREENSHOT_HEIGHT } from "./constants";
export default class Skin extends React.Component {
constructor(props) {
@ -51,6 +52,10 @@ export default class Skin extends React.Component {
>
<img
src={this.props.src}
style={{
imageRendering:
this.props.height >= SCREENSHOT_HEIGHT ? "pixelated" : null
}}
className={`screenshot ${this.state.loaded ? "loaded" : ""}`}
onLoad={this._handleLoad}
alt={Utils.filenameFromHash(this.props.hash)}