cubing

A collection of JavaScript cubing libraries.

Usage no npm install needed!

<script type="module">
  import cubing from 'https://cdn.skypack.dev/cubing';
</script>

README

cubing.js

make test
make build

cubing.js is a collection of JavaScript libraries, still under development.

Twizzle

Twizzle is the spiritual successor to alg.cubing.net, based on cubing.js. It is currently being developed at src/sites/alpha.twizzle.net. See the Twizzle Diaries video series for more information on Twizzle's vision and use cases.

Getting started

If you're just getting started, the easiest way to use cubing.js is throught cdn.cubing.net:

<script src="https://cdn.cubing.net/js/cubing/twisty" type="module"></script>
<twisty-player alg="R U R' U R U2' R'"></twisty-player>

You can find more documentation at js.cubing.net/cubing/.

Using with node and npm

If you would like to use cubing.js as a library in your package-based projects, make sure you have node and npm installed (installing node will install npm as well). Once you have installed those, you can run:

npm install cubing

Then you can use modules like this:

import { Alg } from "cubing/alg";
import { TwistyPlayer } from "cubing/twisty";

Contributing

If you would like to contribute to the development of cubing.js, please refer to our contribution guidelines.

Developing cubing.js itself

If you have git, node, and npm installed, you can run the cubing.js source like this (see the contribution guidelines for more details):

git clone https://github.com/cubing/cubing.js && cd cubing.js
make dev
# Now visit http://localhost:3333

Acknowledgments

As of this time, cubing.js primarily contains code by Lucas Garron (@lgarron) and Tom Rokicki (@rokicki). Significant parts of the cubing code also are from:

It also uses the three.js, comlink, and p-lazy libraries. Twizzle also uses the Ubuntu font.

License

This project is licensed under the GPL license (version 3 or later). This means that this library is free to use, although you must publish any code that uses it (e.g. also put it on GitHub). See the full license for exact details.

We've selected this license in order to encourage the cubing community to work on software in a way so that everyone can contribute and extend each other's work.