Roofpig
Roofpig copied to clipboard
Problems with rotations in setupmoves / alg not working the same way
Hello,
I am running into an issue.
I am trying to use your library to show 2 cubes.
A first cube with the scramble instructions and a second with the algorithm (one OLL algorithm in this example
In the first cube, I put my scrambling sequence as algorithm and it works as expected
I then use that same sequence as "setupmoves" for the 2nd cube, but some of the colors are mixed up
The image below shows the first cube with fully executed algorithm and the second one in the initial state (and they should be identical)
The problem seems to be coming from the rotation (y) at the end, if I remove that, they are identical.
I do however need that rotation in the setup step, as I cannot otherwise apply the resolution algorithm (which expects a specific rotation). If I remove the "y" from the setupmoves and add it as first step of the algorithm, I get the correct end result.
I looks like the rotation are not managed the same way in the setupmoves than in the algorithm
They are identical, only that the colors are assigned incorrectly. Whenever there is any slice moves or cube moves in alg, the color will be wrong. set ALG=M, with or without setupmoves and see
it is just another manifestation of issue 15
I think I can cure it, but I cannot determine whether it is causing any side effects.
Since the repo is not open, I can't make a pull request.
If you want to test my change, do this:
edit the roofpig and three js file
search for the string
this.map=t.start_map(),e&&this.track(e)
there is exactly one occurance.
delete the part after the comma, make it read
this.map=t.start_map()
Seems to me the fix is working fine.