diff --git a/Data-model.md b/Data-model.md index 7517704..b49be2d 100644 --- a/Data-model.md +++ b/Data-model.md @@ -229,7 +229,20 @@ Routes data is not in data model, but can be retrieved directly from svg `routes Secondary data exposed to global space. ## Biomes +Biomes data object is globally available as `biomesData`. It stores a few arrays, making it different from other data. Object structure: +* `i`: `number[]` - biome id +* `name`: `string[]` - biome names +* `color`: `string[]` - biome colors in hex (e.g. `#45ff12`) or link to hatching pattern (e.g. `url(#hatch7)`) +* `biomesMartix`: `number[][]` - 2d matrix used to define cell biome by temperature and moisture. Columns contain temperature data going from > `19` °C to < `-4` °C. Rows contain data for 5 moisture bands from the drier to the wettest one. Each row is a `Uint8Array` +* `cost`: `number[]` - biome movement cost, must be `0` or positive. Extensively used during cultures, states and religions growth phase. `0` means spread to this biome costs nothing. Max value is not defined, but `5000` is the actual max used by default +* `habitability`: `number[]` - biome habitability, must be `0` or positive. `0` means the biome is uninhabitable, max value is not defined, but `100` is the actual max used by default +* `icons`: `string[][]` - non-weighed array of icons for each biome. Used for _relief icons_ rendering. Not-weighed means that random icons from array is selected, so the same icons can be mentioned multiple times +* `iconsDensity`: `number[]` - defines how packed icons can be for the biome. An integer from `0` to `150` ## Notes +Notes (legends) data is stored in unordered array of objects: `notes`. Object structure is as simple as: +* `i`: `string` - note id +* `name`: `string` - note name, visible in Legend box +* `legend`: `string` - note text in html ## Name bases