import { Expr, JsonExpr } from "./Expr"; import { InterpolatedPropertyDefinition } from "./InterpolatedPropertyDefs"; import { BaseTechniqueParams, BasicExtrudedLineTechniqueParams, ExtrudedPolygonTechniqueParams, FillTechniqueParams, LineTechniqueParams, MarkerTechniqueParams, PointTechniqueParams, SegmentsTechniqueParams, ShaderTechniqueParams, SolidLineTechniqueParams, StandardExtrudedLineTechniqueParams, StandardTechniqueParams, TerrainTechniqueParams, TextTechniqueParams, TextureCoordinateType } from "./TechniqueParams"; import { StylePriority } from "./Theme"; /** * Names of the supported texture properties. * @internal */ export declare const TEXTURE_PROPERTY_KEYS: string[]; declare type RemoveInterpolatedPropDef = T | InterpolatedPropertyDefinition extends T ? Exclude> : T; declare type RemoveJsonExpr = T | JsonExpr extends T ? Exclude : T; /** * Make runtime representation of technique attributes from JSON-compatible typings. * * Translates * - InterpolatedPropertyDefinition -> InterpolatedProperty * - JsonExpr -> Expr */ export declare type MakeTechniqueAttrs = { [P in keyof T]: T[P] | JsonExpr extends T[P] ? RemoveInterpolatedPropDef> | Expr : T[P]; }; /** * Possible techniques that can be used to draw a geometry on the map. */ export declare type Technique = SquaresTechnique | CirclesTechnique | PoiTechnique | LineMarkerTechnique | LineTechnique | SegmentsTechnique | SolidLineTechnique | FillTechnique | StandardTechnique | TerrainTechnique | BasicExtrudedLineTechnique | StandardExtrudedLineTechnique | ExtrudedPolygonTechnique | ShaderTechnique | TextTechnique | LabelRejectionLineTechnique; /** * Runtime representation of `SquaresStyle` as parsed by `StyleSetEvaluator`. * For technique parameters see `PointTechniqueParams`. */ export interface SquaresTechnique extends MakeTechniqueAttrs { name: "squares"; } /** * Runtime representation of `CirclesStyle` as parsed by `StyleSetEvaluator`. * For technique parameters see `PointTechniqueParams`. */ export interface CirclesTechnique extends MakeTechniqueAttrs { name: "circles"; } /** * Runtime representation of `PoiStyle` as parsed by `StyleSetEvaluator`. * For technique parameters see `MarkerTechniqueParams`. */ export interface PoiTechnique extends MakeTechniqueAttrs { name: "labeled-icon"; } /** * Runtime representation of `LineMarkerStyle` as parsed by `StyleSetEvaluator`. * For technique parameters see `MarkerTechniqueParams`. */ export interface LineMarkerTechnique extends MakeTechniqueAttrs { name: "line-marker"; } /** * Runtime representation of `SegmentsStyle` as parsed by `StyleSetEvaluator`. * For technique parameters see `SegmentsTechniqueParams`. */ export interface SegmentsTechnique extends MakeTechniqueAttrs { name: "segments"; } /** * Runtime representation of `BasicExtrudedLineStyle` as parsed by `StyleSetEvaluator`. * For technique parameters see `BasicExtrudedLineTechniqueParams`. */ export interface BasicExtrudedLineTechnique extends MakeTechniqueAttrs { name: "extruded-line"; } /** * Runtime representation of `StandardExtrudedLineStyle` as parsed by `StyleSetEvaluator`. * For technique parameters see `StandardExtrudedLineTechniqueParams`. */ export interface StandardExtrudedLineTechnique extends MakeTechniqueAttrs { name: "extruded-line"; } /** * Runtime representation of `SolidLineStyle` as parsed by `StyleSetEvaluator`. * For technique parameters see `SolidLineTechniqueParams`. */ export interface SolidLineTechnique extends MakeTechniqueAttrs { name: "solid-line" | "dashed-line"; } /** * Runtime representation of `LineStyle` as parsed by `StyleSetEvaluator`. * For technique parameters see `LineTechniqueParams`. */ export interface LineTechnique extends MakeTechniqueAttrs { name: "line"; } /** * Runtime representation of `FillStyle` as parsed by `StyleSetEvaluator`. * For technique parameters see `FillTechniqueParams`. */ export interface FillTechnique extends MakeTechniqueAttrs { name: "fill"; } /** * Technique used to render a mesh geometry. * For technique parameters see `StandardTechniqueParams`. */ export interface StandardTechnique extends MakeTechniqueAttrs { name: "standard"; } /** * Runtime representation of `ExtrudedPolygonStyle` as parsed by `StyleSetEvaluator`. * For technique parameters see `ExtrudedPolygonTechniqueParams`. */ export interface ExtrudedPolygonTechnique extends MakeTechniqueAttrs { name: "extruded-polygon"; } /** * Runtime representation of `TextStyle` as parsed by `StyleSetEvaluator`. * For technique parameters see `TextTechniqueParams`. */ export interface TextTechnique extends MakeTechniqueAttrs { name: "text"; } /** * Special technique for user-defined shaders. * For technique parameters see `ShaderTechniqueParams`. */ export interface ShaderTechnique extends MakeTechniqueAttrs { name: "shader"; } /** * Technique used to render a terrain geometry with textures. * For technique parameters see `TerrainTechniqueParams`. */ export interface TerrainTechnique extends MakeTechniqueAttrs { name: "terrain"; } /** * Technique to avoid label rendering on top of certain line geometries. * For technique parameters see `BaseTechniqueParams`. */ export interface LabelRejectionLineTechnique extends MakeTechniqueAttrs { name: "label-rejection-line"; } /** * Names of the properties controlling transparency. * @internal */ export declare const TRANSPARENCY_PROPERTY_KEYS: string[]; /** * Additional params used for optimized usage of `Techniques`. */ export interface IndexedTechniqueParams { /** * Optimization: Index into table in `StyleSetEvaluator` or in `DecodedTile`. * @hidden */ _index: number; /** * Optimization: Unique `Technique` index of `Style` from which technique was derived. * @hidden */ _styleSetIndex: number; /** * The styleSet associated to this `Technique`. * @hidden */ _styleSet?: string; /** * The category used to assign render orders to objects created using this `Technique`. * @hidden */ _category?: string; /** * The category used to assign render orders to secondary objects * created using this `Technique`. * @hidden */ _secondaryCategory?: string; /** * `true` if any of the properties of this technique needs to access * the feature's state. * * @hidden */ _usesFeatureState?: boolean; /** * Last computed state derived from [[Technique.kind]]. */ _kindState?: boolean; } /** * For efficiency, `StyleSetEvaluator` returns `Techniques` additional params as defined in * `IndexedTechniqueParams`. */ export declare type IndexedTechnique = Technique & IndexedTechniqueParams; /** * Type guard to check if an object is an instance of `CirclesTechnique`. */ export declare function isCirclesTechnique(technique: Technique): technique is CirclesTechnique; /** * Type guard to check if an object is an instance of `SquaresTechnique`. */ export declare function isSquaresTechnique(technique: Technique): technique is SquaresTechnique; /** * Type guard to check if an object is an instance of `PoiTechnique`. */ export declare function isPoiTechnique(technique: Technique): technique is PoiTechnique; /** * Type guard to check if an object is an instance of `LineMarkerTechnique`. */ export declare function isLineMarkerTechnique(technique: Technique): technique is LineMarkerTechnique; /** * Type guard to check if an object is an instance of `LineTechnique`. */ export declare function isLineTechnique(technique: Technique): technique is LineTechnique; /** * Type guard to check if an object is an instance of `SolidLineTechnique`. */ export declare function isSolidLineTechnique(technique: Technique): technique is SolidLineTechnique; /** * Type guard to check if an object is an instance of `SolidLineTechnique` and is a kind that * has special dashes. * @note Lines with special dashes need line caps to render properly. */ export declare function isSpecialDashesLineTechnique(technique: Technique): technique is SolidLineTechnique; /** * Type guard to check if an object is an instance of `SegmentsTechnique`. */ export declare function isSegmentsTechnique(technique: Technique): technique is SegmentsTechnique; /** * Type guard to check if an object is an instance of `BasicExtrudedLineTechnique` * or `StandardExtrudedLineTechnique`. */ export declare function isExtrudedLineTechnique(technique: Technique): technique is BasicExtrudedLineTechnique | StandardExtrudedLineTechnique; /** * Type guard to check if an object is an instance of `BasicExtrudedLineTechnique`. */ export declare function isBasicExtrudedLineTechnique(technique: Technique): technique is BasicExtrudedLineTechnique; /** * Type guard to check if an object is an instance of `StandardExtrudedLineTechnique`. */ export declare function isStandardExtrudedLineTechnique(technique: Technique): technique is StandardExtrudedLineTechnique; /** * Type guard to check if an object is an instance of `FillTechnique`. */ export declare function isFillTechnique(technique: Technique): technique is FillTechnique; /** * Type guard to check if an object is an instance of `ExtrudedPolygonTechnique`. */ export declare function isExtrudedPolygonTechnique(technique: Technique): technique is ExtrudedPolygonTechnique; /** * Type guard to check if an object is an instance of `StandardTechnique`. */ export declare function isStandardTechnique(technique: Technique): technique is StandardTechnique; /** * Type guard to check if an object is an instance of `TerrainTechnique`. */ export declare function isTerrainTechnique(technique: Technique): technique is TerrainTechnique; /** * Type guard to check if an object is an instance of `TextTechnique`. */ export declare function isTextTechnique(technique: Technique): technique is TextTechnique; /** * Type guard to check if an object is an instance of `ShaderTechnique`. */ export declare function isShaderTechnique(technique: Technique): technique is ShaderTechnique; export declare function isLabelRejectionLineTechnique(technique: Technique): technique is LabelRejectionLineTechnique; /** * Check if vertex normals should be generated for this technique (if no normals are in the data). * @param technique - Technique to check. */ export declare function needsVertexNormals(technique: Technique): boolean; /** * Type guard to check if an object is an instance of a technique with textures. */ export declare function supportsTextures(technique: Technique): technique is FillTechnique | StandardTechnique | ExtrudedPolygonTechnique | TerrainTechnique; /** * Get the texture coordinate type if the technique supports it. */ export declare function textureCoordinateType(technique: Technique): TextureCoordinateType | undefined; /** * Add all the buffers of the technique to the transfer list. */ export declare function addBuffersToTransferList(technique: Technique, transferList: ArrayBuffer[]): void; /** * Compose full texture name for given image name with technique specified. * Some techniques allows to add prefix/postfix to icons names specified, this * function uses technique information to create fully qualified texture name. * @param imageName - base name of the marker icon. * @param technique - the technique describing POI or line marker. * @returns fully qualified texture name for loading from atlas (without extension). */ export declare function composeTechniqueTextureName(imageName: string, technique: PoiTechnique | LineMarkerTechnique): string; /** * Sets a technique's render order (or priority for screen-space techniques) depending on its * category and the priorities specified in a given theme. * @param technique- The technique whose render order or priority will be set. * @param theme - The theme from which the category priorities will be taken. */ export declare function setTechniqueRenderOrderOrPriority(technique: IndexedTechnique, priorities: StylePriority[], labelPriorities: string[]): void; export {}; //# sourceMappingURL=Techniques.d.ts.map