tangram-map/tangram — pull request #27 by bcamper (2014-09-30 16:24:37+00:00)
Title: Camera configuration

This moves the camera projections (currently perspective, isometric, and flat/top-down) out of hard-coded shaders and into JS-level classes. Each camera class defines a GLSL function called ```cameraProjection``` that is then [injected into all shaders as a global transform](https://github.com/tangram-map/tangram/compare/camera-es6?expand=1#diff-af13ee292b6ce2988c90ac1ada63e8d6R54). The camera class can additionally update uniforms or other special values once per frame (and once per GL program) -- this is used for [setting perspective matrix uniforms](https://github.com/tangram-map/tangram/compare/camera-es6?expand=1#diff-af13ee292b6ce2988c90ac1ada63e8d6R113), for example.

Cameras config is now driven by the [scene definition](https://github.com/tangram-map/tangram/compare/camera-es6?expand=1#diff-4dc0727d23e904a53ea695a15b8119e4R1); each camera type can support its own config properties (isometric axis, perspective focal length, etc.).

This PR also expands the shader transform system to support global transforms (similar to the existing ```#define``` injection system), [merging arrays of global and program-specific transforms](https://github.com/tangram-map/tangram/compare/camera-es6?expand=1#diff-6713a043393cf72a0d1a90fd1e5d679fR225) for each shader injection point.