feat(module-studio): add configurable map page

This commit is contained in:
DCCONSTRUCTIONS
2026-07-13 17:14:34 +03:00
parent 1f2dffc031
commit 1a2ca8c82c
23 changed files with 2700 additions and 31 deletions
@@ -0,0 +1,31 @@
{
"schemaVersion": "0.1.0",
"fixtureId": "map.empty-offline",
"template": { "id": "map", "version": "0.1.0" },
"title": "Empty offline spatial scene",
"description": "Acceptance state proving that the page shell remains usable without provider data or live entity streams.",
"state": "offline",
"viewport": {
"center": [37.6176, 55.7558, 250],
"heading": 0,
"pitch": -45,
"range": 18000
},
"capabilities": ["camera", "selection"],
"styleProfiles": [],
"scene": {
"layers": [],
"places": [],
"movingObjects": [],
"stations": [],
"routes": [],
"tracks": [],
"zones": []
},
"selection": { "entityId": null },
"acceptance": [
{ "id": "state.offline-shell", "expect": ["Header, navigation, Inspector entry and retry action remain available."] },
{ "id": "state.no-phantom-data", "expect": ["The renderer does not retain entities from a previously opened scene."] },
{ "id": "state.explainable", "expect": ["The page distinguishes offline from loading, empty and error states."] }
]
}
@@ -0,0 +1,71 @@
{
"schemaVersion": "0.1.0",
"template": { "id": "map", "version": "0.1.0" },
"metric": "camera-range-meters",
"intervalRule": "min-inclusive-max-exclusive",
"policies": [
{
"id": "grid.planetary",
"target": "grid",
"outsideRange": "nearest-band",
"hysteresisRatio": 0.08,
"bands": [
{ "id": "local", "minRange": 0, "maxRange": 40000, "representation": "geometry", "styleVariant": "grid-local", "density": 1 },
{ "id": "district", "minRange": 40000, "maxRange": 180000, "representation": "geometry", "styleVariant": "grid-district", "density": 0.5 },
{ "id": "regional", "minRange": 180000, "maxRange": 700000, "representation": "geometry", "styleVariant": "grid-regional", "density": 0.2 },
{ "id": "continental", "minRange": 700000, "maxRange": 3000000, "representation": "geometry", "styleVariant": "grid-continental", "density": 0.08 },
{ "id": "planetary", "minRange": 3000000, "maxRange": 50000000, "representation": "geometry", "styleVariant": "grid-planetary", "density": 0.02 }
]
},
{
"id": "place.city",
"target": "place",
"outsideRange": "hidden",
"hysteresisRatio": 0.1,
"bands": [
{ "id": "regional", "minRange": 100000, "maxRange": 900000, "representation": "standard", "styleVariant": "place-medium" },
{ "id": "planetary", "minRange": 900000, "maxRange": 50000000, "representation": "summary", "styleVariant": "place-large" }
]
},
{
"id": "moving-object.transport",
"target": "moving-object",
"outsideRange": "hidden",
"hysteresisRatio": 0.08,
"bands": [
{ "id": "detail", "minRange": 0, "maxRange": 15000, "representation": "detailed", "styleVariant": "transport-detail", "maxItems": 2500 },
{ "id": "standard", "minRange": 15000, "maxRange": 70000, "representation": "standard", "styleVariant": "transport-standard", "maxItems": 1500 },
{ "id": "cluster", "minRange": 70000, "maxRange": 300000, "representation": "cluster", "styleVariant": "transport-cluster", "maxItems": 400 }
]
},
{
"id": "station.transport",
"target": "station",
"outsideRange": "hidden",
"hysteresisRatio": 0.08,
"bands": [
{ "id": "detail", "minRange": 0, "maxRange": 30000, "representation": "detailed", "styleVariant": "station-detail" },
{ "id": "standard", "minRange": 30000, "maxRange": 120000, "representation": "standard", "styleVariant": "station-standard" }
]
},
{
"id": "zone.operational",
"target": "zone",
"outsideRange": "hidden",
"hysteresisRatio": 0.05,
"bands": [
{ "id": "geometry", "minRange": 0, "maxRange": 100000, "representation": "geometry", "styleVariant": "zone-geometry", "maxItems": 500 },
{ "id": "summary", "minRange": 100000, "maxRange": 500000, "representation": "summary", "styleVariant": "zone-summary", "maxItems": 100 }
]
},
{
"id": "track.rail",
"target": "track",
"outsideRange": "hidden",
"hysteresisRatio": 0.05,
"bands": [
{ "id": "geometry", "minRange": 0, "maxRange": 600000, "representation": "geometry", "styleVariant": "rail-track" }
]
}
]
}
@@ -0,0 +1,128 @@
{
"schemaVersion": "0.1.0",
"fixtureId": "map.operational",
"template": { "id": "map", "version": "0.1.0" },
"title": "Operational spatial scene",
"description": "Minimal provider-neutral scene covering the reusable spatial entities already proven in NODE.DC Engine.",
"state": "ready",
"viewport": {
"center": [37.6176, 55.7558, 250],
"heading": 15,
"pitch": -42,
"range": 18000
},
"capabilities": ["camera", "base-layer", "buildings", "grid", "labels", "pins", "moving-objects", "traces", "routes", "tracks", "stations", "zones", "selection"],
"styleProfiles": [
{ "id": "layer.base.neutral", "kind": "layer", "variant": "neutral-dark", "opacity": 1 },
{ "id": "layer.buildings.default", "kind": "layer", "variant": "extruded-neutral", "opacity": 0.86 },
{ "id": "grid.planetary.major", "kind": "grid", "variant": "major", "color": "#8f72dc", "opacity": 0.48, "width": 1 },
{ "id": "label.place.large", "kind": "label", "variant": "place-large", "color": "#ffffff", "opacity": 1, "size": 28 },
{ "id": "label.entity.compact", "kind": "label", "variant": "entity-compact", "color": "#ffffff", "opacity": 0.92, "size": 13 },
{ "id": "label.station.medium", "kind": "label", "variant": "station-medium", "color": "#ffffff", "opacity": 0.95, "size": 16 },
{ "id": "pin.transport.active", "kind": "pin", "variant": "transport-active", "color": "#ff2f92", "opacity": 1, "size": 22 },
{ "id": "pin.station.metro", "kind": "pin", "variant": "station-metro", "color": "#8f72dc", "opacity": 1, "size": 26 },
{ "id": "pin.station.rail", "kind": "pin", "variant": "station-rail", "color": "#ffffff", "opacity": 1, "size": 22 },
{ "id": "line.route.primary", "kind": "line", "variant": "route-primary", "color": "#ff2f92", "opacity": 0.9, "width": 4 },
{ "id": "line.track.rail", "kind": "line", "variant": "track-rail", "color": "#8f72dc", "opacity": 0.8, "width": 2 },
{ "id": "fill.zone.operational", "kind": "fill", "variant": "operational-zone", "color": "#ff2f92", "opacity": 0.22 }
],
"scene": {
"layers": [
{ "id": "base.default", "type": "base", "visible": true, "mode": "surface", "styleProfileId": "layer.base.neutral" },
{ "id": "buildings.default", "type": "buildings", "visible": true, "mode": "volume", "styleProfileId": "layer.buildings.default", "visibility": { "minRange": 0, "maxRange": 70000 } },
{
"id": "grid.planetary",
"type": "grid",
"visible": true,
"mode": "graticule",
"styleProfileId": "grid.planetary.major",
"lodLevels": [
{ "level": 0, "minRange": 3000000, "maxRange": 50000000 },
{ "level": 1, "minRange": 700000, "maxRange": 3000000 },
{ "level": 2, "minRange": 180000, "maxRange": 700000 },
{ "level": 3, "minRange": 40000, "maxRange": 180000 },
{ "level": 4, "minRange": 0, "maxRange": 40000 }
]
}
],
"places": [
{
"id": "place.moscow",
"name": "Москва",
"position": [37.6176, 55.7558, 220],
"label": { "text": "МОСКВА", "styleProfileId": "label.place.large" },
"visibility": { "minRange": 100000, "maxRange": 50000000 }
}
],
"movingObjects": [
{
"id": "vehicle.tram.017",
"objectType": "tram",
"status": "active",
"position": [37.6242, 55.7604, 4],
"heading": 124,
"pinStyleProfileId": "pin.transport.active",
"label": { "text": "ТМ 17", "styleProfileId": "label.entity.compact" },
"trace": [[37.615, 55.756, 4], [37.619, 55.758, 4], [37.6242, 55.7604, 4]]
},
{
"id": "vehicle.rail.mcd2",
"objectType": "rail",
"status": "delayed",
"position": [37.579, 55.769, 4],
"heading": 82,
"pinStyleProfileId": "pin.transport.active",
"label": { "text": "МЦД-2 · +3 мин", "styleProfileId": "label.entity.compact" }
}
],
"stations": [
{
"id": "station.metro.tverskaya",
"stationType": "metro",
"position": [37.604, 55.7647, -20],
"pinStyleProfileId": "pin.station.metro",
"label": { "text": "Тверская", "styleProfileId": "label.station.medium" }
},
{
"id": "station.rail.rizhskaya",
"stationType": "rail",
"position": [37.6328, 55.7927, 4],
"pinStyleProfileId": "pin.station.rail",
"label": { "text": "Рижская", "styleProfileId": "label.station.medium" }
}
],
"routes": [
{
"id": "route.tram.017",
"coordinates": [[37.595, 55.748, 4], [37.607, 55.754, 4], [37.6242, 55.7604, 4], [37.64, 55.772, 4]],
"styleProfileId": "line.route.primary",
"label": { "text": "Маршрут 17", "styleProfileId": "label.entity.compact" }
}
],
"tracks": [
{
"id": "track.rail.north-east",
"coordinates": [[37.579, 55.769, 4], [37.606, 55.781, 4], [37.6328, 55.7927, 4]],
"styleProfileId": "line.track.rail"
}
],
"zones": [
{
"id": "zone.depot.control",
"geometry": {
"type": "Polygon",
"coordinates": [[[37.61, 55.752], [37.632, 55.752], [37.632, 55.765], [37.61, 55.765], [37.61, 55.752]]]
},
"styleProfileId": "fill.zone.operational",
"label": { "text": "Операционная зона", "styleProfileId": "label.entity.compact" }
}
]
},
"selection": { "entityId": "vehicle.tram.017" },
"acceptance": [
{ "id": "scene.provider-neutral", "expect": ["Scene contains no renderer credentials or provider-specific object types."] },
{ "id": "scene.shared-label-language", "expect": ["Places, vehicles, stations, routes and zones resolve labels through shared style profiles."] },
{ "id": "scene.grid-lod", "expect": ["Grid changes density through five non-overlapping range bands without disappearing at a boundary."] },
{ "id": "scene.selection", "expect": ["Selection resolves to an existing scene entity and can open the canonical Inspector."] }
]
}