AnimCubeJS icon indicating copy to clipboard operation
AnimCubeJS copied to clipboard

Before the cube is played, the slider should be at the end.

Open BakiTANRISEVEN opened this issue 1 year ago • 8 comments

When the cube play button is pressed (before the cube starts playing), like in Twizzle Alpha (https://alpha.twizzle.net/edit/?alg=L+B2+F), the slider should first be at the end and then when you click the play button, it should start from the beginning. In other words, the solution should appear first. Then it should start from the beginning and the algorithm should start from the solved cube and go to the solution. Is this possible? How is that possible? I have patterns on my site. I want the pattern to appear first. When the cube is played, I want it to start from the solved cube and go to the pattern solution.

BakiTANRISEVEN avatar Jul 30 '24 10:07 BakiTANRISEVEN

Here's an example of how to do it with a slightly modified version of AnimCube3.js: btn.zip

mfeather1 avatar Aug 04 '24 18:08 mfeather1

İşte bunu AnimCube3.js'nin biraz değiştirilmiş versiyonuyla nasıl yapabileceğinize dair bir örnek: btn.zip

Thank you very much Mr. Michael Feather. This is exactly what I wanted. Now I can use AnimCubeJS to play my Rubik's Cube patterns.

BakiTANRISEVEN avatar Aug 04 '24 19:08 BakiTANRISEVEN

Glad to hear it! Thanks also goes to bcube2 for finding all the bugs in my first few attempts (they are all fixed now).

mfeather1 avatar Aug 04 '24 21:08 mfeather1

Here's an example of how to do it with a slightly modified version of AnimCube3.js: btn.zip

Hello again, Is there a way to add this as a parameter in "AnimCube3.js"? So all the features can be used together.

BakiTANRISEVEN avatar Aug 05 '24 16:08 BakiTANRISEVEN

If you mean initmove & initrevmove params it looks like those may be usable, try taking out the comment characters at lines 434 & 460 in A3mod.js. (the /* and */ that are commenting out the section that reads the initmove/initrevmove params). Reload A3mod.js in the browser after making the change. I just tested it and was able to use an initmove parameter.

mfeather1 avatar Aug 05 '24 17:08 mfeather1

initmove ve initrevmove lisanslarını kastediyorsanız, bunlar kullanılabilir gibi görünüyor, A3mod.js'deki 434 ve 460. satırlardaki yorum karakterlerini silmeyi deneyin (initmove/initrevmove şifrelini okuyan bölümü yorumlayan /* ve */). Yapılandırmanın ardından tarayıcıda A3mod.js'yi yeniden yükleyin. Az önce test yaptım ve bir başlatma parametresi kullanabildim.

I did as you said. Yes, initmove and initrevmove parameters can be used. But the demo does not work.

BakiTANRISEVEN avatar Aug 05 '24 18:08 BakiTANRISEVEN

The main function name in A3mod.js can be changed from AnimCube3 to something else so both can coexist in the same webpage, so for example if you changed line 8 to:

function A3mod(params) {

Then the web page can use both:

 <script src=AnimCube.js></script>
 <script src=A3mod.js></script>

For demo use AnimCube3:
<div style="width:200px; height:200px;">  <script>AnimCube3("...")<script></div>

For cubes with twizzle display use A3mod:
<div style="width:200px; height:200px;">  <script>A3mod("...")<script></div>

mfeather1 avatar Aug 05 '24 19:08 mfeather1

The main function name in A3mod.js can be changed from AnimCube3 to something else so both can coexist in the same webpage, so for example if you changed line 8 to:

function A3mod(params) {

Then the web page can use both:

 <script src=AnimCube.js></script>
 <script src=A3mod.js></script>

For demo use AnimCube3:
<div style="width:200px; height:200px;">  <script>AnimCube3("...")<script></div>

For cubes with twizzle display use A3mod:
<div style="width:200px; height:200px;">  <script>A3mod("...")<script></div>

Ok. I'll use it this way. Thank you very much for your help and quick responses. Goodbye.

BakiTANRISEVEN avatar Aug 05 '24 20:08 BakiTANRISEVEN