Yik Yak icon
Join communities on Yik Yak 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 2w

drop the github rn i wanna play

upvote 24 downvote
default user profile icon
Anonymous 2w

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

upvote 7 downvote
default user profile icon
Anonymous 2w

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

How tf did you do this?!

upvote 1 downvote
default user profile icon
Anonymous 2w

Now create a 4D cube.

upvote 1 downvote
default user profile icon
Anonymous 2w

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

upvote 1 downvote
default user profile icon
Anonymous 2d

Or just have Claude do it like a normal person

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

hey, dm me, and i can send it!

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

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

idk how to

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

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