Add stopwatch animation variable
BlazeWolf1122 opened this issue ยท 1 comments
useful for making things where clock can't be used
it also may need it's own JSON section
say, you add a timer to check how long it takes for something to reach X speed, in this case needing a literal stopwatch
this would also be useful in applications where a "pause" or "rewind" would be required, instances where a simple duration or a clock flatout would not work
"animations": [
{
"animationType": "rotation",
"variable": "stopwatch_timer",
"centerPoint": [0.0,0.0,0.0],
"axis": [0.0,0.0,1],
"offset": -135.0
}
]
this is a "stopwatch" animation system thing for how to set it up
ihibitors would "pause" the stopwatch, translations would add/remove to the "stopwatch" value "timeUnit", based on the translation axis
visibility would reset the clock when the value is at 0
"clocks" : [
{
"name" : "stopwatch_timer",
"timeUnit" : 1, (time unit is in ticks)
"animations": [
{
"animationType": "visibility",
"variable": "startClock", (custom variable)
"clampMin": 1,
"clampMax": 1,
},
{
"animationType": "inhibitor",
"variable": "speed",
"clampMin": 0,
"clampMax": 100,
},
{
"animationType": "translation",
"variable": "stopwatch_timer",
"axis": [0,1,0]
}
]
]
While I can see a few use-cases for this, the animation system is not meant to be timer-based. It's meant to be state-based. Therefore, there's not really anything I can do to implement this easily whatsoever. Considering the use-cases are not well defined, and the amount of time it will take, I'm flagging this as a wontdo. If someone wants to tackle it via PR they can, but I'm not going to tackle it myself.