Add glowing lines

This commit is contained in:
Joey Yakimowich-Payne 2026-02-06 12:54:33 -07:00
commit cdb32287e3
4 changed files with 57 additions and 4 deletions

View file

@ -965,6 +965,17 @@ WarpGraphModel::nodeVolumeState(QtNodes::NodeId nodeId) const {
return {};
}
void WarpGraphModel::setNodePeakLevel(QtNodes::NodeId nodeId, float level) {
constexpr float kDecay = 0.82f;
float &stored = m_peakLevels[nodeId];
stored = std::max(level, stored * kDecay);
}
float WarpGraphModel::nodePeakLevel(QtNodes::NodeId nodeId) const {
auto it = m_peakLevels.find(nodeId);
return it != m_peakLevels.end() ? it->second : 0.0f;
}
void WarpGraphModel::saveLayout(const QString &path) const {
ViewState vs{};
saveLayout(path, vs);