diff --git a/style_editor.html b/style_editor.html
index 06da07d..a223b3b 100644
--- a/style_editor.html
+++ b/style_editor.html
@@ -5621,29 +5621,35 @@
this.effect_ = new OneshotEffectDetector(this.EFFECT);
this.TRANSITIONS=[];
this.running=[];
+ this.E=[];
this.pos = 0;
for (var i = 0; i < this.N; i++) {
this.TRANSITIONS.push(this.TRANSITION.DOCOPY());
this.running.push(false);
+ this.E.push(null);
}
HandleEffectType(EFFECT_ARG);
}
run(blade) {
+ var TMP = last_detected_blade_effect;
var e = this.effect_.Detect(blade);
if (e) {
this.TRANSITIONS[this.pos].begin();
this.running[this.pos] = true;
+ this.E[this.pos] = last_detected_blade_effect;
this.pos++;
if (this.pos == this.N) this.pos = 0;
}
for (var i = 0; i < this.N; i++) {
if (this.running[i]) {
+ last_detected_blade_effect = this.E[i];
this.TRANSITIONS[i].run(blade);
if (this.TRANSITIONS[i].done()) {
this.running[i] = false;
}
}
}
+ last_detected_blade_effect = last_detected_blade_effect;
}
getColor(led) {
var ret = Transparent();
@@ -6612,15 +6618,12 @@
this.c2p = -1;
}
updateC2P() {
- console.log("POS = " + this.pos_);
for (var i = this.pos_ + 1; i < this.ARGS.length - 1; i++) {
if (this.ARGS[i].getType() != "TRANSITION") {
this.c2p = i;
- console.log("C2P = " + i);
return;
}
}
- console.log("C2P = -1");
this.c2p = -1;
}
begin() {