|
@@ -75,9 +75,21 @@ ApplicationWindow {
|
|
|
anchors.fill: parent
|
|
|
radius: 15
|
|
|
color: "transparent"
|
|
|
+ ColorAnimation {
|
|
|
+ id: anim
|
|
|
+ target: neuron
|
|
|
+ property: "color"
|
|
|
+ to: "#000000"
|
|
|
+ duration: 150
|
|
|
+ }
|
|
|
+
|
|
|
function updateColor() {
|
|
|
var alpha = activation.value;
|
|
|
- neuron.color = Qt.rgba(0, 1, 0, Math.max(0.08, alpha))
|
|
|
+ neuron.color = anim.to
|
|
|
+ anim.stop()
|
|
|
+ anim.from = anim.to
|
|
|
+ anim.to = Qt.rgba(0, 1, 0, Math.max(0.08, alpha))
|
|
|
+ anim.start()
|
|
|
}
|
|
|
Component.onCompleted: {
|
|
|
visualizerModel.activationTrigger(layerIndex).updateLayer.connect(neuron.updateColor);
|