src/graphics/dom-layer.js
function(enabled) {
        var style = this._div.style;
        var camelize = Crafty.domHelper.camelize;
        if (enabled) {
            style[camelize("image-rendering")] = "optimizeSpeed"; /* legacy */
            style[camelize("image-rendering")] =
                "-moz-crisp-edges"; /* Firefox */
            style[camelize("image-rendering")] = "-o-crisp-edges"; /* Opera */
            style[camelize("image-rendering")] =
                "-webkit-optimize-contrast"; /* Webkit (Chrome & Safari) */
            style[camelize("-ms-interpolation-mode")] =
                "nearest-neighbor"; /* IE */
            style[camelize("image-rendering")] =
                "optimize-contrast"; /* CSS3 proposed */
            style[camelize("image-rendering")] =
                "pixelated"; /* CSS4 proposed */
            style[camelize("image-rendering")] =
                "crisp-edges"; /* CSS4 proposed */
        } else {
            style[camelize("image-rendering")] = "optimizeQuality"; /* legacy */
            style[camelize("-ms-interpolation-mode")] = "bicubic"; /* IE */
            style[camelize("image-rendering")] = "auto"; /* CSS3 */
        }
    }
function(enabled) {
        var style = this._div.style;
        var camelize = Crafty.domHelper.camelize;
        if (enabled) {
            style[camelize("image-rendering")] = "optimizeSpeed"; /* legacy */
            style[camelize("image-rendering")] =
                "-moz-crisp-edges"; /* Firefox */
            style[camelize("image-rendering")] = "-o-crisp-edges"; /* Opera */
            style[camelize("image-rendering")] =
                "-webkit-optimize-contrast"; /* Webkit (Chrome & Safari) */
            style[camelize("-ms-interpolation-mode")] =
                "nearest-neighbor"; /* IE */
            style[camelize("image-rendering")] =
                "optimize-contrast"; /* CSS3 proposed */
            style[camelize("image-rendering")] =
                "pixelated"; /* CSS4 proposed */
            style[camelize("image-rendering")] =
                "crisp-edges"; /* CSS4 proposed */
        } else {
            style[camelize("image-rendering")] = "optimizeQuality"; /* legacy */
            style[camelize("-ms-interpolation-mode")] = "bicubic"; /* IE */
            style[camelize("image-rendering")] = "auto"; /* CSS3 */
        }
    }
function ( enabled ) { var style = this . _div . style ; var camelize = Crafty . domHelper . camelize ; if ( enabled ) { style [ camelize ( "image-rendering" ) ] = "optimizeSpeed" ; /* legacy */ style [ camelize ( "image-rendering" ) ] = "-moz-crisp-edges" ; /* Firefox */ style [ camelize ( "image-rendering" ) ] = "-o-crisp-edges" ; /* Opera */ style [ camelize ( "image-rendering" ) ] = "-webkit-optimize-contrast" ; /* Webkit (Chrome & Safari) */ style [ camelize ( "-ms-interpolation-mode" ) ] = "nearest-neighbor" ; /* IE */ style [ camelize ( "image-rendering" ) ] = "optimize-contrast" ; /* CSS3 proposed */ style [ camelize ( "image-rendering" ) ] = "pixelated" ; /* CSS4 proposed */ style [ camelize ( "image-rendering" ) ] = "crisp-edges" ; /* CSS4 proposed */ } else { style [ camelize ( "image-rendering" ) ] = "optimizeQuality" ; /* legacy */ style [ camelize ( "-ms-interpolation-mode" ) ] = "bicubic" ; /* IE */ style [ camelize ( "image-rendering" ) ] = "auto" ; /* CSS3 */ } }
Handle whether images should be smoothed or not
Handle whether images should be smoothed or not