cubing 0.40.0 → 0.41.0
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.
- package/dist/esm/bluetooth/index.js +7 -7
- package/dist/esm/bluetooth/index.js.map +2 -2
- package/dist/esm/{chunk-2UHC65GH.js → chunk-2MAPPPWG.js} +5 -5
- package/dist/esm/chunk-2MAPPPWG.js.map +7 -0
- package/dist/esm/{chunk-ZILJKTYP.js → chunk-BTVDGT5H.js} +17 -17
- package/dist/esm/{chunk-JXW26CFJ.js → chunk-DNOZJX34.js} +3 -3
- package/dist/esm/{chunk-F6V2QBMP.js → chunk-F72PPD54.js} +72 -64
- package/dist/esm/chunk-F72PPD54.js.map +7 -0
- package/dist/esm/{chunk-TKIXG2EX.js → chunk-LWPMAFQX.js} +8 -8
- package/dist/esm/chunk-LWPMAFQX.js.map +7 -0
- package/dist/esm/{chunk-TBVTYIMY.js → chunk-QFJEREMI.js} +3 -3
- package/dist/esm/chunk-QFJEREMI.js.map +7 -0
- package/dist/esm/{chunk-IZJ3YK5S.js → chunk-RYRRMKVS.js} +14 -13
- package/dist/esm/chunk-RYRRMKVS.js.map +7 -0
- package/dist/esm/{chunk-NBVZ7LEM.js → chunk-SNYTAYI2.js} +95 -105
- package/dist/esm/chunk-SNYTAYI2.js.map +7 -0
- package/dist/esm/{chunk-NZAWY3EU.js → chunk-UOO5TXR6.js} +29 -29
- package/dist/esm/chunk-UOO5TXR6.js.map +7 -0
- package/dist/esm/{chunk-45VMKYXT.js → chunk-VRFVPBCT.js} +3 -5
- package/dist/esm/chunk-VRFVPBCT.js.map +7 -0
- package/dist/esm/inside-DLVM67HZ.js +17 -0
- package/dist/esm/kpuzzle/index.js +3 -3
- package/dist/esm/notation/index.js +3 -3
- package/dist/esm/protocol/index.js +3 -3
- package/dist/esm/puzzle-geometry/index.js +43 -26
- package/dist/esm/puzzle-geometry/index.js.map +2 -2
- package/dist/esm/puzzles/index.js +3 -3
- package/dist/esm/{puzzles-dynamic-side-events-DHAI7HWB.js → puzzles-dynamic-side-events-42Q52YAB.js} +157 -85
- package/dist/esm/puzzles-dynamic-side-events-42Q52YAB.js.map +7 -0
- package/dist/esm/{puzzles-dynamic-unofficial-QXSDLTK5.js → puzzles-dynamic-unofficial-PCHNKY4Y.js} +13 -13
- package/dist/esm/{puzzles-dynamic-unofficial-QXSDLTK5.js.map → puzzles-dynamic-unofficial-PCHNKY4Y.js.map} +2 -2
- package/dist/esm/scramble/index.js +7 -7
- package/dist/esm/search/index.js +7 -7
- package/dist/esm/{search-dynamic-sgs-side-events-LBEIUPJE.js → search-dynamic-sgs-side-events-7RLPMUUQ.js} +5 -5
- package/dist/esm/{search-dynamic-sgs-unofficial-PHDE4BVE.js → search-dynamic-sgs-unofficial-IXO75L3Y.js} +5 -5
- package/dist/esm/{search-dynamic-solve-4x4x4-EJB3WWMV.js → search-dynamic-solve-4x4x4-IP6UC7HF.js} +5 -5
- package/dist/esm/search-worker-entry.js.js +1 -1
- package/dist/esm/twisty/index.js +28 -22
- package/dist/esm/twisty/index.js.map +2 -2
- package/dist/esm/{twisty-dynamic-3d-EI5ZUVCP.js → twisty-dynamic-3d-6SRUMP27.js} +13 -13
- package/dist/esm/twisty-dynamic-3d-6SRUMP27.js.map +7 -0
- package/dist/esm/{twsearch-ZALDQ4TE.js → twsearch-D6TM63UU.js} +8 -8
- package/dist/esm/twsearch-D6TM63UU.js.map +7 -0
- package/dist/types/{KState-33ce1f57.d.ts → KPattern-85fd8579.d.ts} +33 -29
- package/dist/types/{TwizzleLink-19143923.d.ts → TwizzleLink-7d147be8.d.ts} +7 -7
- package/dist/types/bluetooth/index.d.ts +6 -6
- package/dist/types/{bluetooth-puzzle-29072a56.d.ts → bluetooth-puzzle-da601f13.d.ts} +3 -3
- package/dist/types/kpuzzle/index.d.ts +1 -1
- package/dist/types/notation/index.d.ts +2 -2
- package/dist/types/{outside-b7760f77.d.ts → outside-51ce651a.d.ts} +8 -8
- package/dist/types/protocol/index.d.ts +4 -4
- package/dist/types/puzzle-geometry/index.d.ts +2 -2
- package/dist/types/puzzles/index.d.ts +3 -3
- package/dist/types/scramble/index.d.ts +2 -2
- package/dist/types/search/index.d.ts +3 -3
- package/dist/types/stream/index.d.ts +2 -2
- package/dist/types/twisty/index.d.ts +7 -7
- package/package.json +1 -1
- package/dist/esm/chunk-2UHC65GH.js.map +0 -7
- package/dist/esm/chunk-45VMKYXT.js.map +0 -7
- package/dist/esm/chunk-F6V2QBMP.js.map +0 -7
- package/dist/esm/chunk-IZJ3YK5S.js.map +0 -7
- package/dist/esm/chunk-NBVZ7LEM.js.map +0 -7
- package/dist/esm/chunk-NZAWY3EU.js.map +0 -7
- package/dist/esm/chunk-TBVTYIMY.js.map +0 -7
- package/dist/esm/chunk-TKIXG2EX.js.map +0 -7
- package/dist/esm/inside-BGMQCQ2A.js +0 -17
- package/dist/esm/puzzles-dynamic-side-events-DHAI7HWB.js.map +0 -7
- package/dist/esm/twisty-dynamic-3d-EI5ZUVCP.js.map +0 -7
- package/dist/esm/twsearch-ZALDQ4TE.js.map +0 -7
- /package/dist/esm/{chunk-ZILJKTYP.js.map → chunk-BTVDGT5H.js.map} +0 -0
- /package/dist/esm/{chunk-JXW26CFJ.js.map → chunk-DNOZJX34.js.map} +0 -0
- /package/dist/esm/{inside-BGMQCQ2A.js.map → inside-DLVM67HZ.js.map} +0 -0
- /package/dist/esm/{search-dynamic-sgs-side-events-LBEIUPJE.js.map → search-dynamic-sgs-side-events-7RLPMUUQ.js.map} +0 -0
- /package/dist/esm/{search-dynamic-sgs-unofficial-PHDE4BVE.js.map → search-dynamic-sgs-unofficial-IXO75L3Y.js.map} +0 -0
- /package/dist/esm/{search-dynamic-solve-4x4x4-EJB3WWMV.js.map → search-dynamic-solve-4x4x4-IP6UC7HF.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
2
|
+
KPattern,
|
|
3
|
+
KPuzzle
|
|
4
|
+
} from "./chunk-F72PPD54.js";
|
|
5
5
|
import {
|
|
6
6
|
Alg,
|
|
7
7
|
Move
|
|
@@ -30,12 +30,10 @@ function getFaceletStickeringMask(stickeringMask, orbitName, pieceIdx, faceletId
|
|
|
30
30
|
var PieceAnnotation = class {
|
|
31
31
|
constructor(kpuzzle, defaultValue) {
|
|
32
32
|
this.stickerings = /* @__PURE__ */ new Map();
|
|
33
|
-
for (const
|
|
34
|
-
kpuzzle.definition.orbits
|
|
35
|
-
)) {
|
|
33
|
+
for (const orbitDefinition of kpuzzle.definition.orbits) {
|
|
36
34
|
this.stickerings.set(
|
|
37
|
-
orbitName,
|
|
38
|
-
new Array(
|
|
35
|
+
orbitDefinition.orbitName,
|
|
36
|
+
new Array(orbitDefinition.numPieces).fill(defaultValue)
|
|
39
37
|
);
|
|
40
38
|
}
|
|
41
39
|
}
|
|
@@ -129,15 +127,13 @@ var StickeringManager = class {
|
|
|
129
127
|
}
|
|
130
128
|
and(pieceSets) {
|
|
131
129
|
const newPieceSet = new PieceAnnotation(this.kpuzzle, false);
|
|
132
|
-
for (const
|
|
133
|
-
this.kpuzzle.definition.orbits
|
|
134
|
-
)) {
|
|
130
|
+
for (const orbitDefinition of this.kpuzzle.definition.orbits) {
|
|
135
131
|
pieceLoop:
|
|
136
|
-
for (let i = 0; i <
|
|
137
|
-
newPieceSet.stickerings.get(orbitName)[i] = true;
|
|
132
|
+
for (let i = 0; i < orbitDefinition.numPieces; i++) {
|
|
133
|
+
newPieceSet.stickerings.get(orbitDefinition.orbitName)[i] = true;
|
|
138
134
|
for (const pieceSet of pieceSets) {
|
|
139
|
-
if (!pieceSet.stickerings.get(orbitName)[i]) {
|
|
140
|
-
newPieceSet.stickerings.get(orbitName)[i] = false;
|
|
135
|
+
if (!pieceSet.stickerings.get(orbitDefinition.orbitName)[i]) {
|
|
136
|
+
newPieceSet.stickerings.get(orbitDefinition.orbitName)[i] = false;
|
|
141
137
|
continue pieceLoop;
|
|
142
138
|
}
|
|
143
139
|
}
|
|
@@ -147,15 +143,13 @@ var StickeringManager = class {
|
|
|
147
143
|
}
|
|
148
144
|
or(pieceSets) {
|
|
149
145
|
const newPieceSet = new PieceAnnotation(this.kpuzzle, false);
|
|
150
|
-
for (const
|
|
151
|
-
this.kpuzzle.definition.orbits
|
|
152
|
-
)) {
|
|
146
|
+
for (const orbitDefinition of this.kpuzzle.definition.orbits) {
|
|
153
147
|
pieceLoop:
|
|
154
|
-
for (let i = 0; i <
|
|
155
|
-
newPieceSet.stickerings.get(orbitName)[i] = false;
|
|
148
|
+
for (let i = 0; i < orbitDefinition.numPieces; i++) {
|
|
149
|
+
newPieceSet.stickerings.get(orbitDefinition.orbitName)[i] = false;
|
|
156
150
|
for (const pieceSet of pieceSets) {
|
|
157
|
-
if (pieceSet.stickerings.get(orbitName)[i]) {
|
|
158
|
-
newPieceSet.stickerings.get(orbitName)[i] = true;
|
|
151
|
+
if (pieceSet.stickerings.get(orbitDefinition.orbitName)[i]) {
|
|
152
|
+
newPieceSet.stickerings.get(orbitDefinition.orbitName)[i] = true;
|
|
159
153
|
continue pieceLoop;
|
|
160
154
|
}
|
|
161
155
|
}
|
|
@@ -165,11 +159,9 @@ var StickeringManager = class {
|
|
|
165
159
|
}
|
|
166
160
|
not(pieceSet) {
|
|
167
161
|
const newPieceSet = new PieceAnnotation(this.kpuzzle, false);
|
|
168
|
-
for (const
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
for (let i = 0; i < orbitDef.numPieces; i++) {
|
|
172
|
-
newPieceSet.stickerings.get(orbitName)[i] = !pieceSet.stickerings.get(orbitName)[i];
|
|
162
|
+
for (const orbitDefinition of this.kpuzzle.definition.orbits) {
|
|
163
|
+
for (let i = 0; i < orbitDefinition.numPieces; i++) {
|
|
164
|
+
newPieceSet.stickerings.get(orbitDefinition.orbitName)[i] = !pieceSet.stickerings.get(orbitDefinition.orbitName)[i];
|
|
173
165
|
}
|
|
174
166
|
}
|
|
175
167
|
return newPieceSet;
|
|
@@ -180,12 +172,10 @@ var StickeringManager = class {
|
|
|
180
172
|
move(moveSource) {
|
|
181
173
|
const transformation = this.kpuzzle.moveToTransformation(moveSource);
|
|
182
174
|
const newPieceSet = new PieceAnnotation(this.kpuzzle, false);
|
|
183
|
-
for (const
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
if (transformation.transformationData[orbitName].permutation[i] !== i || transformation.transformationData[orbitName].orientation[i] !== 0) {
|
|
188
|
-
newPieceSet.stickerings.get(orbitName)[i] = true;
|
|
175
|
+
for (const orbitDefinition of this.kpuzzle.definition.orbits) {
|
|
176
|
+
for (let i = 0; i < orbitDefinition.numPieces; i++) {
|
|
177
|
+
if (transformation.transformationData[orbitDefinition.orbitName].permutation[i] !== i || transformation.transformationData[orbitDefinition.orbitName].orientationDelta[i] !== 0) {
|
|
178
|
+
newPieceSet.stickerings.get(orbitDefinition.orbitName)[i] = true;
|
|
189
179
|
}
|
|
190
180
|
}
|
|
191
181
|
}
|
|
@@ -203,19 +193,19 @@ var StickeringManager = class {
|
|
|
203
193
|
}
|
|
204
194
|
orbitPrefix(orbitPrefix) {
|
|
205
195
|
const pieceSet = new PieceAnnotation(this.kpuzzle, false);
|
|
206
|
-
for (const
|
|
207
|
-
if (orbitName.startsWith(orbitPrefix)) {
|
|
208
|
-
pieceSet.stickerings.get(orbitName).fill(true);
|
|
196
|
+
for (const orbitDefinition of this.kpuzzle.definition.orbits) {
|
|
197
|
+
if (orbitDefinition.orbitName.startsWith(orbitPrefix)) {
|
|
198
|
+
pieceSet.stickerings.get(orbitDefinition.orbitName).fill(true);
|
|
209
199
|
}
|
|
210
200
|
}
|
|
211
201
|
return pieceSet;
|
|
212
202
|
}
|
|
213
203
|
// trueCounts(pieceSet: PieceSet): Record<string, number> {
|
|
214
204
|
// const counts: Record<string, number> = {};
|
|
215
|
-
// for (const
|
|
205
|
+
// for (const orbitDefinition of this.def.orbits) {
|
|
216
206
|
// let count = 0;
|
|
217
|
-
// for (let i = 0; i <
|
|
218
|
-
// if (pieceSet.stickerings.get(orbitName)![i]) {
|
|
207
|
+
// for (let i = 0; i < orbitDefinition.numPieces; i++) {
|
|
208
|
+
// if (pieceSet.stickerings.get(orbitDefinition.orbitName)![i]) {
|
|
219
209
|
// count++;
|
|
220
210
|
// }
|
|
221
211
|
// }
|
|
@@ -745,12 +735,12 @@ function puzzleSpecificSimplifyOptionsPromise(kpuzzlePromiseFn) {
|
|
|
745
735
|
// src/cubing/puzzles/implementations/dynamic/3x3x3/3x3x3.kpuzzle.json.ts
|
|
746
736
|
var cube3x3x3KPuzzleDefinition = {
|
|
747
737
|
name: "3x3x3",
|
|
748
|
-
orbits:
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
738
|
+
orbits: [
|
|
739
|
+
{ orbitName: "EDGES", numPieces: 12, numOrientations: 2 },
|
|
740
|
+
{ orbitName: "CORNERS", numPieces: 8, numOrientations: 3 },
|
|
741
|
+
{ orbitName: "CENTERS", numPieces: 6, numOrientations: 4 }
|
|
742
|
+
],
|
|
743
|
+
defaultPattern: {
|
|
754
744
|
EDGES: {
|
|
755
745
|
pieces: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
|
|
756
746
|
orientation: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
|
@@ -769,257 +759,257 @@ var cube3x3x3KPuzzleDefinition = {
|
|
|
769
759
|
U: {
|
|
770
760
|
EDGES: {
|
|
771
761
|
permutation: [1, 2, 3, 0, 4, 5, 6, 7, 8, 9, 10, 11],
|
|
772
|
-
|
|
762
|
+
orientationDelta: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
|
773
763
|
},
|
|
774
764
|
CORNERS: {
|
|
775
765
|
permutation: [1, 2, 3, 0, 4, 5, 6, 7],
|
|
776
|
-
|
|
766
|
+
orientationDelta: [0, 0, 0, 0, 0, 0, 0, 0]
|
|
777
767
|
},
|
|
778
768
|
CENTERS: {
|
|
779
769
|
permutation: [0, 1, 2, 3, 4, 5],
|
|
780
|
-
|
|
770
|
+
orientationDelta: [1, 0, 0, 0, 0, 0]
|
|
781
771
|
}
|
|
782
772
|
},
|
|
783
773
|
y: {
|
|
784
774
|
EDGES: {
|
|
785
775
|
permutation: [1, 2, 3, 0, 5, 6, 7, 4, 10, 8, 11, 9],
|
|
786
|
-
|
|
776
|
+
orientationDelta: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]
|
|
787
777
|
},
|
|
788
778
|
CORNERS: {
|
|
789
779
|
permutation: [1, 2, 3, 0, 7, 4, 5, 6],
|
|
790
|
-
|
|
780
|
+
orientationDelta: [0, 0, 0, 0, 0, 0, 0, 0]
|
|
791
781
|
},
|
|
792
782
|
CENTERS: {
|
|
793
783
|
permutation: [0, 2, 3, 4, 1, 5],
|
|
794
|
-
|
|
784
|
+
orientationDelta: [1, 0, 0, 0, 0, 3]
|
|
795
785
|
}
|
|
796
786
|
},
|
|
797
787
|
x: {
|
|
798
788
|
EDGES: {
|
|
799
789
|
permutation: [4, 8, 0, 9, 6, 10, 2, 11, 5, 7, 1, 3],
|
|
800
|
-
|
|
790
|
+
orientationDelta: [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0]
|
|
801
791
|
},
|
|
802
792
|
CORNERS: {
|
|
803
793
|
permutation: [4, 0, 3, 5, 7, 6, 2, 1],
|
|
804
|
-
|
|
794
|
+
orientationDelta: [2, 1, 2, 1, 1, 2, 1, 2]
|
|
805
795
|
},
|
|
806
796
|
CENTERS: {
|
|
807
797
|
permutation: [2, 1, 5, 3, 0, 4],
|
|
808
|
-
|
|
798
|
+
orientationDelta: [0, 3, 0, 1, 2, 2]
|
|
809
799
|
}
|
|
810
800
|
},
|
|
811
801
|
L: {
|
|
812
802
|
EDGES: {
|
|
813
803
|
permutation: [0, 1, 2, 11, 4, 5, 6, 9, 8, 3, 10, 7],
|
|
814
|
-
|
|
804
|
+
orientationDelta: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
|
815
805
|
},
|
|
816
806
|
CORNERS: {
|
|
817
807
|
permutation: [0, 1, 6, 2, 4, 3, 5, 7],
|
|
818
|
-
|
|
808
|
+
orientationDelta: [0, 0, 2, 1, 0, 2, 1, 0]
|
|
819
809
|
},
|
|
820
810
|
CENTERS: {
|
|
821
811
|
permutation: [0, 1, 2, 3, 4, 5],
|
|
822
|
-
|
|
812
|
+
orientationDelta: [0, 1, 0, 0, 0, 0]
|
|
823
813
|
}
|
|
824
814
|
},
|
|
825
815
|
F: {
|
|
826
816
|
EDGES: {
|
|
827
817
|
permutation: [9, 1, 2, 3, 8, 5, 6, 7, 0, 4, 10, 11],
|
|
828
|
-
|
|
818
|
+
orientationDelta: [1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0]
|
|
829
819
|
},
|
|
830
820
|
CORNERS: {
|
|
831
821
|
permutation: [3, 1, 2, 5, 0, 4, 6, 7],
|
|
832
|
-
|
|
822
|
+
orientationDelta: [1, 0, 0, 2, 2, 1, 0, 0]
|
|
833
823
|
},
|
|
834
824
|
CENTERS: {
|
|
835
825
|
permutation: [0, 1, 2, 3, 4, 5],
|
|
836
|
-
|
|
826
|
+
orientationDelta: [0, 0, 1, 0, 0, 0]
|
|
837
827
|
}
|
|
838
828
|
},
|
|
839
829
|
R: {
|
|
840
830
|
EDGES: {
|
|
841
831
|
permutation: [0, 8, 2, 3, 4, 10, 6, 7, 5, 9, 1, 11],
|
|
842
|
-
|
|
832
|
+
orientationDelta: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
|
843
833
|
},
|
|
844
834
|
CORNERS: {
|
|
845
835
|
permutation: [4, 0, 2, 3, 7, 5, 6, 1],
|
|
846
|
-
|
|
836
|
+
orientationDelta: [2, 1, 0, 0, 1, 0, 0, 2]
|
|
847
837
|
},
|
|
848
838
|
CENTERS: {
|
|
849
839
|
permutation: [0, 1, 2, 3, 4, 5],
|
|
850
|
-
|
|
840
|
+
orientationDelta: [0, 0, 0, 1, 0, 0]
|
|
851
841
|
}
|
|
852
842
|
},
|
|
853
843
|
B: {
|
|
854
844
|
EDGES: {
|
|
855
845
|
permutation: [0, 1, 10, 3, 4, 5, 11, 7, 8, 9, 6, 2],
|
|
856
|
-
|
|
846
|
+
orientationDelta: [0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1]
|
|
857
847
|
},
|
|
858
848
|
CORNERS: {
|
|
859
849
|
permutation: [0, 7, 1, 3, 4, 5, 2, 6],
|
|
860
|
-
|
|
850
|
+
orientationDelta: [0, 2, 1, 0, 0, 0, 2, 1]
|
|
861
851
|
},
|
|
862
852
|
CENTERS: {
|
|
863
853
|
permutation: [0, 1, 2, 3, 4, 5],
|
|
864
|
-
|
|
854
|
+
orientationDelta: [0, 0, 0, 0, 1, 0]
|
|
865
855
|
}
|
|
866
856
|
},
|
|
867
857
|
D: {
|
|
868
858
|
EDGES: {
|
|
869
859
|
permutation: [0, 1, 2, 3, 7, 4, 5, 6, 8, 9, 10, 11],
|
|
870
|
-
|
|
860
|
+
orientationDelta: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
|
871
861
|
},
|
|
872
862
|
CORNERS: {
|
|
873
863
|
permutation: [0, 1, 2, 3, 5, 6, 7, 4],
|
|
874
|
-
|
|
864
|
+
orientationDelta: [0, 0, 0, 0, 0, 0, 0, 0]
|
|
875
865
|
},
|
|
876
866
|
CENTERS: {
|
|
877
867
|
permutation: [0, 1, 2, 3, 4, 5],
|
|
878
|
-
|
|
868
|
+
orientationDelta: [0, 0, 0, 0, 0, 1]
|
|
879
869
|
}
|
|
880
870
|
},
|
|
881
871
|
z: {
|
|
882
872
|
EDGES: {
|
|
883
873
|
permutation: [9, 3, 11, 7, 8, 1, 10, 5, 0, 4, 2, 6],
|
|
884
|
-
|
|
874
|
+
orientationDelta: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
|
|
885
875
|
},
|
|
886
876
|
CORNERS: {
|
|
887
877
|
permutation: [3, 2, 6, 5, 0, 4, 7, 1],
|
|
888
|
-
|
|
878
|
+
orientationDelta: [1, 2, 1, 2, 2, 1, 2, 1]
|
|
889
879
|
},
|
|
890
880
|
CENTERS: {
|
|
891
881
|
permutation: [1, 5, 2, 0, 4, 3],
|
|
892
|
-
|
|
882
|
+
orientationDelta: [1, 1, 1, 1, 3, 1]
|
|
893
883
|
}
|
|
894
884
|
},
|
|
895
885
|
M: {
|
|
896
886
|
EDGES: {
|
|
897
887
|
permutation: [2, 1, 6, 3, 0, 5, 4, 7, 8, 9, 10, 11],
|
|
898
|
-
|
|
888
|
+
orientationDelta: [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0]
|
|
899
889
|
},
|
|
900
890
|
CORNERS: {
|
|
901
891
|
permutation: [0, 1, 2, 3, 4, 5, 6, 7],
|
|
902
|
-
|
|
892
|
+
orientationDelta: [0, 0, 0, 0, 0, 0, 0, 0]
|
|
903
893
|
},
|
|
904
894
|
CENTERS: {
|
|
905
895
|
permutation: [4, 1, 0, 3, 5, 2],
|
|
906
|
-
|
|
896
|
+
orientationDelta: [2, 0, 0, 0, 2, 0]
|
|
907
897
|
}
|
|
908
898
|
},
|
|
909
899
|
E: {
|
|
910
900
|
EDGES: {
|
|
911
901
|
permutation: [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 8, 10],
|
|
912
|
-
|
|
902
|
+
orientationDelta: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]
|
|
913
903
|
},
|
|
914
904
|
CORNERS: {
|
|
915
905
|
permutation: [0, 1, 2, 3, 4, 5, 6, 7],
|
|
916
|
-
|
|
906
|
+
orientationDelta: [0, 0, 0, 0, 0, 0, 0, 0]
|
|
917
907
|
},
|
|
918
908
|
CENTERS: {
|
|
919
909
|
permutation: [0, 4, 1, 2, 3, 5],
|
|
920
|
-
|
|
910
|
+
orientationDelta: [0, 0, 0, 0, 0, 0]
|
|
921
911
|
}
|
|
922
912
|
},
|
|
923
913
|
S: {
|
|
924
914
|
EDGES: {
|
|
925
915
|
permutation: [0, 3, 2, 7, 4, 1, 6, 5, 8, 9, 10, 11],
|
|
926
|
-
|
|
916
|
+
orientationDelta: [0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0]
|
|
927
917
|
},
|
|
928
918
|
CORNERS: {
|
|
929
919
|
permutation: [0, 1, 2, 3, 4, 5, 6, 7],
|
|
930
|
-
|
|
920
|
+
orientationDelta: [0, 0, 0, 0, 0, 0, 0, 0]
|
|
931
921
|
},
|
|
932
922
|
CENTERS: {
|
|
933
923
|
permutation: [1, 5, 2, 0, 4, 3],
|
|
934
|
-
|
|
924
|
+
orientationDelta: [1, 1, 0, 1, 0, 1]
|
|
935
925
|
}
|
|
936
926
|
},
|
|
937
927
|
u: {
|
|
938
928
|
EDGES: {
|
|
939
929
|
permutation: [1, 2, 3, 0, 4, 5, 6, 7, 10, 8, 11, 9],
|
|
940
|
-
|
|
930
|
+
orientationDelta: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]
|
|
941
931
|
},
|
|
942
932
|
CORNERS: {
|
|
943
933
|
permutation: [1, 2, 3, 0, 4, 5, 6, 7],
|
|
944
|
-
|
|
934
|
+
orientationDelta: [0, 0, 0, 0, 0, 0, 0, 0]
|
|
945
935
|
},
|
|
946
936
|
CENTERS: {
|
|
947
937
|
permutation: [0, 2, 3, 4, 1, 5],
|
|
948
|
-
|
|
938
|
+
orientationDelta: [1, 0, 0, 0, 0, 0]
|
|
949
939
|
}
|
|
950
940
|
},
|
|
951
941
|
l: {
|
|
952
942
|
EDGES: {
|
|
953
943
|
permutation: [2, 1, 6, 11, 0, 5, 4, 9, 8, 3, 10, 7],
|
|
954
|
-
|
|
944
|
+
orientationDelta: [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0]
|
|
955
945
|
},
|
|
956
946
|
CORNERS: {
|
|
957
947
|
permutation: [0, 1, 6, 2, 4, 3, 5, 7],
|
|
958
|
-
|
|
948
|
+
orientationDelta: [0, 0, 2, 1, 0, 2, 1, 0]
|
|
959
949
|
},
|
|
960
950
|
CENTERS: {
|
|
961
951
|
permutation: [4, 1, 0, 3, 5, 2],
|
|
962
|
-
|
|
952
|
+
orientationDelta: [2, 1, 0, 0, 2, 0]
|
|
963
953
|
}
|
|
964
954
|
},
|
|
965
955
|
f: {
|
|
966
956
|
EDGES: {
|
|
967
957
|
permutation: [9, 3, 2, 7, 8, 1, 6, 5, 0, 4, 10, 11],
|
|
968
|
-
|
|
958
|
+
orientationDelta: [1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0]
|
|
969
959
|
},
|
|
970
960
|
CORNERS: {
|
|
971
961
|
permutation: [3, 1, 2, 5, 0, 4, 6, 7],
|
|
972
|
-
|
|
962
|
+
orientationDelta: [1, 0, 0, 2, 2, 1, 0, 0]
|
|
973
963
|
},
|
|
974
964
|
CENTERS: {
|
|
975
965
|
permutation: [1, 5, 2, 0, 4, 3],
|
|
976
|
-
|
|
966
|
+
orientationDelta: [1, 1, 1, 1, 0, 1]
|
|
977
967
|
}
|
|
978
968
|
},
|
|
979
969
|
r: {
|
|
980
970
|
EDGES: {
|
|
981
971
|
permutation: [4, 8, 0, 3, 6, 10, 2, 7, 5, 9, 1, 11],
|
|
982
|
-
|
|
972
|
+
orientationDelta: [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0]
|
|
983
973
|
},
|
|
984
974
|
CORNERS: {
|
|
985
975
|
permutation: [4, 0, 2, 3, 7, 5, 6, 1],
|
|
986
|
-
|
|
976
|
+
orientationDelta: [2, 1, 0, 0, 1, 0, 0, 2]
|
|
987
977
|
},
|
|
988
978
|
CENTERS: {
|
|
989
979
|
permutation: [2, 1, 5, 3, 0, 4],
|
|
990
|
-
|
|
980
|
+
orientationDelta: [0, 0, 0, 1, 2, 2]
|
|
991
981
|
}
|
|
992
982
|
},
|
|
993
983
|
b: {
|
|
994
984
|
EDGES: {
|
|
995
985
|
permutation: [0, 5, 10, 1, 4, 7, 11, 3, 8, 9, 6, 2],
|
|
996
|
-
|
|
986
|
+
orientationDelta: [0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1]
|
|
997
987
|
},
|
|
998
988
|
CORNERS: {
|
|
999
989
|
permutation: [0, 7, 1, 3, 4, 5, 2, 6],
|
|
1000
|
-
|
|
990
|
+
orientationDelta: [0, 2, 1, 0, 0, 0, 2, 1]
|
|
1001
991
|
},
|
|
1002
992
|
CENTERS: {
|
|
1003
993
|
permutation: [3, 0, 2, 5, 4, 1],
|
|
1004
|
-
|
|
994
|
+
orientationDelta: [3, 3, 0, 3, 1, 3]
|
|
1005
995
|
}
|
|
1006
996
|
},
|
|
1007
997
|
d: {
|
|
1008
998
|
EDGES: {
|
|
1009
999
|
permutation: [0, 1, 2, 3, 7, 4, 5, 6, 9, 11, 8, 10],
|
|
1010
|
-
|
|
1000
|
+
orientationDelta: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]
|
|
1011
1001
|
},
|
|
1012
1002
|
CORNERS: {
|
|
1013
1003
|
permutation: [0, 1, 2, 3, 5, 6, 7, 4],
|
|
1014
|
-
|
|
1004
|
+
orientationDelta: [0, 0, 0, 0, 0, 0, 0, 0]
|
|
1015
1005
|
},
|
|
1016
1006
|
CENTERS: {
|
|
1017
1007
|
permutation: [0, 4, 1, 2, 3, 5],
|
|
1018
|
-
|
|
1008
|
+
orientationDelta: [0, 0, 0, 0, 0, 1]
|
|
1019
1009
|
}
|
|
1020
1010
|
}
|
|
1021
1011
|
},
|
|
1022
|
-
|
|
1012
|
+
derivedMoves: {
|
|
1023
1013
|
Uw: "u",
|
|
1024
1014
|
Lw: "l",
|
|
1025
1015
|
Fw: "f",
|
|
@@ -1054,7 +1044,7 @@ async function getPartialAppendOptionsForPuzzleSpecificSimplifyOptions(puzzleLoa
|
|
|
1054
1044
|
function puzzleOrientation2x2x2Idx(state) {
|
|
1055
1045
|
const inverse = state.experimentalToTransformation().invert();
|
|
1056
1046
|
const inverseDFL = inverse.transformationData["CORNERS"];
|
|
1057
|
-
return inverseDFL.permutation[6] * 3 + inverseDFL.
|
|
1047
|
+
return inverseDFL.permutation[6] * 3 + inverseDFL.orientationDelta[6];
|
|
1058
1048
|
}
|
|
1059
1049
|
var puzzleOrientationCacheRaw = new Array(24);
|
|
1060
1050
|
var puzzleOrientationCacheInitialized = false;
|
|
@@ -1069,7 +1059,7 @@ function puzzleOrientation2x2x2Cache(kpuzzle) {
|
|
|
1069
1059
|
let transformation = kpuzzle.algToTransformation(uAlg);
|
|
1070
1060
|
for (let i = 0; i < 4; i++) {
|
|
1071
1061
|
transformation = transformation.applyAlg(yAlg);
|
|
1072
|
-
const idx = puzzleOrientation2x2x2Idx(transformation.
|
|
1062
|
+
const idx = puzzleOrientation2x2x2Idx(transformation.toKPattern());
|
|
1073
1063
|
puzzleOrientationCacheRaw[idx] = {
|
|
1074
1064
|
transformation: transformation.invert(),
|
|
1075
1065
|
alg: uAlg.concat(yAlg)
|
|
@@ -1168,7 +1158,7 @@ function puzzleOrientation3x3x3Cache() {
|
|
|
1168
1158
|
for (let i = 0; i < 4; i++) {
|
|
1169
1159
|
transformation = transformation.applyAlg(yAlg);
|
|
1170
1160
|
const [idxU, idxL] = puzzleOrientation3x3x3Idx(
|
|
1171
|
-
transformation.
|
|
1161
|
+
transformation.toKPattern()
|
|
1172
1162
|
);
|
|
1173
1163
|
puzzleOrientationCacheRaw2[idxU][idxL] = transformation.invert();
|
|
1174
1164
|
}
|
|
@@ -1187,7 +1177,7 @@ function experimentalIs3x3x3Solved(state, options) {
|
|
|
1187
1177
|
state = normalize3x3x3Orientation(state);
|
|
1188
1178
|
}
|
|
1189
1179
|
if (options.ignoreCenterOrientation) {
|
|
1190
|
-
state = new
|
|
1180
|
+
state = new KPattern(state.kpuzzle, {
|
|
1191
1181
|
EDGES: state.stateData.EDGES,
|
|
1192
1182
|
CORNERS: state.stateData.CORNERS,
|
|
1193
1183
|
CENTERS: {
|
|
@@ -1222,4 +1212,4 @@ export {
|
|
|
1222
1212
|
customPGPuzzleLoader,
|
|
1223
1213
|
experimental3x3x3KPuzzle
|
|
1224
1214
|
};
|
|
1225
|
-
//# sourceMappingURL=chunk-
|
|
1215
|
+
//# sourceMappingURL=chunk-SNYTAYI2.js.map
|