Skip to content

tibordp/neishauben

Repository files navigation

Neishauben

Neishauben is an in-browser Rubik's cube simulator with an included LBL (Beginners Method) solver.

Screenshot

Main functionality (operations on Rubik's Cube and the solver itself) is implemented in C (see here) and compiled with Emscripten and the cube simulator is written in JavaScript using Three.js for 3D graphics.

Development

Build process requires Docker in order to compile C code to WebAssembly.

Local development

Install dependencies:

yarn --silent

Run the development build locally

yarn wasm:dev
yarn dev

The app will launch at http://localhost:8080/neishauben/

Tests run with (make sure C code is compiled first with yarn wasm:dev )

yarn test

In production build, optimization lookup tables are pre-generated during the build process and baked into the resulting WebAssembly to save on startup time (at the expense of asset size). For developing a production build:

yarn wasm:production
yarn dev

Production build

yarn build