cubing 0.61.0 → 0.61.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/bin/chunks/chunk-ZQLNUW2N.js +14 -0
  2. package/dist/bin/chunks/chunk-ZQLNUW2N.js.map +7 -0
  3. package/dist/bin/order.js +46 -42
  4. package/dist/bin/order.js.map +2 -2
  5. package/dist/bin/puzzle-geometry-bin.js +379 -257
  6. package/dist/bin/puzzle-geometry-bin.js.map +3 -3
  7. package/dist/bin/scramble.js +124 -102
  8. package/dist/bin/scramble.js.map +3 -3
  9. package/dist/lib/cubing/{KPattern-CU9Suh1T.d.ts → PuzzleLoader-CkghxdIL.d.ts} +186 -179
  10. package/dist/lib/cubing/alg/index.d.ts +2 -2
  11. package/dist/lib/cubing/bluetooth/index.d.ts +3 -3
  12. package/dist/lib/cubing/bluetooth/index.js +4 -4
  13. package/dist/lib/cubing/{bluetooth-puzzle-gTRbIRyj.d.ts → bluetooth-puzzle-c-_IBAdu.d.ts} +1 -1
  14. package/dist/lib/cubing/chunks/{chunk-ABQAUY7H.js → chunk-557DMXD6.js} +3 -3
  15. package/dist/lib/cubing/chunks/{chunk-RKTO4CAU.js → chunk-7DT3G3FA.js} +2 -2
  16. package/dist/lib/cubing/chunks/{chunk-BUZPONAW.js → chunk-I5QO52OG.js} +2 -2
  17. package/dist/lib/cubing/chunks/{chunk-PVOSBZRD.js → chunk-KZGAQEPN.js} +3 -3
  18. package/dist/lib/cubing/chunks/{chunk-RUSWM2KK.js → chunk-ST4K23C3.js} +2 -2
  19. package/dist/lib/cubing/chunks/{chunk-RUSWM2KK.js.map → chunk-ST4K23C3.js.map} +1 -1
  20. package/dist/lib/cubing/chunks/{chunk-REBGU5ET.js → chunk-T3SF7NHB.js} +2 -2
  21. package/dist/lib/cubing/chunks/{chunk-OJI4YUWF.js → chunk-UMNYMJKD.js} +4 -4
  22. package/dist/lib/cubing/chunks/{chunk-WIZJQ7QS.js → chunk-UZ7SWKN6.js} +15 -15
  23. package/dist/lib/cubing/chunks/{chunk-PSQEELP4.js → chunk-WAYEJXCG.js} +1 -1
  24. package/dist/lib/cubing/chunks/chunk-WAYEJXCG.js.map +7 -0
  25. package/dist/lib/cubing/chunks/{chunk-NX2Q6B7Y.js → chunk-ZKJKRQKY.js} +2 -2
  26. package/dist/lib/cubing/chunks/{chunk-NX2Q6B7Y.js.map → chunk-ZKJKRQKY.js.map} +2 -2
  27. package/dist/lib/cubing/chunks/{inside-PM6546BQ.js → inside-K3VX2AIZ.js} +12 -12
  28. package/dist/lib/cubing/chunks/{puzzles-dynamic-side-events-BOGUHF4Q.js → puzzles-dynamic-side-events-IMYJ533P.js} +1 -1
  29. package/dist/lib/cubing/chunks/puzzles-dynamic-side-events-IMYJ533P.js.map +7 -0
  30. package/dist/lib/cubing/chunks/{search-dynamic-sgs-side-events-SYC27DSG.js → search-dynamic-sgs-side-events-RIRYKEP5.js} +4 -4
  31. package/dist/lib/cubing/chunks/{search-dynamic-sgs-unofficial-QGGV4PCJ.js → search-dynamic-sgs-unofficial-N4CRUF4Q.js} +4 -4
  32. package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-IE5W637Q.js → search-dynamic-solve-4x4x4-4UB4NMF3.js} +7 -7
  33. package/dist/lib/cubing/chunks/search-worker-entry.js +3 -3
  34. package/dist/lib/cubing/chunks/{twisty-dynamic-3d-LPZQIDD2.js → twisty-dynamic-3d-OCL53BVF.js} +5 -5
  35. package/dist/lib/cubing/{index-CORXpckt.d.ts → index-B_8W-2zR.d.ts} +1 -1
  36. package/dist/lib/cubing/kpuzzle/index.d.ts +1 -1
  37. package/dist/lib/cubing/kpuzzle/index.js +1 -1
  38. package/dist/lib/cubing/notation/index.d.ts +1 -1
  39. package/dist/lib/cubing/notation/index.js +3 -3
  40. package/dist/lib/cubing/protocol/index.d.ts +1 -1
  41. package/dist/lib/cubing/protocol/index.js +3 -3
  42. package/dist/lib/cubing/puzzle-geometry/index.d.ts +2 -2
  43. package/dist/lib/cubing/puzzle-geometry/index.js +138 -179
  44. package/dist/lib/cubing/puzzle-geometry/index.js.map +3 -3
  45. package/dist/lib/cubing/puzzles/index.d.ts +1 -1
  46. package/dist/lib/cubing/puzzles/index.js +3 -3
  47. package/dist/lib/cubing/scramble/index.d.ts +2 -2
  48. package/dist/lib/cubing/scramble/index.js +6 -6
  49. package/dist/lib/cubing/search/index.d.ts +3 -3
  50. package/dist/lib/cubing/search/index.js +6 -6
  51. package/dist/lib/cubing/stream/index.d.ts +2 -2
  52. package/dist/lib/cubing/twisty/index.d.ts +2 -2
  53. package/dist/lib/cubing/twisty/index.js +5 -5
  54. package/dist/lib/cubing/twisty/index.js.map +1 -1
  55. package/experimental-json-schema/kpuzzle/KPatternData.schema.json +22 -30
  56. package/experimental-json-schema/kpuzzle/KPuzzleDefinition.schema.json +72 -89
  57. package/experimental-json-schema/kpuzzle/KTransformationData.schema.json +17 -26
  58. package/package.json +54 -100
  59. package/dist/bin/chunks/chunk-J53ID3VX.js +0 -26
  60. package/dist/bin/chunks/chunk-J53ID3VX.js.map +0 -7
  61. package/dist/lib/cubing/chunks/chunk-PSQEELP4.js.map +0 -7
  62. package/dist/lib/cubing/chunks/puzzles-dynamic-side-events-BOGUHF4Q.js.map +0 -7
  63. /package/dist/lib/cubing/chunks/{chunk-ABQAUY7H.js.map → chunk-557DMXD6.js.map} +0 -0
  64. /package/dist/lib/cubing/chunks/{chunk-RKTO4CAU.js.map → chunk-7DT3G3FA.js.map} +0 -0
  65. /package/dist/lib/cubing/chunks/{chunk-BUZPONAW.js.map → chunk-I5QO52OG.js.map} +0 -0
  66. /package/dist/lib/cubing/chunks/{chunk-PVOSBZRD.js.map → chunk-KZGAQEPN.js.map} +0 -0
  67. /package/dist/lib/cubing/chunks/{chunk-REBGU5ET.js.map → chunk-T3SF7NHB.js.map} +0 -0
  68. /package/dist/lib/cubing/chunks/{chunk-OJI4YUWF.js.map → chunk-UMNYMJKD.js.map} +0 -0
  69. /package/dist/lib/cubing/chunks/{chunk-WIZJQ7QS.js.map → chunk-UZ7SWKN6.js.map} +0 -0
  70. /package/dist/lib/cubing/chunks/{inside-PM6546BQ.js.map → inside-K3VX2AIZ.js.map} +0 -0
  71. /package/dist/lib/cubing/chunks/{search-dynamic-sgs-side-events-SYC27DSG.js.map → search-dynamic-sgs-side-events-RIRYKEP5.js.map} +0 -0
  72. /package/dist/lib/cubing/chunks/{search-dynamic-sgs-unofficial-QGGV4PCJ.js.map → search-dynamic-sgs-unofficial-N4CRUF4Q.js.map} +0 -0
  73. /package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-IE5W637Q.js.map → search-dynamic-solve-4x4x4-4UB4NMF3.js.map} +0 -0
  74. /package/dist/lib/cubing/chunks/{twisty-dynamic-3d-LPZQIDD2.js.map → twisty-dynamic-3d-OCL53BVF.js.map} +0 -0
@@ -1,13 +1,13 @@
1
1
  import "./chunk-NAPITA3L.js";
2
- import "./chunk-RKTO4CAU.js";
2
+ import "./chunk-7DT3G3FA.js";
3
3
  import {
4
4
  random333Scramble
5
- } from "./chunk-OJI4YUWF.js";
5
+ } from "./chunk-UMNYMJKD.js";
6
6
  import "./chunk-7GUL3OBQ.js";
7
- import "./chunk-NX2Q6B7Y.js";
8
- import "./chunk-WIZJQ7QS.js";
9
- import "./chunk-RUSWM2KK.js";
10
- import "./chunk-PSQEELP4.js";
7
+ import "./chunk-ZKJKRQKY.js";
8
+ import "./chunk-UZ7SWKN6.js";
9
+ import "./chunk-ST4K23C3.js";
10
+ import "./chunk-WAYEJXCG.js";
11
11
  import {
12
12
  Alg
13
13
  } from "./chunk-7D7ZUWUK.js";
@@ -2921,4 +2921,4 @@ export {
2921
2921
  initialize,
2922
2922
  random444Scramble
2923
2923
  };
2924
- //# sourceMappingURL=search-dynamic-solve-4x4x4-IE5W637Q.js.map
2924
+ //# sourceMappingURL=search-dynamic-solve-4x4x4-4UB4NMF3.js.map
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  nodeEndpointPort
3
- } from "./chunk-REBGU5ET.js";
3
+ } from "./chunk-T3SF7NHB.js";
4
4
  import {
5
5
  exposeAPI
6
6
  } from "./chunk-7GUL3OBQ.js";
7
- import "./chunk-NX2Q6B7Y.js";
7
+ import "./chunk-ZKJKRQKY.js";
8
8
 
9
9
  // src/cubing/search/worker-workarounds/search-worker-entry.js
10
10
  if (exposeAPI.expose) {
11
11
  (async () => {
12
- await import("./inside-PM6546BQ.js");
12
+ await import("./inside-K3VX2AIZ.js");
13
13
  const messagePort = globalThis.postMessage ? globalThis : await nodeEndpointPort();
14
14
  messagePort.postMessage("comlink-exposed");
15
15
  })();
@@ -3,13 +3,13 @@ import {
3
3
  bulk3DCode,
4
4
  haveStartedSharingRenderers,
5
5
  hintFaceletStyles
6
- } from "./chunk-PVOSBZRD.js";
7
- import "./chunk-WIZJQ7QS.js";
6
+ } from "./chunk-KZGAQEPN.js";
7
+ import "./chunk-UZ7SWKN6.js";
8
8
  import {
9
9
  cube3x3x3,
10
10
  getFaceletStickeringMask
11
- } from "./chunk-RUSWM2KK.js";
12
- import "./chunk-PSQEELP4.js";
11
+ } from "./chunk-ST4K23C3.js";
12
+ import "./chunk-WAYEJXCG.js";
13
13
  import {
14
14
  Move
15
15
  } from "./chunk-7D7ZUWUK.js";
@@ -1880,4 +1880,4 @@ export {
1880
1880
  cube3DShim,
1881
1881
  pg3dShim
1882
1882
  };
1883
- //# sourceMappingURL=twisty-dynamic-3d-LPZQIDD2.js.map
1883
+ //# sourceMappingURL=twisty-dynamic-3d-OCL53BVF.js.map
@@ -1,4 +1,4 @@
1
- import { s as Alg, v as KPuzzle, K as KPattern } from './KPattern-CU9Suh1T.js';
1
+ import { r as Alg, u as KPuzzle, K as KPattern } from './PuzzleLoader-CkghxdIL.js';
2
2
 
3
3
  declare enum PrefetchLevel {
4
4
  Auto = "auto",
@@ -1,3 +1,3 @@
1
- export { K as KPattern, ab as KPatternData, ac as KPatternOrbitData, v as KPuzzle, ad as KPuzzleDefinition, D as KTransformation, ae as KTransformationData, af as KTransformationOrbitData } from '../KPattern-CU9Suh1T.js';
1
+ export { K as KPattern, ab as KPatternData, ac as KPatternOrbitData, u as KPuzzle, aa as KPuzzleDefinition, ad as KPuzzleOrbitDefinition, C as KTransformation, ae as KTransformationData, af as KTransformationOrbitData } from '../PuzzleLoader-CkghxdIL.js';
2
2
  import 'type-fest';
3
3
  import 'three/src/Three.js';
@@ -2,7 +2,7 @@ import {
2
2
  KPattern,
3
3
  KPuzzle,
4
4
  KTransformation
5
- } from "../chunks/chunk-PSQEELP4.js";
5
+ } from "../chunks/chunk-WAYEJXCG.js";
6
6
  import "../chunks/chunk-7D7ZUWUK.js";
7
7
  export {
8
8
  KPattern,
@@ -1,4 +1,4 @@
1
- import { s as Alg, L as LeafCount, t as PuzzleLoader } from '../KPattern-CU9Suh1T.js';
1
+ import { r as Alg, L as LeafCount, s as PuzzleLoader } from '../PuzzleLoader-CkghxdIL.js';
2
2
  import 'type-fest';
3
3
  import 'three/src/Three.js';
4
4
 
@@ -5,9 +5,9 @@ import {
5
5
  countMetricMoves,
6
6
  countMoves,
7
7
  countMovesETM
8
- } from "../chunks/chunk-BUZPONAW.js";
9
- import "../chunks/chunk-RUSWM2KK.js";
10
- import "../chunks/chunk-PSQEELP4.js";
8
+ } from "../chunks/chunk-I5QO52OG.js";
9
+ import "../chunks/chunk-ST4K23C3.js";
10
+ import "../chunks/chunk-WAYEJXCG.js";
11
11
  import "../chunks/chunk-7D7ZUWUK.js";
12
12
  export {
13
13
  CommonMetric as ExperimentalCommonMetric,
@@ -1,4 +1,4 @@
1
- import { K as KPattern } from '../KPattern-CU9Suh1T.js';
1
+ import { K as KPattern } from '../PuzzleLoader-CkghxdIL.js';
2
2
  import 'type-fest';
3
3
  import 'three/src/Three.js';
4
4
 
@@ -5,9 +5,9 @@ import {
5
5
  spacedHexToBuffer,
6
6
  twizzleBinaryToBinaryComponents,
7
7
  twizzleBinaryToReid3x3x3
8
- } from "../chunks/chunk-ABQAUY7H.js";
9
- import "../chunks/chunk-RUSWM2KK.js";
10
- import "../chunks/chunk-PSQEELP4.js";
8
+ } from "../chunks/chunk-557DMXD6.js";
9
+ import "../chunks/chunk-ST4K23C3.js";
10
+ import "../chunks/chunk-WAYEJXCG.js";
11
11
  import "../chunks/chunk-7D7ZUWUK.js";
12
12
  export {
13
13
  binaryComponentsToReid3x3x3 as experimentalBinaryComponentsToReid3x3x3,
@@ -1,5 +1,5 @@
1
- import { P as Perm } from '../KPattern-CU9Suh1T.js';
2
- export { j as EXPERIMENTAL_PUZZLE_BASE_SHAPES, k as EXPERIMENTAL_PUZZLE_CUT_TYPES, i as ExperimentalPGNotation, l as ExperimentalPuzzleBaseShape, m as ExperimentalPuzzleCutDescription, n as ExperimentalPuzzleCutType, o as ExperimentalPuzzleDescription, a as ExperimentalPuzzleGeometryOptions, q as PuzzleGeometry, Q as Quat, S as StickerDat, b as StickerDatAxis, c as StickerDatFace, d as StickerDatSticker, g as getPG3DNamedPuzzles, e as getPuzzleDescriptionString, f as getPuzzleGeometryByDesc, h as getPuzzleGeometryByName, p as parseOptions, r as parsePuzzleDescription } from '../KPattern-CU9Suh1T.js';
1
+ import { P as Perm } from '../PuzzleLoader-CkghxdIL.js';
2
+ export { j as EXPERIMENTAL_PUZZLE_BASE_SHAPES, k as EXPERIMENTAL_PUZZLE_CUT_TYPES, i as ExperimentalPGNotation, l as ExperimentalPuzzleBaseShape, m as ExperimentalPuzzleCutDescription, n as ExperimentalPuzzleCutType, o as ExperimentalPuzzleDescription, a as ExperimentalPuzzleGeometryOptions, p as PuzzleGeometry, Q as Quat, S as StickerDat, b as StickerDatAxis, c as StickerDatFace, d as StickerDatSticker, g as getPG3DNamedPuzzles, e as getPuzzleDescriptionString, f as getPuzzleGeometryByDesc, h as getPuzzleGeometryByName, q as parsePuzzleDescription } from '../PuzzleLoader-CkghxdIL.js';
3
3
  import 'type-fest';
4
4
  import 'three/src/Three.js';
5
5
 
@@ -667,6 +667,60 @@ function remapKPuzzleDefinition(internalDefinition, notationMapper) {
667
667
  return externalDefinition;
668
668
  }
669
669
 
670
+ // src/cubing/puzzle-geometry/Options.ts
671
+ var PuzzleGeometryFullOptions = class {
672
+ verbosity = 0;
673
+ // verbosity (console.log)
674
+ allMoves = false;
675
+ // generate all slice moves in ksolve
676
+ outerBlockMoves = false;
677
+ // generate outer block moves
678
+ vertexMoves = false;
679
+ // generate vertex moves
680
+ addRotations = false;
681
+ // add symmetry information to ksolve output
682
+ moveList = null;
683
+ // move list to generate
684
+ fixedOrientation = false;
685
+ // eliminate any orientations
686
+ fixedPieceType = null;
687
+ // fix a piece?
688
+ orientCenters = false;
689
+ // orient centers?
690
+ // TODO: Group these into a single object?
691
+ includeCornerOrbits = true;
692
+ // include corner orbits
693
+ includeCenterOrbits = true;
694
+ // include center orbits
695
+ includeEdgeOrbits = true;
696
+ // include edge orbits
697
+ // Overrides the previous options.
698
+ excludeOrbits = [];
699
+ // exclude these orbits
700
+ optimizeOrbits = false;
701
+ // optimize PermOri
702
+ grayCorners = false;
703
+ // make corner sets gray
704
+ grayCenters = false;
705
+ // make center sets gray
706
+ grayEdges = false;
707
+ // make edge sets gray
708
+ puzzleOrientation = null;
709
+ // single puzzle orientation from options
710
+ puzzleOrientations = null;
711
+ // puzzle orientation override object from options // TODO: is this needed?
712
+ scrambleAmount = 0;
713
+ // scramble?
714
+ constructor(options = {}) {
715
+ const optionsWithoutUndefined = Object.fromEntries(
716
+ Object.entries(options).filter(
717
+ ([_, value]) => typeof value !== "undefined"
718
+ )
719
+ );
720
+ Object.assign(this, optionsWithoutUndefined);
721
+ }
722
+ };
723
+
670
724
  // src/cubing/puzzle-geometry/Perm.ts
671
725
  var zeroCache = [];
672
726
  var iotaCache = [];
@@ -1505,83 +1559,6 @@ function showcanon(g, disp) {
1505
1559
  }
1506
1560
  }
1507
1561
 
1508
- // src/cubing/puzzle-geometry/PGPuzzles.ts
1509
- var PGPuzzles = {
1510
- "2x2x2": "c f 0",
1511
- "3x3x3": "c f 0.333333333333333",
1512
- "4x4x4": "c f 0.5 f 0",
1513
- "5x5x5": "c f 0.6 f 0.2",
1514
- "6x6x6": "c f 0.666666666666667 f 0.333333333333333 f 0",
1515
- "7x7x7": "c f 0.714285714285714 f 0.428571428571429 f 0.142857142857143",
1516
- "8x8x8": "c f 0.75 f 0.5 f 0.25 f 0",
1517
- "9x9x9": "c f 0.777777777777778 f 0.555555555555556 f 0.333333333333333 f 0.111111111111111",
1518
- "10x10x10": "c f 0.8 f 0.6 f 0.4 f 0.2 f 0",
1519
- "11x11x11": "c f 0.818181818181818 f 0.636363636363636 f 0.454545454545455 f 0.272727272727273 f 0.0909090909090909",
1520
- "12x12x12": "c f 0.833333333333333 f 0.666666666666667 f 0.5 f 0.333333333333333 f 0.166666666666667 f 0",
1521
- "13x13x13": "c f 0.846153846153846 f 0.692307692307692 f 0.538461538461538 f 0.384615384615385 f 0.230769230769231 f 0.0769230769230769",
1522
- "20x20x20": "c f 0 f .1 f .2 f .3 f .4 f .5 f .6 f .7 f .8 f .9",
1523
- "30x30x30": "c f 0 f .066667 f .133333 f .2 f .266667 f .333333 f .4 f .466667 f .533333 f .6 f .666667 f .733333 f .8 f .866667 f .933333",
1524
- "40x40x40": "c f 0 f .05 f .1 f .15 f .2 f .25 f .3 f .35 f .4 f .45 f .5 f .55 f .6 f .65 f .7 f .75 f .8 f .85 f .9 f .95",
1525
- skewb: "c v 0",
1526
- "master skewb": "c v 0.275",
1527
- "professor skewb": "c v 0 v 0.38",
1528
- "compy cube": "c v 0.915641442663986",
1529
- helicopter: "c e 0.707106781186547",
1530
- "curvy copter": "c e 0.83",
1531
- dino: "c v 0.577350269189626",
1532
- "little chop": "c e 0",
1533
- pyramorphix: "t e 0",
1534
- mastermorphix: "t e 0.346184634065199",
1535
- pyraminx: "t v 0.333333333333333 v 1.66666666666667",
1536
- tetraminx: "t v 0.333333333333333",
1537
- "master pyraminx": "t v 0 v 1 v 2",
1538
- "master tetraminx": "t v 0 v 1",
1539
- "professor pyraminx": "t v -0.2 v 0.6 v 1.4 v 2.2",
1540
- "professor tetraminx": "t v -0.2 v 0.6 v 1.4",
1541
- "royal pyraminx": "t v -0.333333333333333 v 0.333333333333333 v 1 v 1.66666666666667 v 2.33333333333333",
1542
- "royal tetraminx": "t v -0.333333333333333 v 0.333333333333333 v 1 v 1.66666666666667",
1543
- "emperor pyraminx": "t v -0.428571428571429 v 0.142857142857143 v 0.714285714285714 v 1.28571428571429 v 1.85714285714286 v 2.42857142857143",
1544
- "emperor tetraminx": "t v -0.428571428571429 v 0.142857142857143 v 0.714285714285714 v 1.28571428571429 v 1.85714285714286",
1545
- "Jing pyraminx": "t f 0",
1546
- "master pyramorphix": "t e 0.866025403784437",
1547
- megaminx: "d f 0.7",
1548
- gigaminx: "d f 0.64 f 0.82",
1549
- teraminx: "d f 0.64 f 0.76 f 0.88",
1550
- petaminx: "d f 0.64 f 0.73 f 0.82 f 0.91",
1551
- examinx: "d f 0.64 f 0.712 f 0.784 f 0.856 f 0.928",
1552
- zetaminx: "d f 0.64 f 0.7 f 0.76 f 0.82 f 0.88 f 0.94",
1553
- yottaminx: "d f 0.64 f 0.6914 f 0.7429 f 0.7943 f 0.8457 f 0.8971 f 0.9486",
1554
- pentultimate: "d f 0",
1555
- "master pentultimate": "d f 0.1",
1556
- "elite pentultimate": "d f 0 f 0.145905",
1557
- // exact value for starminx is sqrt(5(5-2 sqrt(5))/3)
1558
- starminx: "d v 0.937962370425399",
1559
- "starminx 2": "d f 0.23606797749979",
1560
- "pyraminx crystal": "d f 0.447213595499989",
1561
- chopasaurus: "d v 0",
1562
- "big chop": "d e 0",
1563
- "skewb diamond": "o f 0",
1564
- FTO: "o f 0.333333333333333",
1565
- "master FTO": "o f 0.5 f 0",
1566
- "Christopher's jewel": "o v 0.577350269189626",
1567
- octastar: "o e 0",
1568
- "Trajber's octahedron": "o v 0.433012701892219",
1569
- "radio chop": "i f 0",
1570
- icosamate: "i v 0",
1571
- "Regular Astrominx": "i v 0.18759247376021",
1572
- "Regular Astrominx + Big Chop": "i v 0.18759247376021 e 0",
1573
- Redicosahedron: "i v 0.794654472291766",
1574
- "Redicosahedron with centers": "i v 0.84",
1575
- Icosaminx: "i v 0.73",
1576
- "Eitan's star": "i f 0.61803398874989",
1577
- "2x2x2 + dino": "c f 0 v 0.577350269189626",
1578
- "2x2x2 + little chop": "c f 0 e 0",
1579
- "dino + little chop": "c v 0.577350269189626 e 0",
1580
- "2x2x2 + dino + little chop": "c f 0 v 0.577350269189626 e 0",
1581
- "megaminx + chopasaurus": "d f 0.61803398875 v 0",
1582
- "starminx combo": "d f 0.23606797749979 v 0.937962370425399"
1583
- };
1584
-
1585
1562
  // src/cubing/puzzle-geometry/Quat.ts
1586
1563
  var eps = 1e-9;
1587
1564
  function centermassface(face) {
@@ -1932,6 +1909,83 @@ function getface(planes) {
1932
1909
  return face;
1933
1910
  }
1934
1911
 
1912
+ // src/cubing/puzzle-geometry/pgPuzzles.ts
1913
+ var pgPuzzle = {
1914
+ "2x2x2": "c f 0",
1915
+ "3x3x3": "c f 0.333333333333333",
1916
+ "4x4x4": "c f 0.5 f 0",
1917
+ "5x5x5": "c f 0.6 f 0.2",
1918
+ "6x6x6": "c f 0.666666666666667 f 0.333333333333333 f 0",
1919
+ "7x7x7": "c f 0.714285714285714 f 0.428571428571429 f 0.142857142857143",
1920
+ "8x8x8": "c f 0.75 f 0.5 f 0.25 f 0",
1921
+ "9x9x9": "c f 0.777777777777778 f 0.555555555555556 f 0.333333333333333 f 0.111111111111111",
1922
+ "10x10x10": "c f 0.8 f 0.6 f 0.4 f 0.2 f 0",
1923
+ "11x11x11": "c f 0.818181818181818 f 0.636363636363636 f 0.454545454545455 f 0.272727272727273 f 0.0909090909090909",
1924
+ "12x12x12": "c f 0.833333333333333 f 0.666666666666667 f 0.5 f 0.333333333333333 f 0.166666666666667 f 0",
1925
+ "13x13x13": "c f 0.846153846153846 f 0.692307692307692 f 0.538461538461538 f 0.384615384615385 f 0.230769230769231 f 0.0769230769230769",
1926
+ "20x20x20": "c f 0 f .1 f .2 f .3 f .4 f .5 f .6 f .7 f .8 f .9",
1927
+ "30x30x30": "c f 0 f .066667 f .133333 f .2 f .266667 f .333333 f .4 f .466667 f .533333 f .6 f .666667 f .733333 f .8 f .866667 f .933333",
1928
+ "40x40x40": "c f 0 f .05 f .1 f .15 f .2 f .25 f .3 f .35 f .4 f .45 f .5 f .55 f .6 f .65 f .7 f .75 f .8 f .85 f .9 f .95",
1929
+ skewb: "c v 0",
1930
+ "master skewb": "c v 0.275",
1931
+ "professor skewb": "c v 0 v 0.38",
1932
+ "compy cube": "c v 0.915641442663986",
1933
+ helicopter: "c e 0.707106781186547",
1934
+ "curvy copter": "c e 0.83",
1935
+ dino: "c v 0.577350269189626",
1936
+ "little chop": "c e 0",
1937
+ pyramorphix: "t e 0",
1938
+ mastermorphix: "t e 0.346184634065199",
1939
+ pyraminx: "t v 0.333333333333333 v 1.66666666666667",
1940
+ tetraminx: "t v 0.333333333333333",
1941
+ "master pyraminx": "t v 0 v 1 v 2",
1942
+ "master tetraminx": "t v 0 v 1",
1943
+ "professor pyraminx": "t v -0.2 v 0.6 v 1.4 v 2.2",
1944
+ "professor tetraminx": "t v -0.2 v 0.6 v 1.4",
1945
+ "royal pyraminx": "t v -0.333333333333333 v 0.333333333333333 v 1 v 1.66666666666667 v 2.33333333333333",
1946
+ "royal tetraminx": "t v -0.333333333333333 v 0.333333333333333 v 1 v 1.66666666666667",
1947
+ "emperor pyraminx": "t v -0.428571428571429 v 0.142857142857143 v 0.714285714285714 v 1.28571428571429 v 1.85714285714286 v 2.42857142857143",
1948
+ "emperor tetraminx": "t v -0.428571428571429 v 0.142857142857143 v 0.714285714285714 v 1.28571428571429 v 1.85714285714286",
1949
+ "Jing pyraminx": "t f 0",
1950
+ "master pyramorphix": "t e 0.866025403784437",
1951
+ megaminx: "d f 0.7",
1952
+ gigaminx: "d f 0.64 f 0.82",
1953
+ teraminx: "d f 0.64 f 0.76 f 0.88",
1954
+ petaminx: "d f 0.64 f 0.73 f 0.82 f 0.91",
1955
+ examinx: "d f 0.64 f 0.712 f 0.784 f 0.856 f 0.928",
1956
+ zetaminx: "d f 0.64 f 0.7 f 0.76 f 0.82 f 0.88 f 0.94",
1957
+ yottaminx: "d f 0.64 f 0.6914 f 0.7429 f 0.7943 f 0.8457 f 0.8971 f 0.9486",
1958
+ pentultimate: "d f 0",
1959
+ "master pentultimate": "d f 0.1",
1960
+ "elite pentultimate": "d f 0 f 0.145905",
1961
+ // exact value for starminx is sqrt(5(5-2 sqrt(5))/3)
1962
+ starminx: "d v 0.937962370425399",
1963
+ "starminx 2": "d f 0.23606797749979",
1964
+ "pyraminx crystal": "d f 0.447213595499989",
1965
+ chopasaurus: "d v 0",
1966
+ "big chop": "d e 0",
1967
+ "skewb diamond": "o f 0",
1968
+ FTO: "o f 0.333333333333333",
1969
+ "master FTO": "o f 0.5 f 0",
1970
+ "Christopher's jewel": "o v 0.577350269189626",
1971
+ octastar: "o e 0",
1972
+ "Trajber's octahedron": "o v 0.433012701892219",
1973
+ "radio chop": "i f 0",
1974
+ icosamate: "i v 0",
1975
+ "Regular Astrominx": "i v 0.18759247376021",
1976
+ "Regular Astrominx + Big Chop": "i v 0.18759247376021 e 0",
1977
+ Redicosahedron: "i v 0.794654472291766",
1978
+ "Redicosahedron with centers": "i v 0.84",
1979
+ Icosaminx: "i v 0.73",
1980
+ "Eitan's star": "i f 0.61803398874989",
1981
+ "2x2x2 + dino": "c f 0 v 0.577350269189626",
1982
+ "2x2x2 + little chop": "c f 0 e 0",
1983
+ "dino + little chop": "c v 0.577350269189626 e 0",
1984
+ "2x2x2 + dino + little chop": "c f 0 v 0.577350269189626 e 0",
1985
+ "megaminx + chopasaurus": "d f 0.61803398875 v 0",
1986
+ "starminx combo": "d f 0.23606797749979 v 0.937962370425399"
1987
+ };
1988
+
1935
1989
  // src/cubing/puzzle-geometry/SchreierSims.ts
1936
1990
  var FactoredNumber = class {
1937
1991
  mult;
@@ -2417,10 +2471,10 @@ function findelement(a, p) {
2417
2471
  throw Error("Element not found");
2418
2472
  }
2419
2473
  function getPG3DNamedPuzzles() {
2420
- return PGPuzzles;
2474
+ return pgPuzzle;
2421
2475
  }
2422
2476
  function getPuzzleDescriptionString(puzzleName) {
2423
- return PGPuzzles[puzzleName];
2477
+ return pgPuzzle[puzzleName];
2424
2478
  }
2425
2479
  var PUZZLE_BASE_SHAPES = ["c", "t", "o", "d", "i"];
2426
2480
  var PUZZLE_CUT_TYPES = ["f", "v", "e"];
@@ -2459,7 +2513,7 @@ function getPuzzleGeometryByDesc(desc, options = {}) {
2459
2513
  return pg;
2460
2514
  }
2461
2515
  function getPuzzleGeometryByName(puzzleName, options) {
2462
- return getPuzzleGeometryByDesc(PGPuzzles[puzzleName], options);
2516
+ return getPuzzleGeometryByDesc(pgPuzzle[puzzleName], options);
2463
2517
  }
2464
2518
  function getmovename(geo, bits, slices) {
2465
2519
  let inverted = false;
@@ -3638,6 +3692,7 @@ var PuzzleGeometry = class {
3638
3692
  }
3639
3693
  return newmv.modified({ family: this.swizzler.unswizzle(newmv.family) });
3640
3694
  }
3695
+ // TODO: remove this in favor of `Move.fromString(…)`
3641
3696
  // We use an extremely permissive parse here; any character but
3642
3697
  // digits are allowed in a family name.
3643
3698
  stringToBlockMove(mv) {
@@ -3745,6 +3800,9 @@ var PuzzleGeometry = class {
3745
3800
  return [void 0, msi, loslice, hislice, firstgrip, move.amount];
3746
3801
  }
3747
3802
  parsemove(mv) {
3803
+ if (mv instanceof Move) {
3804
+ mv = mv.toString();
3805
+ }
3748
3806
  const r = this.parseMove(this.stringToBlockMove(mv));
3749
3807
  r[0] = mv;
3750
3808
  return r;
@@ -4918,104 +4976,6 @@ var PGNotation = class {
4918
4976
  return remapKPuzzleDefinition(kpuzzleDefinition, this.pg.notationMapper);
4919
4977
  }
4920
4978
  };
4921
-
4922
- // src/cubing/puzzle-geometry/Options.ts
4923
- function parseOptions(argv) {
4924
- let argp = 0;
4925
- const options = {};
4926
- while (argp < argv.length && argv[argp][0] === "-") {
4927
- const option = argv[argp++];
4928
- if (option === "--rotations") {
4929
- options.addRotations = true;
4930
- } else if (option === "--allmoves") {
4931
- options.allMoves = true;
4932
- } else if (option === "--outerblockmoves") {
4933
- options.outerBlockMoves = true;
4934
- } else if (option === "--vertexmoves") {
4935
- options.vertexMoves = true;
4936
- } else if (option === "--nocorners") {
4937
- options.includeCornerOrbits = false;
4938
- } else if (option === "--noedges") {
4939
- options.includeEdgeOrbits = false;
4940
- } else if (option === "--noorientation") {
4941
- options.fixedOrientation = true;
4942
- } else if (option === "--nocenters") {
4943
- options.includeCenterOrbits = false;
4944
- } else if (option === "--omit") {
4945
- options.excludeOrbits = argv[argp].split(",");
4946
- argp++;
4947
- } else if (option === "--moves") {
4948
- options.moveList = argv[argp].split(",");
4949
- argp++;
4950
- } else if (option === "--optimize") {
4951
- options.optimizeOrbits = true;
4952
- } else if (option === "--scramble") {
4953
- options.scrambleAmount = 100;
4954
- } else if (option === "--fixcorner") {
4955
- options.fixedPieceType = "v";
4956
- } else if (option === "--fixedge") {
4957
- options.fixedPieceType = "e";
4958
- } else if (option === "--fixcenter") {
4959
- options.fixedPieceType = "f";
4960
- } else if (option === "--orientcenters") {
4961
- options.orientCenters = true;
4962
- } else if (option === "--puzzleorientation") {
4963
- options.puzzleOrientation = JSON.parse(argv[argp]);
4964
- argp++;
4965
- } else {
4966
- throw new Error(`Bad option: ${option}`);
4967
- }
4968
- }
4969
- const puzzleDescription = parsePuzzleDescription(argv.slice(argp).join(" "));
4970
- return { puzzleDescription, options };
4971
- }
4972
- var PuzzleGeometryFullOptions = class {
4973
- verbosity = 0;
4974
- // verbosity (console.log)
4975
- allMoves = false;
4976
- // generate all slice moves in ksolve
4977
- outerBlockMoves = false;
4978
- // generate outer block moves
4979
- vertexMoves = false;
4980
- // generate vertex moves
4981
- addRotations = false;
4982
- // add symmetry information to ksolve output
4983
- moveList = null;
4984
- // move list to generate
4985
- fixedOrientation = false;
4986
- // eliminate any orientations
4987
- fixedPieceType = null;
4988
- // fix a piece?
4989
- orientCenters = false;
4990
- // orient centers?
4991
- // TODO: Group these into a single object?
4992
- includeCornerOrbits = true;
4993
- // include corner orbits
4994
- includeCenterOrbits = true;
4995
- // include center orbits
4996
- includeEdgeOrbits = true;
4997
- // include edge orbits
4998
- // Overrides the previous options.
4999
- excludeOrbits = [];
5000
- // exclude these orbits
5001
- optimizeOrbits = false;
5002
- // optimize PermOri
5003
- grayCorners = false;
5004
- // make corner sets gray
5005
- grayCenters = false;
5006
- // make center sets gray
5007
- grayEdges = false;
5008
- // make edge sets gray
5009
- puzzleOrientation = null;
5010
- // single puzzle orientation from options
5011
- puzzleOrientations = null;
5012
- // puzzle orientation override object from options // TODO: is this needed?
5013
- scrambleAmount = 0;
5014
- // scramble?
5015
- constructor(options = {}) {
5016
- Object.assign(this, options);
5017
- }
5018
- };
5019
4979
  export {
5020
4980
  PUZZLE_BASE_SHAPES as EXPERIMENTAL_PUZZLE_BASE_SHAPES,
5021
4981
  PUZZLE_CUT_TYPES as EXPERIMENTAL_PUZZLE_CUT_TYPES,
@@ -5026,7 +4986,6 @@ export {
5026
4986
  getPuzzleDescriptionString,
5027
4987
  getPuzzleGeometryByDesc,
5028
4988
  getPuzzleGeometryByName,
5029
- parseOptions,
5030
4989
  parsePuzzleDescription,
5031
4990
  schreierSims
5032
4991
  };