@mapcatch/util 1.0.15 → 2.0.0

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.
Files changed (81) hide show
  1. package/dist/catchUtil.min.esm.js +67984 -14011
  2. package/dist/catchUtil.min.js +2695 -55
  3. package/package.json +22 -3
  4. package/src/constants/annotation_color.js +7 -0
  5. package/src/constants/annotation_draw_style.js +228 -0
  6. package/src/constants/annotation_label_style.js +76 -0
  7. package/src/constants/annotation_style.js +118 -0
  8. package/src/constants/cameras.js +1 -1
  9. package/src/constants/crs.js +31473 -31473
  10. package/src/constants/error_codes.js +44 -0
  11. package/src/constants/height_colors.js +1 -0
  12. package/src/constants/index.js +9 -2
  13. package/src/constants/map_style.js +11 -0
  14. package/src/constants/measurement_fields.js +3 -3
  15. package/src/{event.js → event/event.js} +1 -14
  16. package/src/event/event_bus.js +5 -0
  17. package/src/event/index.js +2 -0
  18. package/src/gl-operations/constants.js +9 -11
  19. package/src/gl-operations/default_options.js +5 -5
  20. package/src/gl-operations/index.js +166 -239
  21. package/src/gl-operations/reglCommands/contours.js +20 -20
  22. package/src/gl-operations/reglCommands/default.js +34 -34
  23. package/src/gl-operations/reglCommands/hillshading.js +116 -116
  24. package/src/gl-operations/reglCommands/index.js +6 -6
  25. package/src/gl-operations/reglCommands/multiLayers.js +55 -55
  26. package/src/gl-operations/reglCommands/transitions.js +24 -24
  27. package/src/gl-operations/reglCommands/util.js +54 -54
  28. package/src/gl-operations/renderer.js +69 -69
  29. package/src/gl-operations/shaders/transform.js +2 -2
  30. package/src/gl-operations/shaders/util/rgbaToFloat.glsl +11 -11
  31. package/src/gl-operations/texture_manager.js +58 -58
  32. package/src/gl-operations/util.js +154 -154
  33. package/src/index.js +14 -2
  34. package/src/measure/index.js +198 -0
  35. package/src/measure/tile_cache.js +88 -0
  36. package/src/mvs/index.js +26 -0
  37. package/src/mvs/protos/index.js +12 -0
  38. package/src/mvs/protos/proto_10.js +155 -0
  39. package/src/observation_pretict.js +168 -0
  40. package/src/photo-parser/exif/gps_tags.js +33 -0
  41. package/src/photo-parser/exif/ifd1_tags.js +22 -0
  42. package/src/photo-parser/exif/index.js +130 -0
  43. package/src/photo-parser/exif/parse_image.js +290 -0
  44. package/src/photo-parser/exif/string_values.js +137 -0
  45. package/src/photo-parser/exif/tags.js +75 -0
  46. package/src/photo-parser/exif/tiff_tags.js +35 -0
  47. package/src/photo-parser/exif/util.js +103 -0
  48. package/src/photo-parser/image-size/detector.js +24 -0
  49. package/src/photo-parser/image-size/fromFile.js +55 -0
  50. package/src/photo-parser/image-size/index.js +2 -0
  51. package/src/photo-parser/image-size/lookup.js +37 -0
  52. package/src/photo-parser/image-size/types/bmp.js +10 -0
  53. package/src/photo-parser/image-size/types/cur.js +16 -0
  54. package/src/photo-parser/image-size/types/dds.js +10 -0
  55. package/src/photo-parser/image-size/types/gif.js +11 -0
  56. package/src/photo-parser/image-size/types/heif.js +35 -0
  57. package/src/photo-parser/image-size/types/icns.js +112 -0
  58. package/src/photo-parser/image-size/types/ico.js +74 -0
  59. package/src/photo-parser/image-size/types/index.js +43 -0
  60. package/src/photo-parser/image-size/types/j2c.js +11 -0
  61. package/src/photo-parser/image-size/types/jp2.js +22 -0
  62. package/src/photo-parser/image-size/types/jpg.js +157 -0
  63. package/src/photo-parser/image-size/types/ktx.js +18 -0
  64. package/src/photo-parser/image-size/types/png.js +36 -0
  65. package/src/photo-parser/image-size/types/pnm.js +74 -0
  66. package/src/photo-parser/image-size/types/psd.js +10 -0
  67. package/src/photo-parser/image-size/types/svg.js +100 -0
  68. package/src/photo-parser/image-size/types/tga.js +14 -0
  69. package/src/photo-parser/image-size/types/tiff.js +92 -0
  70. package/src/photo-parser/image-size/types/utils.js +83 -0
  71. package/src/photo-parser/image-size/types/webp.js +67 -0
  72. package/src/photo-parser/index.js +181 -0
  73. package/src/report/annotations_report.js +446 -0
  74. package/src/report/index.js +2 -0
  75. package/src/report/map_util.js +81 -0
  76. package/src/report/pdf_creator.js +247 -0
  77. package/src/report/report.js +583 -0
  78. package/src/transform.js +204 -0
  79. package/src/util.js +371 -75
  80. package/CHANGELOG.md +0 -60
  81. /package/src/constants/{colors.js → dsm_colors.js} +0 -0
@@ -1,27 +1,27 @@
1
- import vertSingleNotTransformed from '../shaders/vertex/singleNotTransformed.js';
1
+ import vertSingleNotTransformed from '../shaders/vertex/singleNotTransformed.js'
2
2
 
3
- import fragConvolutionSmooth from '../shaders/fragment/convolutionSmooth.js';
3
+ import fragConvolutionSmooth from '../shaders/fragment/convolutionSmooth.js'
4
4
 
5
5
  /**
6
6
  * The resulting Regl DrawCommand is for using a convolution kernel to smooth the input data.
7
7
  * Currently hard-coded the kernel and positions in the shader to reduce number of uniforms.
8
8
  */
9
- export function createConvolutionSmoothCommand(regl, commonConfig) {
10
- return regl({
11
- vert: vertSingleNotTransformed,
12
- frag: fragConvolutionSmooth,
13
- uniforms: {
14
- ...commonConfig.uniforms,
15
- texture: regl.prop("texture"),
16
- textureSize: regl.prop("textureSize"),
17
- kernelSize: regl.prop("kernelSize"),
18
- },
19
- attributes: {
20
- texCoord: [0, 1, 1, 1, 0, 0, 1, 0],
21
- position: [-1, 1, 1, 1, -1, -1, 1, -1],
22
- },
23
- depth: { enable: false },
24
- primitive: 'triangle strip',
25
- count: 4,
26
- });
9
+ export function createConvolutionSmoothCommand (regl, commonConfig) {
10
+ return regl({
11
+ vert: vertSingleNotTransformed,
12
+ frag: fragConvolutionSmooth,
13
+ uniforms: {
14
+ ...commonConfig.uniforms,
15
+ texture: regl.prop('texture'),
16
+ textureSize: regl.prop('textureSize'),
17
+ kernelSize: regl.prop('kernelSize')
18
+ },
19
+ attributes: {
20
+ texCoord: [0, 1, 1, 1, 0, 0, 1, 0],
21
+ position: [-1, 1, 1, 1, -1, -1, 1, -1]
22
+ },
23
+ depth: { enable: false },
24
+ primitive: 'triangle strip',
25
+ count: 4
26
+ })
27
27
  }
@@ -1,44 +1,44 @@
1
- import vertSingle from '../shaders/vertex/single.js';
1
+ import vertSingle from '../shaders/vertex/single.js'
2
2
 
3
- import fragSingle from '../shaders/fragment/single.js';
3
+ import fragSingle from '../shaders/fragment/single.js'
4
4
 
5
5
  import {
6
- DEG2RAD,
7
- SLOPEFACTOR,
8
- } from '../constants';
6
+ DEG2RAD,
7
+ SLOPEFACTOR
8
+ } from '../constants'
9
9
 
10
- import * as util from '../util';
10
+ import * as util from '../util'
11
11
 
12
12
  /**
13
13
  * The resulting Regl DrawCommand is used to draw a single tile. The fragment shader decodes the
14
14
  * Float32 value of a pixel and colorizes it with the given color scale (and/or sentinel values).
15
15
  */
16
- export function createDrawTileCommand(regl, commonConfig, fragMacros) {
17
- return regl({
18
- ...commonConfig,
19
- vert: vertSingle,
20
- frag: util.defineMacros(fragSingle, fragMacros),
21
- uniforms: {
22
- ...commonConfig.uniforms,
23
- scaleLength: regl.prop('scaleLength'),
24
- sentinelLength: regl.prop('sentinelLength'),
25
- scaleColormap: regl.prop('scaleColormap'),
26
- sentinelColormap: regl.prop('sentinelColormap'),
27
- texture: (_, { texture }) => texture,
28
- enableSimpleHillshade: (_, { enableSimpleHillshade }) => enableSimpleHillshade,
29
- offset: 0,
30
- azimuth: 0,
31
- altitude: 0,
32
- slopescale: 0,
33
- deg2rad: DEG2RAD,
34
- slopeFactor: SLOPEFACTOR,
35
- tileSize: 0,
36
- textureSize: 0,
37
- textureBounds: [0, 0, 0, 0],
38
- },
39
- attributes: {
40
- ...commonConfig.attributes,
41
- texCoord: (_, { textureBounds }) => util.getTexCoordVerticesTriangleStripQuad(textureBounds),
42
- },
43
- });
16
+ export function createDrawTileCommand (regl, commonConfig, fragMacros) {
17
+ return regl({
18
+ ...commonConfig,
19
+ vert: vertSingle,
20
+ frag: util.defineMacros(fragSingle, fragMacros),
21
+ uniforms: {
22
+ ...commonConfig.uniforms,
23
+ scaleLength: regl.prop('scaleLength'),
24
+ sentinelLength: regl.prop('sentinelLength'),
25
+ scaleColormap: regl.prop('scaleColormap'),
26
+ sentinelColormap: regl.prop('sentinelColormap'),
27
+ texture: (_, { texture }) => texture,
28
+ enableSimpleHillshade: (_, { enableSimpleHillshade }) => enableSimpleHillshade,
29
+ offset: 0,
30
+ azimuth: 0,
31
+ altitude: 0,
32
+ slopescale: 0,
33
+ deg2rad: DEG2RAD,
34
+ slopeFactor: SLOPEFACTOR,
35
+ tileSize: 0,
36
+ textureSize: 0,
37
+ textureBounds: [0, 0, 0, 0]
38
+ },
39
+ attributes: {
40
+ ...commonConfig.attributes,
41
+ texCoord: (_, { textureBounds }) => util.getTexCoordVerticesTriangleStripQuad(textureBounds)
42
+ }
43
+ })
44
44
  }
@@ -1,33 +1,33 @@
1
- import vertSingle from '../shaders/vertex/single.js';
2
- import vertDouble from '../shaders/vertex/double.js';
3
- import vertSingleNotTransformed from '../shaders/vertex/singleNotTransformed.js';
1
+ import vertSingle from '../shaders/vertex/single.js'
2
+ import vertDouble from '../shaders/vertex/double.js'
3
+ import vertSingleNotTransformed from '../shaders/vertex/singleNotTransformed.js'
4
4
 
5
- import fragSingle from '../shaders/fragment/single.js';
6
- import fragHsPregen from '../shaders/fragment/hillshading/hsPregen.js';
7
- import fragHsAdvMergeAndScaleTiles from '../shaders/fragment/hillshading/hsAdvMergeAndScaleTiles.js';
8
- import fragHsAdvNormals from '../shaders/fragment/hillshading/hsAdvNormals.js';
9
- import fragHsAdvDirectLight from '../shaders/fragment/hillshading/hsAdvDirect.js';
10
- import fragHsAdvSoftShadows from '../shaders/fragment/hillshading/hsAdvSoftShadows.js';
11
- import fragHsAdvAmbientShadows from '../shaders/fragment/hillshading/hsAdvAmbientShadows.js';
12
- import fragHsAdvFinalColorscale from '../shaders/fragment/hillshading/hsAdvFinalColorscale.js';
13
- import fragHsAdvFinalBaselayer from '../shaders/fragment/hillshading/hsAdvFinalBaselayer.js';
14
- import fragHsAdvSmooth from '../shaders/fragment/hillshading/hsAdvSmooth.js';
5
+ import fragSingle from '../shaders/fragment/single.js'
6
+ import fragHsPregen from '../shaders/fragment/hillshading/hsPregen.js'
7
+ import fragHsAdvMergeAndScaleTiles from '../shaders/fragment/hillshading/hsAdvMergeAndScaleTiles.js'
8
+ import fragHsAdvNormals from '../shaders/fragment/hillshading/hsAdvNormals.js'
9
+ import fragHsAdvDirectLight from '../shaders/fragment/hillshading/hsAdvDirect.js'
10
+ import fragHsAdvSoftShadows from '../shaders/fragment/hillshading/hsAdvSoftShadows.js'
11
+ import fragHsAdvAmbientShadows from '../shaders/fragment/hillshading/hsAdvAmbientShadows.js'
12
+ import fragHsAdvFinalColorscale from '../shaders/fragment/hillshading/hsAdvFinalColorscale.js'
13
+ import fragHsAdvFinalBaselayer from '../shaders/fragment/hillshading/hsAdvFinalBaselayer.js'
14
+ import fragHsAdvSmooth from '../shaders/fragment/hillshading/hsAdvSmooth.js'
15
15
 
16
16
  import {
17
- DEG2RAD,
18
- SLOPEFACTOR,
19
- } from '../constants';
17
+ DEG2RAD,
18
+ SLOPEFACTOR
19
+ } from '../constants'
20
20
 
21
- import * as util from '../util';
21
+ import * as util from '../util'
22
22
 
23
- const littleEndian = util.machineIsLittleEndian();
23
+ const littleEndian = util.machineIsLittleEndian()
24
24
 
25
25
  /**
26
26
  * The resulting Regl DrawCommand is used to draw a single tile. The fragment shader decodes the
27
27
  * Float32 value of a pixel and colorizes it with the given color scale (and/or sentinel values).
28
28
  * Hillshading is applied with a simple and fast algorithm
29
29
  */
30
- export function createDrawTileHsSimpleCommand(regl, commonConfig, fragMacros) {
30
+ export function createDrawTileHsSimpleCommand (regl, commonConfig, fragMacros) {
31
31
  return regl({
32
32
  ...commonConfig,
33
33
  vert: vertSingle,
@@ -52,16 +52,16 @@ export function createDrawTileHsSimpleCommand(regl, commonConfig, fragMacros) {
52
52
  [textureBounds[0].y],
53
53
  [textureBounds[1].x],
54
54
  [textureBounds[1].y]
55
- ];
55
+ ]
56
56
  },
57
57
  textureSize: (_, { textureSize }) => textureSize,
58
- tileSize: (_, { tileSize }) => tileSize,
58
+ tileSize: (_, { tileSize }) => tileSize
59
59
  },
60
60
  attributes: {
61
61
  ...commonConfig.attributes,
62
- texCoord: (_, { textureBounds }) => util.getTexCoordVerticesTriangleStripQuad(textureBounds),
63
- },
64
- });
62
+ texCoord: (_, { textureBounds }) => util.getTexCoordVerticesTriangleStripQuad(textureBounds)
63
+ }
64
+ })
65
65
  }
66
66
 
67
67
  /**
@@ -69,7 +69,7 @@ export function createDrawTileHsSimpleCommand(regl, commonConfig, fragMacros) {
69
69
  * Float32 value of a pixel and colorizes it with the given color scale (and/or sentinel values).
70
70
  * Hillshading is applied from a pre-generated texture
71
71
  */
72
- export function createDrawTileHsPregenCommand(regl, commonConfig, fragMacros) {
72
+ export function createDrawTileHsPregenCommand (regl, commonConfig, fragMacros) {
73
73
  return regl({
74
74
  ...commonConfig,
75
75
  vert: vertDouble,
@@ -81,14 +81,14 @@ export function createDrawTileHsPregenCommand(regl, commonConfig, fragMacros) {
81
81
  scaleColormap: regl.prop('scaleColormap'),
82
82
  sentinelColormap: regl.prop('sentinelColormap'),
83
83
  texture: (_, { texture }) => texture,
84
- hillshadePregenTexture: (_, { hillshadePregenTexture }) => hillshadePregenTexture,
84
+ hillshadePregenTexture: (_, { hillshadePregenTexture }) => hillshadePregenTexture
85
85
  },
86
86
  attributes: {
87
87
  ...commonConfig.attributes,
88
88
  texCoordA: (_, { textureBounds }) => util.getTexCoordVerticesTriangleStripQuad(textureBounds),
89
- texCoordB: (_, { textureBoundsHs }) => util.getTexCoordVerticesTriangleStripQuad(textureBoundsHs),
90
- },
91
- });
89
+ texCoordB: (_, { textureBoundsHs }) => util.getTexCoordVerticesTriangleStripQuad(textureBoundsHs)
90
+ }
91
+ })
92
92
  }
93
93
 
94
94
 
@@ -97,37 +97,37 @@ export function createDrawTileHsPregenCommand(regl, commonConfig, fragMacros) {
97
97
  * adjacent tiles. The float values can be scaled to adjust the hillshading.
98
98
  * It will be saved to a framebuffer and is used as an input to advanced hillshading
99
99
  */
100
- export function createHsAdvMergeAndScaleTiles(regl) {
100
+ export function createHsAdvMergeAndScaleTiles (regl) {
101
101
  return regl({
102
102
  vert: vertSingleNotTransformed,
103
103
  frag: fragHsAdvMergeAndScaleTiles,
104
104
  uniforms: {
105
105
  littleEndian: littleEndian,
106
- nodataValue: regl.prop("nodataValue"),
107
- texture: regl.prop("texture"),
108
- floatScale: regl.prop("floatScale"),
106
+ nodataValue: regl.prop('nodataValue'),
107
+ texture: regl.prop('texture'),
108
+ floatScale: regl.prop('floatScale')
109
109
  },
110
110
  attributes: {
111
111
  // 18 triangles = 9 tiles
112
112
  position: [
113
- [-1, 1], [-1/3, 1], [-1, 1/3], [-1/3, 1/3], [-1/3, 1], [-1, 1/3],
114
- [-1, 1/3], [-1/3, 1/3], [-1, -1/3], [-1/3, -1/3], [-1/3, 1/3], [-1, -1/3],
115
- [-1, -1/3], [-1/3, -1/3], [-1, -1], [-1/3, -1], [-1/3, -1/3], [-1, -1],
116
- [-1/3, 1], [1/3, 1], [-1/3, 1/3], [1/3, 1/3], [1/3, 1], [-1/3, 1/3],
117
- [-1/3, 1/3], [1/3, 1/3], [-1/3, -1/3], [1/3, -1/3], [1/3, 1/3], [-1/3, -1/3],
118
- [-1/3, -1/3], [1/3, -1/3], [-1/3, -1], [1/3, -1], [1/3, -1/3], [-1/3, -1],
119
- [1/3, 1], [1, 1], [1/3, 1/3], [1, 1/3], [1, 1], [1/3, 1/3],
120
- [1/3, 1/3], [1, 1/3], [1/3, -1/3], [1, -1/3], [1, 1/3], [1/3, -1/3],
121
- [1/3, -1/3], [1, -1/3], [1/3, -1], [1, -1], [1, -1/3], [1/3, -1]
113
+ [-1, 1], [-1 / 3, 1], [-1, 1 / 3], [-1 / 3, 1 / 3], [-1 / 3, 1], [-1, 1 / 3],
114
+ [-1, 1 / 3], [-1 / 3, 1 / 3], [-1, -1 / 3], [-1 / 3, -1 / 3], [-1 / 3, 1 / 3], [-1, -1 / 3],
115
+ [-1, -1 / 3], [-1 / 3, -1 / 3], [-1, -1], [-1 / 3, -1], [-1 / 3, -1 / 3], [-1, -1],
116
+ [-1 / 3, 1], [1 / 3, 1], [-1 / 3, 1 / 3], [1 / 3, 1 / 3], [1 / 3, 1], [-1 / 3, 1 / 3],
117
+ [-1 / 3, 1 / 3], [1 / 3, 1 / 3], [-1 / 3, -1 / 3], [1 / 3, -1 / 3], [1 / 3, 1 / 3], [-1 / 3, -1 / 3],
118
+ [-1 / 3, -1 / 3], [1 / 3, -1 / 3], [-1 / 3, -1], [1 / 3, -1], [1 / 3, -1 / 3], [-1 / 3, -1],
119
+ [1 / 3, 1], [1, 1], [1 / 3, 1 / 3], [1, 1 / 3], [1, 1], [1 / 3, 1 / 3],
120
+ [1 / 3, 1 / 3], [1, 1 / 3], [1 / 3, -1 / 3], [1, -1 / 3], [1, 1 / 3], [1 / 3, -1 / 3],
121
+ [1 / 3, -1 / 3], [1, -1 / 3], [1 / 3, -1], [1, -1], [1, -1 / 3], [1 / 3, -1]
122
122
  ],
123
- texCoord: regl.prop("texCoord"),
123
+ texCoord: regl.prop('texCoord')
124
124
  },
125
125
  depth: { enable: false },
126
126
  primitive: 'triangles',
127
127
  count: 54,
128
128
  viewport: (_, { canvasSize: [width, height] }) => ({ width, height }),
129
- framebuffer: regl.prop("fbo"),
130
- });
129
+ framebuffer: regl.prop('fbo')
130
+ })
131
131
  }
132
132
 
133
133
 
@@ -136,23 +136,23 @@ export function createHsAdvMergeAndScaleTiles(regl) {
136
136
  * Currently hard-coded the kernel and positions in the shader to reduce number of uniforms.
137
137
  * TODO: Merge with contours function
138
138
  */
139
- export function createHsAdvSmoothCommand(regl, commonConfig) {
139
+ export function createHsAdvSmoothCommand (regl, commonConfig) {
140
140
  return regl({
141
141
  ...commonConfig,
142
142
  vert: vertSingleNotTransformed,
143
143
  frag: fragHsAdvSmooth,
144
144
  uniforms: {
145
145
  ...commonConfig.uniforms,
146
- tInput: regl.prop("tInput"),
147
- textureSize: regl.prop("textureSize"),
148
- kernelSize: regl.prop("kernelSize"),
146
+ tInput: regl.prop('tInput'),
147
+ textureSize: regl.prop('textureSize'),
148
+ kernelSize: regl.prop('kernelSize')
149
149
  },
150
150
  attributes: {
151
151
  position: [[-1, 1], [1, 1], [-1, -1], [1, -1]],
152
- texCoord: [[0, 1], [1, 1], [0, 0], [1, 0]],
152
+ texCoord: [[0, 1], [1, 1], [0, 0], [1, 0]]
153
153
  },
154
- framebuffer: regl.prop("fbo"),
155
- });
154
+ framebuffer: regl.prop('fbo')
155
+ })
156
156
  }
157
157
 
158
158
 
@@ -160,9 +160,9 @@ export function createHsAdvMergeAndScaleTiles(regl) {
160
160
  * The resulting Regl DrawCommand is used to calculate the normals.
161
161
  * It is used as an input to advanced hillshading
162
162
  */
163
- export function createHsAdvCalcNormals(
163
+ export function createHsAdvCalcNormals (
164
164
  regl,
165
- commonConfig,
165
+ commonConfig
166
166
  ) {
167
167
  return regl({
168
168
  ...commonConfig,
@@ -170,25 +170,25 @@ export function createHsAdvCalcNormals(
170
170
  frag: fragHsAdvNormals,
171
171
  uniforms: {
172
172
  ...commonConfig.uniforms,
173
- tInput: regl.prop("tInput"),
174
- pixelScale: regl.prop("pixelScale"),
175
- onePixel: regl.prop("onePixel"),
173
+ tInput: regl.prop('tInput'),
174
+ pixelScale: regl.prop('pixelScale'),
175
+ onePixel: regl.prop('onePixel')
176
176
  },
177
177
  attributes: {
178
178
  position: [[-1, 1], [1, 1], [-1, -1], [1, -1]],
179
- texCoord: [[0, 1], [1, 1], [0, 0], [1, 0]],
179
+ texCoord: [[0, 1], [1, 1], [0, 0], [1, 0]]
180
180
  },
181
- framebuffer: regl.prop("fbo"),
182
- });
181
+ framebuffer: regl.prop('fbo')
182
+ })
183
183
  }
184
184
 
185
185
  /**
186
186
  * The resulting Regl DrawCommand is used to show hillshading without shadows.
187
187
  * Not currently used
188
188
  */
189
- export function createHsAdvDirectLightning(
189
+ export function createHsAdvDirectLightning (
190
190
  regl,
191
- commonConfig,
191
+ commonConfig
192
192
  ) {
193
193
  return regl({
194
194
  ...commonConfig,
@@ -200,24 +200,24 @@ export function createHsAdvDirectLightning(
200
200
  sentinelLength: regl.prop('sentinelLength'),
201
201
  scaleColormap: regl.prop('scaleColormap'),
202
202
  sentinelColormap: regl.prop('sentinelColormap'),
203
- tInput: regl.prop("tInput"),
204
- tNormal: regl.prop("tNormal"),
205
- floatScale: regl.prop("floatScale"),
206
- sunDirection: regl.prop("sunDirection"),
203
+ tInput: regl.prop('tInput'),
204
+ tNormal: regl.prop('tNormal'),
205
+ floatScale: regl.prop('floatScale'),
206
+ sunDirection: regl.prop('sunDirection')
207
207
  },
208
208
  attributes: {
209
209
  position: [[-1, 1], [1, 1], [-1, -1], [1, -1]],
210
- texCoord: [[0, 1], [1, 1], [0, 0], [1, 0]],
211
- },
212
- });
210
+ texCoord: [[0, 1], [1, 1], [0, 0], [1, 0]]
211
+ }
212
+ })
213
213
  }
214
214
 
215
215
  /**
216
216
  * The resulting Regl DrawCommand is used to calculate soft shadows.
217
217
  */
218
- export function createHsAdvSoftShadows(
218
+ export function createHsAdvSoftShadows (
219
219
  regl,
220
- commonConfig,
220
+ commonConfig
221
221
  ) {
222
222
  return regl({
223
223
  ...commonConfig,
@@ -225,28 +225,28 @@ export function createHsAdvSoftShadows(
225
225
  frag: fragHsAdvSoftShadows,
226
226
  uniforms: {
227
227
  ...commonConfig.uniforms,
228
- tInput: regl.prop("tInput"),
229
- tNormal: regl.prop("tNormal"),
230
- tSrc: regl.prop("tSrc"),
231
- softIterations: regl.prop("softIterations"),
232
- pixelScale: regl.prop("pixelScale"),
233
- resolution: regl.prop("resolution"),
234
- sunDirection: regl.prop("sunDirection"),
228
+ tInput: regl.prop('tInput'),
229
+ tNormal: regl.prop('tNormal'),
230
+ tSrc: regl.prop('tSrc'),
231
+ softIterations: regl.prop('softIterations'),
232
+ pixelScale: regl.prop('pixelScale'),
233
+ resolution: regl.prop('resolution'),
234
+ sunDirection: regl.prop('sunDirection')
235
235
  },
236
236
  attributes: {
237
237
  position: [[-1, 1], [1, 1], [-1, -1], [1, -1]],
238
- texCoord: [[1/3, 2/3], [2/3, 2/3], [1/3, 1/3], [2/3, 1/3]],
238
+ texCoord: [[1 / 3, 2 / 3], [2 / 3, 2 / 3], [1 / 3, 1 / 3], [2 / 3, 1 / 3]]
239
239
  },
240
- framebuffer: regl.prop("fbo"),
241
- });
240
+ framebuffer: regl.prop('fbo')
241
+ })
242
242
  }
243
243
 
244
244
  /**
245
245
  * The resulting Regl DrawCommand is used to calculate ambient lighting.
246
246
  */
247
- export function createHsAdvAmbientShadows(
247
+ export function createHsAdvAmbientShadows (
248
248
  regl,
249
- commonConfig,
249
+ commonConfig
250
250
  ) {
251
251
  return regl({
252
252
  ...commonConfig,
@@ -254,29 +254,29 @@ export function createHsAdvAmbientShadows(
254
254
  frag: fragHsAdvAmbientShadows,
255
255
  uniforms: {
256
256
  ...commonConfig.uniforms,
257
- tInput: regl.prop("tInput"),
258
- tNormal: regl.prop("tNormal"),
259
- tSrc: regl.prop("tSrc"),
260
- ambientIterations: regl.prop("ambientIterations"),
261
- pixelScale: regl.prop("pixelScale"),
262
- resolution: regl.prop("resolution"),
263
- direction: regl.prop("direction"),
257
+ tInput: regl.prop('tInput'),
258
+ tNormal: regl.prop('tNormal'),
259
+ tSrc: regl.prop('tSrc'),
260
+ ambientIterations: regl.prop('ambientIterations'),
261
+ pixelScale: regl.prop('pixelScale'),
262
+ resolution: regl.prop('resolution'),
263
+ direction: regl.prop('direction')
264
264
  },
265
265
  attributes: {
266
266
  position: [[-1, 1], [1, 1], [-1, -1], [1, -1]],
267
- texCoord: [[1/3, 2/3], [2/3, 2/3], [1/3, 1/3], [2/3, 1/3]],
267
+ texCoord: [[1 / 3, 2 / 3], [2 / 3, 2 / 3], [1 / 3, 1 / 3], [2 / 3, 1 / 3]]
268
268
  },
269
- framebuffer: regl.prop("fbo"),
270
- });
269
+ framebuffer: regl.prop('fbo')
270
+ })
271
271
  }
272
272
 
273
273
  /**
274
274
  * The resulting Regl DrawCommand is used to combine soft and ambient shading,
275
275
  * use the colormap on the input floats and apply the hillshading.
276
276
  */
277
- export function createHsAdvFinalColorscale(
277
+ export function createHsAdvFinalColorscale (
278
278
  regl,
279
- commonConfig,
279
+ commonConfig
280
280
  ) {
281
281
  return regl({
282
282
  ...commonConfig,
@@ -288,28 +288,28 @@ export function createHsAdvFinalColorscale(
288
288
  sentinelLength: regl.prop('sentinelLength'),
289
289
  scaleColormap: regl.prop('scaleColormap'),
290
290
  sentinelColormap: regl.prop('sentinelColormap'),
291
- tInput: regl.prop("tInput"),
292
- tSoftShadow: regl.prop("tSoftShadow"),
293
- tAmbient: regl.prop("tAmbient"),
294
- floatScale: regl.prop("floatScale"),
295
- finalSoftMultiplier: regl.prop("finalSoftMultiplier"),
296
- finalAmbientMultiplier: regl.prop("finalAmbientMultiplier"),
291
+ tInput: regl.prop('tInput'),
292
+ tSoftShadow: regl.prop('tSoftShadow'),
293
+ tAmbient: regl.prop('tAmbient'),
294
+ floatScale: regl.prop('floatScale'),
295
+ finalSoftMultiplier: regl.prop('finalSoftMultiplier'),
296
+ finalAmbientMultiplier: regl.prop('finalAmbientMultiplier')
297
297
  },
298
298
  attributes: {
299
299
  ...commonConfig.attributes,
300
- texCoordA: [[1/3, 2/3], [2/3, 2/3], [1/3, 1/3], [2/3, 1/3]],
301
- texCoordB: [[0, 1], [1, 1], [0, 0], [1, 0]],
302
- },
303
- });
300
+ texCoordA: [[1 / 3, 2 / 3], [2 / 3, 2 / 3], [1 / 3, 1 / 3], [2 / 3, 1 / 3]],
301
+ texCoordB: [[0, 1], [1, 1], [0, 0], [1, 0]]
302
+ }
303
+ })
304
304
  }
305
305
 
306
306
  /**
307
307
  * The resulting Regl DrawCommand is used to combine soft and ambient shading,
308
308
  * use the baselayer tile and apply the hillshading.
309
309
  */
310
- export function createHsAdvFinalBaselayer(
310
+ export function createHsAdvFinalBaselayer (
311
311
  regl,
312
- commonConfig,
312
+ commonConfig
313
313
  ) {
314
314
  return regl({
315
315
  ...commonConfig,
@@ -317,16 +317,16 @@ export function createHsAdvFinalBaselayer(
317
317
  frag: fragHsAdvFinalBaselayer,
318
318
  uniforms: {
319
319
  ...commonConfig.uniforms,
320
- tBase: regl.prop("tBase"),
321
- tSoftShadow: regl.prop("tSoftShadow"),
322
- tAmbient: regl.prop("tAmbient"),
323
- finalSoftMultiplier: regl.prop("finalSoftMultiplier"),
324
- finalAmbientMultiplier: regl.prop("finalAmbientMultiplier"),
320
+ tBase: regl.prop('tBase'),
321
+ tSoftShadow: regl.prop('tSoftShadow'),
322
+ tAmbient: regl.prop('tAmbient'),
323
+ finalSoftMultiplier: regl.prop('finalSoftMultiplier'),
324
+ finalAmbientMultiplier: regl.prop('finalAmbientMultiplier')
325
325
  },
326
326
  attributes: {
327
327
  ...commonConfig.attributes,
328
- texCoordA: regl.prop("baseTexCoords"),
329
- texCoordB: [[0, 1], [1, 1], [0, 0], [1, 0]],
330
- },
331
- });
328
+ texCoordA: regl.prop('baseTexCoords'),
329
+ texCoordB: [[0, 1], [1, 1], [0, 0], [1, 0]]
330
+ }
331
+ })
332
332
  }
@@ -1,6 +1,6 @@
1
- export * from './default';
2
- export * from './hillshading';
3
- export * from './transitions';
4
- export * from './contours';
5
- export * from './multiLayers';
6
- export * from './util';
1
+ export * from './default'
2
+ export * from './hillshading'
3
+ export * from './transitions'
4
+ export * from './contours'
5
+ export * from './multiLayers'
6
+ export * from './util'