-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathindex.d.ts
More file actions
44 lines (37 loc) · 1.34 KB
/
index.d.ts
File metadata and controls
44 lines (37 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
* Copyright © 2017-2019 HERE Europe B.V.
* Licensed under Apache 2.0, see full license in LICENSE
* SPDX-License-Identifier: Apache-2.0
*/
import {
TileKey,
TilingScheme
} from '@here/geoutils'
import { DecodedTile } from '@here/datasource-protocol'
import { Tile } from '@here/mapview'
import { Material } from 'three'
import { PNG_TILE_DECODER_ID } from './png/tile-decoder'
import { QUANTIZED_MESH_TILE_DECODER_ID } from './quantized-mesh/tile-decoder'
export type TileDecodeId = PNG_TILE_DECODER_ID | QUANTIZED_MESH_TILE_DECODER_ID;
export type DEMEncodingType = 'float32' | 'terrarium';
export interface PNGDecoderOptions {
widthSegments?: number;
heightSegments?: number;
demEncoding?: DEMEncodingType;
}
export interface QuantizedMeshDecoderOptions {}
export interface TerrainDataSourceOptions {
concurrentDecoderServiceName: TileDecodeId;
concurrentDecoderScriptUrl: string;
tilingScheme: TilingScheme;
fetchTile: (tileKey: TileKey) => Promise<ArrayBuffer>;
getTileMaterial?: (mapTile: Tile, decodedTile: DecodedTile) => Material;
decoderOptions?: PNGDecoderOptions | QuantizedMeshDecoderOptions;
getCustomObjects?: (terrainTile: TerrainTile) => Promise | void;
}
export class TerrainDataSource {
constructor(options: TerrainDataSourceOptions);
connect(): Promise<void>;
ready(): boolean;
shouldPreloadTiles(): boolean;
}