# Keyboard-controlled cube



## Spencer131 (May 13, 2022)

Here's a little keyboard-controlled cube I made since the virtual cube on cstimer doesn't have some of the stuff I wanted

https://virtual-cube.web.app/play.html

At the moment, it has:

Any nxn
Turning via keyboard or mouse
Timer
Scrambler (currently not WCA official scrambles)
Algorithm trainer
A couple other pages
I would love any feedback and criticism!


----------



## OtterCuber (May 13, 2022)

This is fantastic! My only feedback at the moment would be be an option to increase the size of the cube for larger nxn cubes.

Again, great work!


----------



## KellanTheCubingCoder (May 14, 2022)

Great work! Is this project on github? Also, what framework do you use?


----------



## Spencer131 (May 15, 2022)

KellanTheCubingCoder said:


> Great work! Is this project on github? Also, what framework do you use?


It's not public on github but I'm considering making it public

It's vanilla js with webgl and glMatrix for the 3D rendering


----------



## OtterCuber (May 15, 2022)

Will there be an option to see three faces of the cube?


----------



## Spencer131 (May 15, 2022)

OtterCuber said:


> Will there be an option to see three faces of the cube?


I have played around with both ways. I like looking at it from 2 faces so that R moves are on the right and L moves are on the left. If you have the perspective of 3 faces, there's not a "right" and "left" side. However, the upside of seeing 3 faces is that you would be able to see more stickers.

People might have different preferences, so I will probably make it an option for the user.


----------



## KellanTheCubingCoder (May 15, 2022)

Maybe you could also convert from seconds to minutes?
https://stackoverflow.com/questions...~:text=To get the number of,floor(time / 60);


----------



## Spencer131 (May 19, 2022)

OtterCuber said:


> Will there be an option to see three faces of the cube?


https://virtual-cube.web.app/play.html

Now you can make it larger and you can change the angle of the cube to see 3 faces. Just click the settings icon by the cube to see those options 

One caveat is if you change the angle, it makes the dragging behavior a little weird. I'm going to think about solutions for this in the meantime. Changing the size and angle should work now though!


----------



## OtterCuber (May 21, 2022)

Spencer131 said:


> https://virtual-cube.web.app/play.html
> 
> Now you can make it larger and you can change the angle of the cube to see 3 faces. Just click the settings icon by the cube to see those options
> 
> One caveat is if you change the angle, it makes the dragging behavior a little weird. I'm going to think about solutions for this in the meantime. Changing the size and angle should work now though!


Terrific update! Thank you!


----------



## Mastermind2368 (May 27, 2022)

Pretty cool virtual cube!

With the most controls being the same as the controls in cs timer, it didn't take much getting used to for turning itself, and I love the default shades you picked. I also really like the UI and it was easy to navigate.

Although, as someone who currently only practices virtual, there are a few things that could be nice to have. Having an option for a "see through" akin to cs timer would make this more viable for speedsolving. And if there was a way to completely disable animations, that would also help. I'd have to solve more on here to know if the placement of the M turns would bother me, but having the option to have custom key bindings would be incredible.

If you ever are just bored or you just wanted to fully soup it up as much as possible, macro support for algs would be amazing. Being able to have a list of times could also be really handy. Some people would probably appreciate custom color options as well, but I love the default shades so much that I don't think I'd change them. 

Overall, if you're just making this to be a web tool for people to check out, I think you did a great job covering the basics. Obviously, most people aren't super into virtual and wouldn't utilize all the extra stuff that I mentioned, but having those features would make this a viable option for virtual speed solving. No matter where you plan on taking this virtual cube, keep up the good work!


----------



## abunickabhi (May 27, 2022)

Spencer131 said:


> Here's a little keyboard-controlled cube I made since the virtual cube on cstimer doesn't have some of the stuff I wanted
> 
> https://virtual-cube.web.app/play.html
> 
> ...


Nice attempt. I would love if the cube is viewed a bit more from the top. A bit more white and bit less green from the base position.


----------



## Spencer131 (May 28, 2022)

Mastermind2368 said:


> Overall, if you're just making this to be a web tool for people to check out, I think you did a great job covering the basics. Obviously, most people aren't super into virtual and wouldn't utilize all the extra stuff that I mentioned, but having those features would make this a viable option for virtual speed solving. No matter where you plan on taking this virtual cube, keep up the good work!


Thank you so much!

I plan to keep developing it. It would be great to get to a point where people actually want to use it for virtual solving.

I agree with most of your suggestions, it's just a matter of what order I will prioritize features. I'm currently thinking of the following order:
- option for "see through"
- option to turn off animations
- custom key bindings
- track times
- preset algorithms (I would be open to suggestions as to how to implement this, whether it be key shortcuts or some kind of mouse interface)

I will make an option to turn off animations. However I would recommend trying it out with animations! I made the animation such that it smoothly speeds up and slows down with your turning speed so it seems realistic. And it could help with lookahead. I don't know for sure whether it's objectively better for speedsolving to have animation or no animation, so the user will have the option at the end of the day.


----------



## Mastermind2368 (May 29, 2022)

Spencer131 said:


> Thank you so much!
> 
> I plan to keep developing it. It would be great to get to a point where people actually want to use it for virtual solving.
> 
> ...


Thank you for considering my suggestions!

As for preset algorithms, I personally think it would be much more optimal to use keyboard controls. The numberpad could be a great starting option for algs on keys from 0-10 and the caps lock key could be a toggle switch for the keyboard to turn all the buttons into buttons that could be mapped (I don't think there's a way for the numbers row to be affected though?? I'm honestly not sure)

And your animations are probably the best looking I've seen on a virtual cube before, for realism, they nail the part. When I first learnt virtual, it was necessary to solve otherwise I couldn't really tell what had been moved. But with more time speed solving, I found for myself, it tends to be fastest to instantly see the new position of the cube (I am terrible at look ahead though, having animations on for slow solves will probably become a new practicing method for me)

But really, it's awesome to see another virtual cube that's being worked on. I've been out of touch of the cubing community for a while now, so maybe some have slipped under my radar, but I've felt for a while now that we could be doing better than CS timer and it's cool to see projects like this come around


----------



## Spencer131 (Jun 9, 2022)

Updates 

- Option to show body of cube or make the cube "see through"
- Option to turn off animations (i.e., complete the turns instantly)
- Save times

At the time of writing, you can find these new features by clicking the buttons at the top right. As I make improvements, things can and will change with the layout and features.

Thanks everyone for the feedback so far. Don't hesitate to comment or DM me with more feedback, I'd be glad to talk with anyone.


----------

