0.4.4 • Published 5 years ago

@biohuns/min2phase v0.4.4

Weekly downloads
1
License
GPL-3.0-or-later
Repository
github
Last release
5 years ago

@biohuns/min2phase.js

This JS package is fork from cubing/min2phase.js. For Chen Shuang's Kociemba-based cs0x7f/min2phase 3x3x3 solver.

Usage

The default import uses automatically uses web workers if they are available (all modern browsers) and does computation on the thread if not (e.g. node.js).

import { defaultOffThread as min2phase } from "@biohuns/min2phase";
import { algToString } from "alg";

// Optional: pre-initialize ahead of time.
min2phase.initialize();

const solution = await min2phase.randomCube();
console.log(algToString(solution));

Use multiple web workers

import { OffThreadMin2Phase } from "@biohuns/min2phase";

const worker1 = new OffThreadMin2Phase();
const worker2 = new OffThreadMin2Phase();

Promise.all([worker1.initialize(), worker2.initialize()]);

// Workers are both ready to solve.
0.4.4

5 years ago

0.4.3

5 years ago

0.4.1

5 years ago

0.4.2

5 years ago

0.4.0

5 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago