cubing.js icon indicating copy to clipboard operation
cubing.js copied to clipboard

Variable tempo conjugates

Open ticklemepierce opened this issue 3 years ago • 3 comments

ticklemepierce avatar Feb 26 '22 18:02 ticklemepierce

Thanks for the PR! It definitely matches the style of the existing code, although I'm not sure this is the right place for it.

Is your goal to set the tempo depending on where you start animating, and then keep that tempo for the rest of the alg? Or perhaps that you only plan to be animating one "alg" at a time?

I think my original impression was that you wanted to speed up commutators and conjugates any time they appeared in an alg/solve. The most robust place to do that would be the place where durations are assigned to the alg: https://github.com/cubing/cubing.js/blob/f7f5574f5cdf5937681b09c9381604ef0fc8879e/src/cubing/twisty/controllers/indexer/tree/AlgWalker.ts

Any chance you have a screenshot or two that convey the context for these animations, before I point you too far down a given path?

lgarron avatar Feb 27 '22 03:02 lgarron

I think my ultimate goal would be to have one long algorithm so that I could use this algviewer thing now that I know about it but then have different portions of it be time adjustable.

For example (with the context of my project being geared towards blindsolving):

  • Do set up moves for a given letter at tempo 1
  • Do edge swap alg at tempo 10
  • Undo set up moves for a given letter at tempo 1
  • (repeat for all letters)
  • Do parity alg at x tempo
  • Do set up moves for a given letter at tempo 1
  • Do corner swap alg at tempo 10
  • Undo set up moves for a given letter at tempo 1
  • (repeat for all letters).

Right now I'm able to do this behavior but have to treat every setup, swap, and undo setup alg as totally separate. In other words each letter of the memorization sequence involves setting and unsetting the experimentalSetupAlg as well as the alg. This also would make it harder to do any of the highlighting I think. I can take a peak at the duration tomorrow and see if that fits.

image Here is a screenshot. Also the alg that I used in this PR illustrates it nicely as it does demonstrates what my app would do for a B corner swap follow by D corner swap.

ticklemepierce avatar Feb 27 '22 05:02 ticklemepierce

I have been playing around with duration but I don't understand it fully. It seems tempoScale is the only way to actually change the animation speed because if I change duration it will animate at the same speed for a shorter amount of time (so end up with a partial move).

ticklemepierce avatar Feb 27 '22 23:02 ticklemepierce