@tileflow/core 0.1.0-alpha.40 → 0.1.0-alpha.42

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/browser.d.ts CHANGED
@@ -171,6 +171,8 @@ type TileflowPoiModuleConfig = {
171
171
  density?: TileflowPoiDensity;
172
172
  /** Category overrides of density, with the same zoom-dependent detail allowance. */
173
173
  densityByCategory?: Partial<Record<TileflowPoiCategory, TileflowPoiDensity>>;
174
+ /** Fixed maximum World filter rank per POI type (0–5), independent of zoom detail. */
175
+ maxRankByType?: Readonly<Record<string, 0 | 1 | 2 | 3 | 4 | 5>>;
174
176
  /** Zoom for the second extra rank of POI detail. Must exceed 16; defaults to 17. */
175
177
  detailZoom?: number;
176
178
  icons?: boolean;
@@ -412,16 +414,7 @@ type TileflowBuildingSurfaceDesign = {
412
414
  cornice?: Required<NonNullable<TileflowBuildingSurfaces['cornice']>>;
413
415
  };
414
416
 
415
- /** The parts of a model, each coloured by the theme: the model's materials name them. */
416
- declare const tileflowModelParts: Readonly<{
417
- surface: 0;
418
- secondary: 1;
419
- glass: 2;
420
- accent: 3;
421
- roof: 4;
422
- }>;
423
- type TileflowModelPart = keyof typeof tileflowModelParts;
424
- /** Architectural roles control lighting independently of the model's palette slots. */
417
+ /** Architectural roles control lighting independently of the model's parts. */
425
418
  declare const tileflowModelLightingRoles: Readonly<{
426
419
  unclassified: 0;
427
420
  wall: 1;
@@ -445,7 +438,7 @@ type TileflowBuildingsThreeDimensionalStyle = {
445
438
  colorVariation?: TileflowThemeNumberValue;
446
439
  /** How strongly roof outlines and outer corners catch the light, from 0 (default) to 1. */
447
440
  edges?: TileflowThemeNumberValue;
448
- /** Radius in metres for softened exterior corners and roof lighting, from 0 to 1; defaults to 0.8. */
441
+ /** Radius in metres for softened exterior corners and roof lighting, from 0 to 1.5; defaults to 0.8. */
449
442
  edgeRadius?: number;
450
443
  /** Their own colour, drawn unlit; without it they take the building's colour, lightened. */
451
444
  edgeColor?: TileflowThemeColorValue;
@@ -466,7 +459,7 @@ type TileflowBuildingsThreeDimensionalStyle = {
466
459
  /** Wall radius as a fraction of building height; defaults to 1/3. */
467
460
  wallHeightRatio?: number;
468
461
  };
469
- /** Per-role physical materials and emission, separate from palette slots and occlusion. */
462
+ /** Per-role physical materials and emission, separate from model parts and occlusion. */
470
463
  modelLighting?: Partial<Record<TileflowModelLightingRole, {
471
464
  emissiveStrength?: TileflowThemeNumberValue;
472
465
  /** Stable per-model addition to emission, from zero to this amount. */
@@ -485,6 +478,12 @@ type TileflowBuildingsThreeDimensionalStyle = {
485
478
  colorMix?: TileflowThemeNumberValue;
486
479
  metallic?: TileflowThemeNumberValue;
487
480
  roughness?: TileflowThemeNumberValue;
481
+ /** Normalize matte light to ordinary buildings, or retain physical glTF lighting (default). */
482
+ shading?: 'physical' | 'map';
483
+ /** Role multiplier for model ambient occlusion, from zero to one; defaults to one. */
484
+ ambientOcclusion?: TileflowThemeNumberValue;
485
+ /** Named-part colour contribution after the role tint, from zero to one; defaults to one. */
486
+ partColorMix?: TileflowThemeNumberValue;
488
487
  /** Independent HSL ranges, seeded by model identity; no window geometry is invented. */
489
488
  colorVariation?: {
490
489
  hue: readonly [TileflowThemeNumberValue, TileflowThemeNumberValue];
@@ -505,6 +504,8 @@ type TileflowBuildingsThreeDimensionalStyle = {
505
504
  };
506
505
  /** Contact shadow at the foot of the walls and in tight corners; defaults to true. */
507
506
  occlusion?: boolean;
507
+ /** Ground contact shadow strength, from 0 to 1; defaults to 0.16. Facade shading is independent. */
508
+ groundOcclusion?: TileflowThemeNumberValue;
508
509
  /** Prepared model ambient occlusion strength, from 0 to 1; defaults to 0.75. */
509
510
  modelOcclusion?: TileflowThemeNumberValue;
510
511
  /** Shadows from the sun, on the buildings and the flat map; defaults to true. */
@@ -521,7 +522,10 @@ type TileflowBuildingsThreeDimensionalStyle = {
521
522
  * directories. Each stands in for the buildings under its footprint.
522
523
  */
523
524
  models?: readonly TileflowBuildingModelPlacementConfig[];
524
- /** The colours of the models' parts; a part without one takes it from the building colour. */
525
+ /**
526
+ * The colours of the models' parts, by the names their materials give them, such as `glass` or
527
+ * `water`. A part the map gives no colour keeps its material's own.
528
+ */
525
529
  modelColors?: Partial<Record<TileflowBuildingModelPart, TileflowThemeColorValue>>;
526
530
  /**
527
531
  * Tileflow's landmarks, such as the Eiffel Tower, drawn as models in place of the buildings
@@ -533,8 +537,11 @@ type TileflowBuildingsThreeDimensionalStyle = {
533
537
  url: string;
534
538
  };
535
539
  };
536
- /** The parts of a building model, as its materials name them. */
537
- type TileflowBuildingModelPart = 'surface' | 'secondary' | 'glass' | 'accent' | 'roof';
540
+ /**
541
+ * A part of a building model, as its materials name it: lower-case words joined by hyphens or
542
+ * underscores, such as `surface`, `glass`, `roof` or `water`.
543
+ */
544
+ type TileflowBuildingModelPart = string;
538
545
  /** Where a building model stands. */
539
546
  type TileflowBuildingModelPlacementConfig = {
540
547
  /** The model's id: the name of its `.glb` file in the map's `models` directories. */
@@ -1253,7 +1260,7 @@ type TileflowBuildingMeshOptions = Readonly<{
1253
1260
  tileMetres: number;
1254
1261
  /** Height used where a building has none, in metres; defaults to 5, World's own fallback. */
1255
1262
  defaultHeight?: number;
1256
- /** Exterior corner radius in metres, up to 1; 0 leaves the footprint unchanged. */
1263
+ /** Exterior corner radius in metres, up to 1.5; 0 leaves the footprint unchanged. */
1257
1264
  edgeRadius?: number;
1258
1265
  /** Maximum turn per rounded segment; defaults to 30 degrees for close views. */
1259
1266
  cornerAngle?: number;
@@ -1322,6 +1329,12 @@ type TileflowModelRoleLighting = Readonly<{
1322
1329
  colorMix?: number;
1323
1330
  metallic?: number;
1324
1331
  roughness?: number;
1332
+ /** Map shading normalizes sunlight to the surrounding extruded buildings. */
1333
+ shading?: 'physical' | 'map';
1334
+ /** Multiplier for the scene's model ambient occlusion. Defaults to one. */
1335
+ ambientOcclusion?: number;
1336
+ /** Contribution of named part colours after the role tint. Defaults to one. */
1337
+ partColorMix?: number;
1325
1338
  colorVariation?: Readonly<{
1326
1339
  hue: readonly [number, number];
1327
1340
  saturation: readonly [number, number];
@@ -1371,7 +1384,7 @@ type TileflowBuildings3DDesign = Readonly<{
1371
1384
  nightLight: number;
1372
1385
  /** Height-selected light on ordinary buildings and the ground, independent of shop windows. */
1373
1386
  floodLight?: TileflowBuildingFloodLight;
1374
- /** Emission by architectural role, independent of model palette slots. */
1387
+ /** Emission by architectural role, independent of the models' parts. */
1375
1388
  modelLighting?: Readonly<Partial<Record<TileflowModelLightingRole, TileflowModelRoleLighting>>>;
1376
1389
  /** Invented night windows, lit by rooms: decoration, not data. */
1377
1390
  windows: boolean;
@@ -1389,12 +1402,14 @@ type TileflowBuildings3DDesign = Readonly<{
1389
1402
  /** Shadows from the sun, and contact shadow at the foot of the walls. */
1390
1403
  shadows: boolean;
1391
1404
  occlusion: boolean;
1405
+ /** Ground contact shadow strength; facade shading is independent. */
1406
+ groundOcclusion?: number;
1392
1407
  /** Strength of prepared model ambient visibility; zero leaves the sky contribution unchanged. */
1393
1408
  modelOcclusion?: number;
1394
1409
  /** Building models the map places in its city, each replacing the buildings under it. */
1395
1410
  models?: readonly TileflowBuildingModelPlacement[];
1396
- /** The colours of the models' parts; a part without one takes it from the building colour. */
1397
- modelColors?: Readonly<Partial<Record<TileflowModelPart, string>>>;
1411
+ /** The colours of the models' parts by name; a part without one keeps its material's colour. */
1412
+ modelColors?: Readonly<Record<string, string>>;
1398
1413
  /**
1399
1414
  * Tileflow's landmarks, drawn as models in place of the buildings under them: the TileJSON of
1400
1415
  * their tileset. Without it, the map shows none.
@@ -1969,6 +1984,8 @@ type TileflowContourProtocolRegistry = {
1969
1984
  type TileflowContourProtocolRegistrationOptions = {
1970
1985
  /** Test/integration override; the default lazily initializes the pinned, bundled module. */
1971
1986
  loadMaplibreContour?: () => Promise<unknown>;
1987
+ /** Route the nested DEM template through an application-owned transport, preserving XYZ slots. */
1988
+ transformDemUrl?: (url: string) => string;
1972
1989
  };
1973
1990
  /** Registers the one self-contained protocol emitted by every compiled contour source. */
1974
1991
  declare function registerTileflowContourProtocol(registry: TileflowContourProtocolRegistry, options?: TileflowContourProtocolRegistrationOptions): void;
@@ -1986,6 +2003,8 @@ type TileflowPmtilesProtocolRegistry = Readonly<{
1986
2003
  }>;
1987
2004
  type TileflowPmtilesProtocolRegistrationOptions = Readonly<{
1988
2005
  maximumDirectoryDepth?: number;
2006
+ /** Route archive byte requests through an application-owned resource transport. */
2007
+ transformArchiveUrl?: (url: string) => string;
1989
2008
  }>;
1990
2009
  declare const tileflowPmtilesMaximumDirectoryDepth: 32;
1991
2010
  declare const tileflowPmtilesProtocol: "tileflow-pmtiles";