Commits

Anonymous committed 4e235ea

add mirror mode toggle. Note that this requires a mirrored set of markers.

Comments (0)

Files changed (2)

         warpHoleColumns: 11,
         warpHoleRows: 11,
         frameSize: 9.09,
-        FLARThreshold: 90,
+        mirrorMode: false,
+        FLARThreshold: 60,
     }
 });
 "use strict";
-define(['threejs'],function() {
+define(['settings','threejs'],function(settings) {
     var camera = (function() {
         var URL = window.URL || window.webkitURL;
 
         canvas.width = element.width;
         canvas.height = element.width*3/4;
         var context = canvas.getContext('2d');
+        console.log("mirrorMode:",settings.mirrorMode);
+        if( settings.mirrorMode ) {
+            context.scale(-1,1);
+        }
 
         return {
             waitForAuthorization: waitForAuthorization,
             canvas: canvas,
             update: function() {
-                context.drawImage(element, 0, 0);
+                if( settings.mirrorMode ) {
+                    context.drawImage(element, -element.width, 0);
+                }
+                else {
+                    context.drawImage(element, 0, 0);
+                }
             }
         }
     }());