1 |
|
2 |
|
3 |
|
4 | import styleSpec from '../../style-spec/reference/latest';
|
5 |
|
6 | import {
|
7 | Properties,
|
8 | DataConstantProperty,
|
9 | DataDrivenProperty,
|
10 | CrossFadedDataDrivenProperty,
|
11 | CrossFadedProperty,
|
12 | ColorRampProperty,
|
13 | PossiblyEvaluatedPropertyValue,
|
14 | CrossFaded
|
15 | } from '../properties';
|
16 |
|
17 | import type Color from '../../style-spec/util/color';
|
18 |
|
19 | import type Formatted from '../../style-spec/expression/types/formatted';
|
20 |
|
21 | import type ResolvedImage from '../../style-spec/expression/types/resolved_image';
|
22 | import {StylePropertySpecification} from '../../style-spec/style-spec';
|
23 |
|
24 |
|
25 | export 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 |
|
36 | export 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 |
|
47 | const 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 |
|
58 | export default ({ paint } as {
|
59 | paint: Properties<RasterPaintProps>
|
60 | }); |
\ | No newline at end of file |