@kepler.gl/deckgl-layers 3.2.6 → 3.3.0-alpha.1
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/3d-building-layer/3d-building-layer.d.ts +3 -3
- package/dist/3d-building-layer/3d-building-layer.js +9 -12
- package/dist/3d-building-layer/types.d.ts +8 -8
- package/dist/cluster-layer/cluster-layer.d.ts +16 -26
- package/dist/cluster-layer/cluster-layer.js +19 -33
- package/dist/column-layer/enhanced-column-layer.d.ts +4 -4
- package/dist/column-layer/enhanced-column-layer.js +39 -35
- package/dist/deckgl-extensions/filter-arrow-layer.d.ts +33 -6
- package/dist/deckgl-extensions/filter-arrow-layer.js +4 -12
- package/dist/deckgl-extensions/filter-shader-module.d.ts +32 -4
- package/dist/deckgl-extensions/filter-shader-module.js +3 -4
- package/dist/grid-layer/enhanced-cpu-grid-layer.d.ts +4913 -6
- package/dist/grid-layer/enhanced-cpu-grid-layer.js +67 -44
- package/dist/hexagon-layer/enhanced-hexagon-layer.d.ts +4910 -4
- package/dist/hexagon-layer/enhanced-hexagon-layer.js +82 -41
- package/dist/index.d.ts +1 -0
- package/dist/index.js +13 -1
- package/dist/layer-utils/aggregation-utils.d.ts +44 -0
- package/dist/layer-utils/aggregation-utils.js +181 -0
- package/dist/layer-utils/cpu-aggregator.d.ts +74 -27
- package/dist/layer-utils/cpu-aggregator.js +224 -19
- package/dist/layer-utils/shader-utils.d.ts +1 -0
- package/dist/layer-utils/shader-utils.js +10 -1
- package/dist/line-layer/line-layer.d.ts +4 -4
- package/dist/line-layer/line-layer.js +29 -21
- package/dist/raster/images.d.ts +10 -3
- package/dist/raster/images.js +154 -60
- package/dist/raster/pipeline-validation-patch.d.ts +1 -0
- package/dist/raster/pipeline-validation-patch.js +101 -0
- package/dist/raster/raster-layer/raster-layer-shaders.d.ts +56 -0
- package/dist/raster/raster-layer/raster-layer-shaders.js +163 -0
- package/dist/raster/raster-layer/raster-layer.d.ts +6 -6
- package/dist/raster/raster-layer/raster-layer.js +90 -88
- package/dist/raster/raster-mesh-layer/matrix.d.ts +3 -1
- package/dist/raster/raster-mesh-layer/matrix.js +3 -3
- package/dist/raster/raster-mesh-layer/raster-mesh-layer-shaders.d.ts +19 -0
- package/dist/raster/raster-mesh-layer/raster-mesh-layer-shaders.js +38 -0
- package/dist/raster/raster-mesh-layer/raster-mesh-layer.d.ts +7 -6
- package/dist/raster/raster-mesh-layer/raster-mesh-layer.js +97 -83
- package/dist/raster/raster-processing-uniforms.d.ts +38 -0
- package/dist/raster/raster-processing-uniforms.js +124 -0
- package/dist/raster/types.d.ts +8 -8
- package/dist/raster/types.js +1 -1
- package/dist/raster/util.d.ts +15 -0
- package/dist/raster/util.js +113 -3
- package/dist/raster/webgl/color/colormap.js +13 -7
- package/dist/raster/webgl/color/filter.js +22 -12
- package/dist/raster/webgl/color/gamma-contrast.js +9 -3
- package/dist/raster/webgl/color/linear-rescale.js +9 -5
- package/dist/raster/webgl/color/saturation.js +7 -4
- package/dist/raster/webgl/color/sigmoidal-contrast.js +9 -5
- package/dist/raster/webgl/pansharpen/pansharpen-brovey.js +7 -4
- package/dist/raster/webgl/texture/combine-bands.js +1 -1
- package/dist/raster/webgl/texture/mask.js +27 -35
- package/dist/raster/webgl/texture/reorder-bands.js +8 -5
- package/dist/raster/webgl/texture/rgba-image.js +1 -1
- package/dist/raster/webgl/types.d.ts +11 -6
- package/dist/raster/webgl/types.js +1 -1
- package/dist/svg-icon-layer/scatterplot-icon-layer.d.ts +2 -4
- package/dist/svg-icon-layer/scatterplot-icon-layer.js +19 -25
- package/dist/svg-icon-layer/svg-icon-layer.d.ts +4 -6
- package/dist/svg-icon-layer/svg-icon-layer.js +5 -3
- package/dist/wms/wms-layer.d.ts +8 -5
- package/dist/wms/wms-layer.js +100 -27
- package/package.json +21 -17
|
@@ -1,9 +1,37 @@
|
|
|
1
1
|
import { RGBAColor } from '@kepler.gl/types';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import type ClusterBuilder from './cluster-utils';
|
|
3
|
+
interface Bin {
|
|
4
|
+
points: Record<string, unknown>[];
|
|
5
|
+
filteredPoints?: Record<string, unknown>[] | null;
|
|
6
|
+
index?: number;
|
|
7
|
+
}
|
|
8
|
+
interface AggregatedBin {
|
|
9
|
+
i: number;
|
|
10
|
+
value: number;
|
|
11
|
+
counts: number;
|
|
12
|
+
}
|
|
13
|
+
declare class BinSorter {
|
|
14
|
+
maxCount: number;
|
|
15
|
+
maxValue: number;
|
|
16
|
+
minValue: number;
|
|
17
|
+
totalCount: number;
|
|
18
|
+
aggregatedBins: AggregatedBin[];
|
|
19
|
+
sortedBins: AggregatedBin[];
|
|
20
|
+
binMap: Record<number, AggregatedBin>;
|
|
21
|
+
constructor(bins?: Bin[], props?: Record<string, any>);
|
|
22
|
+
_getAggregatedBins(bins: Bin[], props: Record<string, any>): AggregatedBin[];
|
|
23
|
+
_updateMinMaxValues(): void;
|
|
24
|
+
_getBinMap(): {};
|
|
25
|
+
_percentileToIndex(percentileRange: number[]): number[];
|
|
26
|
+
getValueDomainByScale(scale: string, [lower, upper]?: number[]): number[];
|
|
27
|
+
_getScaleDomain(scaleType: string, [lowerIdx, upperIdx]: number[]): number[];
|
|
28
|
+
getValueRange(percentileRange?: number[]): number[];
|
|
29
|
+
}
|
|
30
|
+
export type UpdaterType = (this: CPUAggregator, step: any, props: any, dimensionUpdater: any) => void;
|
|
31
|
+
export type BindedUpdaterType = () => void;
|
|
32
|
+
export type AggregatedUpdaterType = (this: CPUAggregator, step: any, props: any, aggregation: any, aggregationParams: any) => void;
|
|
33
|
+
export type BindedAggregatedUpdaterType = (aggregationParams: any) => void;
|
|
34
|
+
export type UpdateStepsType = {
|
|
7
35
|
key: string;
|
|
8
36
|
triggers: {
|
|
9
37
|
[key: string]: {
|
|
@@ -16,7 +44,7 @@ export declare type UpdateStepsType = {
|
|
|
16
44
|
};
|
|
17
45
|
updater: UpdaterType;
|
|
18
46
|
};
|
|
19
|
-
export
|
|
47
|
+
export type DimensionType<ValueType = any> = {
|
|
20
48
|
key: string;
|
|
21
49
|
accessor: string;
|
|
22
50
|
getPickingInfo: (dimensionState: any, cell: any, layerProps?: any) => any;
|
|
@@ -24,7 +52,7 @@ export declare type DimensionType<ValueType = any> = {
|
|
|
24
52
|
updateSteps: UpdateStepsType[];
|
|
25
53
|
getSubLayerAccessor: any;
|
|
26
54
|
};
|
|
27
|
-
export
|
|
55
|
+
export type AggregationUpdateStepsType = {
|
|
28
56
|
key: string;
|
|
29
57
|
triggers: {
|
|
30
58
|
[key: string]: {
|
|
@@ -34,15 +62,18 @@ export declare type AggregationUpdateStepsType = {
|
|
|
34
62
|
};
|
|
35
63
|
updater: AggregatedUpdaterType;
|
|
36
64
|
};
|
|
37
|
-
export
|
|
65
|
+
export type AggregationType = {
|
|
38
66
|
key: string;
|
|
39
67
|
updateSteps: AggregationUpdateStepsType[];
|
|
40
68
|
};
|
|
41
69
|
export declare const DECK_AGGREGATION_MAP: {
|
|
42
|
-
|
|
70
|
+
SUM: "sum";
|
|
71
|
+
MEAN: "average";
|
|
72
|
+
MIN: "minimum";
|
|
73
|
+
MAX: "maximum";
|
|
43
74
|
};
|
|
44
|
-
export declare function getValueFunc(aggregation:
|
|
45
|
-
export declare function getScaleFunctor(scaleType:
|
|
75
|
+
export declare function getValueFunc(aggregation: string, accessor: (d: Record<string, unknown>) => number): (pts: any) => any;
|
|
76
|
+
export declare function getScaleFunctor(scaleType: string): any;
|
|
46
77
|
export declare function getGetValue(this: CPUAggregator, step: any, props: any, dimensionUpdater: any): void;
|
|
47
78
|
export declare function getDimensionSortedBins(this: CPUAggregator, step: any, props: any, dimensionUpdater: any): void;
|
|
48
79
|
export declare function getDimensionValueDomain(this: CPUAggregator, step: any, props: any, dimensionUpdater: any): void;
|
|
@@ -52,13 +83,21 @@ export declare const defaultAggregation: AggregationType;
|
|
|
52
83
|
export declare const defaultColorDimension: DimensionType<RGBAColor>;
|
|
53
84
|
export declare const defaultElevationDimension: DimensionType<number>;
|
|
54
85
|
export declare const defaultDimensions: (DimensionType<RGBAColor> | DimensionType<number>)[];
|
|
55
|
-
export
|
|
86
|
+
export type CPUAggregatorState = {
|
|
56
87
|
layerData: {
|
|
57
|
-
data?:
|
|
88
|
+
data?: Record<string, unknown>[];
|
|
58
89
|
};
|
|
59
|
-
dimensions:
|
|
60
|
-
|
|
61
|
-
|
|
90
|
+
dimensions: Record<string, {
|
|
91
|
+
getValue?: (...args: unknown[]) => number;
|
|
92
|
+
sortedBins?: BinSorter;
|
|
93
|
+
valueDomain?: number[];
|
|
94
|
+
scaleFunc?: ((...args: unknown[]) => unknown) & {
|
|
95
|
+
domain: () => number[];
|
|
96
|
+
scaleType?: string;
|
|
97
|
+
};
|
|
98
|
+
}>;
|
|
99
|
+
geoJSON?: GeoJSON.FeatureCollection;
|
|
100
|
+
clusterBuilder?: ClusterBuilder;
|
|
62
101
|
};
|
|
63
102
|
export default class CPUAggregator {
|
|
64
103
|
static getDimensionScale: any;
|
|
@@ -73,21 +112,29 @@ export default class CPUAggregator {
|
|
|
73
112
|
aggregation?: AggregationType;
|
|
74
113
|
});
|
|
75
114
|
static defaultDimensions(): (DimensionType<RGBAColor> | DimensionType<number>)[];
|
|
76
|
-
updateAllDimensions(props: any): void;
|
|
77
|
-
updateAggregation(props:
|
|
78
|
-
updateState(opts:
|
|
79
|
-
|
|
80
|
-
|
|
115
|
+
updateAllDimensions(props: Record<string, any>): void;
|
|
116
|
+
updateAggregation(props: Record<string, any>, aggregationParams: Record<string, any>): void;
|
|
117
|
+
updateState(opts: {
|
|
118
|
+
oldProps: Record<string, any>;
|
|
119
|
+
props: Record<string, any>;
|
|
120
|
+
changeFlags: Record<string, any>;
|
|
121
|
+
}, aggregationParams: Record<string, any>): CPUAggregatorState;
|
|
122
|
+
setState(updateObject: Partial<CPUAggregatorState>): void;
|
|
123
|
+
_setDimensionState(key: string, updateObject: Record<string, any>): void;
|
|
81
124
|
_addAggregation(aggregation: AggregationType): void;
|
|
82
125
|
_addDimension(dimensions?: DimensionType[]): void;
|
|
83
126
|
_needUpdateStep(dimensionStep: UpdateStepsType | AggregationUpdateStepsType, oldProps: any, props: any, changeFlags: any): boolean;
|
|
84
127
|
_accumulateUpdaters<UpdaterObjectType extends DimensionType | AggregationType>(step: any, props: any, dimension: UpdaterObjectType): (UpdaterObjectType extends DimensionType<any> ? BindedUpdaterType : BindedAggregatedUpdaterType)[];
|
|
85
128
|
_getAllUpdaters<UpdaterObjectType extends DimensionType | AggregationType>(dimension: UpdaterObjectType, oldProps: any, props: any, changeFlags: any): (UpdaterObjectType extends DimensionType<any> ? BindedUpdaterType : BindedAggregatedUpdaterType)[];
|
|
86
|
-
_getAggregationChanges(oldProps:
|
|
87
|
-
_getDimensionChanges(oldProps:
|
|
88
|
-
getUpdateTriggers(props: any): {};
|
|
129
|
+
_getAggregationChanges(oldProps: Record<string, any>, props: Record<string, any>, changeFlags: Record<string, any>): BindedAggregatedUpdaterType[] | null;
|
|
130
|
+
_getDimensionChanges(oldProps: Record<string, any>, props: Record<string, any>, changeFlags: Record<string, any>): BindedUpdaterType[] | null;
|
|
131
|
+
getUpdateTriggers(props: Record<string, any>): {};
|
|
89
132
|
getPickingInfo({ info }: {
|
|
90
|
-
info: any
|
|
91
|
-
}, layerProps: any): any
|
|
92
|
-
|
|
133
|
+
info: Record<string, any>;
|
|
134
|
+
}, layerProps: Record<string, any>): Record<string, any> & {
|
|
135
|
+
picked: boolean;
|
|
136
|
+
object: Record<string, any> | null;
|
|
137
|
+
};
|
|
138
|
+
getAccessor(dimensionKey: string, layerProps: Record<string, any>): any;
|
|
93
139
|
}
|
|
140
|
+
export {};
|