glsl-proj4-camera
use proj4 strings to map lonlat geometry to screen coordinates in a shader
This module sets up listeners for mouse events to update the member uniforms given in a proj4 string.
example
var regl =var glsl =var camera = locationhash || `+proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +ellps=GRS80 +units=m+k_0=0.0000019268500651226404 +x_0=0.35589838645697514+y_0=-0.34185734540971613`cameravar mesh =var draw =reglframe {reglclear color: 1111 depth: true}
api
var projcamera =
var camera = projcamera(str)
Create a camera instance from a proj4 string str
.
var uniforms = camera.members(name)
Return an object of dotted uniform members from a prefix name
.
var str = camera.string()
Return a proj4 string for the current view.
camera.on('update', function (members) {})
When the map view changes, this event fires.
install
npm install glsl-proj4-camera
Use browserify with glslify to use this module.
license
BSD