Search the Community
Showing results for tags 'rubik'.
Found 2 results
Problem with my Rubik's Cube groups
loloof64 posted a topic in Questions & AnswersHello, I am trying to build a Rubik's Cube (see my attemps in BabylonJs playground http://www.babylonjs.com/playground/#EQ0SF). Each little cube is a mesh on its own (UnitCube builder function), so I am trying to group temporary some of them into a single Mesh, in order to rotate the group, but it does not works (into methods clearGroupToRotate()affectWholeCubeToRotatedGroup()affectLayerToRotate()of Rubik's cube class). What workaround could you advise me ? Regards.
Hello everyone , I've built a Rubik's Cube with the latest BabylonJS version, you can find my experiment here : http://jsfiddle.net/loloof64/UK8Mn/1/ If you click on the two buttons rotateWhole and rotateX, whatever the order, you may notice that there are some troubles : the Rubik's Cube recover its initial state after each move (instead of keeping the last state). My main opinion is that there is a problem with the RubiksCube#clearGroupToRotate() method (line 269) : the way I assign several cubes to the groupToRotate mesh seems weird. But still, I haven't found the best workaround to solve it. Does someone has an idea ? Regards (I've tried to split my JS files into several ones, but it seems that JsFiddle doesn't work this way, even when they are hosted on my Github project, though I managed for the libraries files. And I would like to apologize for this source code presentation)