]> git.r.bdr.sh - rbdr/flower/blobdiff - lib/flower.js
Add variable resolution
[rbdr/flower] / lib / flower.js
index 78b657a9408f211d243aa5751377bb72f9ec13b1..319d436b4ff23390aaefdfc543c47b86600352cd 100644 (file)
@@ -5,7 +5,7 @@ const internals = {
   kEntrypointElementId: 'entrypoint',  // The id of the canvas element where we will render
   kWidthRatio: 2.76,
   kHeightRatio: 1,
-  kTargetVerticalResolution: 32,
+  kTargetVerticalResolution: 32 + Math.round(Math.random() * 1024),
   kFieldOfView: 45,
   kNearLimit: 0.1,
   kFarLimit: 100,
@@ -113,9 +113,6 @@ const internals = {
 
     canvas.width = internals.kTargetVerticalResolution * internals.kWidthRatio;
     canvas.height = internals.kTargetVerticalResolution;  
-
-    canvas.width = width;
-    canvas.height = height;
   },
 
   // Methods: Shader / GL Related