@deck.gl/aggregation-layers 8.7.8 → 8.7.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@deck.gl/aggregation-layers",
3
3
  "description": "deck.gl layers that aggregate the input data into alternative representations",
4
4
  "license": "MIT",
5
- "version": "8.7.8",
5
+ "version": "8.7.11",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
@@ -37,5 +37,5 @@
37
37
  "@deck.gl/core": "^8.0.0",
38
38
  "@deck.gl/layers": "^8.0.0"
39
39
  },
40
- "gitHead": "2172dfe62ab2963f755601c1338e98e72cf032e7"
40
+ "gitHead": "05d5d8024eaf3ad161848088b8f1eda8679e9c2e"
41
41
  }
@@ -80,9 +80,14 @@ export function getTextureCoordinates(point, bounds) {
80
80
 
81
81
  // Returns format and type for creating texture objects
82
82
  export function getTextureParams({gl, floatTargetSupport}) {
83
- return {
84
- // format: should be RGBA32F on WebGL2 (float textures), RGBA in WebGL1 for float or non float textures
85
- format: isWebGL2(gl) ? GL.RGBA32F : GL.RGBA,
86
- type: floatTargetSupport ? GL.FLOAT : GL.UNSIGNED_BYTE
87
- };
83
+ return floatTargetSupport
84
+ ? {
85
+ // format: should be RGBA32F on WebGL2 (float textures), RGBA in WebGL1 for float or non float textures
86
+ format: isWebGL2(gl) ? GL.RGBA32F : GL.RGBA,
87
+ type: GL.FLOAT
88
+ }
89
+ : {
90
+ format: GL.RGBA,
91
+ type: GL.UNSIGNED_BYTE
92
+ };
88
93
  }
@@ -72,7 +72,11 @@ const defaultProps = {
72
72
  const REQUIRED_FEATURES = [
73
73
  FEATURES.BLEND_EQUATION_MINMAX, // max weight calculation
74
74
  FEATURES.TEXTURE_FLOAT // weight-map as texture
75
- // FEATURES.FLOAT_BLEND, // implictly supported when TEXTURE_FLOAT is supported
75
+ ];
76
+
77
+ const FLOAT_TARGET_FEATURES = [
78
+ FEATURES.COLOR_ATTACHMENT_RGBA32F, // ability to render to float texture
79
+ FEATURES.FLOAT_BLEND // ability to blend when rendering to float texture
76
80
  ];
77
81
 
78
82
  const DIMENSIONS = {
@@ -266,7 +270,7 @@ export default class HeatmapLayer extends AggregationLayer {
266
270
  const {weightsTextureSize} = this.props;
267
271
 
268
272
  const textureSize = Math.min(weightsTextureSize, getParameters(gl, gl.MAX_TEXTURE_SIZE));
269
- const floatTargetSupport = hasFeatures(gl, FEATURES.COLOR_ATTACHMENT_RGBA32F);
273
+ const floatTargetSupport = hasFeatures(gl, FLOAT_TARGET_FEATURES);
270
274
  const {format, type} = getTextureParams({gl, floatTargetSupport});
271
275
  const weightsScale = floatTargetSupport ? 1 : 1 / 255;
272
276
  this.setState({textureSize, format, type, weightsScale});