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
255 stars 46 forks source link

Supercube-style stickering (distinct center pieces for all puzzles) #180

Open brandonwong55 opened 2 years ago

brandonwong55 commented 2 years ago

It would be nice if we could have the option to turn on supercube-style stickering for all puzzles so that center pieces are distinguishable.

lgarron commented 2 years ago

Does https://experiments.cubing.net/cubing.js/twisty/supercube.html work for you?

You can already do that today with:

<script type="module" src="https://cdn.cubing.net/js/cubing/twisty"></script>

<twisty-player
  experimental-stickering="picture"
  experimental-sprite="./supercube-sprite.png"
></twisty-player>

(You can use https://experiments.cubing.net/cubing.js/twisty/supercube-sprite.png or make your own, just make sure to serve the image from a web server on the same domain as your page.)

lgarron commented 2 years ago

Also, we don't have a 5x5x5 image right now, but it should be easy to adapt Stefan's if you want.

brandonwong55 commented 2 years ago

Cool, the image in the centers of the 3x3 works for me. I was wondering though if a generalized implementation could be made. This came to my mind when I was playing with a 2x2-Skewb hybrid. There were triangular center pieces that I was trying to make distinguishable.

On Wed, Mar 30, 2022 at 4:48 PM Lucas Garron @.***> wrote:

Also, we don't have a 5x5x5 image right now, but it should be easy to adapt Stefan's if you want.

— Reply to this email directly, view it on GitHub https://github.com/cubing/cubing.js/issues/180#issuecomment-1083712709, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIMUTRAH7YQV6WWP6OTKMRDVCTK4BANCNFSM5SCETWQA . You are receiving this because you authored the thread.Message ID: @.***>

rokicki commented 2 years ago

I wonder if a generic gradient might work here. Each sticker would have a distinct full gradient so for instance on an nxnxn all yellow stickers would be identical but have a clear direction.

On Wed, Mar 30, 2022 at 4:18 PM brandonwong55 @.***> wrote:

Cool, the image in the centers of the 3x3 works for me. I was wondering though if a generalized implementation could be made. This came to my mind when I was playing with a 2x2-Skewb hybrid. There were triangular center pieces that I was trying to make distinguishable.

On Wed, Mar 30, 2022 at 4:48 PM Lucas Garron @.***> wrote:

Also, we don't have a 5x5x5 image right now, but it should be easy to adapt Stefan's if you want.

— Reply to this email directly, view it on GitHub <https://github.com/cubing/cubing.js/issues/180#issuecomment-1083712709 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AIMUTRAH7YQV6WWP6OTKMRDVCTK4BANCNFSM5SCETWQA

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/cubing/cubing.js/issues/180#issuecomment-1083746414, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMOLS6Q36ZR6RSXAYLVRSTVCTOL7ANCNFSM5SCETWQA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

--

lgarron commented 2 years ago

I wonder if a generic gradient might work here. Each sticker would have a distinct full gradient so for instance on an nxnxn all yellow stickers would be identical but have a clear direction.

I have some screenshots of an earlier experiment with this: megaminx  __ Scramble_R++ D-- R++ D-- R++ D-- R++ D++ R-- D-- U'_R-- D++ R++ D++ R++ D++ R++ D-- R++ D++ U'_R-- D++ R-- D++ R++ D-- R-- D-- R-- D++ U_R-- D-- R-- D++ R++ D++ R-- D-- R-- D-- U'_R-- D++ R-- D++ R-- D-- R++ D++ R-- D++ U'_R++

Personally, I think this doesn't look too great. It looks like some sort of mis-applied shading, and is too subtle if the gradient goes across an entire face. But if you make the gradient go across each sticker, that also looks really harsh.

I'd personally rather hold off on implementing something beyond sprite support until we can go with something like Pochmann-style or come up with another nice alternative.