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 116 downvote

default user profile icon
Anonymous 7w

drop the github rn i wanna play

upvote 24 downvote
default user profile icon
Anonymous 7w

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

upvote 7 downvote
default user profile icon
Anonymous 7w

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 7w

How tf did you do this?!

upvote 1 downvote
default user profile icon
Anonymous 7w

Now create a 4D cube.

upvote 1 downvote
default user profile icon
Anonymous 7w

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

upvote 1 downvote
default user profile icon
Anonymous 5w

Or just have Claude do it like a normal person

upvote -1 downvote
default user profile icon
Anonymous replying to -> #1 7w

hey, dm me, and i can send it!

upvote 1 downvote
default user profile icon
Anonymous replying to -> #4 7w

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 7w

idk how to

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

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