-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(core) replace glOptions
with deviceProps
#8945
Changes from all commits
c4c2139
5a8f235
cdd6454
8d4d4b3
23a76b1
88f764b
bde6e90
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { | ||
CompositeLayer, | ||
AttributeManager, | ||
UpdateParameters, | ||
CompositeLayerProps | ||
} from '@deck.gl/core'; | ||
export declare type AggregationLayerProps<DataT = any> = CompositeLayerProps<DataT>; | ||
export default abstract class AggregationLayer< | ||
ExtraPropsT = {} | ||
> extends CompositeLayer<ExtraPropsT> { | ||
static layerName: string; | ||
state: CompositeLayer['state'] & { | ||
ignoreProps?: Record<string, any>; | ||
dimensions?: any; | ||
}; | ||
initializeAggregationLayer(dimensions: any): void; | ||
updateState(opts: UpdateParameters<this>): void; | ||
updateAttributes(changedAttributes: any): void; | ||
getAttributes(): { | ||
[id: string]: import('modules/core/src/lib/attribute/shader-attribute').IShaderAttribute; | ||
}; | ||
getModuleSettings(): any; | ||
updateShaders(shaders: any): void; | ||
/** | ||
* Checks if aggregation is dirty | ||
* @param {Object} updateOpts - object {props, oldProps, changeFlags} | ||
* @param {Object} params - object {dimension, compareAll} | ||
* @param {Object} params.dimension - {props, accessors} array of props and/or accessors | ||
* @param {Boolean} params.compareAll - when `true` it will include non layer props for comparision | ||
* @returns {Boolean} - returns true if dimensions' prop or accessor is changed | ||
**/ | ||
isAggregationDirty( | ||
updateOpts: any, | ||
params?: { | ||
compareAll?: boolean; | ||
dimension?: any; | ||
} | ||
): string | boolean; | ||
/** | ||
* Checks if an attribute is changed | ||
* @param {String} name - name of the attribute | ||
* @returns {Boolean} - `true` if attribute `name` is changed, `false` otherwise, | ||
* If `name` is not passed or `undefiend`, `true` if any attribute is changed, `false` otherwise | ||
**/ | ||
isAttributeChanged(name?: string): boolean; | ||
_getAttributeManager(): AttributeManager; | ||
} | ||
// # sourceMappingURL=aggregation-layer.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
import { | ||
Accessor, | ||
AccessorFunction, | ||
Color, | ||
Layer, | ||
Position, | ||
UpdateParameters, | ||
DefaultProps | ||
} from '@deck.gl/core'; | ||
import GridAggregationLayer, {GridAggregationLayerProps} from '../grid-aggregation-layer'; | ||
/** All properties supported by ContourLayer. */ | ||
export declare type ContourLayerProps<DataT = any> = _ContourLayerProps<DataT> & | ||
GridAggregationLayerProps<DataT>; | ||
/** Properties added by ContourLayer. */ | ||
export declare type _ContourLayerProps<DataT> = { | ||
/** | ||
* Size of each cell in meters. | ||
* @default 1000 | ||
*/ | ||
cellSize?: number; | ||
/** | ||
* When set to true, aggregation is performed on GPU, provided other conditions are met. | ||
* @default true | ||
*/ | ||
gpuAggregation?: boolean; | ||
/** | ||
* Defines the type of aggregation operation, valid values are 'SUM', 'MEAN', 'MIN' and 'MAX'. | ||
* @default 'SUM' | ||
*/ | ||
aggregation?: 'SUM' | 'MEAN' | 'MIN' | 'MAX'; | ||
/** | ||
* Definition of contours to be drawn. | ||
* @default [{threshold: 1}] | ||
*/ | ||
contours: { | ||
/** | ||
* Isolines: `threshold` value must be a single `Number`, Isolines are generated based on this threshold value. | ||
* | ||
* Isobands: `threshold` value must be an Array of two `Number`s. Isobands are generated using `[threshold[0], threshold[1])` as threshold range, i.e area that has values `>= threshold[0]` and `< threshold[1]` are rendered with corresponding color. NOTE: `threshold[0]` is inclusive and `threshold[1]` is not inclusive. | ||
*/ | ||
threshold: number | number[]; | ||
/** | ||
* RGBA color array to be used to render the contour. | ||
* @default [255, 255, 255, 255] | ||
*/ | ||
color?: Color; | ||
/** | ||
* Applicable for `Isoline`s only, width of the Isoline in pixels. | ||
* @default 1 | ||
*/ | ||
strokeWidth?: number; | ||
/** Defines z order of the contour. */ | ||
zIndex?: number; | ||
}[]; | ||
/** | ||
* A very small z offset that is added for each vertex of a contour (Isoline or Isoband). | ||
* @default 0.005 | ||
*/ | ||
zOffset?: number; | ||
/** | ||
* Method called to retrieve the position of each object. | ||
* @default object => object.position | ||
*/ | ||
getPosition?: AccessorFunction<DataT, Position>; | ||
/** | ||
* The weight of each object. | ||
* @default 1 | ||
*/ | ||
getWeight?: Accessor<DataT, number>; | ||
}; | ||
/** Aggregate data into iso-lines or iso-bands for a given threshold and cell size. */ | ||
export default class ContourLayer<DataT = any, ExtraPropsT = {}> extends GridAggregationLayer< | ||
ExtraPropsT & Required<_ContourLayerProps<DataT>> | ||
> { | ||
static layerName: string; | ||
static defaultProps: DefaultProps<ContourLayerProps<any>>; | ||
initializeState(): void; | ||
updateState(opts: UpdateParameters<this>): void; | ||
renderLayers(): Layer[]; | ||
updateAggregationState(opts: any): void; | ||
private _updateAccessors; | ||
private _resetResults; | ||
private _generateContours; | ||
private _updateThresholdData; | ||
} | ||
// # sourceMappingURL=contour-layer.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
export declare function generateContours({ | ||
thresholdData, | ||
cellWeights, | ||
gridSize, | ||
gridOrigin, | ||
cellSize | ||
}: { | ||
thresholdData: any; | ||
cellWeights: Float32Array; | ||
gridSize: number[]; | ||
gridOrigin: number[]; | ||
cellSize: number[]; | ||
}): { | ||
contourSegments: { | ||
start: number[]; | ||
end: number[]; | ||
contour: any; | ||
}[]; | ||
contourPolygons: { | ||
vertices: number[][]; | ||
contour: any; | ||
}[]; | ||
}; | ||
// # sourceMappingURL=contour-utils.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
export declare const ISOLINES_CODE_OFFSET_MAP: { | ||
0: any[]; | ||
1: number[][][]; | ||
2: number[][][]; | ||
3: number[][][]; | ||
4: number[][][]; | ||
5: { | ||
0: number[][][]; | ||
1: number[][][]; | ||
}; | ||
6: number[][][]; | ||
7: number[][][]; | ||
8: number[][][]; | ||
9: number[][][]; | ||
10: { | ||
0: number[][][]; | ||
1: number[][][]; | ||
}; | ||
11: number[][][]; | ||
12: number[][][]; | ||
13: number[][][]; | ||
14: number[][][]; | ||
15: any[]; | ||
}; | ||
export declare const ISOBANDS_CODE_OFFSET_MAP: { | ||
[x: number]: | ||
| number[][][] | ||
| { | ||
0: number[][][]; | ||
1: number[][][]; | ||
2: number[][][]; | ||
}; | ||
}; | ||
// # sourceMappingURL=marching-squares-codes.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export declare const CONTOUR_TYPE: { | ||
ISO_LINES: number; | ||
ISO_BANDS: number; | ||
}; | ||
export declare function getCode(opts: any): { | ||
code: number; | ||
meanCode: number; | ||
}; | ||
export declare function getVertices(opts: any): number[][] | number[][][]; | ||
// # sourceMappingURL=marching-squares.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ibgreen I think a bunch of files in
/typed
accidentally made it in here. Was that intentional?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh no, what a mess...
We need to revert and reapply;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm about to push up a revert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#9318