fix: render live V2X vehicles in Cesium preview

This commit is contained in:
2026-08-25 12:57:35 +08:00
parent bc845444bb
commit 25cf82e7c7
23 changed files with 198 additions and 58 deletions

View File

@@ -95,10 +95,12 @@ Unbound phases are counted in the panel — override them with `phaseSignalMap`.
Vehicles follow the dashboard's rules: the push `interval` (`0` falls back to
500 ms) sets the animation duration, a vehicle not updated within
`interval * 1.5` is hidden, and hidden entries stay as reusable slots rather
than being removed. Models are named as the dashboard names them —
`car_obu.glb` for OBU vehicles and `${type}${subType}.glb` for recognized
targets — falling back to the first packaged model, with the shortfall reported
in the panel.
than being removed. The OBU data hook calls its model `car_obu.glb`, but the
dashboard's final `CrossCars` template renders `11.glb`; the preview uses that
final rendering contract. Targets use `${type}${subType}.glb`. The dashboard
vehicle assets are packaged under `_preview/v2x-vehicles/`. Valid live vehicles
are lifted clear of the road, remain at least 28 screen pixels in overview, and
the first live push focuses the camera near the vehicle group.
## Coordinate Contract
@@ -119,7 +121,8 @@ without Nginx, use the repository's proxy static server instead of
`python3 -m http.server`:
```bash
V2X_UPSTREAM=http://<v2x-api-host>:<port> \
V2X_UPSTREAM=http://<v2x-api-host>:<port>/dashboardApi \
V2X_WS_UPSTREAM=http://<v2x-ws-host>:<port>/dashboardWebsocket \
npm run serve:v2x-preview -- --root outputs/fengshu-er-road --host 0.0.0.0 --port 7862
```