@navaramap/engine-api 0.0.6 → 0.0.7
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/navara_wasm_api.d.ts +63 -13
- package/navara_wasm_api.js +147 -0
- package/navara_wasm_api_bg.wasm +0 -0
- package/package.json +1 -1
package/navara_wasm_api.d.ts
CHANGED
|
@@ -459,6 +459,10 @@ export class ConstructedPolygonOutlineGeometry {
|
|
|
459
459
|
batch_index(): Float32Array | undefined;
|
|
460
460
|
batch_index_size(): number | undefined;
|
|
461
461
|
position(): Float32Array;
|
|
462
|
+
position_3d_high(): Float32Array | undefined;
|
|
463
|
+
position_3d_high_size(): number | undefined;
|
|
464
|
+
position_3d_low(): Float32Array | undefined;
|
|
465
|
+
position_3d_low_size(): number | undefined;
|
|
462
466
|
position_size(): number;
|
|
463
467
|
scale_normal_and_cap(): Float32Array;
|
|
464
468
|
scale_normal_and_cap_size(): number;
|
|
@@ -542,6 +546,13 @@ export class EllipsoidGeodesic {
|
|
|
542
546
|
interpolateDistance(distance: number): LLE;
|
|
543
547
|
interpolateGeodeticPoints(granularity?: number | null): LLE[];
|
|
544
548
|
constructor(start: LLE, end: LLE);
|
|
549
|
+
/**
|
|
550
|
+
* Whether Vincenty's inverse iteration converged. `false` for
|
|
551
|
+
* near-antipodal endpoints, where `distance` is only a rough estimate
|
|
552
|
+
* and interpolation snaps to the endpoints instead of following the
|
|
553
|
+
* (unreliable) capped solution.
|
|
554
|
+
*/
|
|
555
|
+
converged: boolean;
|
|
545
556
|
distance: number;
|
|
546
557
|
end_heading: number;
|
|
547
558
|
end: LLE;
|
|
@@ -2020,10 +2031,39 @@ export function parseCssUnicodeRange(value: string): any;
|
|
|
2020
2031
|
|
|
2021
2032
|
export function parseFontFamilyFromCss(family: string, css_text: string, options: any): any;
|
|
2022
2033
|
|
|
2034
|
+
/**
|
|
2035
|
+
* Heights of a quantized-mesh tile at each `[lng, lat]` pair (radians),
|
|
2036
|
+
* interpolated across the decoded mesh's own triangles. Returns `undefined`
|
|
2037
|
+
* when the bytes don't decode as quantized-mesh. Positions are expected to
|
|
2038
|
+
* lie inside tile (x, y, z); ones outside read the nearest mesh vertex.
|
|
2039
|
+
*/
|
|
2040
|
+
export function sampleQuantizedMeshHeights(bytes: Uint8Array, geographic: boolean, x: number, y: number, z: number, positions: Float64Array): Float64Array | undefined;
|
|
2041
|
+
|
|
2042
|
+
/**
|
|
2043
|
+
* Heights of a raster-DEM tile (WebMercator, square RGBA image) at each
|
|
2044
|
+
* `[lng, lat]` pair (radians), bilinear over the decoded grid. `decoder` is
|
|
2045
|
+
* a plain `ElevationDecoder`-shaped object. Returns `undefined` when the
|
|
2046
|
+
* decoder doesn't deserialize or the image is empty.
|
|
2047
|
+
*/
|
|
2048
|
+
export function sampleRasterDemHeights(rgba: Uint8Array, decoder: any, x: number, y: number, z: number, positions: Float64Array): Float64Array | undefined;
|
|
2049
|
+
|
|
2023
2050
|
export function screenToWorld(window: Window, transform: Transform, frustum: CameraFrustum, screen_pos: Vec2): Vec3 | undefined;
|
|
2024
2051
|
|
|
2025
2052
|
export function start(): void;
|
|
2026
2053
|
|
|
2054
|
+
/**
|
|
2055
|
+
* Tile (x, y) containing each `[lng, lat]` pair at `level`, flattened as
|
|
2056
|
+
* `[x0, y0, x1, y1, ...]`. Internal XYZ-style y (north-origin) — the TMS
|
|
2057
|
+
* flip happens in URL building, not here.
|
|
2058
|
+
*/
|
|
2059
|
+
export function terrainPositionsToTiles(geographic: boolean, level: number, positions: Float64Array): Uint32Array;
|
|
2060
|
+
|
|
2061
|
+
/**
|
|
2062
|
+
* Tile URL from the engine's own template expansion, including the TMS
|
|
2063
|
+
* y-flip — sampling must fetch exactly the URLs rendering would.
|
|
2064
|
+
*/
|
|
2065
|
+
export function terrainTileUrl(template: string, geographic: boolean, tms: boolean, x: number, y: number, z: number): string;
|
|
2066
|
+
|
|
2027
2067
|
export function worldToScreen(window: Window, transform: Transform, frustum: CameraFrustum, world_pos: Vec3): Vec2 | undefined;
|
|
2028
2068
|
|
|
2029
2069
|
export function xyzToGeodetic(vec3: Vec3): LLE;
|
|
@@ -2053,8 +2093,12 @@ export interface InitOutput {
|
|
|
2053
2093
|
readonly northWestUpToFixedFrame: (a: number) => [number, number];
|
|
2054
2094
|
readonly parseCssUnicodeRange: (a: number, b: number) => [number, number, number];
|
|
2055
2095
|
readonly parseFontFamilyFromCss: (a: number, b: number, c: number, d: number, e: any) => [number, number, number];
|
|
2096
|
+
readonly sampleQuantizedMeshHeights: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
2097
|
+
readonly sampleRasterDemHeights: (a: number, b: number, c: any, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
2056
2098
|
readonly screenToWorld: (a: number, b: number, c: number, d: number) => number;
|
|
2057
2099
|
readonly start: () => void;
|
|
2100
|
+
readonly terrainPositionsToTiles: (a: number, b: number, c: number, d: number) => [number, number];
|
|
2101
|
+
readonly terrainTileUrl: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
2058
2102
|
readonly worldToScreen: (a: number, b: number, c: number, d: number) => number;
|
|
2059
2103
|
readonly xyzToGeodetic: (a: number) => number;
|
|
2060
2104
|
readonly __wbg_aabb_free: (a: number, b: number) => void;
|
|
@@ -2124,11 +2168,10 @@ export interface InitOutput {
|
|
|
2124
2168
|
readonly __wbg_get_elevationdecoder_max_offset: (a: number) => number;
|
|
2125
2169
|
readonly __wbg_get_elevationdecoder_min_offset: (a: number) => number;
|
|
2126
2170
|
readonly __wbg_get_elevationheatmapmaterial_logarithmic: (a: number) => number;
|
|
2127
|
-
readonly
|
|
2171
|
+
readonly __wbg_get_ellipsoidgeodesic_converged: (a: number) => number;
|
|
2128
2172
|
readonly __wbg_get_ellipsoidgeodesic_end: (a: number) => number;
|
|
2129
2173
|
readonly __wbg_get_ellipsoidgeodesic_end_heading: (a: number) => number;
|
|
2130
2174
|
readonly __wbg_get_ellipsoidgeodesic_start: (a: number) => number;
|
|
2131
|
-
readonly __wbg_get_ellipsoidgeodesic_start_heading: (a: number) => number;
|
|
2132
2175
|
readonly __wbg_get_extentradianf32_east: (a: number) => number;
|
|
2133
2176
|
readonly __wbg_get_extentradianf32_north: (a: number) => number;
|
|
2134
2177
|
readonly __wbg_get_extentradianf32_south: (a: number) => number;
|
|
@@ -2146,7 +2189,6 @@ export interface InitOutput {
|
|
|
2146
2189
|
readonly __wbg_get_hillshadematerial_exaggeration: (a: number) => number;
|
|
2147
2190
|
readonly __wbg_get_modelinternalmaterial_dracoCompressed: (a: number) => number;
|
|
2148
2191
|
readonly __wbg_get_modelinternalmaterial_pointCloud: (a: number) => number;
|
|
2149
|
-
readonly __wbg_get_modelinternalmaterial_pointCloudGeodeticNormal: (a: number) => number;
|
|
2150
2192
|
readonly __wbg_get_modelmaterial___internal__: (a: number) => number;
|
|
2151
2193
|
readonly __wbg_get_modelmaterial_animationActiveClip: (a: number) => [number, number];
|
|
2152
2194
|
readonly __wbg_get_modelmaterial_animationSpeed: (a: number) => number;
|
|
@@ -2234,7 +2276,6 @@ export interface InitOutput {
|
|
|
2234
2276
|
readonly __wbg_get_rastermaterial_showBoundingBox: (a: number) => number;
|
|
2235
2277
|
readonly __wbg_get_rastertileinternalmaterial_castShadow: (a: number) => number;
|
|
2236
2278
|
readonly __wbg_get_rastertileinternalmaterial_colors: (a: number) => [number, number];
|
|
2237
|
-
readonly __wbg_get_rastertileinternalmaterial_elevationEpsilon: (a: number) => number;
|
|
2238
2279
|
readonly __wbg_get_rastertileinternalmaterial_elevationOffset: (a: number) => number;
|
|
2239
2280
|
readonly __wbg_get_rastertileinternalmaterial_hillshadeBScaler: (a: number) => number;
|
|
2240
2281
|
readonly __wbg_get_rastertileinternalmaterial_hillshadeBoundary: (a: number) => number;
|
|
@@ -2354,11 +2395,8 @@ export interface InitOutput {
|
|
|
2354
2395
|
readonly __wbg_set_elevationdecoder_max_offset: (a: number, b: number) => void;
|
|
2355
2396
|
readonly __wbg_set_elevationdecoder_min_offset: (a: number, b: number) => void;
|
|
2356
2397
|
readonly __wbg_set_elevationheatmapmaterial_logarithmic: (a: number, b: number) => void;
|
|
2357
|
-
readonly
|
|
2358
|
-
readonly __wbg_set_ellipsoidgeodesic_end: (a: number, b: number) => void;
|
|
2398
|
+
readonly __wbg_set_ellipsoidgeodesic_converged: (a: number, b: number) => void;
|
|
2359
2399
|
readonly __wbg_set_ellipsoidgeodesic_end_heading: (a: number, b: number) => void;
|
|
2360
|
-
readonly __wbg_set_ellipsoidgeodesic_start: (a: number, b: number) => void;
|
|
2361
|
-
readonly __wbg_set_ellipsoidgeodesic_start_heading: (a: number, b: number) => void;
|
|
2362
2400
|
readonly __wbg_set_extentradianf32_east: (a: number, b: number) => void;
|
|
2363
2401
|
readonly __wbg_set_extentradianf32_north: (a: number, b: number) => void;
|
|
2364
2402
|
readonly __wbg_set_extentradianf32_south: (a: number, b: number) => void;
|
|
@@ -2463,7 +2501,6 @@ export interface InitOutput {
|
|
|
2463
2501
|
readonly __wbg_set_rastermaterial_showBoundingBox: (a: number, b: number) => void;
|
|
2464
2502
|
readonly __wbg_set_rastertileinternalmaterial_castShadow: (a: number, b: number) => void;
|
|
2465
2503
|
readonly __wbg_set_rastertileinternalmaterial_colors: (a: number, b: number, c: number) => void;
|
|
2466
|
-
readonly __wbg_set_rastertileinternalmaterial_elevationEpsilon: (a: number, b: number) => void;
|
|
2467
2504
|
readonly __wbg_set_rastertileinternalmaterial_elevationOffset: (a: number, b: number) => void;
|
|
2468
2505
|
readonly __wbg_set_rastertileinternalmaterial_hillshadeBScaler: (a: number, b: number) => void;
|
|
2469
2506
|
readonly __wbg_set_rastertileinternalmaterial_hillshadeBoundary: (a: number, b: number) => void;
|
|
@@ -2557,6 +2594,10 @@ export interface InitOutput {
|
|
|
2557
2594
|
readonly constructedpolygonoutlinegeometry_batch_index: (a: number) => any;
|
|
2558
2595
|
readonly constructedpolygonoutlinegeometry_batch_index_size: (a: number) => number;
|
|
2559
2596
|
readonly constructedpolygonoutlinegeometry_position: (a: number) => any;
|
|
2597
|
+
readonly constructedpolygonoutlinegeometry_position_3d_high: (a: number) => any;
|
|
2598
|
+
readonly constructedpolygonoutlinegeometry_position_3d_high_size: (a: number) => number;
|
|
2599
|
+
readonly constructedpolygonoutlinegeometry_position_3d_low: (a: number) => any;
|
|
2600
|
+
readonly constructedpolygonoutlinegeometry_position_3d_low_size: (a: number) => number;
|
|
2560
2601
|
readonly constructedpolygonoutlinegeometry_position_size: (a: number) => number;
|
|
2561
2602
|
readonly constructedpolygonoutlinegeometry_scale_normal_and_cap: (a: number) => any;
|
|
2562
2603
|
readonly constructedpolygonoutlinegeometry_scale_normal_and_cap_size: (a: number) => number;
|
|
@@ -2801,6 +2842,9 @@ export interface InitOutput {
|
|
|
2801
2842
|
readonly __wbg_get_textmaterial_outlineColor: (a: number) => number;
|
|
2802
2843
|
readonly __wbg_get_textmaterial_color: (a: number) => number;
|
|
2803
2844
|
readonly __wbg_get_pointmaterial_color: (a: number) => number;
|
|
2845
|
+
readonly __wbg_get_rastertileinternalmaterial_elevationMinOffset: (a: number) => number;
|
|
2846
|
+
readonly __wbg_get_rastertileinternalmaterial_elevationEpsilon: (a: number) => number;
|
|
2847
|
+
readonly __wbg_get_rastertileinternalmaterial_elevationMaxOffset: (a: number) => number;
|
|
2804
2848
|
readonly __wbg_get_tilexyz_x: (a: number) => number;
|
|
2805
2849
|
readonly __wbg_get_vec2_y: (a: number) => number;
|
|
2806
2850
|
readonly __wbg_get_vec3_z: (a: number) => number;
|
|
@@ -2835,8 +2879,8 @@ export interface InitOutput {
|
|
|
2835
2879
|
readonly __wbg_get_rastertileinternalmaterial_elevationBoundary: (a: number) => number;
|
|
2836
2880
|
readonly __wbg_get_rastertileinternalmaterial_elevationBScaler: (a: number) => number;
|
|
2837
2881
|
readonly __wbg_get_elevationdecoder_g_scaler: (a: number) => number;
|
|
2838
|
-
readonly
|
|
2839
|
-
readonly
|
|
2882
|
+
readonly __wbg_get_ellipsoidgeodesic_start_heading: (a: number) => number;
|
|
2883
|
+
readonly __wbg_get_ellipsoidgeodesic_distance: (a: number) => number;
|
|
2840
2884
|
readonly __wbg_get_elevationdecoder_b_scaler: (a: number) => number;
|
|
2841
2885
|
readonly __wbg_get_returnedconstructedterrainmesh_min_height: (a: number) => number;
|
|
2842
2886
|
readonly __wbg_get_returnedconstructedterrainmesh_max_height: (a: number) => number;
|
|
@@ -2850,6 +2894,9 @@ export interface InitOutput {
|
|
|
2850
2894
|
readonly __wbg_set_pointmaterial_center: (a: number, b: number) => void;
|
|
2851
2895
|
readonly __wbg_set_terrainmaterial_skirtExaggeration: (a: number, b: number) => void;
|
|
2852
2896
|
readonly __wbg_set_polylineinternalmaterial_minMaxHeights: (a: number, b: number, c: number) => void;
|
|
2897
|
+
readonly __wbg_set_rastertileinternalmaterial_elevationMinOffset: (a: number, b: number) => void;
|
|
2898
|
+
readonly __wbg_set_rastertileinternalmaterial_elevationEpsilon: (a: number, b: number) => void;
|
|
2899
|
+
readonly __wbg_set_rastertileinternalmaterial_elevationMaxOffset: (a: number, b: number) => void;
|
|
2853
2900
|
readonly __wbg_set_ray_origin: (a: number, b: number) => void;
|
|
2854
2901
|
readonly __wbg_set_ray_direction: (a: number, b: number) => void;
|
|
2855
2902
|
readonly __wbg_set_modelinternalmaterial_pointCloudGeodeticNormal: (a: number, b: number) => void;
|
|
@@ -2891,8 +2938,8 @@ export interface InitOutput {
|
|
|
2891
2938
|
readonly __wbg_set_rastertileinternalmaterial_elevationBoundary: (a: number, b: number) => void;
|
|
2892
2939
|
readonly __wbg_set_rastertileinternalmaterial_elevationBScaler: (a: number, b: number) => void;
|
|
2893
2940
|
readonly __wbg_set_elevationdecoder_g_scaler: (a: number, b: number) => void;
|
|
2894
|
-
readonly
|
|
2895
|
-
readonly
|
|
2941
|
+
readonly __wbg_set_ellipsoidgeodesic_start_heading: (a: number, b: number) => void;
|
|
2942
|
+
readonly __wbg_set_ellipsoidgeodesic_distance: (a: number, b: number) => void;
|
|
2896
2943
|
readonly __wbg_set_elevationdecoder_b_scaler: (a: number, b: number) => void;
|
|
2897
2944
|
readonly __wbg_set_returnedconstructedterrainmesh_min_height: (a: number, b: number) => void;
|
|
2898
2945
|
readonly __wbg_set_returnedconstructedterrainmesh_max_height: (a: number, b: number) => void;
|
|
@@ -2931,6 +2978,7 @@ export interface InitOutput {
|
|
|
2931
2978
|
readonly __wbg_get_pointmaterial_center: (a: number) => number;
|
|
2932
2979
|
readonly __wbg_get_modelmaterial_waterScaleNormal: (a: number) => number;
|
|
2933
2980
|
readonly __wbg_get_polylineinternalmaterial_minMaxHeights: (a: number) => [number, number];
|
|
2981
|
+
readonly __wbg_get_modelinternalmaterial_pointCloudGeodeticNormal: (a: number) => number;
|
|
2934
2982
|
readonly __wbg_get_ray_origin: (a: number) => number;
|
|
2935
2983
|
readonly __wbg_get_tilexyz_y: (a: number) => number;
|
|
2936
2984
|
readonly __wbg_get_vec2_x: (a: number) => number;
|
|
@@ -2961,6 +3009,8 @@ export interface InitOutput {
|
|
|
2961
3009
|
readonly __wbg_modelinternalmaterial_free: (a: number, b: number) => void;
|
|
2962
3010
|
readonly __wbg_polylineinternalmaterial_free: (a: number, b: number) => void;
|
|
2963
3011
|
readonly __wbg_vec3_free: (a: number, b: number) => void;
|
|
3012
|
+
readonly __wbg_set_ellipsoidgeodesic_end: (a: number, b: number) => void;
|
|
3013
|
+
readonly __wbg_set_ellipsoidgeodesic_start: (a: number, b: number) => void;
|
|
2964
3014
|
readonly __wbg_compiledfilter_free: (a: number, b: number) => void;
|
|
2965
3015
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
2966
3016
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
package/navara_wasm_api.js
CHANGED
|
@@ -1356,6 +1356,34 @@ export class ConstructedPolygonOutlineGeometry {
|
|
|
1356
1356
|
const ret = wasm.constructedpolygonoutlinegeometry_position(this.__wbg_ptr);
|
|
1357
1357
|
return ret;
|
|
1358
1358
|
}
|
|
1359
|
+
/**
|
|
1360
|
+
* @returns {Float32Array | undefined}
|
|
1361
|
+
*/
|
|
1362
|
+
position_3d_high() {
|
|
1363
|
+
const ret = wasm.constructedpolygonoutlinegeometry_position_3d_high(this.__wbg_ptr);
|
|
1364
|
+
return ret;
|
|
1365
|
+
}
|
|
1366
|
+
/**
|
|
1367
|
+
* @returns {number | undefined}
|
|
1368
|
+
*/
|
|
1369
|
+
position_3d_high_size() {
|
|
1370
|
+
const ret = wasm.constructedpolygonoutlinegeometry_position_3d_high_size(this.__wbg_ptr);
|
|
1371
|
+
return ret === 0xFFFFFF ? undefined : ret;
|
|
1372
|
+
}
|
|
1373
|
+
/**
|
|
1374
|
+
* @returns {Float32Array | undefined}
|
|
1375
|
+
*/
|
|
1376
|
+
position_3d_low() {
|
|
1377
|
+
const ret = wasm.constructedpolygonoutlinegeometry_position_3d_low(this.__wbg_ptr);
|
|
1378
|
+
return ret;
|
|
1379
|
+
}
|
|
1380
|
+
/**
|
|
1381
|
+
* @returns {number | undefined}
|
|
1382
|
+
*/
|
|
1383
|
+
position_3d_low_size() {
|
|
1384
|
+
const ret = wasm.constructedpolygonoutlinegeometry_position_3d_low_size(this.__wbg_ptr);
|
|
1385
|
+
return ret === 0xFFFFFF ? undefined : ret;
|
|
1386
|
+
}
|
|
1359
1387
|
/**
|
|
1360
1388
|
* @returns {number}
|
|
1361
1389
|
*/
|
|
@@ -1885,6 +1913,17 @@ export class EllipsoidGeodesic {
|
|
|
1885
1913
|
EllipsoidGeodesicFinalization.register(this, this.__wbg_ptr, this);
|
|
1886
1914
|
return this;
|
|
1887
1915
|
}
|
|
1916
|
+
/**
|
|
1917
|
+
* Whether Vincenty's inverse iteration converged. `false` for
|
|
1918
|
+
* near-antipodal endpoints, where `distance` is only a rough estimate
|
|
1919
|
+
* and interpolation snaps to the endpoints instead of following the
|
|
1920
|
+
* (unreliable) capped solution.
|
|
1921
|
+
* @returns {boolean}
|
|
1922
|
+
*/
|
|
1923
|
+
get converged() {
|
|
1924
|
+
const ret = wasm.__wbg_get_ellipsoidgeodesic_converged(this.__wbg_ptr);
|
|
1925
|
+
return ret !== 0;
|
|
1926
|
+
}
|
|
1888
1927
|
/**
|
|
1889
1928
|
* @returns {number}
|
|
1890
1929
|
*/
|
|
@@ -1920,6 +1959,16 @@ export class EllipsoidGeodesic {
|
|
|
1920
1959
|
const ret = wasm.__wbg_get_ellipsoidgeodesic_start(this.__wbg_ptr);
|
|
1921
1960
|
return LLE.__wrap(ret);
|
|
1922
1961
|
}
|
|
1962
|
+
/**
|
|
1963
|
+
* Whether Vincenty's inverse iteration converged. `false` for
|
|
1964
|
+
* near-antipodal endpoints, where `distance` is only a rough estimate
|
|
1965
|
+
* and interpolation snaps to the endpoints instead of following the
|
|
1966
|
+
* (unreliable) capped solution.
|
|
1967
|
+
* @param {boolean} arg0
|
|
1968
|
+
*/
|
|
1969
|
+
set converged(arg0) {
|
|
1970
|
+
wasm.__wbg_set_ellipsoidgeodesic_converged(this.__wbg_ptr, arg0);
|
|
1971
|
+
}
|
|
1923
1972
|
/**
|
|
1924
1973
|
* @param {number} arg0
|
|
1925
1974
|
*/
|
|
@@ -7765,6 +7814,60 @@ export function parseFontFamilyFromCss(family, css_text, options) {
|
|
|
7765
7814
|
return takeFromExternrefTable0(ret[0]);
|
|
7766
7815
|
}
|
|
7767
7816
|
|
|
7817
|
+
/**
|
|
7818
|
+
* Heights of a quantized-mesh tile at each `[lng, lat]` pair (radians),
|
|
7819
|
+
* interpolated across the decoded mesh's own triangles. Returns `undefined`
|
|
7820
|
+
* when the bytes don't decode as quantized-mesh. Positions are expected to
|
|
7821
|
+
* lie inside tile (x, y, z); ones outside read the nearest mesh vertex.
|
|
7822
|
+
* @param {Uint8Array} bytes
|
|
7823
|
+
* @param {boolean} geographic
|
|
7824
|
+
* @param {number} x
|
|
7825
|
+
* @param {number} y
|
|
7826
|
+
* @param {number} z
|
|
7827
|
+
* @param {Float64Array} positions
|
|
7828
|
+
* @returns {Float64Array | undefined}
|
|
7829
|
+
*/
|
|
7830
|
+
export function sampleQuantizedMeshHeights(bytes, geographic, x, y, z, positions) {
|
|
7831
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
7832
|
+
const len0 = WASM_VECTOR_LEN;
|
|
7833
|
+
const ptr1 = passArrayF64ToWasm0(positions, wasm.__wbindgen_malloc);
|
|
7834
|
+
const len1 = WASM_VECTOR_LEN;
|
|
7835
|
+
const ret = wasm.sampleQuantizedMeshHeights(ptr0, len0, geographic, x, y, z, ptr1, len1);
|
|
7836
|
+
let v3;
|
|
7837
|
+
if (ret[0] !== 0) {
|
|
7838
|
+
v3 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
7839
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
7840
|
+
}
|
|
7841
|
+
return v3;
|
|
7842
|
+
}
|
|
7843
|
+
|
|
7844
|
+
/**
|
|
7845
|
+
* Heights of a raster-DEM tile (WebMercator, square RGBA image) at each
|
|
7846
|
+
* `[lng, lat]` pair (radians), bilinear over the decoded grid. `decoder` is
|
|
7847
|
+
* a plain `ElevationDecoder`-shaped object. Returns `undefined` when the
|
|
7848
|
+
* decoder doesn't deserialize or the image is empty.
|
|
7849
|
+
* @param {Uint8Array} rgba
|
|
7850
|
+
* @param {any} decoder
|
|
7851
|
+
* @param {number} x
|
|
7852
|
+
* @param {number} y
|
|
7853
|
+
* @param {number} z
|
|
7854
|
+
* @param {Float64Array} positions
|
|
7855
|
+
* @returns {Float64Array | undefined}
|
|
7856
|
+
*/
|
|
7857
|
+
export function sampleRasterDemHeights(rgba, decoder, x, y, z, positions) {
|
|
7858
|
+
const ptr0 = passArray8ToWasm0(rgba, wasm.__wbindgen_malloc);
|
|
7859
|
+
const len0 = WASM_VECTOR_LEN;
|
|
7860
|
+
const ptr1 = passArrayF64ToWasm0(positions, wasm.__wbindgen_malloc);
|
|
7861
|
+
const len1 = WASM_VECTOR_LEN;
|
|
7862
|
+
const ret = wasm.sampleRasterDemHeights(ptr0, len0, decoder, x, y, z, ptr1, len1);
|
|
7863
|
+
let v3;
|
|
7864
|
+
if (ret[0] !== 0) {
|
|
7865
|
+
v3 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
7866
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
7867
|
+
}
|
|
7868
|
+
return v3;
|
|
7869
|
+
}
|
|
7870
|
+
|
|
7768
7871
|
/**
|
|
7769
7872
|
* @param {Window} window
|
|
7770
7873
|
* @param {Transform} transform
|
|
@@ -7789,6 +7892,50 @@ export function start() {
|
|
|
7789
7892
|
wasm.start();
|
|
7790
7893
|
}
|
|
7791
7894
|
|
|
7895
|
+
/**
|
|
7896
|
+
* Tile (x, y) containing each `[lng, lat]` pair at `level`, flattened as
|
|
7897
|
+
* `[x0, y0, x1, y1, ...]`. Internal XYZ-style y (north-origin) — the TMS
|
|
7898
|
+
* flip happens in URL building, not here.
|
|
7899
|
+
* @param {boolean} geographic
|
|
7900
|
+
* @param {number} level
|
|
7901
|
+
* @param {Float64Array} positions
|
|
7902
|
+
* @returns {Uint32Array}
|
|
7903
|
+
*/
|
|
7904
|
+
export function terrainPositionsToTiles(geographic, level, positions) {
|
|
7905
|
+
const ptr0 = passArrayF64ToWasm0(positions, wasm.__wbindgen_malloc);
|
|
7906
|
+
const len0 = WASM_VECTOR_LEN;
|
|
7907
|
+
const ret = wasm.terrainPositionsToTiles(geographic, level, ptr0, len0);
|
|
7908
|
+
var v2 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
|
|
7909
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
7910
|
+
return v2;
|
|
7911
|
+
}
|
|
7912
|
+
|
|
7913
|
+
/**
|
|
7914
|
+
* Tile URL from the engine's own template expansion, including the TMS
|
|
7915
|
+
* y-flip — sampling must fetch exactly the URLs rendering would.
|
|
7916
|
+
* @param {string} template
|
|
7917
|
+
* @param {boolean} geographic
|
|
7918
|
+
* @param {boolean} tms
|
|
7919
|
+
* @param {number} x
|
|
7920
|
+
* @param {number} y
|
|
7921
|
+
* @param {number} z
|
|
7922
|
+
* @returns {string}
|
|
7923
|
+
*/
|
|
7924
|
+
export function terrainTileUrl(template, geographic, tms, x, y, z) {
|
|
7925
|
+
let deferred2_0;
|
|
7926
|
+
let deferred2_1;
|
|
7927
|
+
try {
|
|
7928
|
+
const ptr0 = passStringToWasm0(template, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
7929
|
+
const len0 = WASM_VECTOR_LEN;
|
|
7930
|
+
const ret = wasm.terrainTileUrl(ptr0, len0, geographic, tms, x, y, z);
|
|
7931
|
+
deferred2_0 = ret[0];
|
|
7932
|
+
deferred2_1 = ret[1];
|
|
7933
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
7934
|
+
} finally {
|
|
7935
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
7936
|
+
}
|
|
7937
|
+
}
|
|
7938
|
+
|
|
7792
7939
|
/**
|
|
7793
7940
|
* @param {Window} window
|
|
7794
7941
|
* @param {Transform} transform
|
package/navara_wasm_api_bg.wasm
CHANGED
|
Binary file
|