@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.
@@ -207,7 +207,7 @@ export default defineMap({
207
207
  - `threeDimensional.edges` and `edgeColor` set the [edges](#edges), and `nightLight` the
208
208
  [night light](#night-light). Numbers and colours may be theme tokens.
209
209
  - `threeDimensional.edgeRadius` rounds convex exterior corners in the mesh and softens the
210
- roof/wall lighting transition. It accepts 0–1 metres and defaults to 0.8; use 0 for sharp corners.
210
+ roof/wall lighting transition. It accepts 0–1.5 metres and defaults to 0.8; use 0 for sharp corners.
211
211
  Courtyard corners and tile cuts stay unchanged. The authored roof shape is preserved; the top
212
212
  edge is softened through lighting, not a geometric roof bevel. Rounding adds a bounded number
213
213
  of vertices at convex corners, with no extra render pass. Changes to this radius rebuild the
@@ -218,7 +218,8 @@ at most three metres (half the height for low buildings). It is evaluated per fr
218
218
  building does not acquire a full-height dark ramp. Disabling the authored extrusion's
219
219
  `verticalGradient` disables this shading. Ground contact shadow is controlled by `occlusion`, enabled by default. It extends three metres
220
220
  from grounded walls, darkening the ground by at most 16%, with a smooth distance falloff and round
221
- corners. Every map uses these defaults when it enables `occlusion`. The reach is measured in world
221
+ corners. `threeDimensional.groundOcclusion` adjusts this strength from zero to one (default `0.16`)
222
+ without changing facade shading or model ambient occlusion. Streets uses `0.12`. The reach is measured in world
222
223
  metres, so its screen width scales continuously with zoom and becomes subtle at distant views.
223
224
  Overlaps use the strongest
224
225
  shade once, so shared walls, courtyards and tile joins do not accumulate dark bands. Raised building
@@ -236,6 +237,8 @@ Maps on Tileflow World show Tileflow's landmarks, such as the Eiffel Tower, as 3
236
237
  the buildings under them. They come from a landmarks tileset kept apart from the map's data: each of
237
238
  its tiles carries the models standing in it, with their levels of detail and footprints, and each
238
239
  region's index names its tiles by their hash, with where each landmark stands and its footprint.
240
+ Core reads only indexes in the `tileflow-landmark-region-v2` format; an index that names no
241
+ footprints is not read, and its region shows no landmarks.
239
242
  The renderer reads the tileset's TileJSON, then only the indexes of the regions round the camera
240
243
  and the landmark tiles near it, from a zoom before the buildings show, so a landmark in Paris costs
241
244
  nothing in Madrid. New and improved landmarks reach every map without a new build of the map.
@@ -313,18 +316,26 @@ address; the map then needs no `.glb` of its own for it.
313
316
 
314
317
  How to prepare a model:
315
318
 
316
- - **Materials name the parts.** Name each material `surface`, `secondary`, `glass`, `accent` or
317
- `roof` (an exporter's `.001` suffix is ignored); a model whose materials name a tree's parts is a
319
+ - **Materials name the parts.** Name each material after the part it is: an architectural part,
320
+ `surface`, `secondary`, `glass`, `accent` or `roof`, or a part of the model's own, such as
321
+ `water`, `vegetation`, `wood` or `stone`. A name is lower-case words joined by hyphens or
322
+ underscores, at most 32 characters; an exporter's `.001` suffix is ignored, and a level names at
323
+ most 16 parts. A model whose materials name only a tree's parts (`bark`, `leaves`, `fronds`,
324
+ `stem`) is a
318
325
  [tree model](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/trees-3d.md)
319
- instead. Each part takes its colour from `modelColors`, or from the buildings' colour when the
320
- design gives it none, so the model follows the theme from day to night. Like every visual
321
- colour, a `modelColors` entry is a theme token such as `token.color('buildings.modelRoof')`, or
322
- a literal wrapped in `fixed(value, {reason})`; vertex colours lighter or
323
- darker than the rest of their part shade it within that colour.
326
+ instead.
327
+ - **The map colours parts by name.** A part takes the colour `modelColors` gives its name, so the
328
+ model follows the theme from day to night; a part the map does not colour keeps its material's
329
+ own colour. Like every visual colour, a `modelColors` entry is a theme token such as
330
+ `token.color('buildings.modelRoof')`, or a literal wrapped in `fixed(value, {reason})`; vertex
331
+ colours lighter or darker than the rest of their part shade it within that colour. Name pools
332
+ `water`, planting `vegetation` and timber `wood` where they fit: Streets colours these from its
333
+ water and tree colours, so a model that uses them follows the map without a colour of its own.
324
334
  - **Architectural roles control lighting.** A material may set
325
335
  `extras.tileflow.lightingRole` to `wall`, `door`, `roof`, `window`, `lamp`, `logo` or
326
- `unclassified`. This preserves its palette slot. Without a role, `surface`, `secondary` and
327
- `accent` are walls, `glass` is a window, and `roof` is a roof.
336
+ `unclassified`, whatever part it names. Without a role, `surface`, `secondary` and `accent` are
337
+ walls, `glass` is a window, and `roof` is a roof; every other part is `unclassified`, so a pool
338
+ or a planted bed never takes a window's light.
328
339
  - **Metres round an origin on the ground.** The origin is where the model stands, with the model
329
340
  above it and its own north along +y once read Z up; nothing may lie more than half a metre below
330
341
  it.
@@ -332,7 +343,11 @@ How to prepare a model:
332
343
  out on the ground what the model stands in for, such as a landmark's whole base. Without one, the
333
344
  model's own outline on the ground stands in, courtyards included.
334
345
  - **Levels of detail.** `<id>.mid.glb` and `<id>.far.glb`, when present, are drawn farther from the
335
- camera's centre, from about 900 m and 2.6 km.
346
+ camera, measured to the centre of the model's bounds: a model 30 m or taller from 2 km and 5 km,
347
+ one 80 m or more across from 1.5 km and 3.5 km, and any other from 1 km and 2.5 km. A model beside
348
+ a low camera at a steep pitch keeps its near level however far the map's centre is, and a model
349
+ near a threshold keeps its level until it is about 10% past it. A model casts its shadow with its
350
+ next lighter level, and a model outside the view or the light's reach is not drawn.
336
351
  - **Budgets.** A level has at most 200,000 triangles and 200,000 vertices, and a map at most 64
337
352
  building models. Triangles of the default scene are read with their node transforms; textures,
338
353
  animations and compressed geometry (Draco or meshopt) are not.
@@ -340,7 +355,8 @@ How to prepare a model:
340
355
  The build reads each model, reports a problem with the file and what to change, works out its
341
356
  footprint and writes it beside the style as a prepared model file: a glTF binary whose meshes are
342
357
  quantised (`KHR_mesh_quantization`) and compressed by meshoptimizer (`EXT_meshopt_compression`),
343
- which any glTF viewer opens. The renderer downloads a model only when it stands near the tiles round
358
+ which glTF viewers open with a current meshoptimizer decoder: vertex streams use its version 1
359
+ codec. Triangles are ordered for the GPU's vertex cache within each material range. The renderer downloads a model only when it stands near the tiles round
344
360
  the camera, whether or not those tiles hold buildings, keeps the nearest dozen, and builds the tiles
345
361
  under it again without the buildings that
346
362
  reach more than half a metre into its footprint; a neighbour that only touches it stays. A tile of
@@ -491,18 +507,32 @@ Architectural illumination has two independent controls:
491
507
  they also control the falloff of explicitly authored area emitters.
492
508
 
493
509
  Physical profiles also accept `color`, `colorMix` (zero to one, default one when a tint exists),
494
- `roughness` and `metallic` (zero to one). Explicit `modelColors` override role tints. Missing
510
+ `roughness` and `metallic` (zero to one). Explicit `modelColors` override role tints, weighted by
511
+ `partColorMix` (zero to one, default one). Set it to zero to retain a role's colour on shared parts.
512
+ Missing
495
513
  physical overrides retain the glTF material. `emissiveVariation` adds a stable, model-seeded amount
496
514
  from zero to its value. Optional `colorVariation` supplies independent `[min, max]` ranges for
497
515
  `hue` (0–360), `saturation` and `lightness` (0–100), with `space: 'srgb'` (default) or `'linear'`.
498
516
  The same model identity keeps its samples across LODs and theme changes.
499
-
500
- Streets leaves ordinary flood lighting off in its light presets. Its dusk/night wall profile uses a strength
501
- of `0.1` and `[0.5, 0, 0, 1, 0.8]`, concentrating a warm wash near the foot. Monochrome uses a
502
- weaker neutral wall profile and no architectural ground flood. Prepared models without role
503
- metadata use their documented palette mapping. Windows use metallic reflection and varied emission;
504
- doors and logos have separate profiles, and roofs remain non-emissive. Day/dawn profiles follow
505
- the scene's brighter material response. A role does not generate missing windows or ground emitters.
517
+ A valid explicit `color` takes precedence over `colorVariation`.
518
+
519
+ For glTF surfaces, `shading: 'map'` uses the surrounding buildings' normalized sunlight and matte
520
+ response. The default, `physical`, retains metallic/roughness lighting. `ambientOcclusion` is a
521
+ zero-to-one multiplier for that role's scene occlusion, defaulting to one. Shading, occlusion and
522
+ part colour weights blend through theme transitions. Textures, alpha, normal maps and emission
523
+ remain independent of the shading choice.
524
+
525
+ Streets leaves ordinary flood lighting off in its light presets and in Monochrome. Authored stone
526
+ uses the ordinary building palette with subtle secondary, roof and accent tones, map shading and
527
+ reduced occlusion. Windows retain their original metallic reflection, stable colour variation and
528
+ emission, including on shared stone parts. Prepared models without role metadata take each part's
529
+ default role. A role does not generate missing windows or ground emitters.
530
+
531
+ Streets' stone theme tokens are `buildings.modelSurface`, `buildings.modelSecondary`,
532
+ `buildings.modelRoof`, and `buildings.modelAccent`. Their defaults are derived from each preset's
533
+ `buildings.extrusion` colour. Set `modelLighting.window.color` to choose one glass colour while
534
+ retaining its reflection and emission. Windows use `partColorMix: 0`; set it to one to opt into
535
+ named `modelColors` overrides. These controls preserve geometry and detail.
506
536
  See [building-model preparation](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/docs/building-models.md)
507
537
  for glTF channels, explicit area emitters, compatibility and resource costs.
508
538
 
@@ -142,6 +142,10 @@ Each value is 1–5; eligible rank increases by one at z16 and two at `detailZoo
142
142
  Streets uses 18). `detailZoom` must exceed 16 and cannot exceed 24. Source rank meanings
143
143
  and category coverage differ between datasets, so equal settings need not produce equal counts.
144
144
 
145
+ `poi({maxRankByType: {garden: 1}})` adds a fixed rank ceiling for selected World POI types.
146
+ Values are 0–5; unspecified types retain their usual eligibility. The ceiling applies to markers,
147
+ icons and labels in both placement orders and does not increase with zoom or category density.
148
+
145
149
  MapLibre owns perspective scaling, distant-symbol rejection, collision placement and fading.
146
150
  These native behaviors apply without a module switch. The SDK does not change feature filters
147
151
  when panning, rotating, tilting or ending a gesture. Category and zoom eligibility remain compiled
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tileflow/core",
3
- "version": "0.1.0-alpha.40",
3
+ "version": "0.1.0-alpha.42",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Typed Tileflow config and MapLibre style compiler.",
6
6
  "type": "module",