Skip to content

Experience-Monks/google-panorama-zoom-level

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

google-panorama-zoom-level

stable

Find the best zoom level for StreetView panoramas based on the specified maximum texture dimension. This is useful to avoid WebGL texture limits on low-end hardware.

Example:

var level = require('google-panorama-zoom-level')

level(4096) // -> 3
level(2048) // -> 2

A typical usage with WebGL capabilities:

var level = require('google-panorama-zoom-level')
var gl = require('webgl-context')()

var maxSize = gl.getParameteri(gl.MAX_TEXTURE_SIZE)
var zoom = level(maxSize)

Usage

NPM

zoom = level(maxSize)

Returns the best zoom level for the given maxSize texture dimension. A stitched StreetView panoramic image at that zoom level will be equal or less than maxSize.

See Also

License

MIT, see LICENSE.md for details.

About

get the best street view zoom level within texture size

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published