From 51538dff481d2a860c465864ec539bcd436fb03b Mon Sep 17 00:00:00 2001 From: Julian Descottes Date: Sun, 24 Sep 2017 15:55:50 +0200 Subject: [PATCH] Make piskel performance warning less scary --- src/js/service/performance/PerformanceReport.js | 8 ++++---- src/templates/dialogs/performance-info.html | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/js/service/performance/PerformanceReport.js b/src/js/service/performance/PerformanceReport.js index 2cdebf20..716a0941 100644 --- a/src/js/service/performance/PerformanceReport.js +++ b/src/js/service/performance/PerformanceReport.js @@ -16,7 +16,7 @@ */ ns.PerformanceReport = function (piskel, colorsCount) { var pixels = piskel.getWidth() * piskel.getHeight(); - this.resolution = pixels > (500 * 500); + this.resolution = pixels > (512 * 512); var layersCount = piskel.getLayers().length; this.layers = layersCount > 25; @@ -24,10 +24,10 @@ var framesCount = piskel.getLayerAt(0).size(); this.frames = framesCount > 100; - this.colors = colorsCount > 100; + this.colors = colorsCount >= 256; - var overallScore = (pixels / 2500) + (layersCount * 4) + framesCount + colorsCount; - this.overall = overallScore > 100; + var overallScore = (pixels / 2620) + (layersCount * 4) + framesCount + (colorsCount * 100 / 256); + this.overall = overallScore > 200; }; ns.PerformanceReport.prototype.equals = function (report) { diff --git a/src/templates/dialogs/performance-info.html b/src/templates/dialogs/performance-info.html index b62b6aa2..7ca3806d 100644 --- a/src/templates/dialogs/performance-info.html +++ b/src/templates/dialogs/performance-info.html @@ -15,10 +15,10 @@

If you ignore this warning, please save often!

To fix the issue, try adjusting your sprite settings:

We strive to improve Piskel, its performance and stability, but this is a personal project with limited time and resources. We prefer to warn you early rather than having you lose your work.