Add glowing lines
This commit is contained in:
parent
65cd227f46
commit
cdb32287e3
4 changed files with 57 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue