AnalyticalGraphicsInc/cesium — pull request #2291 by abwood (2014-11-21 14:24:29+00:00)
Title: Quantized mesh extensions fix

This pull request fixes the handling of Quantized-Mesh extensions, where extension size is now extracted in little endian. This error went unnoticed, because the actual error was on the Terrain Server where the extension size was serialized in big endian.

With this pull request, the following cases are handled:
Cesium 1.0 client requesting vertex normals from Terrain Server 1.0
Cesium 1.0 client requesting vertex normals from the patched Terrain Server 1.1
Cesium master requesting vertex normals from Terrain Server 1.0
Cesium master requesting vertex normals from patched Terrain Server 1.1

The patched Terrain Server 1.1 publishes the vertex normal extension under the new name, "octvertexnormals". Requesting the former "vertexnormals" extension will return the extension with the extension size uint32 still in big endian.

To test, I've updated the unit tests request the octvertexnormal extension in addition to the former "vertexnormal" extension. The patched Terrain Server 1.1 has also been deployed on assets.agi.com for test (//assets.agi.com/stk-terrain-new). For example, in sand castle you can access the new terrain server instance as follows:
```
var viewer = new Cesium.Viewer('cesiumContainer');
viewer.scene.globe.enableLighting = true;
viewer.scene.terrainProvider = new Cesium.CesiumTerrainProvider({
url: '//assets.agi.com/stk-terrain-new/v1/tilesets/world/tiles',
requestVertexNormals : true
});
```
//assets.agi.com/terrain is still live for testing Cesium compatibility with Terrain Server v1.0. Once merged we'll go live with the patched Terrain Server v1.1