@tileflow/core 0.1.0-alpha.40 → 0.1.0-alpha.41
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/3d.js +244 -98
- package/dist/browser.d.ts +14 -17
- package/dist/browser.js +247 -101
- package/dist/build.d.ts +2 -2
- package/dist/build.js +18 -10
- package/dist/config-reference.json +493 -566
- package/dist/{icon-composition-CcSHApUm.d.ts → icon-composition-HUh_Lj8Z.d.ts} +56 -18
- package/dist/index.d.ts +15 -16
- package/dist/index.js +128 -59
- package/dist/worker/camera-tile-worker.global.js +2 -2
- package/docs/buildings-3d.md +25 -11
- package/package.json +1 -1
package/dist/browser.d.ts
CHANGED
|
@@ -412,16 +412,7 @@ type TileflowBuildingSurfaceDesign = {
|
|
|
412
412
|
cornice?: Required<NonNullable<TileflowBuildingSurfaces['cornice']>>;
|
|
413
413
|
};
|
|
414
414
|
|
|
415
|
-
/**
|
|
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. */
|
|
415
|
+
/** Architectural roles control lighting independently of the model's parts. */
|
|
425
416
|
declare const tileflowModelLightingRoles: Readonly<{
|
|
426
417
|
unclassified: 0;
|
|
427
418
|
wall: 1;
|
|
@@ -466,7 +457,7 @@ type TileflowBuildingsThreeDimensionalStyle = {
|
|
|
466
457
|
/** Wall radius as a fraction of building height; defaults to 1/3. */
|
|
467
458
|
wallHeightRatio?: number;
|
|
468
459
|
};
|
|
469
|
-
/** Per-role physical materials and emission, separate from
|
|
460
|
+
/** Per-role physical materials and emission, separate from model parts and occlusion. */
|
|
470
461
|
modelLighting?: Partial<Record<TileflowModelLightingRole, {
|
|
471
462
|
emissiveStrength?: TileflowThemeNumberValue;
|
|
472
463
|
/** Stable per-model addition to emission, from zero to this amount. */
|
|
@@ -521,7 +512,10 @@ type TileflowBuildingsThreeDimensionalStyle = {
|
|
|
521
512
|
* directories. Each stands in for the buildings under its footprint.
|
|
522
513
|
*/
|
|
523
514
|
models?: readonly TileflowBuildingModelPlacementConfig[];
|
|
524
|
-
/**
|
|
515
|
+
/**
|
|
516
|
+
* The colours of the models' parts, by the names their materials give them, such as `glass` or
|
|
517
|
+
* `water`. A part the map gives no colour keeps its material's own.
|
|
518
|
+
*/
|
|
525
519
|
modelColors?: Partial<Record<TileflowBuildingModelPart, TileflowThemeColorValue>>;
|
|
526
520
|
/**
|
|
527
521
|
* Tileflow's landmarks, such as the Eiffel Tower, drawn as models in place of the buildings
|
|
@@ -533,8 +527,11 @@ type TileflowBuildingsThreeDimensionalStyle = {
|
|
|
533
527
|
url: string;
|
|
534
528
|
};
|
|
535
529
|
};
|
|
536
|
-
/**
|
|
537
|
-
|
|
530
|
+
/**
|
|
531
|
+
* A part of a building model, as its materials name it: lower-case words joined by hyphens or
|
|
532
|
+
* underscores, such as `surface`, `glass`, `roof` or `water`.
|
|
533
|
+
*/
|
|
534
|
+
type TileflowBuildingModelPart = string;
|
|
538
535
|
/** Where a building model stands. */
|
|
539
536
|
type TileflowBuildingModelPlacementConfig = {
|
|
540
537
|
/** The model's id: the name of its `.glb` file in the map's `models` directories. */
|
|
@@ -1371,7 +1368,7 @@ type TileflowBuildings3DDesign = Readonly<{
|
|
|
1371
1368
|
nightLight: number;
|
|
1372
1369
|
/** Height-selected light on ordinary buildings and the ground, independent of shop windows. */
|
|
1373
1370
|
floodLight?: TileflowBuildingFloodLight;
|
|
1374
|
-
/** Emission by architectural role, independent of
|
|
1371
|
+
/** Emission by architectural role, independent of the models' parts. */
|
|
1375
1372
|
modelLighting?: Readonly<Partial<Record<TileflowModelLightingRole, TileflowModelRoleLighting>>>;
|
|
1376
1373
|
/** Invented night windows, lit by rooms: decoration, not data. */
|
|
1377
1374
|
windows: boolean;
|
|
@@ -1393,8 +1390,8 @@ type TileflowBuildings3DDesign = Readonly<{
|
|
|
1393
1390
|
modelOcclusion?: number;
|
|
1394
1391
|
/** Building models the map places in its city, each replacing the buildings under it. */
|
|
1395
1392
|
models?: readonly TileflowBuildingModelPlacement[];
|
|
1396
|
-
/** The colours of the models' parts; a part without one
|
|
1397
|
-
modelColors?: Readonly<
|
|
1393
|
+
/** The colours of the models' parts by name; a part without one keeps its material's colour. */
|
|
1394
|
+
modelColors?: Readonly<Record<string, string>>;
|
|
1398
1395
|
/**
|
|
1399
1396
|
* Tileflow's landmarks, drawn as models in place of the buildings under them: the TileJSON of
|
|
1400
1397
|
* their tileset. Without it, the map shows none.
|