@tomtom-org/maps-sdk-plugin-landmarks-3d 0.0.4 → 0.0.6

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/dist/index.d.ts CHANGED
@@ -1,343 +1,355 @@
1
- import { AmbientLight } from 'three';
2
- import { Camera } from 'three';
3
- import { CustomLayerInterface } from 'maplibre-gl';
4
- import { CustomRenderMethodInput } from 'maplibre-gl';
5
- import { DirectionalLight } from 'three';
6
- import { Group } from 'three';
7
- import { Map as Map_2 } from 'maplibre-gl';
8
- import { Mesh } from 'three';
9
- import { Scene } from 'three';
10
- import { ShaderMaterial } from 'three';
11
- import { Texture } from 'three';
12
- import { TomTomMap } from '../../map/dist';
13
- import { WebGLRenderer } from 'three';
14
-
15
- /**
16
- * Builds the TomTom Orbis 3D Landmarks tile URL template.
17
- *
18
- * @remarks
19
- * The API serves meshopt-compressed GLB tiles with KTX2/Basis textures and requires
20
- * an API key with Orbis 3D Landmarks entitlements (still in Private Preview).
21
- *
22
- * @group Landmarks 3D
23
- */
24
- export declare const buildLandmarksTileURL: () => string;
25
-
26
- /**
27
- * Alpha mask carried over from a landmark mesh's as-authored texture.
28
- *
29
- * Landmark meshes are coarse hulls (e.g. a wall is one rectangle) whose realistic
30
- * silhouette is carved out by the texture's alpha channel. Untextured shading must keep
31
- * sampling that alpha and discard the carved-away fragments, otherwise the raw hull
32
- * shape gets coloured in.
33
- *
34
- * @group Landmarks 3D
35
- */
36
- declare type FillExtrusionAlphaMask = {
37
- /** Texture whose alpha channel carves the mesh silhouette (the mesh's base colour map). */
38
- map: Texture;
39
- /** Fragments with alpha below this are discarded. */
40
- cutoff: number;
41
- };
42
-
43
- /**
44
- * Material that shades untextured landmark meshes exactly like maplibre-gl shades
45
- * `fill-extrusion` buildings, so they blend in with the basemap building layer.
46
- *
47
- * Colour and opacity premultiply like maplibre's `v_color *= u_opacity`, paired with
48
- * (ONE, ONE_MINUS_SRC_ALPHA) blending. Backfaces are culled like maplibre's extrusion
49
- * rendering, except for alpha-masked meshes whose cutout surfaces must stay visible from
50
- * both sides; pair with {@link FillExtrusionDepthMaterial} as a depth prepass so that
51
- * translucent landmarks blend with the basemap exactly once per pixel.
52
- *
53
- * @group Landmarks 3D
54
- */
55
- declare class FillExtrusionMaterial extends ShaderMaterial {
56
- constructor(alphaMask?: FillExtrusionAlphaMask);
57
- /**
58
- * Copies the shading uniforms (colour, light, layer opacity) from another instance,
59
- * bringing a freshly created alpha-masked variant up to date with the shared material.
60
- */
61
- copyShadingFrom(source: FillExtrusionMaterial): void;
62
- /**
63
- * Sets the building colour from a CSS colour string, stored as raw sRGB
64
- * components — maplibre shades paint colours in sRGB space, not linear.
65
- */
66
- setDiffuseColor(cssColor: string): void;
67
- setLayerOpacity(opacity: number): void;
68
- /**
69
- * Mirrors maplibre's fill-extrusion light uniforms: the style light position is
70
- * rotated by the map bearing for viewport-anchored lights and the light vector is
71
- * deliberately left unnormalised, exactly like maplibre's `u_lightpos`.
72
- *
73
- * @param position - The style light position, in maplibre's y-south axes.
74
- * @param bearingInRadians - Map bearing to rotate by; pass `0` for map-anchored lights.
75
- * @param intensity - The style light intensity.
76
- * @param color - The style light colour.
77
- */
78
- setLight(position: {
79
- x: number;
80
- y: number;
81
- z: number;
82
- }, bearingInRadians: number, intensity: number, color: {
83
- r: number;
84
- g: number;
85
- b: number;
86
- }): void;
87
- }
88
-
89
- /**
90
- * Renders TomTom Orbis 3D Landmarks (high-detail building meshes) on a {@link TomTomMap}.
91
- *
92
- * The plugin streams GLB tiles from the Orbis 3D Landmarks API (Private Preview),
93
- * renders them with Three.js via a MapLibre custom layer, filters overlapping
94
- * extruded basemap buildings out of the style, and keeps everything restored
95
- * across map style changes.
96
- *
97
- * @remarks
98
- * Requires an API key with Orbis 3D Landmarks entitlements and a map style that
99
- * shows extruded 3D buildings for the exclusion filter and `inherited` mode to
100
- * have an effect.
101
- *
102
- * @example
103
- * ```typescript
104
- * import { Landmarks3D } from '@tomtom-org/maps-sdk-plugin-landmarks-3d';
105
- *
106
- * // assume `map` is your initialized TomTomMap instance
107
- * const landmarks = new Landmarks3D(map);
108
- *
109
- * await landmarks.setDisplayMode('inherited');
110
- * ```
111
- *
112
- * @group Landmarks 3D
113
- */
114
- export declare class Landmarks3D {
115
- private readonly map;
116
- private readonly layerID;
117
- private readonly basemapBuildingLayerID;
118
- private readonly modelsLayer;
119
- private readonly layerMinZoom?;
120
- private readonly layerMaxZoom?;
121
- private displayMode;
122
- /**
123
- * Creates the plugin bound to a TomTom map and starts rendering landmarks
124
- * as soon as the map is ready.
125
- *
126
- * @param map - The TomTom map instance to render landmarks on.
127
- * @param options - Optional configuration.
128
- */
129
- constructor(map: TomTomMap, options?: Landmarks3DOptions);
130
- private installWhenReady;
131
- /**
132
- * The underlying MapLibre custom layer, for advanced use beyond this facade.
133
- */
134
- get layer(): ModelsLayer;
135
- /**
136
- * The currently applied display mode.
137
- */
138
- getDisplayMode(): Landmarks3DDisplayMode;
139
- /**
140
- * Changes how landmarks are rendered relative to the base map.
141
- *
142
- * @param mode - The display mode to apply.
143
- * @returns A promise that resolves once the mode has been applied.
144
- */
145
- setDisplayMode(mode: Landmarks3DDisplayMode): Promise<void>;
146
- /**
147
- * Whether the landmarks are currently visible.
148
- */
149
- isVisible(): boolean;
150
- /**
151
- * Shows or hides the landmarks layer.
152
- *
153
- * @param visible - `true` to show landmarks, `false` to hide them.
154
- * @returns A promise that resolves once the visibility has been applied.
155
- */
156
- setVisible(visible: boolean): Promise<void>;
157
- private install;
158
- private landmarkInsertBeforeID;
159
- private alignZoomRangeWithBasemapBuildings;
160
- private excludeLandmarkBuildingsFromBasemap;
161
- private readBasemapBuildingMaterial;
162
- private resolveCurrentMaterialState;
163
- private applyDisplayMode;
164
- }
165
-
166
- /**
167
- * How 3D landmarks are shaded relative to the base map. Every mode renders the
168
- * landmarks as maplibre-style fill-extrusion buildings:
169
- * - `inherited`: mirrors the colour and opacity of the basemap 3D building layer (default).
170
- * - `dark`: uses the 3D building look of the SDK's standard dark style.
171
- * - `light`: uses the 3D building look of the SDK's standard light style.
172
- *
173
- * @group Landmarks 3D
174
- */
175
- export declare type Landmarks3DDisplayMode = 'inherited' | 'dark' | 'light';
176
-
177
- /**
178
- * Configuration for the {@link Landmarks3D} plugin.
179
- *
180
- * @group Landmarks 3D
181
- */
182
- export declare type Landmarks3DOptions = {
183
- /**
184
- * Initial display mode for the landmarks. Can also be changed at runtime with
185
- * {@link Landmarks3D.setDisplayMode}.
186
- * @defaultValue `'inherited'`
187
- */
188
- displayMode?: Landmarks3DDisplayMode;
189
- /**
190
- * Whether the landmarks are initially visible. Can also be changed at runtime with
191
- * {@link Landmarks3D.setVisible}.
192
- * @defaultValue `true`
193
- */
194
- visible?: boolean;
195
- /**
196
- * Minimum zoom at which landmarks are rendered.
197
- * @defaultValue The basemap 3D building layer's minimum zoom, so landmarks appear together
198
- * with it (falls back to `10` when that layer is absent).
199
- */
200
- minZoom?: number;
201
- /**
202
- * Maximum zoom at which landmarks are rendered.
203
- * @defaultValue The basemap 3D building layer's maximum zoom, so landmarks disappear together
204
- * with it (falls back to `22` when that layer is absent).
205
- */
206
- maxZoom?: number;
207
- /**
208
- * Send `credentials: 'include'` with each tile request so a proxy session
209
- * cookie travels with it. By default this tracks the SDK's proxy config, so
210
- * tiles behave like every other SDK request; set it explicitly only to
211
- * override that.
212
- * @defaultValue Auto-detected — `true` when the SDK is configured for a
213
- * credentialed proxy (no `apiKey` + non-default `commonBaseURL`).
214
- */
215
- withCredentials?: boolean;
216
- };
217
-
218
- /**
219
- * MapLibre custom layer that renders tiled glTF/GLB models with Three.js.
220
- *
221
- * The layer owns a {@link ModelsSource} that streams model tiles for the current
222
- * viewport, renders them as maplibre-style fill-extrusion buildings, and keeps its
223
- * lighting in sync with the map style light.
224
- *
225
- * @group Landmarks 3D
226
- */
227
- export declare class ModelsLayer implements CustomLayerInterface {
228
- id: string;
229
- type: "custom";
230
- renderingMode: "3d";
231
- renderer: WebGLRenderer;
232
- scene: Scene;
233
- camera: Camera;
234
- tiles: Group;
235
- directionalLight: DirectionalLight;
236
- ambientLight: AmbientLight;
237
- map: Map_2;
238
- source: ModelsSource;
239
- minzoom: number;
240
- maxzoom: number;
241
- visible: boolean;
242
- diffuseColor: string;
243
- private readonly fillExtrusionMaterial;
244
- private readonly depthPrepassMaterial;
245
- private readonly maskedFillExtrusionMaterials;
246
- constructor(options: ModelsLayerSpecification, source: ModelsSourceSpecification);
247
- updateProperties(options: ModelsLayerSpecification): void;
248
- setDirectionalLight(radius: number, phi: number, theta: number): void;
249
- onAdd(map: Map_2, gl: WebGLRenderingContext | WebGL2RenderingContext): void;
250
- render(_gl: WebGLRenderingContext | WebGL2RenderingContext, options: CustomRenderMethodInput): void;
251
- private alignCameraToMap;
252
- private needsTranslucentPrepass;
253
- private renderDepthPrepass;
254
- setOpacity(value: number): void;
255
- getMaterial(mesh: Mesh): FillExtrusionMaterial;
256
- private maskedFillExtrusionVariant;
257
- private forEachFillExtrusionMaterial;
258
- private syncLighting;
259
- private applyMaterials;
260
- }
261
-
262
- /**
263
- * Style-like specification for a {@link ModelsLayer}, mirroring the shape of a
264
- * MapLibre layer definition so 3D model layers can be configured declaratively.
265
- *
266
- * @group Landmarks 3D
267
- */
268
- export declare interface ModelsLayerSpecification {
269
- id: string;
270
- type: 'models';
271
- source: string;
272
- before?: string;
273
- minzoom?: number;
274
- maxzoom?: number;
275
- paint?: {
276
- 'models-base-color'?: string;
277
- };
278
- layout?: {
279
- visibility?: 'visible' | 'none';
280
- };
281
- }
282
-
283
- /**
284
- * Source of tiled glTF/GLB models for a {@link ModelsLayer}.
285
- *
286
- * Tracks the tiles covering the current viewport, fetches each tile's models once
287
- * and keeps them in a Three.js {@link Group} that the owning layer renders.
288
- *
289
- * @group Landmarks 3D
290
- */
291
- export declare class ModelsSource {
292
- type: "models";
293
- id: string;
294
- minzoom: number;
295
- maxzoom: number;
296
- map: Map_2;
297
- tiles: Array<string>;
298
- scene: Group;
299
- loadedTiles: Set<string>;
300
- /** Optional consumer callback fired once per successful tile load. */
301
- onTileLoaded?: (scene: Group, key: string) => void;
302
- private readonly ktx2Loader;
303
- private readonly gltfLoader;
304
- private readonly specification;
305
- private readonly withCredentials;
306
- constructor(id: string, options: ModelsSourceSpecification);
307
- onAdd(map: Map_2, renderer: WebGLRenderer): void;
308
- updateTiles(): void;
309
- private coveringTiles;
310
- private loadTile;
311
- private fetchTile;
312
- }
313
-
314
- /**
315
- * Style-like specification for a {@link ModelsSource}: a tiled source of
316
- * glTF/GLB models, mirroring the shape of a MapLibre raster/vector source definition.
317
- *
318
- * @group Landmarks 3D
319
- */
320
- export declare interface ModelsSourceSpecification {
321
- type: 'models';
322
- tiles: Array<string>;
323
- bounds?: [number, number, number, number];
324
- scheme?: 'xyz' | 'tms';
325
- minzoom?: number;
326
- maxzoom?: number;
327
- attribution?: string;
328
- /**
329
- * Base path of the Basis Universal transcoder used to decode KTX2 textures.
330
- * Defaults to the three.js examples CDN path on unpkg; point this at a
331
- * self-hosted copy when external CDNs are not an option (e.g. strict CSP).
332
- */
333
- transcoderPath?: string;
334
- /**
335
- * Send `credentials: 'include'` with each tile request so a session cookie
336
- * (e.g. the demo-BFF proxy's) travels with it. Leave off for direct
337
- * `api.tomtom.com` access, where credentialed CORS would fail.
338
- * @defaultValue `false`
339
- */
340
- withCredentials?: boolean;
341
- }
342
-
343
- export { }
1
+ import { TomTomMap } from "@tomtom-org/maps-sdk/map";
2
+ import { CustomLayerInterface, CustomRenderMethodInput, Map } from "maplibre-gl";
3
+ import { AmbientLight, Camera, DirectionalLight, Group, Mesh, Scene, ShaderMaterial, Texture, WebGLRenderer } from "three";
4
+ //#region src/displayMode.d.ts
5
+ /**
6
+ * How 3D landmarks are shaded relative to the base map. Every mode renders the
7
+ * landmarks as maplibre-style fill-extrusion buildings:
8
+ * - `inherited`: mirrors the colour, opacity and vertical gradient of the basemap 3D building layer (default).
9
+ * - `dark`: uses the 3D building look of the SDK's standard dark style.
10
+ * - `light`: uses the 3D building look of the SDK's standard light style.
11
+ *
12
+ * @group Landmarks 3D
13
+ */
14
+ type Landmarks3DDisplayMode = 'inherited' | 'dark' | 'light';
15
+ //#endregion
16
+ //#region src/FillExtrusionMaterial.d.ts
17
+ /**
18
+ * Alpha mask carried over from a landmark mesh's as-authored texture.
19
+ *
20
+ * Landmark meshes are coarse hulls (e.g. a wall is one rectangle) whose realistic
21
+ * silhouette is carved out by the texture's alpha channel. Untextured shading must keep
22
+ * sampling that alpha and discard the carved-away fragments, otherwise the raw hull
23
+ * shape gets coloured in.
24
+ *
25
+ * @group Landmarks 3D
26
+ */
27
+ type FillExtrusionAlphaMask = {
28
+ /** Texture whose alpha channel carves the mesh silhouette (the mesh's base colour map). */
29
+ map: Texture;
30
+ /** Fragments with alpha below this are discarded. */
31
+ cutoff: number;
32
+ };
33
+ /**
34
+ * Material that shades untextured landmark meshes exactly like maplibre-gl shades
35
+ * `fill-extrusion` buildings, so they blend in with the basemap building layer.
36
+ *
37
+ * Colour and opacity premultiply like maplibre's `v_color *= u_opacity`, paired with
38
+ * (ONE, ONE_MINUS_SRC_ALPHA) blending. Backfaces are culled like maplibre's extrusion
39
+ * rendering, except for alpha-masked meshes whose cutout surfaces must stay visible from
40
+ * both sides; pair with {@link FillExtrusionDepthMaterial} as a depth prepass so that
41
+ * translucent landmarks blend with the basemap exactly once per pixel.
42
+ *
43
+ * @group Landmarks 3D
44
+ */
45
+ declare class FillExtrusionMaterial extends ShaderMaterial {
46
+ constructor(alphaMask?: FillExtrusionAlphaMask);
47
+ /**
48
+ * Copies the shading uniforms (colour, light, layer opacity, vertical gradient) from another
49
+ * instance, bringing a freshly created alpha-masked variant up to date with the shared material.
50
+ */
51
+ copyShadingFrom(source: FillExtrusionMaterial): void;
52
+ /**
53
+ * Sets the building colour from a CSS colour string, stored as raw sRGB
54
+ * components — maplibre shades paint colours in sRGB space, not linear.
55
+ */
56
+ setDiffuseColor(cssColor: string): void;
57
+ setLayerOpacity(opacity: number): void;
58
+ /** Enables or disables maplibre's `fill-extrusion-vertical-gradient` wall darkening. */
59
+ setVerticalGradient(enabled: boolean): void;
60
+ /**
61
+ * Mirrors maplibre's fill-extrusion light uniforms: the style light position is
62
+ * rotated by the map bearing for viewport-anchored lights and the light vector is
63
+ * deliberately left unnormalised, exactly like maplibre's `u_lightpos`.
64
+ *
65
+ * @param position - The style light position, in maplibre's y-south axes.
66
+ * @param bearingInRadians - Map bearing to rotate by; pass `0` for map-anchored lights.
67
+ * @param intensity - The style light intensity.
68
+ * @param color - The style light colour.
69
+ */
70
+ setLight(position: {
71
+ x: number;
72
+ y: number;
73
+ z: number;
74
+ }, bearingInRadians: number, intensity: number, color: {
75
+ r: number;
76
+ g: number;
77
+ b: number;
78
+ }): void;
79
+ }
80
+ //#endregion
81
+ //#region src/types/modelsSpecifications.d.ts
82
+ /**
83
+ * Style-like specification for a {@link ModelsLayer}, mirroring the shape of a
84
+ * MapLibre layer definition so 3D model layers can be configured declaratively.
85
+ *
86
+ * @group Landmarks 3D
87
+ */
88
+ interface ModelsLayerSpecification {
89
+ id: string;
90
+ type: 'models';
91
+ source: string;
92
+ before?: string;
93
+ minzoom?: number;
94
+ maxzoom?: number;
95
+ paint?: {
96
+ 'models-base-color'?: string;
97
+ };
98
+ layout?: {
99
+ visibility?: 'visible' | 'none';
100
+ };
101
+ }
102
+ /**
103
+ * Style-like specification for a {@link ModelsSource}: a tiled source of
104
+ * glTF/GLB models, mirroring the shape of a MapLibre raster/vector source definition.
105
+ *
106
+ * @group Landmarks 3D
107
+ */
108
+ interface ModelsSourceSpecification {
109
+ type: 'models';
110
+ tiles: Array<string>;
111
+ bounds?: [number, number, number, number];
112
+ scheme?: 'xyz' | 'tms';
113
+ minzoom?: number;
114
+ maxzoom?: number;
115
+ attribution?: string;
116
+ /**
117
+ * Base path of the Basis Universal transcoder used to decode KTX2 textures.
118
+ * Defaults to the three.js examples CDN path on unpkg; point this at a
119
+ * self-hosted copy when external CDNs are not an option (e.g. strict CSP).
120
+ */
121
+ transcoderPath?: string;
122
+ /**
123
+ * Send `credentials: 'include'` with each tile request so a session cookie
124
+ * (e.g. the demos proxy's) travels with it. Leave off for direct
125
+ * `api.tomtom.com` access, where credentialed CORS would fail.
126
+ * @defaultValue `false`
127
+ */
128
+ withCredentials?: boolean;
129
+ }
130
+ //#endregion
131
+ //#region src/ModelsSource.d.ts
132
+ /**
133
+ * Source of tiled glTF/GLB models for a {@link ModelsLayer}.
134
+ *
135
+ * Tracks the tiles covering the current viewport, fetches each tile's models once
136
+ * and keeps them in a Three.js {@link Group} that the owning layer renders.
137
+ *
138
+ * @group Landmarks 3D
139
+ */
140
+ export declare class ModelsSource {
141
+ type: "models";
142
+ id: string;
143
+ minzoom: number;
144
+ maxzoom: number;
145
+ map: Map;
146
+ tiles: Array<string>;
147
+ scene: Group;
148
+ loadedTiles: Set<string>;
149
+ /**
150
+ * EPSG:3857 origin subtracted from all mesh positions: absolute coordinates (~6·10⁶ m) exceed
151
+ * float32 precision (~0.5 m), which makes landmark edges tremble while zooming. `null` until the
152
+ * first tile with meshes loads.
153
+ */
154
+ sceneOrigin: {
155
+ x: number;
156
+ y: number;
157
+ } | null;
158
+ /** Optional consumer callback fired once per successful tile load. */
159
+ onTileLoaded?: (scene: Group, key: string) => void;
160
+ private readonly ktx2Loader;
161
+ private readonly gltfLoader;
162
+ private readonly specification;
163
+ private readonly withCredentials;
164
+ constructor(id: string, options: ModelsSourceSpecification);
165
+ onAdd(map: Map, renderer: WebGLRenderer): void;
166
+ updateTiles(): void;
167
+ private showCoveringTilesOnly;
168
+ private coveringTiles;
169
+ private loadTile;
170
+ private rebaseToSceneOrigin;
171
+ private fetchTile;
172
+ }
173
+ //#endregion
174
+ //#region src/ModelsLayer.d.ts
175
+ /**
176
+ * MapLibre custom layer that renders tiled glTF/GLB models with Three.js.
177
+ *
178
+ * The layer owns a {@link ModelsSource} that streams model tiles for the current
179
+ * viewport, renders them as maplibre-style fill-extrusion buildings, and keeps its
180
+ * lighting in sync with the map style light.
181
+ *
182
+ * @group Landmarks 3D
183
+ */
184
+ export declare class ModelsLayer implements CustomLayerInterface {
185
+ id: string;
186
+ type: "custom";
187
+ renderingMode: "3d";
188
+ renderer: WebGLRenderer;
189
+ scene: Scene;
190
+ camera: Camera;
191
+ tiles: Group;
192
+ directionalLight: DirectionalLight;
193
+ ambientLight: AmbientLight;
194
+ map: Map;
195
+ source: ModelsSource;
196
+ minzoom: number;
197
+ maxzoom: number;
198
+ visible: boolean;
199
+ diffuseColor: string;
200
+ private readonly fillExtrusionMaterial;
201
+ private readonly depthPrepassMaterial;
202
+ private readonly maskedFillExtrusionMaterials;
203
+ constructor(options: ModelsLayerSpecification, source: ModelsSourceSpecification);
204
+ updateProperties(options: ModelsLayerSpecification): void;
205
+ setDirectionalLight(radius: number, phi: number, theta: number): void;
206
+ onAdd(map: Map, gl: WebGLRenderingContext | WebGL2RenderingContext): void;
207
+ render(_gl: WebGLRenderingContext | WebGL2RenderingContext, options: CustomRenderMethodInput): void;
208
+ private groundLandmarksOnTerrain;
209
+ private groundMeshOnTerrain;
210
+ private terrainSamplePoints;
211
+ private alignCameraToMap;
212
+ private get sceneOrigin();
213
+ private needsTranslucentPrepass;
214
+ private renderDepthPrepass;
215
+ setOpacity(value: number): void;
216
+ /** Mirrors the basemap's fill-extrusion-vertical-gradient on the landmark shading. */
217
+ setVerticalGradient(enabled: boolean): void;
218
+ getMaterial(mesh: Mesh): FillExtrusionMaterial;
219
+ private maskedFillExtrusionVariant;
220
+ private forEachFillExtrusionMaterial;
221
+ private syncLighting;
222
+ private applyMaterials;
223
+ }
224
+ //#endregion
225
+ //#region src/Landmarks3D.d.ts
226
+ /**
227
+ * Configuration for the {@link Landmarks3D} plugin.
228
+ *
229
+ * @group Landmarks 3D
230
+ */
231
+ type Landmarks3DOptions = {
232
+ /**
233
+ * Initial display mode for the landmarks. Can also be changed at runtime with
234
+ * {@link Landmarks3D.setDisplayMode}.
235
+ * @defaultValue `'inherited'`
236
+ */
237
+ displayMode?: Landmarks3DDisplayMode;
238
+ /**
239
+ * Whether the landmarks are initially visible. Can also be changed at runtime with
240
+ * {@link Landmarks3D.setVisible}.
241
+ * @defaultValue `true`
242
+ */
243
+ visible?: boolean;
244
+ /**
245
+ * Minimum zoom at which landmarks are rendered.
246
+ * @defaultValue The basemap 3D building layer's minimum zoom, so landmarks appear together
247
+ * with it (falls back to `10` when that layer is absent).
248
+ */
249
+ minZoom?: number;
250
+ /**
251
+ * Maximum zoom at which landmarks are rendered.
252
+ * @defaultValue The basemap 3D building layer's maximum zoom, so landmarks disappear together
253
+ * with it (falls back to `22` when that layer is absent).
254
+ */
255
+ maxZoom?: number;
256
+ /**
257
+ * Send `credentials: 'include'` with each tile request so a proxy session
258
+ * cookie travels with it. By default this tracks the SDK's proxy config, so
259
+ * tiles behave like every other SDK request; set it explicitly only to
260
+ * override that.
261
+ * @defaultValue Auto-detected — `true` when the SDK is configured for a
262
+ * credentialed proxy (no `apiKey` + non-default `commonBaseURL`).
263
+ */
264
+ withCredentials?: boolean;
265
+ };
266
+ /**
267
+ * Renders TomTom Orbis 3D Landmarks (high-detail building meshes) on a {@link TomTomMap}.
268
+ *
269
+ * The plugin streams GLB tiles from the Orbis 3D Landmarks API (Private Preview),
270
+ * renders them with Three.js via a MapLibre custom layer, filters overlapping
271
+ * extruded basemap buildings out of the style, and keeps everything restored
272
+ * across map style changes.
273
+ *
274
+ * @remarks
275
+ * Requires an API key with Orbis 3D Landmarks entitlements and a map style that
276
+ * shows extruded 3D buildings for the exclusion filter and `inherited` mode to
277
+ * have an effect.
278
+ *
279
+ * @example
280
+ * ```typescript
281
+ * import { Landmarks3D } from '@tomtom-org/maps-sdk-plugin-landmarks-3d';
282
+ *
283
+ * // assume `map` is your initialized TomTomMap instance
284
+ * const landmarks = new Landmarks3D(map);
285
+ *
286
+ * await landmarks.setDisplayMode('inherited');
287
+ * ```
288
+ *
289
+ * @group Landmarks 3D
290
+ */
291
+ export declare class Landmarks3D {
292
+ private readonly map;
293
+ private readonly layerID;
294
+ private readonly basemapBuildingLayerID;
295
+ private readonly modelsLayer;
296
+ private readonly layerMinZoom?;
297
+ private readonly layerMaxZoom?;
298
+ private displayMode;
299
+ /**
300
+ * Creates the plugin bound to a TomTom map and starts rendering landmarks
301
+ * as soon as the map is ready.
302
+ *
303
+ * @param map - The TomTom map instance to render landmarks on.
304
+ * @param options - Optional configuration.
305
+ */
306
+ constructor(map: TomTomMap, options?: Landmarks3DOptions);
307
+ private installWhenReady;
308
+ /**
309
+ * The underlying MapLibre custom layer, for advanced use beyond this facade.
310
+ */
311
+ get layer(): ModelsLayer;
312
+ /**
313
+ * The currently applied display mode.
314
+ */
315
+ getDisplayMode(): Landmarks3DDisplayMode;
316
+ /**
317
+ * Changes how landmarks are rendered relative to the base map.
318
+ *
319
+ * @param mode - The display mode to apply.
320
+ * @returns A promise that resolves once the mode has been applied.
321
+ */
322
+ setDisplayMode(mode: Landmarks3DDisplayMode): Promise<void>;
323
+ /**
324
+ * Whether the landmarks are currently visible.
325
+ */
326
+ isVisible(): boolean;
327
+ /**
328
+ * Shows or hides the landmarks layer.
329
+ *
330
+ * @param visible - `true` to show landmarks, `false` to hide them.
331
+ * @returns A promise that resolves once the visibility has been applied.
332
+ */
333
+ setVisible(visible: boolean): Promise<void>;
334
+ private install;
335
+ private landmarkInsertBeforeID;
336
+ private alignZoomRangeWithBasemapBuildings;
337
+ private excludeLandmarkBuildingsFromBasemap;
338
+ private readBasemapBuildingMaterial;
339
+ private resolveCurrentMaterialState;
340
+ private applyDisplayMode;
341
+ }
342
+ //#endregion
343
+ //#region src/landmarksTileURL.d.ts
344
+ /**
345
+ * Builds the TomTom Orbis 3D Landmarks tile URL template.
346
+ *
347
+ * @remarks
348
+ * The API serves meshopt-compressed GLB tiles with KTX2/Basis textures and requires
349
+ * an API key with Orbis 3D Landmarks entitlements (still in Private Preview).
350
+ *
351
+ * @group Landmarks 3D
352
+ */
353
+ export declare const buildLandmarksTileURL: () => string;
354
+ //#endregion
355
+ export type { Landmarks3DDisplayMode, Landmarks3DOptions, ModelsLayerSpecification, ModelsSourceSpecification };