feat(map): control ghost pin movement speed

This commit is contained in:
DCCONSTRUCTIONS
2026-07-29 18:53:00 +03:00
parent 0c3855eac5
commit 2678295ca7
9 changed files with 121 additions and 8 deletions
@@ -59,6 +59,27 @@ export function GhostPinSettingsPanel({
return current;
})}
/>
<RangeControl
label="Максимальная скорость"
value={configuration.maximumSpeedMetersPerSecond}
min={1}
max={100}
step={1}
formatValue={(value) => `${value} м/с`}
onChange={(maximumSpeedMetersPerSecond) => updateDraft((current) => {
current.view.ghostPins.maximumSpeedMetersPerSecond =
maximumSpeedMetersPerSecond;
current.view.ghostPins.positions =
current.view.ghostPins.positions.map((pin) => ({
...pin,
speedMetersPerSecond: Math.min(
pin.speedMetersPerSecond,
maximumSpeedMetersPerSecond,
),
}));
return current;
})}
/>
<Checker
label="Симуляция движения"
checked={configuration.simulationEnabled}