cubing / cubing.js

🛠 A library for displaying and working with twisty puzzles. Also currently home to the code for Twizzle.
https://js.cubing.net/cubing/
GNU General Public License v3.0
232 stars 42 forks source link

[cubing.js issue] Incomplete turns in `<twisty-alg-viewer>` #315

Closed bohdancho closed 5 months ago

bohdancho commented 5 months ago

Steps to reproduce the issue

  1. Go to https://experiments.cubing.net/cubing.js/twisty/twisty-alg-viewer.html
  2. Click on any move in <twisty-alg-viewer>

Observed behaviour

The cube jumps to the selected move, but the turn is not visually finished (as in the cube is slightly out of cubic shape). A click on "step forward" plays the remaining bit of the selected move and fixes the shape instead of playing a new move.

🖼 Screenshots

image

Expected behaviour

I would expect turns to always look complete after jumping to a move. Which would look the same is if I would manually navigate to the same move with step forward/backward buttons.

Environment

Google Chrome Version 120.0.6099.225 (Official Build) (64-bit)

Additional info

I'm going to use <twisty-alg-editor> with readonly as a workaround for now, I'm also thinking about forcing selections to always end at the end of an alg leaf, never in the middle or in the beginning.

I would have to fork cubing.js and tweak the source code for this.

Is there a better alternative?

lgarron commented 5 months ago

This is by design, to indicate what move is being performed at the given index. This is similar to how alg.cubing.net and Twizzle show what move you're on. In the long term I'd like to find something better (perhaps animating the given move).

Could you share more about why you need different functionality?

bohdancho commented 5 months ago

Now that you put it this way, it makes sense to me so I don't need different functionality. Thanks for the clarification!