UNPKG

2.77 kBPlain TextView Raw
1// This file is generated. Edit build/generate-style-code.ts, then run 'npm run codegen'.
2/* eslint-disable */
3
4import styleSpec from '../../style-spec/reference/latest';
5
6import {
7 Properties,
8 DataConstantProperty,
9 DataDrivenProperty,
10 CrossFadedDataDrivenProperty,
11 CrossFadedProperty,
12 ColorRampProperty,
13 PossiblyEvaluatedPropertyValue,
14 CrossFaded
15} from '../properties';
16
17import type Color from '../../style-spec/util/color';
18
19import type Formatted from '../../style-spec/expression/types/formatted';
20
21import type ResolvedImage from '../../style-spec/expression/types/resolved_image';
22import {StylePropertySpecification} from '../../style-spec/style-spec';
23
24
25export type RasterPaintProps = {
26 "raster-opacity": DataConstantProperty<number>,
27 "raster-hue-rotate": DataConstantProperty<number>,
28 "raster-brightness-min": DataConstantProperty<number>,
29 "raster-brightness-max": DataConstantProperty<number>,
30 "raster-saturation": DataConstantProperty<number>,
31 "raster-contrast": DataConstantProperty<number>,
32 "raster-resampling": DataConstantProperty<"linear" | "nearest">,
33 "raster-fade-duration": DataConstantProperty<number>,
34};
35
36export type RasterPaintPropsPossiblyEvaluated = {
37 "raster-opacity": number,
38 "raster-hue-rotate": number,
39 "raster-brightness-min": number,
40 "raster-brightness-max": number,
41 "raster-saturation": number,
42 "raster-contrast": number,
43 "raster-resampling": "linear" | "nearest",
44 "raster-fade-duration": number,
45};
46
47const paint: Properties<RasterPaintProps> = new Properties({
48 "raster-opacity": new DataConstantProperty(styleSpec["paint_raster"]["raster-opacity"] as any as StylePropertySpecification),
49 "raster-hue-rotate": new DataConstantProperty(styleSpec["paint_raster"]["raster-hue-rotate"] as any as StylePropertySpecification),
50 "raster-brightness-min": new DataConstantProperty(styleSpec["paint_raster"]["raster-brightness-min"] as any as StylePropertySpecification),
51 "raster-brightness-max": new DataConstantProperty(styleSpec["paint_raster"]["raster-brightness-max"] as any as StylePropertySpecification),
52 "raster-saturation": new DataConstantProperty(styleSpec["paint_raster"]["raster-saturation"] as any as StylePropertySpecification),
53 "raster-contrast": new DataConstantProperty(styleSpec["paint_raster"]["raster-contrast"] as any as StylePropertySpecification),
54 "raster-resampling": new DataConstantProperty(styleSpec["paint_raster"]["raster-resampling"] as any as StylePropertySpecification),
55 "raster-fade-duration": new DataConstantProperty(styleSpec["paint_raster"]["raster-fade-duration"] as any as StylePropertySpecification),
56});
57
58export default ({ paint } as {
59 paint: Properties<RasterPaintProps>
60});
\No newline at end of file