Rubick vube in JavaScript