cubing / AnimCubeJS

▶️ Play around with a Rubik's Cube simulator.
https://animcubejs.cubing.net/animcubejs.html
MIT License
29 stars 10 forks source link

Create config_tool.html #25

Closed mfo13 closed 1 year ago

mfo13 commented 1 year ago

It's an attempt of an "easy" to use configuration tool for AnimCubeJS.

mfeather1 commented 1 year ago

Nice!
There is a problem, it needs global var removeListeners:

...

Everything is set up in my test repo the way I intend to install into the AnimCubeJS repo next week: https://mfeather1.github.io/test/AnimCubeJS-gh-pages/animcubejs.html

The documentation for direct access is at the bottom of the doc in a new show/hide section named: "The Direct Access Method (for Programmers)" which has several links for examples of which my facelet_editor is one.

mfeather1 commented 1 year ago

I found a bug in AnimCubeJS that has apparently been there since the beginning, the following will cause it to crash (it is one digit short on the last color which should be 0000ff): colorscheme=012345&colors=ff0000FFA500ffff00ffffff00ff000000f

test here: https://animcubejs.cubing.net/sources/codes/enhancement/parameters/create.html

I fixed the programs in the test repo so it works here:

https://mfeather1.github.io/test/AnimCubeJS-gh-pages/sources/codes/enhancement/parameters/create.html

Also, to work with the new versions of AnimCube[2-7].js removeListeners needs to be changed to acjs_removeListeners in web pages.

mfo13 commented 1 year ago

I didn't notice that. I thought colors would not (or should not) accept less than 60 characters (10 colors) to work, as is the case with facelets. If you don't provide NN6 facelets it automatically sets to the default. I think it should be the same for colors. Since you are not using the default 10 numerical colors you should provide all of them. This is not an issue, actually, when you use the config tool. By the way, I made some few final touches, so the tool is ready to be published. The correct code (without the "scripts/" is found here, in this current branch we discuss (patch-1 on mfo13/AnimCubeJS), the https://mfo13.github.io/ is just for testing. (ps.: just remember to change removelisteners when you release the new AnimCubeJS versions). I'll read about the new features later.

mfeather1 commented 1 year ago

I updated the AnimCubeJS repo with all of the recent mods, the changes are here:

https://github.com/cubing/AnimCubeJS/commit/723383ac9a685d8be234a9963c0b7dfa4f2038e8

The config tool was included in the update so I think this pull request can be closed.

mfo13 commented 1 year ago

OK! Closed.