@deck.gl/aggregation-layers 9.3.3 → 9.3.5
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/dist/dist.dev.js +0 -3
- package/dist/hexagon-layer/hexagon-cell-layer.d.ts.map +1 -1
- package/dist/hexagon-layer/hexagon-cell-layer.js +0 -5
- package/dist/hexagon-layer/hexagon-cell-layer.js.map +1 -1
- package/dist/index.cjs +0 -3
- package/dist/index.cjs.map +2 -2
- package/dist.min.js +1 -1
- package/package.json +2 -2
- package/src/hexagon-layer/hexagon-cell-layer.ts +0 -5
package/dist.min.js
CHANGED
|
@@ -302,7 +302,7 @@ DECKGL_FILTER_COLOR(vColor, geometry);
|
|
|
302
302
|
vec2 elevationRange;
|
|
303
303
|
vec2 originCommon;
|
|
304
304
|
} hexagon;
|
|
305
|
-
`,je={name:"hexagon",vs:Jo,uniformTypes:{colorDomain:"vec4<f32>",elevationDomain:"vec4<f32>",elevationRange:"vec2<f32>",originCommon:"vec2<f32>"}};var Dt=class extends Ge.ColumnLayer{getShaders(){let t=super.getShaders();return t.modules.push(je),{...t,vs:ke}}initializeState(){super.initializeState();let t=this.getAttributeManager();t.remove(["instanceElevations","instanceFillColors","instanceLineColors","instanceStrokeWidths"]),t.addInstanced({instancePositions:{size:2,type:"float32",accessor:"getBin"},instanceColorValues:{size:1,type:"float32",accessor:"getColorValue"},instanceElevationValues:{size:1,type:"float32",accessor:"getElevationValue"}})}updateState(t){super.updateState(t);let{props:e,oldProps:o}=t,r=this.state.fillModel;if(o.colorRange!==e.colorRange){this.state.colorTexture?.destroy(),this.state.colorTexture=Q(this.context.device,e.colorRange,e.colorScaleType);let i={colorRange:this.state.colorTexture};r.shaderInputs.setProps({hexagon:i})}else o.colorScaleType!==e.colorScaleType&&Z(this.state.colorTexture,e.colorScaleType)}finalizeState(t){super.finalizeState(t),this.state.colorTexture?.destroy()}draw({uniforms:t}){let{radius:e,hexOriginCommon:o,elevationRange:r,elevationScale:i,extruded:s,coverage:a,colorDomain:c,elevationDomain:g}=this.props,h=this.props.colorCutoff||[-1/0,1/0],f=this.props.elevationCutoff||[-1/0,1/0],p=this.state.fillModel;p.
|
|
305
|
+
`,je={name:"hexagon",vs:Jo,uniformTypes:{colorDomain:"vec4<f32>",elevationDomain:"vec4<f32>",elevationRange:"vec2<f32>",originCommon:"vec2<f32>"}};var Dt=class extends Ge.ColumnLayer{getShaders(){let t=super.getShaders();return t.modules.push(je),{...t,vs:ke}}initializeState(){super.initializeState();let t=this.getAttributeManager();t.remove(["instanceElevations","instanceFillColors","instanceLineColors","instanceStrokeWidths"]),t.addInstanced({instancePositions:{size:2,type:"float32",accessor:"getBin"},instanceColorValues:{size:1,type:"float32",accessor:"getColorValue"},instanceElevationValues:{size:1,type:"float32",accessor:"getElevationValue"}})}updateState(t){super.updateState(t);let{props:e,oldProps:o}=t,r=this.state.fillModel;if(o.colorRange!==e.colorRange){this.state.colorTexture?.destroy(),this.state.colorTexture=Q(this.context.device,e.colorRange,e.colorScaleType);let i={colorRange:this.state.colorTexture};r.shaderInputs.setProps({hexagon:i})}else o.colorScaleType!==e.colorScaleType&&Z(this.state.colorTexture,e.colorScaleType)}finalizeState(t){super.finalizeState(t),this.state.colorTexture?.destroy()}draw({uniforms:t}){let{radius:e,hexOriginCommon:o,elevationRange:r,elevationScale:i,extruded:s,coverage:a,colorDomain:c,elevationDomain:g}=this.props,h=this.props.colorCutoff||[-1/0,1/0],f=this.props.elevationCutoff||[-1/0,1/0],p=this.state.fillModel;p.setVertexCount(this.state.fillVertexCount);let d={colorDomain:[Math.max(c[0],h[0]),Math.min(c[1],h[1]),Math.max(c[0]-1,h[0]),Math.min(c[1]+1,h[1])],elevationDomain:[Math.max(g[0],f[0]),Math.min(g[1],f[1]),Math.max(g[0]-1,f[0]),Math.min(g[1]+1,f[1])],elevationRange:[r[0]*i,r[1]*i],originCommon:o};p.shaderInputs.setProps({column:{extruded:s,coverage:a,radius:e},hexagon:d}),p.draw(this.context.renderPass)}};Dt.layerName="HexagonCellLayer";var qe=Dt;var tr=`layout(std140) uniform binOptionsUniforms {
|
|
306
306
|
vec2 hexOriginCommon;
|
|
307
307
|
float radiusCommon;
|
|
308
308
|
} binOptions;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "deck.gl layers that aggregate the input data into alternative representations",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"version": "9.3.
|
|
6
|
+
"version": "9.3.5",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"@luma.gl/core": "~9.3.3",
|
|
50
50
|
"@luma.gl/engine": "~9.3.3"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "e3277ecddbfd58c297253bd38faa11217afa790d"
|
|
53
53
|
}
|
|
@@ -108,11 +108,6 @@ export default class HexagonCellLayer<ExtraPropsT extends {} = {}> extends Colum
|
|
|
108
108
|
const elevationCutoff = this.props.elevationCutoff || [-Infinity, Infinity];
|
|
109
109
|
const fillModel = this.state.fillModel!;
|
|
110
110
|
|
|
111
|
-
if (fillModel.vertexArray.indexBuffer) {
|
|
112
|
-
// indices are for drawing wireframe, disable them
|
|
113
|
-
// TODO - this should be handled in ColumnLayer?
|
|
114
|
-
fillModel.setIndexBuffer(null);
|
|
115
|
-
}
|
|
116
111
|
fillModel.setVertexCount(this.state.fillVertexCount);
|
|
117
112
|
|
|
118
113
|
const hexagonProps: Omit<HexagonProps, 'colorRange'> = {
|