cubing / twisty.js

The functionality of `twisty.js` is now part of `cubing.js`. Please see: https://js.cubing.net/cubing/twisty/
GNU General Public License v3.0
60 stars 15 forks source link

Proper translation between JSON algs and alg strings. #10

Closed lgarron closed 11 years ago

lgarron commented 13 years ago

I started this a while ago (still uncommitted), but this needs to be done carefully some time. It needs to incorporate things like commutator and comment parsing, and the ability to make text displays of algs correspond to animations.

lgarron commented 13 years ago

This probably just needs some proper classes with convenience methods and translation to twisty.js-usable formats.

jfly commented 13 years ago

By "JSON alg", you mean a twisty.js "move", right? By "move", I mean an element of the moveQueue in the file "twisty.js".

lgarron commented 13 years ago

A "move" is a move. An alg would be a sequence of moves. The queue is a crude example of that, but actual representations of algs have some subtleties (normalizing / condensing moves, preserving metadata like commutators and/or comments).

jfly commented 13 years ago

Are you sure that's the sort of thing twisty.js should be dealing with? That really seems like an algnexus thing.

lgarron commented 11 years ago

https://github.com/cubing/twisty.js/blob/master/inc/twisty/twisty_alg.js has rudimentary support by now.