Skip to content

Instantly share code, notes, and snippets.

@lorinbeer
Created October 11, 2014 23:41
Show Gist options
  • Save lorinbeer/415ade0a792192bd3943 to your computer and use it in GitHub Desktop.
Save lorinbeer/415ade0a792192bd3943 to your computer and use it in GitHub Desktop.
zscale adjustment for window coordinates to maintain proper aspect ratio of primitives
var zScale = (innerWidth > innerHeight) ?
zScale = -1. - (size / innerHeight) :
zScale = -1. - (size = innerWidth);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment