Roofpig icon indicating copy to clipboard operation
Roofpig copied to clipboard

Feature request: pass moves interactively to cube

Open diegoboston opened this issue 2 years ago • 2 comments

Hi all, I'm trying to build an interactive cube that I want to drive with some buttons. Is there a way to pass moves to a cube? The examples don't seem to suggest this feature. I would build a rows of buttons (L D R F U etc) and my button's onclick would trigger a function like:

var cube = getCube() cube.move("L")

Thanks for helping.

diegoboston avatar May 20 '22 18:05 diegoboston

As far as I remember, that's not possible directly, but you should be able to make the button switch focus over to a cube and then send a keyboard event. That would be a hacky workaround, but it should work.

dunkelziffer avatar Apr 17 '23 11:04 dunkelziffer

If you are still looking for a solution, using buttons to do moves is currently being discussed for a similar simulator called AnimCubeJS: https://github.com/cubing/AnimCubeJS/issues/33

bcube2 avatar Dec 29 '23 11:12 bcube2