Browse Source

Confirmed ONLY tracks visible, now fixed

refactor/sync-centralize
RUSHIL AMBARISH KADU 3 months ago
parent
commit
5ebd55d876
  1. 10
      steps/src/p5/radarSketch.js

10
steps/src/p5/radarSketch.js

@ -16,6 +16,7 @@ import {
toggleVelocity, toggleVelocity,
toggleVehicleDimensions, toggleVehicleDimensions,
toggleClusterColor, toggleClusterColor,
toggleConfirmedOnly,
} from "../dom.js"; } from "../dom.js";
import { import {
drawStaticRegionsToBuffer, drawStaticRegionsToBuffer,
@ -205,6 +206,9 @@ export const radarSketch = function (p) {
// } // }
if (togglePredictedPos.checked) { if (togglePredictedPos.checked) {
for (const track of appState.vizData.tracks) { for (const track of appState.vizData.tracks) {
if (toggleConfirmedOnly.checked && track.isConfirmed === false) {
continue;
}
const log = track.historyLog.find((log) => log.frameIdx === appState.currentFrame); const log = track.historyLog.find((log) => log.frameIdx === appState.currentFrame);
if ( if (
log && log &&
@ -229,6 +233,9 @@ export const radarSketch = function (p) {
drawTrajectories(p, plotScales); drawTrajectories(p, plotScales);
if (toggleCovariance.checked) { if (toggleCovariance.checked) {
for (const track of appState.vizData.tracks) { for (const track of appState.vizData.tracks) {
if (toggleConfirmedOnly.checked && track.isConfirmed === false) {
continue;
}
const log = track.historyLog.find( const log = track.historyLog.find(
(log) => log.frameIdx === appState.currentFrame); (log) => log.frameIdx === appState.currentFrame);
if ( if (
@ -252,6 +259,9 @@ export const radarSketch = function (p) {
} }
if (toggleVehicleDimensions.checked) { if (toggleVehicleDimensions.checked) {
for (const track of appState.vizData.tracks) { for (const track of appState.vizData.tracks) {
if (toggleConfirmedOnly.checked && track.isConfirmed === false) {
continue;
}
const log = track.historyLog.find( const log = track.historyLog.find(
(log) => log.frameIdx === appState.currentFrame); (log) => log.frameIdx === appState.currentFrame);
if ( if (

Loading…
Cancel
Save