Closed ghost closed 1 year ago
Indeed, this will unfortunately need a lot more work before it's ready.
index.html
doesn't seem useful (and contains a typo).In any case, this isn't high priority, but it would be okay to have a robust partial implementation. I'd start by making sure at least some of the code from alg.cubing.net.js
(and maybe alg.js
or twisty.js
) is used here.
As said it's just a base. I'll continue work on it. Adding missing stuff and so on.
Ok, Reworked a lot this API, it should works now:
var api = new CubingAPI("alg.cubing.net"); var link = api.generate_link({'alg' : "R U2 R' U' R U' R' "});
{'foo' : bar}
or {'puzzle' : '1x2x3'}
), the link generation will log the exception and return falsevar link = api.generate_link({'alg' : "R U2 R' U' R U' R' "}, api.PRESET_OLL);
for playback, alg type, oll stage. At the moment only two preset are available :
Here some examples of input & output:
api.generate_link({'alg' : "R U2 R' U' R U' R' "}, api.PRESET_OLL); ---> http://alg.cubing.net/?alg=R_U2_R-_U-_R_U-_R-_&view=playback&type=alg&puzzle=3x3x3&stage=OLL
api.generate_link({'alg' : "R U R' U' R' F R2 U' R' U' R U R' F'", 'type' : 'alg', 'title': 'T-PERM', 'stage' : 'full' }); ---> http://alg.cubing.net/?alg=R_U_R-_U-_R-_F_R2_U-_R-_U-_R_U_R-_F-&type=alg&title=T-PERM&stage=full
Thanks for the changes; that looks nicer!
Since alg.cubing.net is far from stable, however, I don't think I'll be merging or working on this feature very soon. That's not because I don't appreciate it, but there are too many other things that need to be done first, and I don't want to commit to a certain API format in more places than necessary. I'll definitely look back at this PR when the time comes, but I don't know if that will be more like a few weeks or a year.
No problems. Anyway when you'll decide to work on it, just contact me, I'll be glad to help finishing it!
heh, am I reading this wrong; or has this PR been open since 2014?
heh, am I reading this wrong; or has this PR been open since 2014?
It has been open!
alg.cubing.net v2 is still far from ready, although I'm working on it on-off.
It looks like this project had a lot of initial momentum, then life happened. I've got a bunch of projects like that in my github.
Is there any way to resurrect time/impetus/interest to get a v2 out there? Maybe I'm misreading. I'll go look at the v2 branch(es).
Is there any way to resurrect time/impetus/interest to get a v2 out there? Maybe I'm misreading. I'll go look at the v2 branch(es).
Sorry, I can't promise anything. I have time to work on it every few months, but at the moment I'm focusing on getting things right rather than finishing sooner.
cubing.js
now has this functionality, particularly for Twizzle.
After reading #104 I was seduced by the idea.
I'm not a js guru and this code have to be improved a lot (new preset, some easy-to-uses functions...) but I create this PR before continues in order to know if this little base is good or if I should change it.