Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Include stopping criteria info in output image title attribute

  • Loading branch information...
commit 9b3ca9079011ed79f1b98d45aa6027834ab3cdc2 1 parent f825199
Phil McCarthy authored
Showing with 9 additions and 2 deletions.
  1. +9 −2 pareidoloop.js
View
11 pareidoloop.js
@@ -32,8 +32,8 @@ var Pareidoloop = new function() {
settings.OUTPUT_SIZE = args.outputSize;
}
if (args.outputCallback) {
- outputCallback = args.outputCallback;
- }
+ outputCallback = args.outputCallback;
+ }
if (args.confidenceThreshold) {
settings.CONFIDENCE_THRESHOLD = args.confidenceThreshold;
}
@@ -208,6 +208,13 @@ var Pareidoloop = new function() {
var outputImg = document.createElement("img");
outputImg.src = dataUrl;
+ var title = "Fitness: " + fitnessScore.toPrecision(4) +
+ "/" + settings.CONFIDENCE_THRESHOLD.toPrecision(4) +
+ " @ Generation: " + genCount +
+ "/" + settings.MAX_GENERATIONS;
+
+ outputImg.title = title;
+
if (outputCallback) {
outputCallback(outputImg);
}
Please sign in to comment.
Something went wrong with that request. Please try again.