cubing / AnimCubeJS

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

[Feature Request] Support programatic control of the cube. #18

Closed 7ombie closed 2 years ago

7ombie commented 2 years ago

While AnimCubeJS is great for animating hardcoded stuff, the mouse-based controls are too awkward and unpredictable to use the cube as a virtual Rubik's Cube. The controls are also broken (the wrong layer is often selected), and they provide no way to move two layers at the same time or reset the view of the cube etc.

An API for manipulating the cube (really the camera) and its layers would allow users to integrate AnimCubeJS into their own applications.

I'd personally like to bind a gamepad, but it would be just as simple to bind a keyboard or MIDI controller, if there was an API for that. Thanks for considering this.

7ombie commented 2 years ago

P.S. If an API was added, the configuration (file) should permit disabling the mouse-based controls.

lgarron commented 2 years ago

Depending on exactly what you're trying to do, cubing.js might already have everything you need:

https://codepen.io/lgarron/pen/BaZerqe?editors=1010 https://twizzle.net/stream/ might be more convenient to use directly as well.

Let me know if you'd like any help trying those out.

7ombie commented 2 years ago

Thanks, @lgarron. I'll look at those links. Much appreciated.