routes

Azgaar 2024-08-15 21:22:50 +02:00
parent e7fc4018a5
commit 43af487085

@ -262,7 +262,14 @@ Markers data is stored as an unordered array of objects (so element id is _not_
* `lock`: `boolean` - `true` if marker is locked (not affected by regeneration). Optional * `lock`: `boolean` - `true` if marker is locked (not affected by regeneration). Optional
## Routes ## Routes
Routes data is not in data model, but can be retrieved directly from svg `routes` element and `pack.cells.roads` array. Routes data is stored as an ordered array of objects (so element id is the array index). Object structure:
* `i`: `number` - route id. Please note the element with id `0` is a fully valid route, not a placeholder
* `points`: `number[]` - array of control points in format `[x, y, cellId]`
* `feature`: `number` - feature id of the route. Auto-generated routes cannot be place on multiple features
* `group`: `string` - route group. Default groups are: 'roads', 'trails', 'searoutes'
* `length`: `number` - route length in km. Optional
* `name`: `string` - route name. Optional
* `lock`: `boolean` - `true` if route is locked (not affected by regeneration). Optional
# Secondary global data # Secondary global data
Secondary data exposed to global space. Secondary data exposed to global space.