- Notifications
You must be signed in to change notification settings - Fork51
🛠 A library for displaying and working with twisty puzzles. Also currently home to the code for Twizzle.
License
GPL-3.0, MPL-2.0 licenses found
Licenses found
cubing/cubing.js
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
cubing.js
is a collection of JavaScript libraries, still under development.
Twizzle is the spiritual successor toalg.cubing.net, based oncubing.js
. It is currently being developed atsrc/sites/alpha.twizzle.net. See theTwizzle Diaries video series for more information on Twizzle's vision and use cases.
If you're just getting started, the easiest way to usecubing.js
is throughcdn.cubing.net
:
<scriptsrc="https://cdn.cubing.net/v0/js/cubing/twisty"type="module"></script><twisty-playeralg="R U R' U R U2' R'"></twisty-player>
You can find more documentation atjs.cubing.net/cubing/.
If you would like to usecubing.js
as a library in your package-based projects, make sure you havenode andnpm installed (installingnode
will installnpm
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";
Please note thatcubing.js
requires ES2022 module compatibility. Seehere.
If you would like to contribute to the development ofcubing.js
, please refer to ourcontribution guidelines.
Working oncubing.js
requires the following tools:
GNU make
(probably included with your OS)git
(possibly included with your OS)git-lfs
bun
node
andnpm
On macOS, you can install these usingHomebrew:
brew install git git-lfs node oven-sh/bun/bun
(On other platforms, you'll have to follow individual installation instructions. We recommend usingWSL on Windows.)
Once you have these dependencies, you can run thecubing.js
source like this (see thecontribution guidelines for more details):
git clone https://github.com/cubing/cubing.js&&cd cubing.jsmake dev# Now visit http://cubing.localhost:3333
To quickly check any changes for issues, trymake test-fast
. Runmake test
for more thorough testing options.
We recommend using Microsoft'sWindows Subsystem for Linux (WSL) to developcubing.js
on Windows.
For release versions and release notes, view the release history on GitHub:https://github.com/cubing/cubing.js/releases
This project is licensed under the Mozilla Public License. This means thatcubing.js
isfree to use in any public or private project. We've selected this license so thatcubing.js
can be used in a large variety of use cases.
However, if you modify the source code ofcubing.js
to fit your needs then youmust publish your modifications to thecubing.js
source code (e.g. publish a fork put it on GitHub). Seethe full license for exact details.
Although you are no longer required to publish code that usescubing.js
, we encourage you to develop your projects as open-source. This way, others can learn from your work and build on it far into the future. It also allows us to tell how features are being used by projects in the community, and what new features are needed.
All original code in this project is dual-licensed as bothGPL andMPL, but the codebase contains additional vendored code under theApache,MIT, andUbuntu Font licenses. This may affect you if you are forking the source code, as certain parts are not MPL-licensed on their own. But if you are just usingcubing.js
as a library, you can effectively treat all ofcubing.js
as if it was MPL-licensed.
As of this time,cubing.js
primarily contains code byLucas Garron (@lgarron) andTom Rokicki (@rokicki). Significant parts of the cubing code also are from:
- Chen Shuang (@cs0x7f): Scramblers for 3x3x3, 4x4x4, and Square-1
xyxxy
(@torchlight): Scramblers for unofficial events
It also uses thethree.js
,comlink
, andp-lazy
libraries. Twizzle also uses theUbuntu font.
About
🛠 A library for displaying and working with twisty puzzles. Also currently home to the code for Twizzle.