Open rokicki opened 4 years ago
I believe the solution here is in widget.ts. We add a boolean saying we are "animating an appended move" and a "from state" and a "move-being-animated" (the "to state" we can get from the normal place.) Whenever we are "animating an append moved" the scrubber is always at the extreme right. On any action (another move coming in, scrubber hit, play/stop/etc. hit) we kill this new state and do a quick jump to the end of the new algorithm. Otherwise, things are pretty much as with the old twizzle, except we actually animate rather than jumping.
This is resolved on the branch betterclickanim (modulo some glitches that may need to be ironed out). Leaving it on the branch for review.
Right now if you click a move in twizzle, the move gets appended to the algorithm and the move is executed, but there is no coalescing of moves (say, U then U into U2). If you enable automatic coalescing, then clicking the second U causes the cube to "jump" back to the state before the first U and execute a U2; this is jarring and incorrect. This should be improved to behave similarly to the original twizzle (currently at twizzle.cubing.net).