From: Ben Beltran Date: Wed, 1 Aug 2018 02:48:22 +0000 (-0500) Subject: Add variable resolution X-Git-Url: https://git.r.bdr.sh/rbdr/flower/commitdiff_plain/40f5364be88ce7b224aa28d85b35940b9bb31907?ds=inline;hp=9910da3bbf88df7eb23212431fbcdb3c9394851c Add variable resolution --- diff --git a/lib/flower.js b/lib/flower.js index 78b657a..319d436 100644 --- a/lib/flower.js +++ b/lib/flower.js @@ -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