Skip to content

Instantly share code, notes, and snippets.

@patrickheng
Created December 29, 2018 23:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patrickheng/334a6c38a9047b7a022d6d9c88669b93 to your computer and use it in GitHub Desktop.
Save patrickheng/334a6c38a9047b7a022d6d9c88669b93 to your computer and use it in GitHub Desktop.
Camera snippets
const frustumHeight = 2.0 * dist * Math.tan(camera.fov * 0.5 * (Math.PI / 180))
const frustumWidth = frustumHeight * aspect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment