Comparing version 2.3.0 to 2.4.0
@@ -74,2 +74,3 @@ 'use strict'; | ||
deepCompare: false, | ||
disableMercatorProjector: false, | ||
getValue: function getValue(x) { | ||
@@ -628,3 +629,5 @@ return x; | ||
var zoom = _props2.zoom; | ||
var disableMercatorProjector = _props2.disableMercatorProjector; | ||
this.setState({ | ||
@@ -637,7 +640,10 @@ viewport: { x: 0, y: 0, width: width, height: height }, | ||
}); | ||
this.setUniforms({ | ||
viewport: [0, 0, width, height], | ||
mercatorScale: Math.pow(2, zoom), | ||
mercatorCenter: [longitude, latitude] | ||
mercatorCenter: [longitude, latitude], | ||
disableMercatorProjector: disableMercatorProjector | ||
}); | ||
(0, _log2.default)(3, this.state.viewport, latitude, longitude, zoom); | ||
@@ -687,2 +693,2 @@ } | ||
exports.default = Layer; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9sYXllci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztxakJBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7OztBQUNBOztBQUNBOztBQUVBOzs7O0FBQ0E7Ozs7QUFDQTs7OztBQUNBOzs7Ozs7OztBQUVBOzs7Ozs7OztBQVFBLElBQU0sZ0JBQWdCO0FBQ3BCLE9BQUssQ0FEZTtBQUVwQixXQUFTLEdBRlc7QUFHcEIsZ0JBQWMsU0FITTtBQUlwQixRQUFNLEVBSmM7QUFLcEIsY0FBWSxLQUxRO0FBTXBCLGVBQWEsS0FOTztBQU9wQixZQUFVO0FBQUEsV0FBSyxDQUFMO0FBQUEsR0FQVTtBQVFwQixXQUFTLG1CQUFNLENBQUUsQ0FSRztBQVNwQixXQUFTLG1CQUFNLENBQUUsQ0FURzt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WRlciwgc28gaW4gbWFueSBjYXNlcyB0aGVyZSBpcyBubyBuZWVkXG4gICAqIGZvciB0aGlzIGZ1bmN0aW9uXG4gICAqIEBwYXJhbSB7T2JqZWN0fEFycmF5fSBsYXRMbmcgLSBFaXRoZXIgW2xhdCxsbmddIG9yIHtsYXQsIGxvbn1cbiAgICogQHJldHVybiB7T2JqZWN0fSAtIHgsIHlcbiAgICovXG4gIHByb2plY3QobGF0TG5nKSB7XG4gICAgY29uc3Qge21lcmNhdG9yfSA9IHRoaXMuc3RhdGU7XG4gICAgY29uc3QgW3gsIHldID0gQXJyYXkuaXNBcnJheShsYXRMbmcpID9cbiAgICAgIG1lcmNhdG9yLnByb2plY3QoW2xhdExuZ1sxXSwgbGF0TG5nWzBdXSkgOlxuICAgICAgbWVyY2F0b3IucHJvamVjdChbbGF0TG5nLmxvbiwgbGF0TG5nLmxhdF0pO1xuICAgIHJldHVybiB7eCwgeX07XG4gIH1cblxuICB1bnByb2plY3QoeHkpIHtcbiAgICBjb25zdCB7bWVyY2F0b3J9ID0gdGhpcy5zdGF0ZTtcbiAgICBjb25zdCBbbG9uLCBsYXRdID0gQXJyYXkuaXNBcnJheSh4eSkgP1xuICAgICAgbWVyY2F0b3IudW5wcm9qZWN0KHh5KSA6XG4gICAgICBtZXJjYXRvci51bnByb2plY3QoW3h5LngsIHh5LnldKTtcbiAgICByZXR1cm4ge2xhdCwgbG9ufTtcbiAgfVxufVxuIl19 |
@@ -128,4 +128,4 @@ 'use strict'; | ||
program: new _luma.Program(gl, { | ||
vs: '#define GLSLIFY 1\n// Copyright (c) 2015 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the "Software"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/* vertex shader for the arc-layer */\n#define SHADER_NAME arc-layer-vs\n\nconst float TILE_SIZE_1540259130 = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE_1540259130 = TILE_SIZE_1540259130 / (PI * 2.0);\n\n// non-linear projection: lnglats => zoom 0 tile [0-512, 0-512] * scale\nvec2 mercatorProject(vec2 lnglat, float zoomScale) {\n float scale = WORLD_SCALE_1540259130 * zoomScale;\n return vec2(\n \tscale * (radians(lnglat.x) + PI),\n \tscale * (PI - log(tan(PI * 0.25 + radians(lnglat.y) * 0.5)))\n );\n}\n\nuniform float mercatorScale;\n\nconst float N = 49.0;\n\nattribute vec3 positions;\nattribute vec3 instanceColors;\nattribute vec4 instancePositions;\nattribute vec3 instancePickingColors;\n\nuniform mat4 worldMatrix;\nuniform mat4 projectionMatrix;\nuniform float opacity;\nuniform float renderPickingBuffer;\n\nvarying vec4 vColor;\n\nfloat paraboloid(vec2 source, vec2 target, float index) {\n float ratio = index / N;\n\n vec2 x = mix(source, target, ratio);\n vec2 center = mix(source, target, 0.5);\n\n float dSourceCenter = distance(source, center);\n float dXCenter = distance(x, center);\n return (dSourceCenter + dXCenter) * (dSourceCenter - dXCenter);\n}\n\nvoid main(void) {\n vec2 source = mercatorProject(instancePositions.xy, mercatorScale);\n vec2 target = mercatorProject(instancePositions.zw, mercatorScale);\n\n // TODO - are we only using x coordinate?\n float segmentIndex = positions.x;\n vec3 p = vec3(\n // xy: linear interpolation of source & target\n mix(source, target, segmentIndex / N),\n // z: paraboloid interpolate of source & target\n sqrt(paraboloid(source, target, segmentIndex))\n );\n\n gl_Position = projectionMatrix * vec4(p, 1.0);\n\n vec4 color = vec4(instanceColors / 255.0, opacity);\n vec4 pickingColor = vec4(instancePickingColors / 255.0, opacity);\n vColor = mix(color, pickingColor, renderPickingBuffer);\n}\n', | ||
fs: '// Copyright (c) 2015 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the "Software"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/* fragment shader for the arc-layer */\n#define SHADER_NAME arc-layer-fs\n\n#ifdef GL_ES\nprecision highp float;\n#define GLSLIFY 1\n#endif\n\nvarying vec4 vColor;\n\nvoid main(void) {\n gl_FragColor = vColor;\n}\n', | ||
vs: '#define GLSLIFY 1\n// Copyright (c) 2015 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the "Software"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#define SHADER_NAME arc-layer-vertex-shader\n\nconst float TILE_SIZE_1540259130 = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE_1540259130 = TILE_SIZE_1540259130 / (PI * 2.0);\n\nuniform bool disableMercatorProjector;\nuniform float mercatorScale;\n\n// non-linear projection: lnglats => unit tile [0-1, 0-1]\nvec2 mercatorProject(vec2 lnglat) {\n return vec2(\n \tradians(lnglat.x) + PI,\n \tPI - log(tan(PI * 0.25 + radians(lnglat.y) * 0.5))\n );\n}\n\nvec2 project(vec2 position) {\n if (disableMercatorProjector) {\n return (position + vec2(TILE_SIZE_1540259130 / 2.0)) * mercatorScale;\n } else {\n return mercatorProject(position) * WORLD_SCALE_1540259130 * mercatorScale;\n }\n}\n\nconst float N = 49.0;\n\nattribute vec3 positions;\nattribute vec3 instanceColors;\nattribute vec4 instancePositions;\nattribute vec3 instancePickingColors;\n\nuniform mat4 worldMatrix;\nuniform mat4 projectionMatrix;\nuniform float opacity;\nuniform float renderPickingBuffer;\n\nvarying vec4 vColor;\n\nfloat paraboloid(vec2 source, vec2 target, float index) {\n float ratio = index / N;\n\n vec2 x = mix(source, target, ratio);\n vec2 center = mix(source, target, 0.5);\n\n float dSourceCenter = distance(source, center);\n float dXCenter = distance(x, center);\n return (dSourceCenter + dXCenter) * (dSourceCenter - dXCenter);\n}\n\nvoid main(void) {\n vec2 source = project(instancePositions.xy);\n vec2 target = project(instancePositions.zw);\n\n float segmentIndex = positions.x;\n vec3 p = vec3(\n // xy: linear interpolation of source & target\n mix(source, target, segmentIndex / N),\n // z: paraboloid interpolate of source & target\n sqrt(paraboloid(source, target, segmentIndex))\n );\n\n gl_Position = projectionMatrix * vec4(p, 1.0);\n\n vec4 color = vec4(instanceColors / 255.0, opacity);\n vec4 pickingColor = vec4(instancePickingColors / 255.0, opacity);\n vColor = mix(color, pickingColor, renderPickingBuffer);\n}\n', | ||
fs: '// Copyright (c) 2015 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the "Software"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#define SHADER_NAME arc-layer-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#define GLSLIFY 1\n#endif\n\nvarying vec4 vColor;\n\nvoid main(void) {\n gl_FragColor = vColor;\n}\n', | ||
id: 'arc' | ||
@@ -235,2 +235,2 @@ }), | ||
exports.default = ArcLayer; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9sYXllcnMvYXJjLWxheWVyL2FyYy1sYXllci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7O0FBb0JBOzs7O0FBQ0E7Ozs7Ozs7Ozs7OzsrZUFyQkE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBSUEsSUFBTSxVQUFVLFFBQVEsU0FBUixDQUFoQjs7QUFFQSxJQUFNLGFBQWE7QUFDakIscUJBQW1CLEVBQUMsTUFBTSxDQUFQLEVBQVUsS0FBSyxJQUFmLEVBQXFCLEtBQUssSUFBMUIsRUFBZ0MsS0FBSyxJQUFyQyxFQUEyQyxLQUFLLElBQWhELEVBREY7QUFFakIsa0JBQWdCLEVBQUMsTUFBTSxDQUFQLEVBQVUsS0FBSyxLQUFmLEVBQXNCLEtBQUssT0FBM0IsRUFBb0MsS0FBSyxNQUF6QztBQUZDLENBQW5COztBQUtBLElBQU0sTUFBTSxDQUFDLEdBQUQsRUFBTSxDQUFOLEVBQVMsQ0FBVCxDQUFaO0FBQ0EsSUFBTSxPQUFPLENBQUMsQ0FBRCxFQUFJLENBQUosRUFBTyxHQUFQLENBQWI7O0lBRXFCLFE7OztBQUNuQjs7Ozs7OztBQU9BLHNCQUtRO0FBQUEscUVBQUosRUFBSTs7QUFBQSxnQ0FKTixXQUlNO0FBQUEsUUFKTixXQUlNLG9DQUpRLENBSVI7QUFBQSwwQkFITixN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zLnByb3BzO1xuICAgIGNvbnN0IHt2YWx1ZSwgc2l6ZX0gPSBhdHRyaWJ1dGU7XG4gICAgbGV0IGkgPSAwO1xuICAgIGZvciAoY29uc3QgcG9pbnQgb2YgZGF0YSkge1xuICAgICAgdmFsdWVbaSArIDBdID0gcG9pbnQuY29sb3JbMF07XG4gICAgICB2YWx1ZVtpICsgMV0gPSBwb2ludC5jb2xvclsxXTtcbiAgICAgIHZhbHVlW2kgKyAyXSA9IHBvaW50LmNvbG9yWzJdO1xuICAgICAgaSArPSBzaXplO1xuICAgIH1cbiAgfVxuXG59XG4iXX0= |
@@ -142,4 +142,4 @@ 'use strict'; | ||
program: new _luma.Program(gl, { | ||
vs: '#define GLSLIFY 1\n// Copyright (c) 2015 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the "Software"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/* vertex shader for the choropleth-layer */\n#define SHADER_NAME choropleth-layer-vertex-shader\n\nconst float TILE_SIZE_1540259130 = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE_1540259130 = TILE_SIZE_1540259130 / (PI * 2.0);\n\n// non-linear projection: lnglats => zoom 0 tile [0-512, 0-512] * scale\nvec2 mercatorProject(vec2 lnglat, float zoomScale) {\n float scale = WORLD_SCALE_1540259130 * zoomScale;\n return vec2(\n \tscale * (radians(lnglat.x) + PI),\n \tscale * (PI - log(tan(PI * 0.25 + radians(lnglat.y) * 0.5)))\n );\n}\n\nuniform float mercatorScale;\n\nattribute vec3 positions;\nattribute vec3 colors;\nattribute vec3 pickingColors;\n\nuniform mat4 projectionMatrix;\nuniform mat4 worldMatrix;\n\nuniform float opacity;\nuniform float renderPickingBuffer;\nuniform vec3 selectedPickingColor;\n\nvarying vec4 vColor;\n\nvec4 getColor(vec4 color, float opacity, vec3 pickingColor, float renderPickingBuffer) {\n vec4 color4 = vec4(color.xyz / 255., color.w / 255. * opacity);\n vec4 pickingColor4 = vec4(pickingColor / 255., 1.);\n return mix(color4, pickingColor4, renderPickingBuffer);\n}\n\nvoid main(void) {\n vec2 pos = mercatorProject(positions.xy, mercatorScale);\n // For some reason, need to add one to elevation to show up in untilted mode\n vec3 p = vec3(pos.xy, positions.z + 1.);\n gl_Position = projectionMatrix * vec4(p, 1.);\n\n vec4 color = vec4(colors / 255., opacity);\n vec4 pickingColor = vec4(pickingColors / 255., 1.);\n vColor = mix(color, pickingColor, renderPickingBuffer);\n\n // float alpha = pickingColors == selectedPickingColor ? 0.5 : opacity;\n // vColor = vec4(mix(colors / 255., pickingColors / 255., renderPickingBuffer), alpha);\n}\n', | ||
fs: '// Copyright (c) 2015 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the "Software"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/* fragment shader for the choropleth-layer */\n\n#ifdef GL_ES\nprecision highp float;\n#define GLSLIFY 1\n#endif\n\nvarying vec4 vColor;\n\nvoid main(void) {\n gl_FragColor = vColor;\n}\n', | ||
vs: '#define GLSLIFY 1\n// Copyright (c) 2015 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the "Software"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#define SHADER_NAME choropleth-layer-vertex-shader\n\nconst float TILE_SIZE_1540259130 = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE_1540259130 = TILE_SIZE_1540259130 / (PI * 2.0);\n\nuniform bool disableMercatorProjector;\nuniform float mercatorScale;\n\n// non-linear projection: lnglats => unit tile [0-1, 0-1]\nvec2 mercatorProject(vec2 lnglat) {\n return vec2(\n \tradians(lnglat.x) + PI,\n \tPI - log(tan(PI * 0.25 + radians(lnglat.y) * 0.5))\n );\n}\n\nvec2 project(vec2 position) {\n if (disableMercatorProjector) {\n return (position + vec2(TILE_SIZE_1540259130 / 2.0)) * mercatorScale;\n } else {\n return mercatorProject(position) * WORLD_SCALE_1540259130 * mercatorScale;\n }\n}\n\nattribute vec3 positions;\nattribute vec3 colors;\nattribute vec3 pickingColors;\n\nuniform mat4 projectionMatrix;\nuniform mat4 worldMatrix;\n\nuniform float opacity;\nuniform float renderPickingBuffer;\nuniform vec3 selectedPickingColor;\n\nvarying vec4 vColor;\n\nvec4 getColor(vec4 color, float opacity, vec3 pickingColor, float renderPickingBuffer) {\n vec4 color4 = vec4(color.xyz / 255., color.w / 255. * opacity);\n vec4 pickingColor4 = vec4(pickingColor / 255., 1.);\n return mix(color4, pickingColor4, renderPickingBuffer);\n}\n\nvoid main(void) {\n // For some reason, need to add one to elevation to show up in untilted mode\n vec3 p = vec3(project(positions.xy), positions.z + 1.0);\n gl_Position = projectionMatrix * vec4(p, 1.);\n\n vec4 color = vec4(colors / 255., opacity);\n vec4 pickingColor = vec4(pickingColors / 255., 1.);\n vColor = mix(color, pickingColor, renderPickingBuffer);\n}\n', | ||
fs: '// Copyright (c) 2015 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the "Software"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#define SHADER_NAME choropleth-layer-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#define GLSLIFY 1\n#endif\n\nvarying vec4 vColor;\n\nvoid main(void) {\n gl_FragColor = vColor;\n}\n', | ||
id: 'choropleth' | ||
@@ -194,5 +194,5 @@ }), | ||
var colors = this.state.groupedVertices.map(function (vertices) { | ||
return vertices.map(function (vertex) { | ||
return _this3.props.drawContour ? [0, 0, 0] : [128, 128, 128]; | ||
var colors = this.state.groupedVerticesColors.map(function (colors) { | ||
return colors.map(function (color) { | ||
return _this3.props.drawContour ? [0, 0, 0] : [color[0], color[1], color[2]]; | ||
}); | ||
@@ -243,2 +243,7 @@ }); | ||
}); | ||
this.state.groupedVerticesColors = this.state.choropleths.map(function (choropleth) { | ||
return choropleth.coordinates.map(function (coordinate) { | ||
return choropleth.properties.color || [128, 128, 128]; | ||
}); | ||
}); | ||
} | ||
@@ -279,2 +284,2 @@ }, { | ||
exports.default = ChoroplethLayer; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9sYXllcnMvY2hvcm9wbGV0aC1sYXllci9jaG9yb3BsZXRoLWxheWVyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Oz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dGVzLm1hcChcbiAgICAgICAgY29vcmRpbmF0ZSA9PiBjaG9yb3BsZXRoLnByb3BlcnRpZXMuY29sb3IgfHwgWzEyOCwgMTI4LCAxMjhdXG4gICAgICApXG4gICAgKTtcbiAgfVxuXG4gIGNhbGN1bGF0ZUNvbnRvdXJJbmRpY2VzKG51bVZlcnRpY2VzKSB7XG4gICAgLy8gdXNlIHZlcnRleCBwYWlycyBmb3IgZ2wuTElORVMgPT4gWzAsIDEsIDEsIDIsIDIsIC4uLiwgbi0xLCBuLTEsIDBdXG4gICAgbGV0IGluZGljZXMgPSBbXTtcbiAgICBmb3IgKGxldCBpID0gMTsgaSA8IG51bVZlcnRpY2VzIC0gMTsgaSsrKSB7XG4gICAgICBpbmRpY2VzID0gWy4uLmluZGljZXMsIGksIGldO1xuICAgIH1cbiAgICByZXR1cm4gWzAsIC4uLmluZGljZXMsIDBdO1xuXG4gIH1cblxuICBvbkhvdmVyKGluZm8pIHtcbiAgICBjb25zdCB7aW5kZXh9ID0gaW5mbztcbiAgICBjb25zdCB7ZGF0YX0gPSB0aGlzLnByb3BzO1xuICAgIGNvbnN0IGZlYXR1cmUgPSBkYXRhLmZlYXR1cmVzW2luZGV4XTtcbiAgICB0aGlzLnByb3BzLm9uSG92ZXIoey4uLmluZm8sIGZlYXR1cmV9KTtcbiAgfVxuXG4gIG9uQ2xpY2soaW5mbykge1xuICAgIGNvbnN0IHtpbmRleH0gPSBpbmZvO1xuICAgIGNvbnN0IHtkYXRhfSA9IHRoaXMucHJvcHM7XG4gICAgY29uc3QgZmVhdHVyZSA9IGRhdGEuZmVhdHVyZXNbaW5kZXhdO1xuICAgIHRoaXMucHJvcHMub25DbGljayh7Li4uaW5mbywgZmVhdHVyZX0pO1xuICB9XG5cbn1cbiJdfQ== |
@@ -110,4 +110,4 @@ 'use strict'; | ||
program: new _luma.Program(gl, { | ||
vs: '#define GLSLIFY 1\n// Copyright (c) 2015 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the "Software"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/* vertex shader for the line-layer */\n#define SHADER_NAME line-layer-vs\n\nconst float TILE_SIZE_1540259130 = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE_1540259130 = TILE_SIZE_1540259130 / (PI * 2.0);\n\n// non-linear projection: lnglats => zoom 0 tile [0-512, 0-512] * scale\nvec2 mercatorProject(vec2 lnglat, float zoomScale) {\n float scale = WORLD_SCALE_1540259130 * zoomScale;\n return vec2(\n \tscale * (radians(lnglat.x) + PI),\n \tscale * (PI - log(tan(PI * 0.25 + radians(lnglat.y) * 0.5)))\n );\n}\n\nuniform float mercatorScale;\n\nattribute vec3 positions;\nattribute vec3 instanceColors;\nattribute vec4 instancePositions;\nattribute vec3 instancePickingColors;\n\nuniform mat4 worldMatrix;\nuniform mat4 projectionMatrix;\nuniform float opacity;\nuniform float renderPickingBuffer;\n\nvarying vec4 vColor;\n\nvoid main(void) {\n vec2 source = mercatorProject(instancePositions.xy, mercatorScale);\n vec2 target = mercatorProject(instancePositions.zw, mercatorScale);\n\n float segmentIndex = positions.x;\n vec3 p = vec3(\n // xy: linear interpolation of source & target\n mix(source, target, segmentIndex),\n // As per similar comment in choropleth-layer-vertex.glsl\n // For some reason, need to add one to elevation to show up in untilted mode\n // This seems to be only a problem on a Mac and not in Windows.\n 1.0\n );\n\n gl_Position = projectionMatrix * vec4(p, 1.0);\n\n vec4 color = vec4(instanceColors / 255.0, opacity);\n vec4 pickingColor = vec4(instancePickingColors / 255.0, opacity);\n vColor = mix(color, pickingColor, renderPickingBuffer);\n}\n', | ||
fs: '// Copyright (c) 2015 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the "Software"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/* fragment shader for the line-layer */\n#define SHADER_NAME line-layer-fs\n\n#ifdef GL_ES\nprecision highp float;\n#define GLSLIFY 1\n#endif\n\nvarying vec4 vColor;\n\nvoid main(void) {\n gl_FragColor = vColor;\n}\n', | ||
vs: '#define GLSLIFY 1\n// Copyright (c) 2015 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the "Software"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#define SHADER_NAME line-layer-vertex-shader\n\nconst float TILE_SIZE_1540259130 = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE_1540259130 = TILE_SIZE_1540259130 / (PI * 2.0);\n\nuniform bool disableMercatorProjector;\nuniform float mercatorScale;\n\n// non-linear projection: lnglats => unit tile [0-1, 0-1]\nvec2 mercatorProject(vec2 lnglat) {\n return vec2(\n \tradians(lnglat.x) + PI,\n \tPI - log(tan(PI * 0.25 + radians(lnglat.y) * 0.5))\n );\n}\n\nvec2 project(vec2 position) {\n if (disableMercatorProjector) {\n return (position + vec2(TILE_SIZE_1540259130 / 2.0)) * mercatorScale;\n } else {\n return mercatorProject(position) * WORLD_SCALE_1540259130 * mercatorScale;\n }\n}\n\nattribute vec3 positions;\nattribute vec3 instanceColors;\nattribute vec4 instancePositions;\nattribute vec3 instancePickingColors;\n\nuniform mat4 worldMatrix;\nuniform mat4 projectionMatrix;\nuniform float opacity;\nuniform float renderPickingBuffer;\n\nvarying vec4 vColor;\n\nvoid main(void) {\n vec2 source = project(instancePositions.xy);\n vec2 target = project(instancePositions.zw);\n\n float segmentIndex = positions.x;\n vec3 p = vec3(\n // xy: linear interpolation of source & target\n mix(source, target, segmentIndex),\n // As per similar comment in choropleth-layer-vertex.glsl\n // For some reason, need to add one to elevation to show up in untilted mode\n // This seems to be only a problem on a Mac and not in Windows.\n 1.0\n );\n\n gl_Position = projectionMatrix * vec4(p, 1.0);\n\n vec4 color = vec4(instanceColors / 255.0, opacity);\n vec4 pickingColor = vec4(instancePickingColors / 255.0, opacity);\n vColor = mix(color, pickingColor, renderPickingBuffer);\n}\n', | ||
fs: '// Copyright (c) 2015 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the "Software"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#define SHADER_NAME line-layer-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#define GLSLIFY 1\n#endif\n\nvarying vec4 vColor;\n\nvoid main(void) {\n gl_FragColor = vColor;\n}\n', | ||
id: 'line' | ||
@@ -209,2 +209,2 @@ }), | ||
exports.default = LineLayer;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baSArIDFdID0gcG9pbnQuY29sb3JbMV07XG4gICAgICB2YWx1ZVtpICsgMl0gPSBwb2ludC5jb2xvclsyXTtcbiAgICAgIGkgKz0gc2l6ZTtcbiAgICB9XG4gIH1cblxufVxuIl19 |
@@ -119,4 +119,4 @@ 'use strict'; | ||
program: new _luma.Program(gl, { | ||
vs: '#define GLSLIFY 1\n// Copyright (c) 2015 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the "Software"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/* vertex shader for the scatterplot-layer */\n#define SHADER_NAME scatterplot-layer-vs\n\nhighp float random(vec2 co) {\n highp float a = 12.9898;\n highp float b = 78.233;\n highp float c = 43758.5453;\n highp float dt= dot(co.xy ,vec2(a,b));\n highp float sn= mod(dt,3.14);\n return fract(sin(sn) / c) - .5;\n}\n\nconst float TILE_SIZE_1604150559 = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE_1604150559 = TILE_SIZE_1604150559 / (PI * 2.0);\n\n// non-linear projection: lnglats => zoom 0 tile [0-512, 0-512] * scale\nvec2 mercatorProject(vec2 lnglat, float zoomScale) {\n float scale = WORLD_SCALE_1604150559 * zoomScale;\n return vec2(\n \tscale * (radians(lnglat.x) + PI),\n \tscale * (PI - log(tan(PI * 0.25 + radians(lnglat.y) * 0.5)))\n );\n}\n\nuniform float mercatorScale;\n\nattribute vec3 positions;\nattribute vec3 instancePositions;\nattribute vec3 instanceColors;\nattribute vec3 instancePickingColors;\n\nuniform float radius;\nuniform float opacity;\n\nuniform mat4 worldMatrix;\nuniform mat4 projectionMatrix;\n\nvarying vec4 vColor;\nuniform float renderPickingBuffer;\n\nvoid main(void) {\n // vec2 pos = mercatorProject(instancePositions.xy);\n // vec3 p = vec3(pos, instancePositions.z) + positions * radius;\n // // gl_Position = projectionMatrix * vec4(p, 1.0);\n // // float rand = random(pos);\n // // gl_Position = vec4(rand, rand, 0, 1.);\n\n // vec4 color = vec4(instanceColors / 255.0, 1.);\n // vec4 pickingColor = vec4(instancePickingColors / 255.0, 1.);\n // vColor = mix(color, pickingColor, renderPickingBuffer);\n\n vec2 pos = mercatorProject(instancePositions.xy, mercatorScale);\n // For some reason, need to add one to elevation to show up in untilted mode\n vec3 p = vec3(pos, instancePositions.z + 1.) + positions * radius;\n gl_Position = projectionMatrix * vec4(p, 1.0);\n\n vec4 color = vec4(instanceColors / 255.0, 1.);\n vec4 pickingColor = vec4(instancePickingColors / 255.0, 1.);\n vColor = mix(color, pickingColor, renderPickingBuffer);\n}\n', | ||
fs: '// Copyright (c) 2015 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the "Software"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/* fragment shader for the scatterplot-layer */\n#define SHADER_NAME scatterplot-layer-fs\n\n#ifdef GL_ES\nprecision highp float;\n#define GLSLIFY 1\n#endif\n\nvarying vec4 vColor;\n\nvoid main(void) {\n gl_FragColor = vColor;\n}\n', | ||
vs: '#define GLSLIFY 1\n// Copyright (c) 2015 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the "Software"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#define SHADER_NAME scatterplot-layer-vertex-shader\n\nconst float TILE_SIZE_1540259130 = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE_1540259130 = TILE_SIZE_1540259130 / (PI * 2.0);\n\nuniform bool disableMercatorProjector;\nuniform float mercatorScale;\n\n// non-linear projection: lnglats => unit tile [0-1, 0-1]\nvec2 mercatorProject(vec2 lnglat) {\n return vec2(\n \tradians(lnglat.x) + PI,\n \tPI - log(tan(PI * 0.25 + radians(lnglat.y) * 0.5))\n );\n}\n\nvec2 project(vec2 position) {\n if (disableMercatorProjector) {\n return (position + vec2(TILE_SIZE_1540259130 / 2.0)) * mercatorScale;\n } else {\n return mercatorProject(position) * WORLD_SCALE_1540259130 * mercatorScale;\n }\n}\n\nattribute vec3 positions;\nattribute vec3 instancePositions;\nattribute vec3 instanceColors;\nattribute vec3 instancePickingColors;\n\nuniform mat4 worldMatrix;\nuniform mat4 projectionMatrix;\nuniform float opacity;\nuniform float radius;\nuniform float renderPickingBuffer;\n\nvarying vec4 vColor;\n\nvoid main(void) {\n // For some reason, need to add one to elevation to show up in untilted mode\n vec3 p = vec3(project(instancePositions.xy), instancePositions.z + 1.0) + positions * radius;\n gl_Position = projectionMatrix * vec4(p, 1.0);\n\n vec4 color = vec4(instanceColors / 255.0, 1.);\n vec4 pickingColor = vec4(instancePickingColors / 255.0, 1.);\n vColor = mix(color, pickingColor, renderPickingBuffer);\n}\n', | ||
fs: '// Copyright (c) 2015 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the "Software"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#define SHADER_NAME scatterplot-layer-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#define GLSLIFY 1\n#endif\n\nvarying vec4 vColor;\n\nvoid main(void) {\n gl_FragColor = vColor;\n}\n', | ||
id: 'scatterplot' | ||
@@ -236,2 +236,2 @@ }), | ||
exports.default = ScatterplotLayer; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9sYXllcnMvc2NhdHRlcnBsb3QtbGF5ZXIvc2NhdHRlcnBsb3QtbGF5ZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFvQkE7Ozs7QUFDQTs7Ozs7Ozs7OzsrZUFyQkE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBSUEsSUFBTSxVQUFVLFFBQVEsU0FBUixDQUFoQjs7QUFFQSxJQUFNLGFBQWE7QUFDakIscUJBQW1CLEVBQUMsTUFBTSxDQUFQLEVBQVUsS0FBSyxHQUFmLEVBQW9CLEtBQUssR0FBekIsRUFBOEIsS0FBSyxRQUFuQyxFQURGO0FBRWpCLGtCQUFnQixFQUFDLE1BQU0sQ0FBUCxFQUFVLEtBQUssS0FBZixFQUFzQixLQUFLLE9BQTNCLEVBQW9DLEtBQUssTUFBekM7QUFGQyx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WRcbiAgICBpZiAodGhpcy5wcm9wcy5yYWRpdXMpIHtcbiAgICAgIHRoaXMuc3RhdGUucmFkaXVzID0gdGhpcy5wcm9wcy5yYWRpdXM7XG4gICAgICByZXR1cm47XG4gICAgfVxuXG4gICAgY29uc3QgcGl4ZWwwID0gdGhpcy5wcm9qZWN0KHtsb246IC0xMjIsIGxhdDogMzcuNX0pO1xuICAgIGNvbnN0IHBpeGVsMSA9IHRoaXMucHJvamVjdCh7bG9uOiAtMTIyLCBsYXQ6IDM3LjUwMDJ9KTtcblxuICAgIGNvbnN0IGR4ID0gcGl4ZWwwLnggLSBwaXhlbDEueDtcbiAgICBjb25zdCBkeSA9IHBpeGVsMC55IC0gcGl4ZWwxLnk7XG5cbiAgICB0aGlzLnN0YXRlLnJhZGl1cyA9IE1hdGgubWF4KE1hdGguc3FydChkeCAqIGR4ICsgZHkgKiBkeSksIDIuMCk7XG4gIH1cblxufVxuIl19 |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"keywords": [ | ||
@@ -8,0 +8,0 @@ "webgl", |
@@ -45,2 +45,3 @@ // Copyright (c) 2015 Uber Technologies, Inc. | ||
deepCompare: false, | ||
disableMercatorProjector: false, | ||
getValue: x => x, | ||
@@ -481,5 +482,8 @@ onHover: () => {}, | ||
// MAP LAYER FUNCTIONALITY | ||
setViewport() { | ||
const { | ||
width, height, latitude, longitude, zoom, | ||
disableMercatorProjector | ||
} = this.props; | ||
setViewport() { | ||
const {width, height, latitude, longitude, zoom} = this.props; | ||
this.setState({ | ||
@@ -492,7 +496,10 @@ viewport: {x: 0, y: 0, width, height}, | ||
}); | ||
this.setUniforms({ | ||
viewport: [0, 0, width, height], | ||
mercatorScale: Math.pow(2, zoom), | ||
mercatorCenter: [longitude, latitude] | ||
mercatorCenter: [longitude, latitude], | ||
disableMercatorProjector | ||
}); | ||
log(3, this.state.viewport, latitude, longitude, zoom); | ||
@@ -499,0 +506,0 @@ } |
@@ -140,5 +140,5 @@ // Copyright (c) 2015 Uber Technologies, Inc. | ||
calculateColors(attribute) { | ||
const colors = this.state.groupedVertices.map( | ||
vertices => vertices.map( | ||
vertex => this.props.drawContour ? [0, 0, 0] : [128, 128, 128] | ||
const colors = this.state.groupedVerticesColors.map( | ||
colors => colors.map( | ||
color => this.props.drawContour ? [0, 0, 0] : [color[0], color[1], color[2]] | ||
) | ||
@@ -185,2 +185,7 @@ ); | ||
); | ||
this.state.groupedVerticesColors = this.state.choropleths.map( | ||
choropleth => choropleth.coordinates.map( | ||
coordinate => choropleth.properties.color || [128, 128, 128] | ||
) | ||
); | ||
} | ||
@@ -187,0 +192,0 @@ |
@@ -67,3 +67,3 @@ // Copyright (c) 2015 Uber Technologies, Inc. | ||
createModel(gl) { | ||
let positions = [0, 0, 0, 1, 1, 1]; | ||
const positions = [0, 0, 0, 1, 1, 1]; | ||
@@ -70,0 +70,0 @@ return new Model({ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
106
66654
3767931