cubing 0.30.0 → 0.31.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 (89) hide show
  1. package/dist/esm/alg/index.js +3 -1
  2. package/dist/esm/bluetooth/index.js +5 -5
  3. package/dist/esm/bluetooth/index.js.map +2 -2
  4. package/dist/esm/{chunk-KOAJIBEX.js → chunk-52L7V4XF.js} +32 -27
  5. package/dist/esm/chunk-52L7V4XF.js.map +7 -0
  6. package/dist/esm/{chunk-4QZRHN6S.js → chunk-55WSHQFP.js} +6 -8
  7. package/dist/esm/{chunk-4QZRHN6S.js.map → chunk-55WSHQFP.js.map} +2 -2
  8. package/dist/esm/{chunk-5OQ34D3X.js → chunk-A3PA5E45.js} +4 -4
  9. package/dist/esm/{chunk-5OQ34D3X.js.map → chunk-A3PA5E45.js.map} +2 -2
  10. package/dist/esm/{chunk-C6KMV2PL.js → chunk-G6MFOXW4.js} +10 -11
  11. package/dist/esm/chunk-G6MFOXW4.js.map +7 -0
  12. package/dist/esm/{chunk-6FB2XWAK.js → chunk-JCIUBLD5.js} +138 -183
  13. package/dist/esm/chunk-JCIUBLD5.js.map +7 -0
  14. package/dist/esm/{chunk-RI2DAEY6.js → chunk-JW5R6EBK.js} +2 -2
  15. package/dist/esm/{chunk-RI2DAEY6.js.map → chunk-JW5R6EBK.js.map} +0 -0
  16. package/dist/esm/{chunk-GQBRF4EM.js → chunk-MHP4YJE7.js} +7 -9
  17. package/dist/esm/chunk-MHP4YJE7.js.map +7 -0
  18. package/dist/esm/{chunk-ZQT3QSWD.js → chunk-PVI43RDV.js} +16 -13
  19. package/dist/esm/chunk-PVI43RDV.js.map +7 -0
  20. package/dist/esm/{chunk-35OK6TQ4.js → chunk-VTO7WPWK.js} +28 -19
  21. package/dist/esm/chunk-VTO7WPWK.js.map +7 -0
  22. package/dist/esm/{chunk-VIUWS2PX.js → chunk-XNPPG3BV.js} +3 -3
  23. package/dist/esm/chunk-XNPPG3BV.js.map +7 -0
  24. package/dist/esm/kpuzzle/index.js +2 -2
  25. package/dist/esm/notation/index.js +2 -2
  26. package/dist/esm/protocol/index.js +4 -4
  27. package/dist/esm/puzzle-geometry/index.js +6 -18
  28. package/dist/esm/puzzle-geometry/index.js.map +2 -2
  29. package/dist/esm/puzzles/index.js +4 -4
  30. package/dist/esm/scramble/index.js +2 -2
  31. package/dist/esm/search/index.js +6 -6
  32. package/dist/esm/{search-dynamic-sgs-side-events-XNTCWRI4.js → search-dynamic-sgs-side-events-UIAYYZRR.js} +6 -6
  33. package/dist/esm/{search-dynamic-sgs-side-events-XNTCWRI4.js.map → search-dynamic-sgs-side-events-UIAYYZRR.js.map} +0 -0
  34. package/dist/esm/{search-dynamic-sgs-unofficial-5KMZ747E.js → search-dynamic-sgs-unofficial-7XRXANEX.js} +6 -6
  35. package/dist/esm/{search-dynamic-sgs-unofficial-5KMZ747E.js.map → search-dynamic-sgs-unofficial-7XRXANEX.js.map} +0 -0
  36. package/dist/esm/{search-dynamic-solve-3x3x3-TSXPWENP.js → search-dynamic-solve-3x3x3-DDVSUP2C.js} +275 -290
  37. package/dist/esm/search-dynamic-solve-3x3x3-DDVSUP2C.js.map +7 -0
  38. package/dist/esm/{search-dynamic-solve-4x4x4-FKQ2JWK2.js → search-dynamic-solve-4x4x4-K5LUSS2B.js} +6 -6
  39. package/dist/esm/{search-dynamic-solve-4x4x4-FKQ2JWK2.js.map → search-dynamic-solve-4x4x4-K5LUSS2B.js.map} +0 -0
  40. package/dist/esm/{search-dynamic-solve-fto-GPLW7S5F.js → search-dynamic-solve-fto-MA4X6JEE.js} +6 -16
  41. package/dist/esm/search-dynamic-solve-fto-MA4X6JEE.js.map +7 -0
  42. package/dist/esm/{search-dynamic-solve-kilominx-HB2QFUGF.js → search-dynamic-solve-kilominx-XDOKK3ZV.js} +2 -2
  43. package/dist/esm/search-dynamic-solve-kilominx-XDOKK3ZV.js.map +7 -0
  44. package/dist/esm/{search-dynamic-solve-master_tetraminx-LR3LJI7O.js → search-dynamic-solve-master_tetraminx-YKINTRUU.js} +4 -10
  45. package/dist/esm/search-dynamic-solve-master_tetraminx-YKINTRUU.js.map +7 -0
  46. package/dist/esm/{search-worker-inside-generated-string-5HKZNHKK.js → search-worker-inside-generated-string-LBOAERDX.js} +28 -28
  47. package/dist/esm/search-worker-inside-generated-string-LBOAERDX.js.map +7 -0
  48. package/dist/esm/{search-worker-js-entry-PDXEE46R.js → search-worker-js-entry-4MMPUMST.js} +30 -36
  49. package/dist/esm/{search-worker-js-entry-PDXEE46R.js.map → search-worker-js-entry-4MMPUMST.js.map} +2 -2
  50. package/dist/esm/{search-worker-ts-entry-UV2RY2EY.js → search-worker-ts-entry-LBKZYRBU.js} +2 -2
  51. package/dist/esm/{search-worker-ts-entry-UV2RY2EY.js.map → search-worker-ts-entry-LBKZYRBU.js.map} +0 -0
  52. package/dist/esm/stream/index.js +1 -1
  53. package/dist/esm/stream/index.js.map +2 -2
  54. package/dist/esm/twisty/index.js +381 -250
  55. package/dist/esm/twisty/index.js.map +4 -4
  56. package/dist/esm/{twisty-dynamic-3d-GPF6TW32.js → twisty-dynamic-3d-TFI45NMX.js} +125 -106
  57. package/dist/esm/twisty-dynamic-3d-TFI45NMX.js.map +7 -0
  58. package/dist/types/{Alg-1c8c3757.d.ts → Alg-d3ac9660.d.ts} +53 -4
  59. package/dist/types/{KState-7c9e40f4.d.ts → KState-0a9388d0.d.ts} +1 -1
  60. package/dist/types/{TwizzleLink-3f8a01d2.d.ts → TwizzleLink-79b17516.d.ts} +63 -41
  61. package/dist/types/alg/index.d.ts +9 -6
  62. package/dist/types/bluetooth/index.d.ts +4 -4
  63. package/dist/types/{bluetooth-puzzle-a64e9756.d.ts → bluetooth-puzzle-83ade5b5.d.ts} +2 -2
  64. package/dist/types/kpuzzle/index.d.ts +2 -2
  65. package/dist/types/notation/index.d.ts +1 -1
  66. package/dist/types/{outside-b62aa614.d.ts → outside-6a613add.d.ts} +2 -2
  67. package/dist/types/{parseAlg-d5fbee87.d.ts → parseAlg-3bb4dddb.d.ts} +1 -1
  68. package/dist/types/protocol/index.d.ts +2 -2
  69. package/dist/types/puzzle-geometry/index.d.ts +3 -3
  70. package/dist/types/puzzles/index.d.ts +5 -5
  71. package/dist/types/scramble/index.d.ts +3 -3
  72. package/dist/types/search/index.d.ts +3 -3
  73. package/dist/types/stream/index.d.ts +3 -3
  74. package/dist/types/twisty/index.d.ts +6 -6
  75. package/package.json +11 -5
  76. package/dist/esm/.DS_Store +0 -0
  77. package/dist/esm/chunk-35OK6TQ4.js.map +0 -7
  78. package/dist/esm/chunk-6FB2XWAK.js.map +0 -7
  79. package/dist/esm/chunk-C6KMV2PL.js.map +0 -7
  80. package/dist/esm/chunk-GQBRF4EM.js.map +0 -7
  81. package/dist/esm/chunk-KOAJIBEX.js.map +0 -7
  82. package/dist/esm/chunk-VIUWS2PX.js.map +0 -7
  83. package/dist/esm/chunk-ZQT3QSWD.js.map +0 -7
  84. package/dist/esm/search-dynamic-solve-3x3x3-TSXPWENP.js.map +0 -7
  85. package/dist/esm/search-dynamic-solve-fto-GPLW7S5F.js.map +0 -7
  86. package/dist/esm/search-dynamic-solve-kilominx-HB2QFUGF.js.map +0 -7
  87. package/dist/esm/search-dynamic-solve-master_tetraminx-LR3LJI7O.js.map +0 -7
  88. package/dist/esm/search-worker-inside-generated-string-5HKZNHKK.js.map +0 -7
  89. package/dist/esm/twisty-dynamic-3d-GPF6TW32.js.map +0 -7
@@ -4,20 +4,18 @@ import {
4
4
  haveStartedSharingRenderers,
5
5
  hintFaceletStyles,
6
6
  twistyDebugGlobals
7
- } from "./chunk-KOAJIBEX.js";
7
+ } from "./chunk-52L7V4XF.js";
8
8
  import "./chunk-QHWK5RXN.js";
9
9
  import {
10
- cube3x3x3,
11
- puzzles
12
- } from "./chunk-35OK6TQ4.js";
10
+ cube3x3x3
11
+ } from "./chunk-VTO7WPWK.js";
13
12
  import {
14
- experimentalStickerings,
15
- getFaceletAppearance
16
- } from "./chunk-6FB2XWAK.js";
17
- import "./chunk-GQBRF4EM.js";
13
+ getFaceletStickeringMask
14
+ } from "./chunk-JCIUBLD5.js";
15
+ import "./chunk-MHP4YJE7.js";
18
16
  import {
19
17
  Move
20
- } from "./chunk-ZQT3QSWD.js";
18
+ } from "./chunk-PVI43RDV.js";
21
19
 
22
20
  // src/cubing/twisty/views/3D/puzzles/Cube3D.ts
23
21
  import {
@@ -114,31 +112,46 @@ var axesInfo = [
114
112
  14540253,
115
113
  1.25
116
114
  ),
117
- new AxisInfo(new Vector3(-1, 0, 0), new Euler(
118
- 0,
119
- -TAU / 4,
120
- 0
121
- ), 16746496, 8930304, 1, { hintDimColor: 10053120 }),
122
- new AxisInfo(new Vector3(0, 0, 1), new Euler(
123
- 0,
124
- 0,
125
- 0
126
- ), 65280, 34816, 1, { hintDimColor: 39168 }),
127
- new AxisInfo(new Vector3(1, 0, 0), new Euler(
128
- 0,
129
- TAU / 4,
130
- 0
131
- ), 16711680, 6684672, 1, { hintDimColor: 10027008 }),
132
- new AxisInfo(new Vector3(0, 0, -1), new Euler(
133
- 0,
134
- TAU / 2,
135
- 0
136
- ), 255, 136, 0.75, { hintColor: 17663, hintDimColor: 6246 }),
137
- new AxisInfo(new Vector3(0, -1, 0), new Euler(
138
- TAU / 4,
139
- 0,
140
- 0
141
- ), 16776960, 8947712, 1.25, { hintDimColor: 12303104 })
115
+ new AxisInfo(
116
+ new Vector3(-1, 0, 0),
117
+ new Euler(0, -TAU / 4, 0),
118
+ 16746496,
119
+ 8930304,
120
+ 1,
121
+ { hintDimColor: 10053120 }
122
+ ),
123
+ new AxisInfo(
124
+ new Vector3(0, 0, 1),
125
+ new Euler(0, 0, 0),
126
+ 65280,
127
+ 34816,
128
+ 1,
129
+ { hintDimColor: 39168 }
130
+ ),
131
+ new AxisInfo(
132
+ new Vector3(1, 0, 0),
133
+ new Euler(0, TAU / 4, 0),
134
+ 16711680,
135
+ 6684672,
136
+ 1,
137
+ { hintDimColor: 10027008 }
138
+ ),
139
+ new AxisInfo(
140
+ new Vector3(0, 0, -1),
141
+ new Euler(0, TAU / 2, 0),
142
+ 255,
143
+ 136,
144
+ 0.75,
145
+ { hintColor: 17663, hintDimColor: 6246 }
146
+ ),
147
+ new AxisInfo(
148
+ new Vector3(0, -1, 0),
149
+ new Euler(TAU / 4, 0, 0),
150
+ 16776960,
151
+ 8947712,
152
+ 1.25,
153
+ { hintDimColor: 12303104 }
154
+ )
142
155
  ];
143
156
  var face = {
144
157
  U: 0,
@@ -191,7 +204,7 @@ var cube3DOptionsDefaults = {
191
204
  showMainStickers: true,
192
205
  hintFacelets: "floating",
193
206
  showFoundation: true,
194
- experimentalStickering: "full",
207
+ experimentalStickeringMask: void 0,
195
208
  foundationSprite: null,
196
209
  hintSprite: null
197
210
  };
@@ -506,8 +519,8 @@ var Cube3D = class extends Object3D {
506
519
  );
507
520
  }
508
521
  this.scale.set(CUBE_SCALE, CUBE_SCALE, CUBE_SCALE);
509
- if (this.options.experimentalStickering) {
510
- this.setStickering(this.options.experimentalStickering);
522
+ if (this.options.experimentalStickeringMask) {
523
+ this.setStickeringMask(this.options.experimentalStickeringMask);
511
524
  }
512
525
  this.#animateRaiseHintFacelets();
513
526
  }
@@ -557,33 +570,38 @@ var Cube3D = class extends Object3D {
557
570
  experimentalSetHintStickerSpriteURL(hintStickerSpriteURL) {
558
571
  this.setHintSpriteURL(hintStickerSpriteURL);
559
572
  }
560
- setStickering(stickering) {
561
- (async () => {
562
- const appearance = await puzzles["3x3x3"].appearance(
563
- stickering ?? "full"
564
- );
565
- this.setAppearance(
566
- appearance ?? await puzzles["3x3x3"].appearance("full")
567
- );
568
- })();
569
- }
570
- setAppearance(appearance) {
571
- for (const [orbitName, orbitAppearance] of Object.entries(
572
- appearance.orbits
573
+ setStickeringMask(stickeringMask) {
574
+ if (stickeringMask.specialBehaviour === "picture") {
575
+ for (const pieceInfos of Object.values(this.kpuzzleFaceletInfo)) {
576
+ for (const faceletInfos of pieceInfos) {
577
+ for (const faceletInfo of faceletInfos) {
578
+ faceletInfo.facelet.material = invisibleMaterial;
579
+ const { hintFacelet } = faceletInfo;
580
+ if (hintFacelet) {
581
+ hintFacelet.material = invisibleMaterial;
582
+ }
583
+ }
584
+ }
585
+ }
586
+ return;
587
+ }
588
+ this.options.experimentalStickeringMask = stickeringMask;
589
+ for (const [orbitName, orbitStickeringMask] of Object.entries(
590
+ stickeringMask.orbits
573
591
  )) {
574
- for (let pieceIdx = 0; pieceIdx < orbitAppearance.pieces.length; pieceIdx++) {
575
- const pieceAppearance = orbitAppearance.pieces[pieceIdx];
576
- if (pieceAppearance) {
592
+ for (let pieceIdx = 0; pieceIdx < orbitStickeringMask.pieces.length; pieceIdx++) {
593
+ const pieceStickeringMask = orbitStickeringMask.pieces[pieceIdx];
594
+ if (pieceStickeringMask) {
577
595
  const pieceInfo = this.kpuzzleFaceletInfo[orbitName][pieceIdx];
578
596
  for (let faceletIdx = 0; faceletIdx < pieceInfo.length; faceletIdx++) {
579
- const faceletAppearance = pieceAppearance.facelets[faceletIdx];
580
- if (faceletAppearance) {
597
+ const faceletStickeringMask = pieceStickeringMask.facelets[faceletIdx];
598
+ if (faceletStickeringMask) {
581
599
  const faceletInfo = pieceInfo[faceletIdx];
582
- const appearance2 = typeof faceletAppearance === "string" ? faceletAppearance : faceletAppearance?.appearance;
583
- faceletInfo.facelet.material = axesInfo[faceletInfo.faceIdx].stickerMaterial[appearance2];
584
- const hintAppearance = typeof faceletAppearance === "string" ? appearance2 : faceletAppearance.hintAppearance ?? appearance2;
600
+ const stickeringMask2 = typeof faceletStickeringMask === "string" ? faceletStickeringMask : faceletStickeringMask?.mask;
601
+ faceletInfo.facelet.material = axesInfo[faceletInfo.faceIdx].stickerMaterial[stickeringMask2];
602
+ const hintStickeringMask = typeof faceletStickeringMask === "string" ? stickeringMask2 : faceletStickeringMask.hintMask ?? stickeringMask2;
585
603
  if (faceletInfo.hintFacelet) {
586
- faceletInfo.hintFacelet.material = axesInfo[faceletInfo.faceIdx].hintStickerMaterial[hintAppearance];
604
+ faceletInfo.hintFacelet.material = axesInfo[faceletInfo.faceIdx].hintStickerMaterial[hintStickeringMask];
587
605
  }
588
606
  }
589
607
  }
@@ -613,10 +631,10 @@ var Cube3D = class extends Object3D {
613
631
  }
614
632
  this.scheduleRenderCallback();
615
633
  }
616
- const experimentalStickering = options.experimentalStickering;
617
- if (typeof experimentalStickering !== "undefined" && this.options.experimentalStickering !== experimentalStickering && experimentalStickerings[experimentalStickering]) {
618
- this.options.experimentalStickering = experimentalStickering;
619
- this.setStickering(experimentalStickering);
634
+ const { experimentalStickeringMask } = options;
635
+ if (typeof experimentalStickeringMask !== "undefined") {
636
+ this.options.experimentalStickeringMask = experimentalStickeringMask;
637
+ this.setStickeringMask(experimentalStickeringMask);
620
638
  this.scheduleRenderCallback();
621
639
  }
622
640
  }
@@ -639,8 +657,11 @@ var Cube3D = class extends Object3D {
639
657
  -this.ease(moveProgress.fraction) * moveProgress.direction * move.amount * TAU / 4
640
658
  );
641
659
  for (let i = 0; i < pieces.length; i++) {
642
- const k = this.kpuzzle.definition.moves[move.family][orbit].permutation[i];
643
- if (i !== k || this.kpuzzle.definition.moves[move.family][orbit].orientation[i] !== 0) {
660
+ const quantumTransformation = this.kpuzzle.moveToTransformation(
661
+ move.modified({ amount: 1 })
662
+ );
663
+ const k = quantumTransformation.transformationData[orbit].permutation[i];
664
+ if (i !== k || quantumTransformation.transformationData[orbit].orientation[i] !== 0) {
644
665
  const j = reid333.stateData[orbit].pieces[i];
645
666
  this.pieces[orbit][j].matrix.premultiply(moveMatrix);
646
667
  }
@@ -679,7 +700,7 @@ var Cube3D = class extends Object3D {
679
700
  faceletInfo.hintFacelet = hintSticker;
680
701
  this.experimentalHintStickerMeshes.push(hintSticker);
681
702
  }
682
- if (this.options.experimentalStickering === "picture" && pictureStickerCoords[orbit] && pictureStickerCoords[orbit][orbitPieceIdx] && pictureStickerCoords[orbit][orbitPieceIdx][i]) {
703
+ if (this.options.experimentalStickeringMask?.specialBehaviour === "picture" && pictureStickerCoords[orbit] && pictureStickerCoords[orbit][orbitPieceIdx] && pictureStickerCoords[orbit][orbitPieceIdx][i]) {
683
704
  const [rotate, offsetX, offsetY] = pictureStickerCoords[orbit][orbitPieceIdx][i];
684
705
  (async () => {
685
706
  const addImageSticker = async (hint) => {
@@ -753,11 +774,11 @@ var Cube3D = class extends Object3D {
753
774
  const box = sharedCubieFoundationGeometry();
754
775
  return new Mesh(
755
776
  box,
756
- this.options.experimentalStickering === "picture" ? blackMesh : blackTranslucentMesh
777
+ this.options.experimentalStickeringMask?.specialBehaviour === "picture" ? blackMesh : blackTranslucentMesh
757
778
  );
758
779
  }
759
780
  createSticker(posAxisInfo, materialAxisInfo, isHint) {
760
- const geo = this.options.experimentalStickering === "picture" ? newStickerGeometry() : isHint ? this.#sharedHintStickerGeometry() : sharedStickerGeometry();
781
+ const geo = this.options.experimentalStickeringMask?.specialBehaviour === "picture" ? newStickerGeometry() : isHint ? this.#sharedHintStickerGeometry() : sharedStickerGeometry();
761
782
  const stickerMesh = new Mesh(
762
783
  geo,
763
784
  isHint ? materialAxisInfo.hintStickerMaterial.regular : materialAxisInfo.stickerMaterial.regular
@@ -765,7 +786,7 @@ var Cube3D = class extends Object3D {
765
786
  stickerMesh.setRotationFromEuler(posAxisInfo.fromZ);
766
787
  stickerMesh.position.copy(posAxisInfo.vector);
767
788
  stickerMesh.position.multiplyScalar(
768
- isHint ? this.options.experimentalStickering === "picture" ? EXPERIMENTAL_PICTURE_CUBE_HINT_ELEVATION : cubieDimensions.hintStickerElevation : cubieDimensions.stickerElevation
789
+ isHint ? this.options.experimentalStickeringMask?.specialBehaviour === "picture" ? EXPERIMENTAL_PICTURE_CUBE_HINT_ELEVATION : cubieDimensions.hintStickerElevation : cubieDimensions.stickerElevation
769
790
  );
770
791
  return stickerMesh;
771
792
  }
@@ -975,9 +996,9 @@ var StickerDef = class {
975
996
  this.stickerStart = filler.ipos;
976
997
  const sdColor = new Color(stickerDat.color).getHex();
977
998
  this.origColor = sdColor;
978
- this.origColorAppearance = sdColor;
979
- if (options?.appearance) {
980
- this.setAppearance(filler, options.appearance);
999
+ this.origColorStickeringMask = sdColor;
1000
+ if (options?.stickeringMask) {
1001
+ this.setStickeringMask(filler, options.stickeringMask);
981
1002
  }
982
1003
  this.faceColor = sdColor;
983
1004
  const coords = this.stickerCoords(stickerDat.coords, trim);
@@ -1036,9 +1057,9 @@ var StickerDef = class {
1036
1057
  filler.ind[i] = indv | filler.ind[i] & 1;
1037
1058
  }
1038
1059
  }
1039
- setAppearance(filler, faceletMeshAppearance) {
1060
+ setStickeringMask(filler, faceletMeshStickeringMask) {
1040
1061
  let c = 0;
1041
- switch (faceletMeshAppearance) {
1062
+ switch (faceletMeshStickeringMask) {
1042
1063
  case "regular": {
1043
1064
  c = this.origColor;
1044
1065
  break;
@@ -1062,7 +1083,7 @@ var StickerDef = class {
1062
1083
  case "invisible":
1063
1084
  c = this.origColor;
1064
1085
  }
1065
- this.origColorAppearance = c;
1086
+ this.origColorStickeringMask = c;
1066
1087
  for (let i = 9 * this.stickerStart; i < 9 * this.stickerEnd; i += 3) {
1067
1088
  filler.colors[filler.pos + i] = c >> 16;
1068
1089
  filler.colors[filler.pos + i + 1] = c >> 8 & 255;
@@ -1075,7 +1096,7 @@ var StickerDef = class {
1075
1096
  }
1076
1097
  this.setHintStickers(
1077
1098
  filler,
1078
- faceletMeshAppearance !== "invisible" && !this.isDup
1099
+ faceletMeshStickeringMask !== "invisible" && !this.isDup
1079
1100
  );
1080
1101
  }
1081
1102
  addUVs(filler) {
@@ -1118,7 +1139,7 @@ var StickerDef = class {
1118
1139
  return 1;
1119
1140
  }
1120
1141
  setColor(filler, sd) {
1121
- const c = sd.origColorAppearance;
1142
+ const c = sd.origColorStickeringMask;
1122
1143
  if (this.faceColor !== c) {
1123
1144
  this.faceColor = c;
1124
1145
  const sz = filler.pos;
@@ -1235,9 +1256,9 @@ var PG3D = class extends Object3D2 {
1235
1256
  this.stickers[orbit][ori] = [];
1236
1257
  }
1237
1258
  const options = {};
1238
- if (params.appearance) {
1239
- options.appearance = getFaceletAppearance(
1240
- params.appearance,
1259
+ if (params.stickeringMask) {
1260
+ options.stickeringMask = getFaceletStickeringMask(
1261
+ params.stickeringMask,
1241
1262
  orbit,
1242
1263
  ord,
1243
1264
  ori,
@@ -1363,28 +1384,28 @@ var PG3D = class extends Object3D2 {
1363
1384
  if (transformations.invert) {
1364
1385
  closestMove = closestMove.invert();
1365
1386
  }
1366
- const order = this.kpuzzle.moveToTransformation(
1367
- closestMove
1368
- ).repetitionOrder();
1387
+ const order = this.kpuzzle.moveToTransformation(closestMove).repetitionOrder();
1369
1388
  return { move: closestMove, order };
1370
1389
  }
1371
- experimentalSetAppearance(appearance) {
1372
- this.params.appearance = appearance;
1373
- for (const orbitName in this.kpuzzle.definition.orbits) {
1374
- const { numPieces, numOrientations: orientations } = this.kpuzzle.definition.orbits[orbitName];
1375
- for (let pieceIdx = 0; pieceIdx < numPieces; pieceIdx++) {
1376
- for (let faceletIdx = 0; faceletIdx < orientations; faceletIdx++) {
1377
- const faceletAppearance = getFaceletAppearance(
1378
- appearance,
1379
- orbitName,
1380
- pieceIdx,
1381
- faceletIdx,
1382
- false
1383
- );
1384
- const stickerDef = this.stickers[orbitName][faceletIdx][pieceIdx];
1385
- if (this.textured && this.hintMaterialDisposable && faceletAppearance === "invisible") {
1386
- } else {
1387
- stickerDef.setAppearance(this.filler, faceletAppearance);
1390
+ setStickeringMask(stickeringMask) {
1391
+ this.params.stickeringMask = stickeringMask;
1392
+ if (stickeringMask.specialBehaviour !== "picture") {
1393
+ for (const orbitName in this.kpuzzle.definition.orbits) {
1394
+ const { numPieces, numOrientations: orientations } = this.kpuzzle.definition.orbits[orbitName];
1395
+ for (let pieceIdx = 0; pieceIdx < numPieces; pieceIdx++) {
1396
+ for (let faceletIdx = 0; faceletIdx < orientations; faceletIdx++) {
1397
+ const faceletStickeringMask = getFaceletStickeringMask(
1398
+ stickeringMask,
1399
+ orbitName,
1400
+ pieceIdx,
1401
+ faceletIdx,
1402
+ false
1403
+ );
1404
+ const stickerDef = this.stickers[orbitName][faceletIdx][pieceIdx];
1405
+ if (this.textured && this.hintMaterialDisposable && faceletStickeringMask === "invisible") {
1406
+ } else {
1407
+ stickerDef.setStickeringMask(this.filler, faceletStickeringMask);
1408
+ }
1388
1409
  }
1389
1410
  }
1390
1411
  }
@@ -1404,9 +1425,7 @@ var PG3D = class extends Object3D2 {
1404
1425
  let colormods = 0;
1405
1426
  const filler = this.filler;
1406
1427
  const ind = filler.ind;
1407
- if (!this.lastPos || this.#pendingStickeringUpdate || !this.lastPos.state.experimentalToTransformation().isIdentical(
1408
- transformation
1409
- )) {
1428
+ if (!this.lastPos || this.#pendingStickeringUpdate || !this.lastPos.state.experimentalToTransformation().isIdentical(transformation)) {
1410
1429
  for (const orbit in this.stickers) {
1411
1430
  const pieces = this.stickers[orbit];
1412
1431
  const pos2 = transformation.transformationData[orbit];
@@ -1581,7 +1600,7 @@ var PG3D = class extends Object3D2 {
1581
1600
  this.hintMaterial = new MeshBasicMaterial2({
1582
1601
  vertexColors: true,
1583
1602
  transparent: true,
1584
- opacity: 0.5
1603
+ opacity: v
1585
1604
  });
1586
1605
  this.hintMaterialDisposable = true;
1587
1606
  }
@@ -1653,7 +1672,7 @@ var PG3D = class extends Object3D2 {
1653
1672
  this.hintMaterial = new MeshBasicMaterial2({
1654
1673
  map: hintTexture,
1655
1674
  side: FrontSide,
1656
- transparent: false
1675
+ transparent: true
1657
1676
  });
1658
1677
  this.hintMaterialDisposable = true;
1659
1678
  } else {
@@ -1726,4 +1745,4 @@ export {
1726
1745
  cube3DShim,
1727
1746
  pg3dShim
1728
1747
  };
1729
- //# sourceMappingURL=twisty-dynamic-3d-GPF6TW32.js.map
1748
+ //# sourceMappingURL=twisty-dynamic-3d-TFI45NMX.js.map