From e13a734ab936161c298c108b509ba61e2d81ffb2 Mon Sep 17 00:00:00 2001 From: rakadu1 Date: Thu, 15 Jan 2026 11:51:54 +0530 Subject: [PATCH] feat: Add vehicle dimensions visualization and enhance track risk coloring Vehicle Dimensions: - Added "Show Dimensions" toggle to the display settings. - Implemented `drawObjectDimensions` in `drawUtils.js` to render object extents as oriented rectangles based on `objectExtentRadii` and `objectExtentAngle`. - Updated `radarSketch.js` to draw dimensions when enabled. - Ensured dimensions and covariance ellipses are drawn at the `correctedPosition` for accurate alignment with track markers. Track Visualization: - Updated `drawTrajectories` to prioritize the `risk` property on track logs for coloring (0=Low/Blue, 1=Medium/Orange, 2=High/Red). - Added fallback to `ttcCategoryTimeline` for backward compatibility. - Fixed off-by-one error in trajectory history filtering to prevent drawing future points. Frame Synchronization & UI: - Refactored frame number display logic across Overlays, Data Explorer, and Timeline. - UI now displays the actual `frameIdx` from the data source instead of the internal array index, resolving discrepancies between the Data Explorer and the main view. --- steps/index.html | 2 + steps/src/dom.js | 1 + steps/src/drawUtils.js | 123 ++++++++++++++++++++++++++---------- steps/src/p5/radarSketch.js | 34 ++++++++-- steps/src/ui.js | 4 +- 5 files changed, 124 insertions(+), 40 deletions(-) diff --git a/steps/index.html b/steps/index.html index c8ac40b..6acdba5 100644 --- a/steps/index.html +++ b/steps/index.html @@ -318,6 +318,8 @@ (P) +