Sidechat icon
Join communities on Sidechat Download
thanks to the person that suggested including multiple dimensions as additional functionality!
i know it’s not much, but i’ve been working on a rubik’s cube in three.js w/ internal representation
upvote 115 downvote

default user profile icon
Anonymous 1w

drop the github rn i wanna play

upvote 24 downvote
default user profile icon
Anonymous 1w

Omgosh it’s you!!! Yayyyy you’re back!! :)

upvote 7 downvote
default user profile icon
Anonymous 6d

When I first read this, I thought extra dimension meant this would be a Rubik's tesseract

upvote 3 downvote
default user profile icon
Anonymous 6d

How tf did you do this?!

upvote 1 downvote
default user profile icon
Anonymous 6d

Now create a 4D cube.

upvote 1 downvote
default user profile icon
Anonymous 6d

How do you relate the mouse movement with the 3d space?

upvote 1 downvote
default user profile icon
Anonymous replying to -> #1 6d

hey, dm me, and i can send it!

upvote 1 downvote
default user profile icon
Anonymous replying to -> #4 6d

a lot of OOP with hashmaps + arrays for storing its data, then three.js, then blender for making the cubes themselves

upvote 1 downvote
default user profile icon
Anonymous replying to -> OP 6d

idk how to

upvote 1 downvote
default user profile icon
Anonymous replying to -> #6 3h

i used the THREE.js raycaster, which u can use to get the set of meshes, respective world positions etc. that the cursor intersects with. i used the starting world position of the mouse movement, then the difference between frames’ world positions over the course of a few frames to calculate the avg of that distance, then use the starting position and direction of the mouse movement in the scene to determine which face/direction of the cube the user intends to rotate

upvote 1 downvote