# Introducing Twizzle (alpha)



## Lucas Garron (Jul 22, 2021)

So, it's been a while since I announced alg.cubing.net, and it hasn't changed much over the years. That's because I've been working from scratch with Tom Rokicki to build a much more powerful successor called Twizzle!

We have so much more to do, we not even in beta yet!
However, you can now start using it at:

https://alpha.twizzle.net/
​
Twizzle (short for "twisty puzzle") is an open source project based on a new library called cubing.js and its <twisty-player>, which allows us to support lots of new features:


All WCA puzzles and WCA notationMore & custom puzzlesExtended features
Puzzle solvers
(Clock is currently 2D and doesn't show pins yet.)
Bluetooth and keyboard input (doesn't work well for all puzzles right now).
(Square-1 doesn't currently check that corners stay together and is only 2D so far.)
From Walter Randelshofer's Pretty Patterns database.
General puzzle format handling (using the KPuzzle format, based on KSolve).

So far we have an "editor" (similar to alg.cubing.net) and an "explorer", but we're working to combine those into a single app and have a few more experiments to bring in.
You can see the influence of alg.cubing.net, and also the rather general puzzle support, which is almost entirely thanks to Tom.

I've started a video series explaining Twizzle, and plan to cover new features as we work on them.
In particular, there are a few important open topics (notation, accessibility, etc.) where I want to reach out to the community before we go to beta and v1.0.

*Twizzle Diaries — Ep. 1: What If?*


*Twizzle Diaries — Ep. 2: Ten Years Ago*


Please try out Twizzle alpha and let us know what you think!
There are a lot of things we haven't gotten around to, and it would be useful to know what kind of functionality is valuable for you.


----------



## LBr (Jul 22, 2021)

Bye Bye alg.cubing.net


----------



## Filipe Teixeira (Jul 22, 2021)

Congratulations Lucas, the app is beautiful and easy to use.
I'm looking forward to use it from now on.

Keep on the good work!


----------



## Cubing Forever (Jul 22, 2021)

Wow that's nice!! Do you think it's possible/feasible to build a web-based Cube Explorer-like solver?

Edit: ACube.js exists wow!!


----------



## OreKehStrah (Jul 22, 2021)

As someone who uses custom color schemes on all my cubes, would it be possible to add a color scheme customization option in the future? Obviously not necessary but would be a neat QoL feature!


----------



## effperm (Jul 22, 2021)

yoooo this is actually awesome


----------



## DuckubingCuber347 (Jul 22, 2021)

O boy, I always wanted to solve a 40X40!!



But really, this looks awesome.


----------



## qwr (Jul 22, 2021)

Since I learned basic js I can help contribute


----------



## pjk (Jul 22, 2021)

Nice work @Lucas Garron. Just watched both videos, nice edits. I think making a video showing how to use Twizzle, why you should use it, why it's useful, etc. would be useful for new people to the community who aren't sure how it is used 1k times/day and would perhaps open their curiosity to it. Keep up the good work, hope all is well with you.


----------



## BenChristman1 (Jul 22, 2021)

It would be great if you could put the movecount of the solve (QTM, HTM, STM, etc.) into Twizzle, like it is in ACN.


----------



## Christopher Mowla (Jul 23, 2021)

Will alg.cubing.net going to stay on the air even after a beta comes out, or do we have to update the links to all the algs in the wiki again?


----------



## CodingCuber (Jul 23, 2021)

Did a CFOP example solve with this. The "Alg Tools" are really useful, especially the scramble tool. Found it really enjoyable to use.

Scramble: D2 F' B2 R' B' U' L B R F2 D2 B2 D B2 U F2 D' B2 U R2 U'

x2 R D L' U L' B F //cross
D2 R U' R' //F2L1
U' B2 R B2 R' //F2L2
U' L' U' L U2 L U' L' //F2L3
y L U' L' U2 L U' //F2L4
y' R U R' U' F' //OLL
y M2 U M U2 M' U M2 //PLL


----------



## Megaminx lover (Jul 23, 2021)

alpha.twizzle.net dosen't work on my computer.


----------



## Lucas Garron (Jul 23, 2021)

Cubing Forever said:


> Wow that's nice!! Do you think it's possible/feasible to build a web-based Cube Explorer-like solver?
> 
> Edit: ACube.js exists wow!!


Yep!
Tom has been working on twsearch, which is a more powerful replacement for KSolve and ACube. The goal is to make that available on the web similar to ACube.js, and we're pretty close!



OreKehStrah said:


> As someone who uses custom color schemes on all my cubes, would it be possible to add a color scheme customization option in the future?



Yeah, this is a top request. We need to think about it carefully, because people have a variety of color scheme needs:

Colorblind folks who might have different needs for distinguishable colors.
People who like to substitute an individual color vs. rearrange a bunch.
Viewing algs with your preferred color scheme or LL face.
Reconstructions of solves performed on some other color schemes (less of a problem now that most Japanese cubers use BOY).
Reorienting the color scheme of a reconstruction to match your cross color.
... and then we need a way to handle this for all puzzles, and a way to "remember" such a setting for the right situation. I don't want to implement something super-customizable only for someone's "red" to mean someone else's "white".
I don't want to hold up 3x3x3 color schemes until we have a full solution, but I definitely want to get it right.



TheCubingCuber347 said:


> O boy, I always wanted to solve a 40X40!!



You wouldn't be the first! 

https://experiments.cubing.net/cubing.js/stress-tests/40x40x40.html






pjk said:


> Nice work @Lucas Garron. Just watched both videos, nice edits. I think making a video showing how to use Twizzle, why you should use it, why it's useful, etc. would be useful for new people to the community who aren't sure how it is used 1k times/day and would perhaps open their curiosity to it. Keep up the good work, hope all is well with you.



Thanks! First order of priority was just getting the site working and announced, but we're definitely working on a basic explainer vid. :-D



BenChristman1 said:


> It would be great if you could put the movecount of the solve (QTM, HTM, STM, etc.) into Twizzle, like it is in ACN.



Thanks, it's good to hear requests like that!
It's definitely on the list. (For now, you can paste an alg back into alg.cubing.net to get counts, since the notation is compatible).



Christopher Mowla said:


> Will alg.cubing.net going to stay on the air even after a beta comes out, or do we have to update the links to all the algs in the wiki again?


I plan to redirect everything to twizzle.net eventually, but we will definitely make sure all existing links continue to lead somewhere that animates the same thing.
For now, it's probably best not to update any place with a lot of links.



Megaminx lover said:


> alpha.twizzle.net dosen't work on my computer.


Hmm, it should work on any modern browser on any device. Could you try on a different network, or with another browser or device?


----------



## abunickabhi (Jul 23, 2021)

Super excited for this project for over a year.

Was fun to follow your work Lucas. Twizzle will be super fun to use.


----------



## Lucas Garron (Jul 23, 2021)

qwr said:


> Since I learned basic js I can help contribute



Contributions are definitely welcome!
We rely on `npm` and GitHub. If you're familiar with those, it should be pretty straigthforward: https://github.com/cubing/cubing.js/blob/main/CONTRIBUTING.md

We have a few things marked as a "good first issue", although they tend to assume familiarity our tooling:








Build software better, together


GitHub is where people build software. More than 94 million people use GitHub to discover, fork, and contribute to over 330 million projects.




github.com




But it might be more effective to just start by tinkering with the code to see what changes.
(I want to make a proper "how to work with the code" video at some point. I have one draft, but it's very long.)

Feel free to join our Slack if you'd like to chat more directly about development!





Slack







join.slack.com


----------



## CodingCuber (Jul 23, 2021)

Lucas Garron said:


> Contributions are definitely welcome!
> We rely on `npm` and GitHub. If you're familiar with those, it should be pretty straigthforward: https://github.com/cubing/cubing.js/blob/main/CONTRIBUTING.md
> 
> We have a few things marked as a "good first issue", although they tend to assume familiarity our tooling:
> ...


I'd love to help contribute. I'll try get around to it when I can.


----------



## qwr (Jul 23, 2021)

Lucas Garron said:


> Contributions are definitely welcome!
> We rely on `npm` and GitHub. If you're familiar with those, it should be pretty straigthforward: https://github.com/cubing/cubing.js/blob/main/CONTRIBUTING.md
> 
> We have a few things marked as a "good first issue", although they tend to assume familiarity our tooling:
> ...


I use GitHub a lot, not really familiar with Node environment. I have taken a computer graphics course in C++ and worked with Plotly


----------



## CodingCuber (Jul 23, 2021)

qwr said:


> I use GitHub a lot, not really familiar with Node environment. I have taken a computer graphics course in C++ and worked with Plotly


Don't worry, Node.js is very simple to get started with. The documentation is straightforward too.


----------



## Lucas Garron (Jul 23, 2021)

CodingCuber said:


> Don't worry, Node.js is very simple to get started with. The documentation is straightforward too.



`node` also has... a lot of compatibility challenges. I'm on macOS, so I personally would do this:

Install Homebrew: https://brew.sh/
`brew install node`
Use the `cubing.js` development instructions: https://github.com/cubing/cubing.js#development
At that point, you should be edit the code for on any part of Twizzle and. Unfortunately, setting up `node` can vary a lot by computer. If anyone runs into issues setting up `node`, feel free to contact me directly and I'll try to help.

(Note: If you have access to GitHub Codespaces, that is much more convenient.)

If anyone is interested in trying out `cubing.js`, it's actually much easier to use a service like CodePen:



https://codepen.io/lgarron/pen/eYvrPrd




https://codepen.io/lgarron/pen/KKmMdzV



We have some documentation for `<twisty-player>` at https://js.cubing.net/cubing/ , although we could certainly use feedback on how to make it more useful.
I know this is all a bit vague, but we're still in the early days!


----------



## Cubing Forever (Jul 23, 2021)

Lucas Garron said:


> Yep!
> Tom has been working on twsearch, which is a more powerful replacement for KSolve and ACube. The goal is to make that available on the web similar to ACube.js, and we're pretty close!


Nice!! Would it support all the WCA puzzles like KSolve++ does?

Kinda off topic: I wanna learn CSS and JS someday(I know basic HTML already). They seem interesting.


----------



## CodingCuber (Jul 23, 2021)

Cubing Forever said:


> Kinda off topic: I wanna learn CSS and JS someday(I know basic HTML already). They seem interesting.


CSS and HTML for me are kinda the boring part. JavaScript (or preferably TypeScript) is where it gets interesting.


----------



## Christopher Mowla (Jul 23, 2021)

Lucas Garron said:


> a much more powerful successor called Twizzle!


I forgot to mention it, but for those who want to appreciate that statement fully, take a look at this post by Tom Rokicki on the twisty puzzles forum!


----------



## Humble Cuber (Jul 23, 2021)

Lucas Garron said:


> Contributions are definitely welcome!
> We rely on `npm` and GitHub. If you're familiar with those, it should be pretty straigthforward: https://github.com/cubing/cubing.js/blob/main/CONTRIBUTING.md
> 
> We have a few things marked as a "good first issue", although they tend to assume familiarity our tooling:
> ...


Lol I would love to help but all I’m okay at is making stuff look pretty with html and cs, I suck at JS and most other languages


----------



## Lucas Garron (Jul 24, 2021)

It sounds like there's quite some interest in learning to work on this kind of stuff, so I'll see about making an "getting started" guide sooner rather than later. (If someone has experience running `node` and `npm` on Windows, please let me know!)



Christopher Mowla said:


> I forgot to mention it, but for those who want to appreciate that statement fully, take a look at this post by Tom Rokicki on the twisty puzzles forum!


Yep, this is an important design constraint!

We make sure that any algorithm that can *fit* in the text field can be animated efficiently. So we handle arbitrarily nested commutators, conjugates, and groupings with repetitions using a tree structure. This is fairly safe to do for permutation puzzles, but there are some fun considerations, like the fact that JS only allows us to handle move indices up to 2^53


----------



## ray5 (Jul 24, 2021)

Congrats on the alpha release!

Is there an option to make the edges of the cube black instead of transparent?

and with the megaminx I can't look at it from the top down. the camera is limited too much.


----------



## xyzzy (Jul 24, 2021)

Lucas Garron said:


> JS only allows us to handle move indices up to 2^53


There's BigInt now!


----------



## rokicki (Jul 24, 2021)

And, if you don't want to install homebrew, the default Mac installer for the latest node works pretty seamlessly.


----------



## qwr (Jul 24, 2021)

imagine being on a Mac and having to use homebrew


----------



## rokicki (Jul 24, 2021)

qwr said:


> Thou shalt have no other gods before me


I prefer to keep my Mac virginal. Eventually I need something that really *needs* homebrew, and then I feel dirty.


----------



## Lucas Garron (Jul 25, 2021)

xyzzy said:


> There's BigInt now!



Indeed!
We're thinking about how much work it would be to use this, but I want to explore some time.



ray5 said:


> Congrats on the alpha release!
> 
> Is there an option to make the edges of the cube black instead of transparent?
> 
> and with the megaminx I can't look at it from the top down. the camera is limited too much.



For right now, you can try this in the JS console or using a bookmarklet:

`document.querySelector("twisty-player").twisty3D.experimentalSetFoundationOpacity(1)`
`document.querySelector("twisty-player").viewerElems[0].orbitControls.experimentalLatitudeLimits = false;`

But I can't guarantee that those will keep working.
If you need to look at the top of the Megaminx, I suggest sticking with Twizzle Explorer for now: https://alpha.twizzle.net/explore/?puzzle=megaminx

Do you have a particular reason to look at the top of a Megaminx? My guess is that people will usually want to do this to look at LL cases, but it would be useful to know.


----------



## qwr (Jul 25, 2021)

rokicki said:


> I prefer to keep my Mac virginal. Eventually I need something that really *needs* homebrew, and then I feel dirty.


my Ubuntu laptop needs no dirtyness (though I am running snaps...)


----------



## Gil.zussman (Aug 3, 2021)

My everlasting inspiration! R E S P E C T!


----------



## tsmosher (Aug 6, 2021)

Lucas Garron said:


> (If someone has experience running `node` and `npm` on Windows, please let me know!)



Although my most recent experience was on a Mac (which I detested for the record), I have experience running node/npm in Windows.

If anyone wants to learn how to write JavaScript/TypeScript, Id love to teach you. I'm not the best JS/TS developer, but i know the ropes.


----------



## Christopher Mowla (Aug 7, 2021)

tsmosher said:


> If anyone wants to learn how to write JavaScript/TypeScript, Id love to teach you. I'm not the best JS/TS developer, but i know the ropes.


Why don't you record some videos and make a course on Udemy so that you can get the satisfaction of teaching and make some cash on the side (and help a lot more people than you can from one-on-one).


----------



## Melvintnh327 (Aug 11, 2021)

when you feel like the 6x6's corner is going to fall off:


----------



## Melvintnh327 (Aug 11, 2021)

I created a 100x100 rubik's cube on twizzle

link: https://alpha.twizzle.net/explore/?puzzlegeometry=c+f+0+f+.02+f+.04+f+.06+f+...


----------



## Christopher Mowla (Aug 21, 2021)

This always _bugged_ me with Twizzle. Twizzle Alpha - Throwing puzzles off the screen bug (Firefox 91.0.1 on Windows 10)


----------



## rokicki (Aug 21, 2021)

Christopher Mowla said:


> This always _bugged_ me with Twizzle. Twizzle Alpha - Throwing puzzles off the screen bug (Firefox 91.0.1 on Windows 10)


Howdy, Christopher! Can anyone else reproduce this? How hard is it to reproduce? Is there anything special about your setup that might help explain it? Anything strange in the console?


----------



## xyzzy (Aug 21, 2021)

Oh, I've been getting that bug a bunch too. Just drag it up and down a bunch and the puzzle vanishes. Nothing shows up in the console for me, though. (Also Firefox; I thought I managed to reproduce it in Chrome before, but I can't get it to happen now.)

Maybe the coordinates turned into a sea of NaNs or something; if you change the puzzle geometry, the puzzle starts rendering again (because all the coordinates are recomputed?), but if you only change the cuts, the puzzle remains unrendered.

On another note, I think it'd be nice if the puzzles could have fully free rotation, rather than only two adjustable Euler angles (one of which is constrained to ±90°). Hovering face labels (like CubeDB has) would also be very nice.


----------



## Christopher Mowla (Aug 21, 2021)

rokicki said:


> Howdy, Christopher! Can anyone else reproduce this? How hard is it to reproduce? Is there anything special about your setup that might help explain it? Anything strange in the console?


It should be very easy to replicate. Just try to spin the puzzle as fast as you can. A few times should do it (if not just once).


----------



## Lucas Garron (Aug 22, 2021)

Christopher Mowla said:


> This always _bugged_ me with Twizzle. Twizzle Alpha - Throwing puzzles off the screen bug (Firefox 91.0.1 on Windows 10)



Thanks for reporting!

(In general, it would help to know more details if you wouldn't mind filing an issue using a template on GitHub. But this thread is totally fine if you prefer; we'd rather hear about issues than not. :-D)



xyzzy said:


> Oh, I've been getting that bug a bunch too. Just drag it up and down a bunch and the puzzle vanishes. Nothing shows up in the console for me, though. (Also Firefox; I thought I managed to reproduce it in Chrome before, but I can't get it to happen now.)
> 
> Maybe the coordinates turned into a sea of NaNs or something; if you change the puzzle geometry, the puzzle starts rendering again (because all the coordinates are recomputed?), but if you only change the cuts, the puzzle remains unrendered.



So, I've tried a bunch in Firefox both on macOS and Windows in a VM, but I haven't been able to reproduce this.
There is definitely an issue with gimbal lock in the 3D library we're using. There's a workaround that's _supposed_ to solve it, but I'm not super confident about it.

That said, I recently rewrote all of this. Could I ask you to see if you still have the issue with the new version?

Visit https://experiments.cubing.net/cubing.js/twisty/twisty-player-v2/
Set camera-latitude-limit to 90.
Spin the player and see if you can cause the issue.
If you do, a screencap of the debugging elements on the right might help.



xyzzy said:


> On another note, I think it'd be nice if the puzzles could have fully free rotation, rather than only two adjustable Euler angles (one of which is constrained to ±90°). Hovering face labels (like CubeDB has) would also be very nice.



Given what I've learned from having latitude limits in alg.cubing.net, I believe very strongly that the camera should be constrained by default.
That said, it's certainly possible that this is important enough for some use cases, so we'll probably evaluate this more at some point.

(Also, note that the latitude is locked to ≈±35° by default. Twizzle Explorer uses 90° right now, but you'll have to use a JS console to unlock that on other pages. The command for this is experimental and subject to change, but I can document it in a GitHub issue if anyone wants.)

I also definitely have plans for face labels, but that will probably take a few months unless someone would like to jump in and contribute.


----------



## bcube (Aug 22, 2021)

Christopher Mowla said:


> This always _bugged_ me with Twizzle. Twizzle Alpha - Throwing puzzles off the screen bug (Firefox 91.0.1 on Windows 10)



As far as I remember, this behavior has also been always present at https://alg.cubing.net/ in Firefox on Windows (sorry for duplicating if that´s what you were implying). 



xyzzy said:


> I think it'd be nice if the puzzles could have fully free rotation.



For users who want to play with the puzzle, a rotation of separated layer/side (compare the edit parameter values for AnimCubeJS) would be also neat.


----------



## xyzzy (Aug 22, 2021)

Lucas Garron said:


> That said, I recently rewrote all of this. Could I ask you to see if you still have the issue with the new version?
> 
> Visit https://experiments.cubing.net/cubing.js/twisty/twisty-player-v2/
> Set camera-latitude-limit to 90.
> ...


Immediately managed to reproduce it, both with and without setting camera-latitude-limit. The longitude values are `null` in "orbit coordinates" and "orbit coordinates request".



https://imgur.com/OwHvGkG


I've never had this problem on alg.cubing.net (any combination of Firefox and Chrome on Windows and Linux).



Lucas Garron said:


> Given what I've learned from having latitude limits in alg.cubing.net, I believe very strongly that the camera should be constrained by default.
> That said, it's certainly possible that this is important enough for some use cases, so we'll probably evaluate this more at some point.


I remember watching one of Kevin Hays's solve analyses (quite a few years ago) and he seemed to have struggled with a.c.n's constrained camera at points. Sometimes you just want to look at the other side without rotating it the long way around first.

(Also, a lot of click-and-drag rotation implementations are kinda horrible and behave unintuitively. pCubes' implementation is one such example, and it's a massive pain trying to rotate the puzzle to how I want it to be oriented in pCubes. Roofpig's is just weird (use drag direction to determine rotation axis and drag distance to determine rotation angle), but it also always resets the camera immediately after the mouse is released. This dumb demo I wrote forever ago has more sensible rotation behaviour (although still not ideal).)


----------



## Lucas Garron (Aug 22, 2021)

bcube said:


> For users who want to play with the puzzle, a rotation of separated layer/side (compare the edit parameter values for AnimCubeJS) would be also neat.



There's definitely a lot to do here! I don't know if we'll end up going with exactly the same solution, but intuitive ways to input moves into all sorts of puzzles is a major goal.



xyzzy said:


> Immediately managed to reproduce it, both with and without setting camera-latitude-limit. The longitude values are `null` in "orbit coordinates" and "orbit coordinates request".
> 
> 
> 
> https://imgur.com/OwHvGkG



Aha! The "latitude": null values are very helpful.
I've deployed a potential fix that probably won't work, but it will rule out some issues. Would you mind fully refreshing the page and seeing what you get now?



xyzzy said:


> (Also, a lot of click-and-drag rotation implementations are kinda horrible and behave unintuitively. pCubes' implementation is one such example, and it's a massive pain trying to rotate the puzzle to how I want it to be oriented in pCubes. Roofpig's is just weird (use drag direction to determine rotation axis and drag distance to determine rotation angle), but it also always resets the camera immediately after the mouse is released. This dumb demo I wrote forever ago has more sensible rotation behaviour (although still not ideal).)



This is also definitely my concern for me. Many free rotation inputs are not very intuitive. Your demo is definitely going in the right direction, but I think it can easily still result in confusing angles for people, especially for any watchers who are not directly controlling the input (which is more common in videos now, as you mention). It can also make it a bit tricky to return to "normal" angles, especially on unfamiliar puzzles. I'd love to see a more thorough analysis of prior art and the relevant tradeoffs.


----------



## qwr (Aug 22, 2021)

plotly has very usable 3d rotation. I wonder how they implement it


----------



## Lucas Garron (Aug 22, 2021)

Lucas Garron said:


> Aha! The "latitude": null values are very helpful.
> I've deployed a potential fix that probably won't work, but it will rule out some issues. Would you mind fully refreshing the page and seeing what you get now?



Okay, I was able to find a Windows install with the issue. Turns out that my fix works after all, and I've fixed this for both alpha.twizzle.net and experiments.cubing.net/cubing.js

For anyone curious, it seems that Firefox on Windows easily reports that the mouse has moved a few pixels but that exactly 0 time has passed since the mouse was at its previous position. We calculate how fast the mouse was moving, and since the mouse moved in exactly 0 time we get a speed of Infinity. This causes further issues similar to NaN ("not a number") like @xyzzy suggested. The workaround is to ignore such mouse movements when it comes to calculating speed.


----------



## bcube (Aug 22, 2021)

Lucas Garron said:


> I've fixed this for both alpha.twizzle.net and experiments.cubing.net/cubing.js



I am not sure whether https://alpha.twizzle.net/edit/ is fixed, however, I was able to replicate the issue right now. Cache was cleared before testing.


----------



## Lucas Garron (Aug 22, 2021)

bcube said:


> I am not sure whether https://alpha.twizzle.net/edit/ is fixed, however, I was able to replicate the issue right now. Cache was cleared before testing.



Would you mind checking https://experiments.cubing.net/cubing.js/twisty/twisty-player-v2/ like @xyzzy at https://www.speedsolving.com/threads/introducing-twizzle-alpha.85019/page-3#post-1451912


----------



## bcube (Aug 22, 2021)

I am not able to replicate the issue anymore at https://experiments.cubing.net/cubing.js/twisty/twisty-player-v2/, both with and without setting camera-latitude-limit. Well done.


----------



## xyzzy (Aug 22, 2021)

bcube said:


> I am not able to replicate the issue anymore at https://experiments.cubing.net/cubing.js/twisty/twisty-player-v2/, both with and without setting camera-latitude-limit. Well done.


Same here, can't replicate it any more on that specific page.


----------



## Cubing Forever (Aug 22, 2021)

@Lucas Garron one more small request:
It would be nice if you add the "forum link" function of a.c.n over here. It helps me link algs and recons easily without having to do a bunch of formatting. Currently, that's the only thing keeping me from switching to twizzle from a.c.n.

Cheers!!


----------



## Christopher Mowla (Aug 22, 2021)

Lucas Garron said:


> Okay, I was able to find a Windows install with the issue. Turns out that my fix works after all, and I've fixed this for both alpha.twizzle.net and experiments.cubing.net/cubing.js
> 
> For anyone curious, it seems that Firefox on Windows easily reports that the mouse has moved a few pixels but that exactly 0 time has passed since the mouse was at its previous position. We calculate how fast the mouse was moving, and since the mouse moved in exactly 0 time we get a speed of Infinity. This causes further issues similar to NaN ("not a number") like @xyzzy suggested. The workaround is to ignore such mouse movements when it comes to calculating speed.


This doesn't sound like a good long-term resolution; but, if you are certain that the NaN error is only caused by (and will only ever be caused by) our *superman* turning speed of the puzzles, then it will suffice! (Just be careful!) I had no idea that Firefox on Windows was actually a special combination of colliding software that would produce the error, so I'm glad that I mentioned that to at least help you to identify the error type so quickly.

But I wasn't able to reproduce the bug anymore. I guess you exposed us supermen to *green kryptonite* or changed the color of the sun shining on twizzle!

But thanks! You saved a lot of page refreshes for the lot of us!

And I recall this same bug happening to me when I clicked on your 2x2x2 Hamiltonian Circuit link. I am not sure exactly what caused it to break regarding that, but if it wasn't the same cause here, this may have fixed that cause too.


----------



## Christopher Mowla (Sep 10, 2021)

@Lucas Garron 
When I clicked on the link to the pattern that Per found an algorithm to in your post on twistypuzzles, this happened. (This is the puzzle vanishing bug from before, only this time, the puzzle disappears without spinning it. Just gently turning it! You can see where I am clicking.)

Again on Windows 10 with Firefox. (Firefox just had an update. Maybe this has something to do with it? Firefox 92.0 (64-bit) )


----------



## rokicki (Sep 10, 2021)

Thanks for the report; we'll get right on it!


----------



## Lucas Garron (Sep 11, 2021)

Christopher Mowla said:


> @Lucas Garron
> When I clicked on the link to the pattern that Per found an algorithm to in your post on twistypuzzles, this happened. (This is the puzzle vanishing bug from before, only this time, the puzzle disappears without spinning it. Just gently turning it! You can see where I am clicking.)
> 
> Again on Windows 10 with Firefox. (Firefox just had an update. Maybe this has something to do with it? Firefox 92.0 (64-bit) )


Thanks for letting us know!

Turns out we were missing the proper fix in one place (that only affected the explorer, not the editor ). I've patched that up and added a guard that should still prevent the puzzle from disappearing even if something goes wrong. Could you let us know if it's robust now?


----------



## Christopher Mowla (Sep 11, 2021)

It didn't break when I tested it just now, so it looks like it's fixed! Thanks!


----------



## abunickabhi (Sep 13, 2021)

Great video on explaining all the features of Twizzle by Lucas and Tom.


----------



## Isaev (Jun 11, 2022)

Lucas Garron​could you please add a bandaging parts visualization?


----------



## Lucas Garron (Jun 11, 2022)

Isaev said:


> Lucas Garron​could you please add a bandaging parts visualization?


We're definitely going to add a way to do this for puzzles like Square-1. Do you have any other particular puzzles in mind, or are you trying to visualize general bandagings?


----------



## OreKehStrah (Jun 12, 2022)

Lucas Garron said:


> We're definitely going to add a way to do this for puzzles like Square-1. Do you have any other particular puzzles in mind, or are you trying to visualize general bandagings?


Bandaging would be sick for 3x3 with bandage cube reduction methods like RUP, PRUM, PPW, etc


----------



## BalsaCuber (Jun 12, 2022)

It looks very nice. Keep working on it.


----------



## Isaev (Jun 13, 2022)

Lucas Garron said:


> We're definitely going to add a way to do this for puzzles like Square-1. Do you have any other particular puzzles in mind, or are you trying to visualize general bandagings?


general bandaging I meant... at least in NxNxN cubes

This is not enough everywhere, and it would be very nice to see in your great simulator

you can, for example, specify as an additional parameter, as here https://joshmermelstein.com/bandaged-cube-explorer?id=0x30000005A1B02D
and to position to a particular move if it isn't possible due to bandaging


----------



## Isaev (Oct 6, 2022)

algorithm conversion bug


----------



## Lucas Garron (Oct 6, 2022)

Isaev said:


> algorithm conversion bug



Thanks for catching! There's an alg format translation bug and Twizzle doesn't support 2U for 3x3x3 yet, so I need to fix up a few things. I'll try to fix this soon.

EDIT: should be fixed now!


----------



## Filipe Teixeira (Oct 7, 2022)

Lucas Garron said:


> Thanks for catching! There's an alg format translation bug and Twizzle doesn't support 2U for 3x3x3 yet, so I need to fix up a few things. I'll try to fix this soon.
> 
> EDIT: should be fixed now!


fast.


----------



## lucazdoescubingstuff (Jan 2, 2023)

Lucas Garron said:


> So, it's been a while since I announced alg.cubing.net, and it hasn't changed much over the years. That's because I've been working from scratch with Tom Rokicki to build a much more powerful successor called Twizzle!
> 
> We have so much more to do, we not even in beta yet!
> However, you can now start using it at:
> ...


when will kilominx be added?


----------



## MagicVince (Jan 2, 2023)

Lucas Garron said:


> We're definitely going to add a way to do this for puzzles like Square-1. Do you have any other particular puzzles in mind, or are you trying to visualize general bandagings?


The "maximum bandage cube" for a given algorithm, as described in this thread, can apply to any puzzle. That would be a great addition.


----------



## Athefre (Jan 2, 2023)

I would like to see support for both the apostrophe (') and the single quote (’) for counter-clockwise turns. I have encountered the issue many times over the years when someone provides a list of algs or example solves from Microsoft Word or some other source. I then paste their solution into Twizzle or alg.cubing.net and the single quote that their source automatically converted to isn't recognized.

Or is there something that I've been doing wrong?


----------



## tsmosher (Jan 2, 2023)

Athefre said:


> I would like to see support for both the apostrophe (') and the single quote (’) for counter-clockwise turns. I have encountered the issue many times over the years when someone provides a list of algs or example solves from Microsoft Word or some other source. I then paste their solution into Twizzle or alg.cubing.net and the single quote that their source automatically converted to isn't recognized.
> 
> Or is there something that I've been doing wrong?


I continue to experience this problem and can't tell you how many times I have simply given up on using acn/twizzle due to this issue (and other white space parsing issues wherein it will refuse to transcribe the solve).

IIRC, someone on the forums claimed that the issue could be resolved by simply updating one of the third party libraries being used.

Tim.


----------



## Lucas Garron (Jan 2, 2023)

lucazdoescubingstuff said:


> when will kilominx be added?



It's already supported! 

Twizzle linkBR2 x2 R2' BL L' U' L2 F2 BR x2 F' U2 R L U' L2' BL2' BR2 U' R F2 U R2' F U2 F' U2' R U2' R2'


Like some WCA puzzles, we only have 2D animation for now, but we'll definitely have 3D animation in the future.



Athefre said:


> I would like to see support for both the apostrophe (') and the single quote (’) for counter-clockwise turns.



This one is a tricky one. On the one hand, I want Twizzle to be as convenient as possible to use. However, we also have a responsibility to set a certain standard for compatibility, and there is an ongoing ecosystem cost to parsing workarounds.

My current thinking is that it might be worth fixing these on *paste*, since they shouldn't occur while typing. This allows a certain level of convenience without locking us into permanent parsing compatibility workarounds. Do you think that would work for you?


----------



## lucazdoescubingstuff (Jan 3, 2023)

Lucas Garron said:


> It's already supported!
> 
> Twizzle linkBR2 x2 R2' BL L' U' L2 F2 BR x2 F' U2 R L U' L2' BL2' BR2 U' R F2 U R2' F U2 F' U2' R U2' R2'
> 
> ...


but when will it be added to twizzle explorer? (i dont really need it rn, just asking)


----------



## Athefre (Jan 3, 2023)

Lucas Garron said:


> My current thinking is that it might be worth fixing these on *paste*, since they shouldn't occur while typing. This allows a certain level of convenience without locking us into permanent parsing compatibility workarounds. Do you think that would work for you?


Yep, that should be all that's needed. I only ever have the problem when pasting, so it could be a good fix. Another minor one would be allowing no spaces between turns or to automatically add spaces when typing if the user doesn't add it. It is easy to "mess up" and not add a space and many older algs and examples didn't have spaces between turns. But I understand that there is a lot going on in the program, so in this case I would prioritize performance over the spacing if the performance is impacted.


----------



## CodingCuber (Jan 5, 2023)

Lucas Garron said:


> This one is a tricky one. On the one hand, I want Twizzle to be as convenient as possible to use. However, we also have a responsibility to set a certain standard for compatibility, and there is an ongoing ecosystem cost to parsing workarounds.
> 
> My current thinking is that it might be worth fixing these on *paste*, since they shouldn't occur while typing. This allows a certain level of convenience without locking us into permanent parsing compatibility workarounds. Do you think that would work for you?


Unsure if this is something you/any other contributors have considered, but a fix to this could be to remap key inputs for the single quote character (’) to the standard apostrophe. That way, you can maintain compatibility but still ensure that the program is convenient to use.


----------



## Lucas Garron (Jan 5, 2023)

lucazdoescubingstuff said:


> but when will it be added to twizzle explorer? (i dont really need it rn, just asking)


Twizzle Explorer is for "doctrinaire" puzzles produced by slicing polyhedra, so that wouldn't really work. However:

You could make a Megaminx or Rex-like minx and look at only corners.
At some point the editor and explorer will be merged into a single app.



CodingCuber said:


> Unsure if this is something you/any other contributors have considered, but a fix to this could be to remap key inputs for the single quote character (’) to the standard apostrophe. That way, you can maintain compatibility but still ensure that the program is convenient to use.


This should be unnecessary, since we disable smart quote replacement on the text areas. This is only an issue for pasted algs.

I've taken a look at some ways to handle pasting and it looks roughly like I expected — doable but definitely also tricky. I'll update this thread if and when I've managed to implement a solution that doesn't introduce more problems than it solves!


----------

