]> git.r.bdr.sh - rbdr/flower/commitdiff
Add variable resolution
authorBen Beltran <redacted>
Wed, 1 Aug 2018 02:48:22 +0000 (21:48 -0500)
committerBen Beltran <redacted>
Wed, 1 Aug 2018 02:48:22 +0000 (21:48 -0500)
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,
   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,
   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 = internals.kTargetVerticalResolution * internals.kWidthRatio;
     canvas.height = internals.kTargetVerticalResolution;  
-
-    canvas.width = width;
-    canvas.height = height;
   },
 
   // Methods: Shader / GL Related
   },
 
   // Methods: Shader / GL Related