/RubiksCube

Playing around with making a Rubiks Cube in Three.js

Primary LanguageJavaScript

Rubik's Cube in Three.js

A little exploration into Three.js and 3d in general. I put together a simple Rubik's cube, with the intent to have it playable and maybe write some cube solving algorithms.

Overview

The cube can currently be displayed with orbit controls, zoom in and out, and movements can be applied.

cube1

However....

There is no internal representation for the cubes state, so to move the cube I am just rotating cubelets based off their starting coordinates, which breaks almost immediately. I'll fix this when I have the chance.

cubebroke

How to use?

Prerequisites

Ensure that you have Node.js installed.

Installation

Clone the repository:

git clone https://github.com/matthew-tyler/RubiksCube

Navigate to the project directory:

cd RubiksCube

Install the dependencies:

npm install

Running the Project

To start the development server, run the following command:

npm run dev

The development server should now be running on http://localhost:3000 (or another available port, if 3000 is already in use). Open your browser and navigate to the provided URL to view play around