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

[Feature request] apply an LL masking on any face in any orientation #275

Open trexrush opened 1 year ago

trexrush commented 1 year ago

Goal

I would like to show a last layer mask (I believe this is experimentalStickering) on any face (for example, to visualize a ZBLS algroithm using the ZBLS mask with green cross and blue last layer on 3x3)

and have this work with any visualization (critical ones for my use case are NxN, Megaminx and Megaminx LL SVG Visualization)

Possible solution

an extra config option to apply an LL masking after applyingexperimentalSetupAlg()

(dont know the technical details of how Mask is currently implemented but might also need to modify to apply on whatever face is currently in the F position after the setup moves have been applied)

might also be a challenge to implement with the LL visualizations? Not sure

Alternatives

No response

lgarron commented 1 year ago

This sounds more like you want to show a puzzle with green cross, more than you want to show cross on F, right?

There are some short-term workarounds — could you let us know more about the use case for this?

trexrush commented 1 year ago

Currently applying a mask only applies it to the initial state of the puzzle, so typically white top. My specific use case is to apply the mask in a way that for, say, PLL mask, it would apply it to the yellow side. using experimentalSetupAlg seems to be applied after the mask, meaning that the mask still shows highlights a PLL mask on white rather than considering any rotations in the setup state.

So you are correct. There is a practical reason for a pre-mask setup alg, currently experimentalSetupAlg acts like a post-mask setup alg.