From fa12dd4ae56026dc4c78988fa8e73f35da2c19cc Mon Sep 17 00:00:00 2001 From: astoniab <52107893+astoniab@users.noreply.github.com> Date: Sat, 10 Jun 2023 10:43:25 -0400 Subject: [PATCH] Add new option for reversing custom timing --- funstim.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/funstim.html b/funstim.html index e166b92..8098b8b 100644 --- a/funstim.html +++ b/funstim.html @@ -171,7 +171,7 @@

Custom Generation Settings

Enter time offset (ms) and position pairs for each action separated by commas. When the last action is reached, the cycle will start again at the beginning. - Each value in the pair can be further modified by appending a : and then an increment modifier to adjust the value for the next cycle. A second : and value can be added to stop the increment when a specific value is reached. A third : and value (0 or 1) can be added to indicate if the increment should be reversed when the stop target is reached. The reverse will continue until the inital value is reached and then reverse again continuing the cycle. + Each value in the pair can be further modified by appending a : and then an increment modifier to adjust the value for the next cycle. A second : and value can be added to stop the increment when a specific value is reached. A third : and value (0, 1, or 2) can be added to indicate if the increment should be reversed or start over when the stop target is reached. 0 means the value will stop incrementing, 1 means the increment will be reversed until it's back to the original value (and then continue reversing between the values), and 2 means it will jump back to the original value and continue incrementing from there. e.g. "500,20:-1,1000:-10,80:+1:90:1" = 1st action at +500ms at position 20 then decrement position by 1, 2nd action at +1000ms at position 80, then decrement ms by 10 and increment position by 1 until it gets to 90 then reverse until it's back at 80
@@ -427,7 +427,9 @@

Save/Load Settings

ct[ctpos].currentat=maxat; if(ct[ctpos].revat && ct[ctpos].revat==1) { ct[ctpos].incatmult=-ct[ctpos].incatmult; - } + } else if(ct[ctpos].revat && ct[ctpos].revat==2) { + ct[ctpos].currentat=ct[ctpos].startat; + } } } @@ -447,7 +449,9 @@

Save/Load Settings

ct[ctpos].currentpos=maxpos; if(ct[ctpos].revpos && ct[ctpos].revpos==1) { ct[ctpos].incposmult=-ct[ctpos].incposmult; - } + } else if(ct[ctpos].revpos && ct[ctpos].revpos==2) { + ct[ctpos].currentpos=ct[ctpos].startpos; + } } }