autumnplot-gl 3.2.0 → 4.0.0-beta
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.
- package/lib/AutumnTypes.d.ts +53 -5
- package/lib/AutumnTypes.js +25 -1
- package/lib/Barbs.d.ts +6 -5
- package/lib/BillboardCollection.d.ts +8 -7
- package/lib/BillboardCollection.js +69 -58
- package/lib/Color.d.ts +1 -0
- package/lib/Color.js +3 -0
- package/lib/ColorBar.d.ts +10 -0
- package/lib/ColorBar.js +4 -2
- package/lib/Colormap.js +8 -8
- package/lib/Contour.d.ts +18 -8
- package/lib/Contour.js +17 -54
- package/lib/ContourCreator.d.ts +4 -0
- package/lib/ContourCreator.js +2 -1
- package/lib/Fill.d.ts +26 -14
- package/lib/Fill.js +97 -50
- package/lib/Grid.d.ts +124 -29
- package/lib/Grid.js +297 -94
- package/lib/Hodographs.d.ts +9 -8
- package/lib/Hodographs.js +14 -11
- package/lib/Map.js +1 -1
- package/lib/Paintball.d.ts +6 -5
- package/lib/Paintball.js +35 -30
- package/lib/ParticleTracer.d.ts +19 -0
- package/lib/ParticleTracer.js +37 -0
- package/lib/PlotComponent.d.ts +6 -7
- package/lib/PlotComponent.js +8 -3
- package/lib/PlotLayer.d.ts +3 -3
- package/lib/PlotLayer.worker.d.ts +1 -2
- package/lib/PlotLayer.worker.js +15 -50
- package/lib/PolylineCollection.d.ts +5 -3
- package/lib/PolylineCollection.js +60 -37
- package/lib/RawField.d.ts +76 -23
- package/lib/RawField.js +138 -29
- package/lib/ShaderManager.d.ts +12 -0
- package/lib/ShaderManager.js +58 -0
- package/lib/StationPlot.d.ts +136 -25
- package/lib/StationPlot.js +192 -60
- package/lib/TextCollection.d.ts +9 -6
- package/lib/TextCollection.js +94 -62
- package/lib/cpp/marchingsquares.js +483 -585
- package/lib/cpp/marchingsquares.wasm +0 -0
- package/lib/cpp/marchingsquares_embind.d.ts +23 -3
- package/lib/index.d.ts +4 -3
- package/lib/index.js +4 -3
- package/lib/utils.d.ts +4 -1
- package/lib/utils.js +12 -1
- package/package.json +2 -2
|
Binary file
|
|
@@ -1,6 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
// TypeScript bindings for emscripten-generated code. Automatically generated at compile time.
|
|
2
|
+
declare namespace RuntimeExports {
|
|
3
|
+
let HEAPF32: any;
|
|
4
|
+
let HEAPF64: any;
|
|
5
|
+
let HEAP_DATA_VIEW: any;
|
|
6
|
+
let HEAP8: any;
|
|
7
|
+
let HEAPU8: any;
|
|
8
|
+
let HEAP16: any;
|
|
9
|
+
let HEAPU16: any;
|
|
10
|
+
let HEAP32: any;
|
|
11
|
+
let HEAPU32: any;
|
|
12
|
+
let HEAP64: any;
|
|
13
|
+
let HEAPU64: any;
|
|
14
|
+
}
|
|
15
|
+
interface WasmModule {
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface EmbindModule {
|
|
19
|
+
makeContoursFloat32(_0: any, _1: any, _2: any, _3: any, _4: any, _5: any): any;
|
|
20
|
+
makeContoursFloat16(_0: any, _1: any, _2: any, _3: any, _4: any, _5: any): any;
|
|
4
21
|
getContourLevelsFloat32(_0: any, _1: number, _2: number, _3: number): any;
|
|
5
22
|
getContourLevelsFloat16(_0: any, _1: number, _2: number, _3: number): any;
|
|
6
23
|
}
|
|
24
|
+
|
|
25
|
+
export type MainModule = WasmModule & typeof RuntimeExports & EmbindModule;
|
|
26
|
+
export default function MainModuleFactory (options?: unknown): Promise<MainModule>;
|
package/lib/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { ContourFill, Raster, ContourFillOptions, RasterOptions } from "./Fill";
|
|
|
4
4
|
import Barbs, { BarbsOptions } from "./Barbs";
|
|
5
5
|
import Paintball, { PaintballOptions } from "./Paintball";
|
|
6
6
|
import Hodographs, { HodographOptions } from './Hodographs';
|
|
7
|
+
import StationPlot, { StationPlotOptions, SPPosition, SPNumberConfig, SPStringConfig, SPBarbConfig, SPSymbolConfig, SPConfig, SPDataConfig, SPSymbol } from "./StationPlot";
|
|
7
8
|
import { PlotLayer, MultiPlotLayer } from './PlotLayer';
|
|
8
9
|
import { WindProfile, WebGLAnyRenderingContext, TypedArray, ContourData } from "./AutumnTypes";
|
|
9
10
|
import { MapLikeType } from "./Map";
|
|
@@ -11,8 +12,8 @@ import { ColorMap, ColorMapOptions } from './Colormap';
|
|
|
11
12
|
import { Color } from "./Color";
|
|
12
13
|
import { makeColorBar, makePaintballKey, ColorbarOrientation, ColorbarTickDirection, ColorBarOptions, PaintballKeyOptions } from "./ColorBar";
|
|
13
14
|
import { LineStyle } from "./PolylineCollection";
|
|
14
|
-
import { RawScalarField, RawVectorField, RawProfileField, VectorRelativeTo, RawVectorFieldOptions } from "./RawField";
|
|
15
|
-
import { Grid, GridType, PlateCarreeGrid, PlateCarreeRotatedGrid, LambertGrid } from './Grid';
|
|
15
|
+
import { RawScalarField, RawVectorField, RawProfileField, VectorRelativeTo, RawVectorFieldOptions, RawObsField, ObsRawData } from "./RawField";
|
|
16
|
+
import { Grid, GridType, StructuredGrid, PlateCarreeGrid, PlateCarreeRotatedGrid, LambertGrid, UnstructuredGrid } from './Grid';
|
|
16
17
|
import { FieldContourOpts } from './ContourCreator';
|
|
17
18
|
declare const colormaps: {
|
|
18
19
|
bluered: (level_min: number, level_max: number, n_colors: number) => ColorMap;
|
|
@@ -29,4 +30,4 @@ declare const colormaps: {
|
|
|
29
30
|
* first, you can prevent races when you contour a bunch of fields at once.
|
|
30
31
|
*/
|
|
31
32
|
declare function initAutumnPlot(): void;
|
|
32
|
-
export { PlotComponent, Barbs, BarbsOptions, Contour, ContourOptions, ContourLabels, ContourLabelOptions, ContourFill, Raster, ContourFillOptions, RasterOptions, Paintball, PaintballOptions, Hodographs, HodographOptions, WindProfile, PlotLayer, MultiPlotLayer, MapLikeType, LineStyle, ColorMap, ColorMapOptions, colormaps, makeColorBar, makePaintballKey, Color, ColorbarOrientation, ColorbarTickDirection, ColorBarOptions, PaintballKeyOptions, RawScalarField, RawVectorField, RawProfileField, Grid, GridType, VectorRelativeTo, RawVectorFieldOptions, PlateCarreeGrid, PlateCarreeRotatedGrid, LambertGrid, WebGLAnyRenderingContext, TypedArray, ContourData, initAutumnPlot, FieldContourOpts };
|
|
33
|
+
export { PlotComponent, Barbs, BarbsOptions, Contour, ContourOptions, ContourLabels, ContourLabelOptions, ContourFill, Raster, ContourFillOptions, RasterOptions, Paintball, PaintballOptions, Hodographs, HodographOptions, WindProfile, StationPlot, StationPlotOptions, SPPosition, SPNumberConfig, SPStringConfig, SPBarbConfig, SPSymbolConfig, SPConfig, SPDataConfig, SPSymbol, PlotLayer, MultiPlotLayer, MapLikeType, LineStyle, ColorMap, ColorMapOptions, colormaps, makeColorBar, makePaintballKey, Color, ColorbarOrientation, ColorbarTickDirection, ColorBarOptions, PaintballKeyOptions, RawScalarField, RawVectorField, RawProfileField, RawObsField, ObsRawData, Grid, GridType, StructuredGrid, VectorRelativeTo, RawVectorFieldOptions, PlateCarreeGrid, PlateCarreeRotatedGrid, LambertGrid, UnstructuredGrid, WebGLAnyRenderingContext, TypedArray, ContourData, initAutumnPlot, FieldContourOpts };
|
package/lib/index.js
CHANGED
|
@@ -4,12 +4,13 @@ import { ContourFill, Raster } from "./Fill";
|
|
|
4
4
|
import Barbs from "./Barbs";
|
|
5
5
|
import Paintball from "./Paintball";
|
|
6
6
|
import Hodographs from './Hodographs';
|
|
7
|
+
import StationPlot from "./StationPlot";
|
|
7
8
|
import { PlotLayer, MultiPlotLayer } from './PlotLayer';
|
|
8
9
|
import { ColorMap, bluered, redblue, pw_speed500mb, pw_speed850mb, pw_cape, pw_t2m, pw_td2m, nws_storm_clear_refl } from './Colormap';
|
|
9
10
|
import { Color } from "./Color";
|
|
10
11
|
import { makeColorBar, makePaintballKey } from "./ColorBar";
|
|
11
|
-
import { RawScalarField, RawVectorField, RawProfileField } from "./RawField";
|
|
12
|
-
import { Grid, PlateCarreeGrid, PlateCarreeRotatedGrid, LambertGrid } from './Grid';
|
|
12
|
+
import { RawScalarField, RawVectorField, RawProfileField, RawObsField } from "./RawField";
|
|
13
|
+
import { Grid, StructuredGrid, PlateCarreeGrid, PlateCarreeRotatedGrid, LambertGrid, UnstructuredGrid } from './Grid';
|
|
13
14
|
import { initMSModule } from './ContourCreator';
|
|
14
15
|
const colormaps = {
|
|
15
16
|
bluered: bluered,
|
|
@@ -28,4 +29,4 @@ const colormaps = {
|
|
|
28
29
|
function initAutumnPlot() {
|
|
29
30
|
initMSModule();
|
|
30
31
|
}
|
|
31
|
-
export { PlotComponent, Barbs, Contour, ContourLabels, ContourFill, Raster, Paintball, Hodographs, PlotLayer, MultiPlotLayer, ColorMap, colormaps, makeColorBar, makePaintballKey, Color, RawScalarField, RawVectorField, RawProfileField, Grid, PlateCarreeGrid, PlateCarreeRotatedGrid, LambertGrid, initAutumnPlot };
|
|
32
|
+
export { PlotComponent, Barbs, Contour, ContourLabels, ContourFill, Raster, Paintball, Hodographs, StationPlot, PlotLayer, MultiPlotLayer, ColorMap, colormaps, makeColorBar, makePaintballKey, Color, RawScalarField, RawVectorField, RawProfileField, RawObsField, Grid, StructuredGrid, PlateCarreeGrid, PlateCarreeRotatedGrid, LambertGrid, UnstructuredGrid, initAutumnPlot };
|
package/lib/utils.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TypedArray } from "./AutumnTypes";
|
|
1
2
|
declare function getMinZoom(jlat: number, ilon: number, thin_fac_base: number): number;
|
|
2
3
|
declare function zip(...args: any[]): Generator<any[], void, unknown>;
|
|
3
4
|
declare function getOS(): string | null;
|
|
@@ -9,4 +10,6 @@ declare class Cache<A extends unknown[], R> {
|
|
|
9
10
|
getValue(...args: A): R;
|
|
10
11
|
}
|
|
11
12
|
declare function normalizeOptions<Type extends Record<string, any>>(opts: Type | undefined, defaults: Required<Type>): Required<Type>;
|
|
12
|
-
|
|
13
|
+
declare function getArrayConstructor<ArrayType extends TypedArray>(ary: ArrayType): new (...args: any[]) => ArrayType;
|
|
14
|
+
declare function mergeShaderCode(snippet: string, main: string): string;
|
|
15
|
+
export { zip, getMinZoom, getOS, Cache, normalizeOptions, getArrayConstructor, mergeShaderCode };
|
package/lib/utils.js
CHANGED
|
@@ -61,4 +61,15 @@ function normalizeOptions(opts, defaults) {
|
|
|
61
61
|
}
|
|
62
62
|
return ret;
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
function getArrayConstructor(ary) {
|
|
65
|
+
return ary.constructor;
|
|
66
|
+
}
|
|
67
|
+
function mergeShaderCode(snippet, main) {
|
|
68
|
+
const ES3_SHADER_MAGIC = '#version 300 es\n';
|
|
69
|
+
const is_es3_shader = main.startsWith(ES3_SHADER_MAGIC);
|
|
70
|
+
if (is_es3_shader) {
|
|
71
|
+
return ES3_SHADER_MAGIC + snippet + "\n" + main.slice(ES3_SHADER_MAGIC.length);
|
|
72
|
+
}
|
|
73
|
+
return snippet + "\n" + main;
|
|
74
|
+
}
|
|
75
|
+
export { zip, getMinZoom, getOS, Cache, normalizeOptions, getArrayConstructor, mergeShaderCode };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autumnplot-gl",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-beta",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@petamoriken/float16": "^3.8.4",
|
|
37
|
-
"autumn-wgl": "^1.
|
|
37
|
+
"autumn-wgl": "^1.5.3",
|
|
38
38
|
"comlink": "^4.3.1",
|
|
39
39
|
"kd-tree-javascript": "^1.0.3",
|
|
40
40
|
"pbf": "^3.2.1",
|