cubing 0.29.2 → 0.31.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.
Files changed (99) hide show
  1. package/dist/esm/alg/index.js +1 -2
  2. package/dist/esm/bluetooth/index.js +8 -9
  3. package/dist/esm/bluetooth/index.js.map +2 -2
  4. package/dist/esm/{chunk-RH4WZIGC.js → chunk-5QXVR3FK.js} +2 -2
  5. package/dist/esm/{chunk-RH4WZIGC.js.map → chunk-5QXVR3FK.js.map} +0 -0
  6. package/dist/esm/{chunk-WNZXZ4MW.js → chunk-7LJHXZJM.js} +6 -8
  7. package/dist/esm/{chunk-WNZXZ4MW.js.map → chunk-7LJHXZJM.js.map} +2 -2
  8. package/dist/esm/{chunk-OT7AIIFN.js → chunk-CUIME76I.js} +3 -3
  9. package/dist/esm/chunk-CUIME76I.js.map +7 -0
  10. package/dist/esm/{chunk-NUMCMGLU.js → chunk-J5IQUWXC.js} +2 -2
  11. package/dist/esm/{chunk-NUMCMGLU.js.map → chunk-J5IQUWXC.js.map} +0 -0
  12. package/dist/esm/{chunk-J5KJ2WWA.js → chunk-JQLCWEVU.js} +44 -31
  13. package/dist/esm/chunk-JQLCWEVU.js.map +7 -0
  14. package/dist/esm/{chunk-7OIUETFU.js → chunk-RBZINRTT.js} +213 -106
  15. package/dist/esm/chunk-RBZINRTT.js.map +7 -0
  16. package/dist/esm/{chunk-EOEJDDXN.js → chunk-SNLVO6OQ.js} +256 -31
  17. package/dist/esm/chunk-SNLVO6OQ.js.map +7 -0
  18. package/dist/esm/{chunk-YD2TMJI2.js → chunk-SYSXHJ4V.js} +137 -183
  19. package/dist/esm/chunk-SYSXHJ4V.js.map +7 -0
  20. package/dist/esm/{chunk-POCUG6QW.js → chunk-UAHLC2BK.js} +3 -5
  21. package/dist/esm/{chunk-POCUG6QW.js.map → chunk-UAHLC2BK.js.map} +2 -2
  22. package/dist/esm/{chunk-RIXFKOD6.js → chunk-V67YQOIN.js} +4 -4
  23. package/dist/esm/{chunk-RIXFKOD6.js.map → chunk-V67YQOIN.js.map} +2 -2
  24. package/dist/esm/kpuzzle/index.js +2 -3
  25. package/dist/esm/notation/index.js +2 -3
  26. package/dist/esm/protocol/index.js +4 -5
  27. package/dist/esm/puzzle-geometry/index.js +6 -19
  28. package/dist/esm/puzzle-geometry/index.js.map +2 -2
  29. package/dist/esm/puzzles/index.js +4 -5
  30. package/dist/esm/{puzzles-dynamic-3x3x3-KIG5A6QR.js → puzzles-dynamic-3x3x3-ZKMODX2P.js} +1 -3
  31. package/dist/esm/{puzzles-dynamic-3x3x3-KIG5A6QR.js.map → puzzles-dynamic-3x3x3-ZKMODX2P.js.map} +1 -1
  32. package/dist/esm/{puzzles-dynamic-4x4x4-PEDAPUZK.js → puzzles-dynamic-4x4x4-DT42HVIY.js} +1 -3
  33. package/dist/esm/{puzzles-dynamic-4x4x4-PEDAPUZK.js.map → puzzles-dynamic-4x4x4-DT42HVIY.js.map} +1 -1
  34. package/dist/esm/{puzzles-dynamic-side-events-3K26JTOG.js → puzzles-dynamic-side-events-HMUBMHA5.js} +1 -3
  35. package/dist/esm/{puzzles-dynamic-side-events-3K26JTOG.js.map → puzzles-dynamic-side-events-HMUBMHA5.js.map} +1 -1
  36. package/dist/esm/{puzzles-dynamic-unofficial-WWJ4NJMX.js → puzzles-dynamic-unofficial-QXSDLTK5.js} +1 -3
  37. package/dist/esm/{puzzles-dynamic-unofficial-WWJ4NJMX.js.map → puzzles-dynamic-unofficial-QXSDLTK5.js.map} +1 -1
  38. package/dist/esm/scramble/index.js +2 -3
  39. package/dist/esm/search/index.js +6 -7
  40. package/dist/esm/{search-dynamic-sgs-side-events-AE3TLLPA.js → search-dynamic-sgs-side-events-KVUAIBGE.js} +6 -7
  41. package/dist/esm/{search-dynamic-sgs-side-events-AE3TLLPA.js.map → search-dynamic-sgs-side-events-KVUAIBGE.js.map} +1 -1
  42. package/dist/esm/{search-dynamic-sgs-unofficial-JUXMNMNO.js → search-dynamic-sgs-unofficial-7ICOL4T7.js} +6 -7
  43. package/dist/esm/{search-dynamic-sgs-unofficial-JUXMNMNO.js.map → search-dynamic-sgs-unofficial-7ICOL4T7.js.map} +1 -1
  44. package/dist/esm/{search-dynamic-solve-3x3x3-SA75BI5I.js → search-dynamic-solve-3x3x3-DDVSUP2C.js} +275 -292
  45. package/dist/esm/search-dynamic-solve-3x3x3-DDVSUP2C.js.map +7 -0
  46. package/dist/esm/{search-dynamic-solve-4x4x4-ALKH43DT.js → search-dynamic-solve-4x4x4-GGDX7YYZ.js} +6 -7
  47. package/dist/esm/{search-dynamic-solve-4x4x4-ALKH43DT.js.map → search-dynamic-solve-4x4x4-GGDX7YYZ.js.map} +1 -1
  48. package/dist/esm/{search-dynamic-solve-fto-5B5ZESQC.js → search-dynamic-solve-fto-MA4X6JEE.js} +6 -17
  49. package/dist/esm/search-dynamic-solve-fto-MA4X6JEE.js.map +7 -0
  50. package/dist/esm/{search-dynamic-solve-kilominx-OY4VIARG.js → search-dynamic-solve-kilominx-TVKK4KDH.js} +2 -3
  51. package/dist/esm/search-dynamic-solve-kilominx-TVKK4KDH.js.map +7 -0
  52. package/dist/esm/{search-dynamic-solve-master_tetraminx-GE2BTRGI.js → search-dynamic-solve-master_tetraminx-YKINTRUU.js} +4 -11
  53. package/dist/esm/search-dynamic-solve-master_tetraminx-YKINTRUU.js.map +7 -0
  54. package/dist/esm/{search-dynamic-solve-sq1-W6PSSLR6.js → search-dynamic-solve-sq1-W33UXTDZ.js} +1 -2
  55. package/dist/esm/{search-dynamic-solve-sq1-W6PSSLR6.js.map → search-dynamic-solve-sq1-W33UXTDZ.js.map} +1 -1
  56. package/dist/esm/{search-worker-inside-generated-string-7HYFSSPW.js → search-worker-inside-generated-string-I4T4KADX.js} +28 -30
  57. package/dist/esm/search-worker-inside-generated-string-I4T4KADX.js.map +7 -0
  58. package/dist/esm/{search-worker-js-entry-SNUA3SOE.js → search-worker-js-entry-KWGCJXGS.js} +34 -41
  59. package/dist/esm/search-worker-js-entry-KWGCJXGS.js.map +7 -0
  60. package/dist/esm/{search-worker-ts-entry-LNB7KNFY.js → search-worker-ts-entry-J533AM5E.js} +2 -3
  61. package/dist/esm/{search-worker-ts-entry-LNB7KNFY.js.map → search-worker-ts-entry-J533AM5E.js.map} +1 -1
  62. package/dist/esm/stream/index.js +1 -2
  63. package/dist/esm/stream/index.js.map +2 -2
  64. package/dist/esm/twisty/index.js +450 -254
  65. package/dist/esm/twisty/index.js.map +4 -4
  66. package/dist/esm/{twisty-dynamic-3d-PU74EKRA.js → twisty-dynamic-3d-OAYMJ6OD.js} +125 -107
  67. package/dist/esm/twisty-dynamic-3d-OAYMJ6OD.js.map +7 -0
  68. package/dist/types/{Alg-137fb0d5.d.ts → Alg-60b374e8.d.ts} +25 -26
  69. package/dist/types/{KState-a73111d7.d.ts → KState-958b873c.d.ts} +1 -1
  70. package/dist/types/{TwizzleLink-ce20e840.d.ts → TwizzleLink-e873f6e5.d.ts} +77 -54
  71. package/dist/types/alg/index.d.ts +31 -9
  72. package/dist/types/bluetooth/index.d.ts +4 -4
  73. package/dist/types/{bluetooth-puzzle-8a678993.d.ts → bluetooth-puzzle-cc8eeaae.d.ts} +2 -2
  74. package/dist/types/kpuzzle/index.d.ts +2 -2
  75. package/dist/types/notation/index.d.ts +1 -1
  76. package/dist/types/{outside-e55f28a0.d.ts → outside-15f39b79.d.ts} +2 -2
  77. package/dist/types/{parseAlg-a28f7568.d.ts → parseAlg-3c77c4b3.d.ts} +1 -1
  78. package/dist/types/protocol/index.d.ts +2 -2
  79. package/dist/types/puzzle-geometry/index.d.ts +3 -3
  80. package/dist/types/puzzles/index.d.ts +5 -5
  81. package/dist/types/scramble/index.d.ts +3 -3
  82. package/dist/types/search/index.d.ts +3 -3
  83. package/dist/types/stream/index.d.ts +3 -3
  84. package/dist/types/twisty/index.d.ts +6 -6
  85. package/package.json +3 -2
  86. package/dist/esm/chunk-7OIUETFU.js.map +0 -7
  87. package/dist/esm/chunk-EOEJDDXN.js.map +0 -7
  88. package/dist/esm/chunk-J5KJ2WWA.js.map +0 -7
  89. package/dist/esm/chunk-OT7AIIFN.js.map +0 -7
  90. package/dist/esm/chunk-SBZRVSPK.js +0 -30
  91. package/dist/esm/chunk-SBZRVSPK.js.map +0 -7
  92. package/dist/esm/chunk-YD2TMJI2.js.map +0 -7
  93. package/dist/esm/search-dynamic-solve-3x3x3-SA75BI5I.js.map +0 -7
  94. package/dist/esm/search-dynamic-solve-fto-5B5ZESQC.js.map +0 -7
  95. package/dist/esm/search-dynamic-solve-kilominx-OY4VIARG.js.map +0 -7
  96. package/dist/esm/search-dynamic-solve-master_tetraminx-GE2BTRGI.js.map +0 -7
  97. package/dist/esm/search-worker-inside-generated-string-7HYFSSPW.js.map +0 -7
  98. package/dist/esm/search-worker-js-entry-SNUA3SOE.js.map +0 -7
  99. package/dist/esm/twisty-dynamic-3d-PU74EKRA.js.map +0 -7
@@ -4,21 +4,18 @@ import {
4
4
  haveStartedSharingRenderers,
5
5
  hintFaceletStyles,
6
6
  twistyDebugGlobals
7
- } from "./chunk-J5KJ2WWA.js";
7
+ } from "./chunk-JQLCWEVU.js";
8
8
  import "./chunk-QHWK5RXN.js";
9
9
  import {
10
- cube3x3x3,
11
- puzzles
12
- } from "./chunk-EOEJDDXN.js";
10
+ cube3x3x3
11
+ } from "./chunk-SNLVO6OQ.js";
13
12
  import {
14
- experimentalStickerings,
15
- getFaceletAppearance
16
- } from "./chunk-YD2TMJI2.js";
17
- import "./chunk-POCUG6QW.js";
13
+ getFaceletStickeringMask
14
+ } from "./chunk-SYSXHJ4V.js";
15
+ import "./chunk-UAHLC2BK.js";
18
16
  import {
19
17
  Move
20
- } from "./chunk-7OIUETFU.js";
21
- import "./chunk-SBZRVSPK.js";
18
+ } from "./chunk-RBZINRTT.js";
22
19
 
23
20
  // src/cubing/twisty/views/3D/puzzles/Cube3D.ts
24
21
  import {
@@ -115,31 +112,46 @@ var axesInfo = [
115
112
  14540253,
116
113
  1.25
117
114
  ),
118
- new AxisInfo(new Vector3(-1, 0, 0), new Euler(
119
- 0,
120
- -TAU / 4,
121
- 0
122
- ), 16746496, 8930304, 1, { hintDimColor: 10053120 }),
123
- new AxisInfo(new Vector3(0, 0, 1), new Euler(
124
- 0,
125
- 0,
126
- 0
127
- ), 65280, 34816, 1, { hintDimColor: 39168 }),
128
- new AxisInfo(new Vector3(1, 0, 0), new Euler(
129
- 0,
130
- TAU / 4,
131
- 0
132
- ), 16711680, 6684672, 1, { hintDimColor: 10027008 }),
133
- new AxisInfo(new Vector3(0, 0, -1), new Euler(
134
- 0,
135
- TAU / 2,
136
- 0
137
- ), 255, 136, 0.75, { hintColor: 17663, hintDimColor: 6246 }),
138
- new AxisInfo(new Vector3(0, -1, 0), new Euler(
139
- TAU / 4,
140
- 0,
141
- 0
142
- ), 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
+ )
143
155
  ];
144
156
  var face = {
145
157
  U: 0,
@@ -192,7 +204,7 @@ var cube3DOptionsDefaults = {
192
204
  showMainStickers: true,
193
205
  hintFacelets: "floating",
194
206
  showFoundation: true,
195
- experimentalStickering: "full",
207
+ experimentalStickeringMask: void 0,
196
208
  foundationSprite: null,
197
209
  hintSprite: null
198
210
  };
@@ -507,8 +519,8 @@ var Cube3D = class extends Object3D {
507
519
  );
508
520
  }
509
521
  this.scale.set(CUBE_SCALE, CUBE_SCALE, CUBE_SCALE);
510
- if (this.options.experimentalStickering) {
511
- this.setStickering(this.options.experimentalStickering);
522
+ if (this.options.experimentalStickeringMask) {
523
+ this.setStickeringMask(this.options.experimentalStickeringMask);
512
524
  }
513
525
  this.#animateRaiseHintFacelets();
514
526
  }
@@ -558,33 +570,38 @@ var Cube3D = class extends Object3D {
558
570
  experimentalSetHintStickerSpriteURL(hintStickerSpriteURL) {
559
571
  this.setHintSpriteURL(hintStickerSpriteURL);
560
572
  }
561
- setStickering(stickering) {
562
- (async () => {
563
- const appearance = await puzzles["3x3x3"].appearance(
564
- stickering ?? "full"
565
- );
566
- this.setAppearance(
567
- appearance ?? await puzzles["3x3x3"].appearance("full")
568
- );
569
- })();
570
- }
571
- setAppearance(appearance) {
572
- for (const [orbitName, orbitAppearance] of Object.entries(
573
- 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
574
591
  )) {
575
- for (let pieceIdx = 0; pieceIdx < orbitAppearance.pieces.length; pieceIdx++) {
576
- const pieceAppearance = orbitAppearance.pieces[pieceIdx];
577
- if (pieceAppearance) {
592
+ for (let pieceIdx = 0; pieceIdx < orbitStickeringMask.pieces.length; pieceIdx++) {
593
+ const pieceStickeringMask = orbitStickeringMask.pieces[pieceIdx];
594
+ if (pieceStickeringMask) {
578
595
  const pieceInfo = this.kpuzzleFaceletInfo[orbitName][pieceIdx];
579
596
  for (let faceletIdx = 0; faceletIdx < pieceInfo.length; faceletIdx++) {
580
- const faceletAppearance = pieceAppearance.facelets[faceletIdx];
581
- if (faceletAppearance) {
597
+ const faceletStickeringMask = pieceStickeringMask.facelets[faceletIdx];
598
+ if (faceletStickeringMask) {
582
599
  const faceletInfo = pieceInfo[faceletIdx];
583
- const appearance2 = typeof faceletAppearance === "string" ? faceletAppearance : faceletAppearance?.appearance;
584
- faceletInfo.facelet.material = axesInfo[faceletInfo.faceIdx].stickerMaterial[appearance2];
585
- 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;
586
603
  if (faceletInfo.hintFacelet) {
587
- faceletInfo.hintFacelet.material = axesInfo[faceletInfo.faceIdx].hintStickerMaterial[hintAppearance];
604
+ faceletInfo.hintFacelet.material = axesInfo[faceletInfo.faceIdx].hintStickerMaterial[hintStickeringMask];
588
605
  }
589
606
  }
590
607
  }
@@ -614,10 +631,10 @@ var Cube3D = class extends Object3D {
614
631
  }
615
632
  this.scheduleRenderCallback();
616
633
  }
617
- const experimentalStickering = options.experimentalStickering;
618
- if (typeof experimentalStickering !== "undefined" && this.options.experimentalStickering !== experimentalStickering && experimentalStickerings[experimentalStickering]) {
619
- this.options.experimentalStickering = experimentalStickering;
620
- this.setStickering(experimentalStickering);
634
+ const { experimentalStickeringMask } = options;
635
+ if (typeof experimentalStickeringMask !== "undefined") {
636
+ this.options.experimentalStickeringMask = experimentalStickeringMask;
637
+ this.setStickeringMask(experimentalStickeringMask);
621
638
  this.scheduleRenderCallback();
622
639
  }
623
640
  }
@@ -640,8 +657,11 @@ var Cube3D = class extends Object3D {
640
657
  -this.ease(moveProgress.fraction) * moveProgress.direction * move.amount * TAU / 4
641
658
  );
642
659
  for (let i = 0; i < pieces.length; i++) {
643
- const k = this.kpuzzle.definition.moves[move.family][orbit].permutation[i];
644
- 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) {
645
665
  const j = reid333.stateData[orbit].pieces[i];
646
666
  this.pieces[orbit][j].matrix.premultiply(moveMatrix);
647
667
  }
@@ -680,7 +700,7 @@ var Cube3D = class extends Object3D {
680
700
  faceletInfo.hintFacelet = hintSticker;
681
701
  this.experimentalHintStickerMeshes.push(hintSticker);
682
702
  }
683
- 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]) {
684
704
  const [rotate, offsetX, offsetY] = pictureStickerCoords[orbit][orbitPieceIdx][i];
685
705
  (async () => {
686
706
  const addImageSticker = async (hint) => {
@@ -754,11 +774,11 @@ var Cube3D = class extends Object3D {
754
774
  const box = sharedCubieFoundationGeometry();
755
775
  return new Mesh(
756
776
  box,
757
- this.options.experimentalStickering === "picture" ? blackMesh : blackTranslucentMesh
777
+ this.options.experimentalStickeringMask?.specialBehaviour === "picture" ? blackMesh : blackTranslucentMesh
758
778
  );
759
779
  }
760
780
  createSticker(posAxisInfo, materialAxisInfo, isHint) {
761
- const geo = this.options.experimentalStickering === "picture" ? newStickerGeometry() : isHint ? this.#sharedHintStickerGeometry() : sharedStickerGeometry();
781
+ const geo = this.options.experimentalStickeringMask?.specialBehaviour === "picture" ? newStickerGeometry() : isHint ? this.#sharedHintStickerGeometry() : sharedStickerGeometry();
762
782
  const stickerMesh = new Mesh(
763
783
  geo,
764
784
  isHint ? materialAxisInfo.hintStickerMaterial.regular : materialAxisInfo.stickerMaterial.regular
@@ -766,7 +786,7 @@ var Cube3D = class extends Object3D {
766
786
  stickerMesh.setRotationFromEuler(posAxisInfo.fromZ);
767
787
  stickerMesh.position.copy(posAxisInfo.vector);
768
788
  stickerMesh.position.multiplyScalar(
769
- 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
770
790
  );
771
791
  return stickerMesh;
772
792
  }
@@ -976,9 +996,9 @@ var StickerDef = class {
976
996
  this.stickerStart = filler.ipos;
977
997
  const sdColor = new Color(stickerDat.color).getHex();
978
998
  this.origColor = sdColor;
979
- this.origColorAppearance = sdColor;
980
- if (options?.appearance) {
981
- this.setAppearance(filler, options.appearance);
999
+ this.origColorStickeringMask = sdColor;
1000
+ if (options?.stickeringMask) {
1001
+ this.setStickeringMask(filler, options.stickeringMask);
982
1002
  }
983
1003
  this.faceColor = sdColor;
984
1004
  const coords = this.stickerCoords(stickerDat.coords, trim);
@@ -1037,9 +1057,9 @@ var StickerDef = class {
1037
1057
  filler.ind[i] = indv | filler.ind[i] & 1;
1038
1058
  }
1039
1059
  }
1040
- setAppearance(filler, faceletMeshAppearance) {
1060
+ setStickeringMask(filler, faceletMeshStickeringMask) {
1041
1061
  let c = 0;
1042
- switch (faceletMeshAppearance) {
1062
+ switch (faceletMeshStickeringMask) {
1043
1063
  case "regular": {
1044
1064
  c = this.origColor;
1045
1065
  break;
@@ -1063,7 +1083,7 @@ var StickerDef = class {
1063
1083
  case "invisible":
1064
1084
  c = this.origColor;
1065
1085
  }
1066
- this.origColorAppearance = c;
1086
+ this.origColorStickeringMask = c;
1067
1087
  for (let i = 9 * this.stickerStart; i < 9 * this.stickerEnd; i += 3) {
1068
1088
  filler.colors[filler.pos + i] = c >> 16;
1069
1089
  filler.colors[filler.pos + i + 1] = c >> 8 & 255;
@@ -1076,7 +1096,7 @@ var StickerDef = class {
1076
1096
  }
1077
1097
  this.setHintStickers(
1078
1098
  filler,
1079
- faceletMeshAppearance !== "invisible" && !this.isDup
1099
+ faceletMeshStickeringMask !== "invisible" && !this.isDup
1080
1100
  );
1081
1101
  }
1082
1102
  addUVs(filler) {
@@ -1119,7 +1139,7 @@ var StickerDef = class {
1119
1139
  return 1;
1120
1140
  }
1121
1141
  setColor(filler, sd) {
1122
- const c = sd.origColorAppearance;
1142
+ const c = sd.origColorStickeringMask;
1123
1143
  if (this.faceColor !== c) {
1124
1144
  this.faceColor = c;
1125
1145
  const sz = filler.pos;
@@ -1236,9 +1256,9 @@ var PG3D = class extends Object3D2 {
1236
1256
  this.stickers[orbit][ori] = [];
1237
1257
  }
1238
1258
  const options = {};
1239
- if (params.appearance) {
1240
- options.appearance = getFaceletAppearance(
1241
- params.appearance,
1259
+ if (params.stickeringMask) {
1260
+ options.stickeringMask = getFaceletStickeringMask(
1261
+ params.stickeringMask,
1242
1262
  orbit,
1243
1263
  ord,
1244
1264
  ori,
@@ -1364,28 +1384,28 @@ var PG3D = class extends Object3D2 {
1364
1384
  if (transformations.invert) {
1365
1385
  closestMove = closestMove.invert();
1366
1386
  }
1367
- const order = this.kpuzzle.moveToTransformation(
1368
- closestMove
1369
- ).repetitionOrder();
1387
+ const order = this.kpuzzle.moveToTransformation(closestMove).repetitionOrder();
1370
1388
  return { move: closestMove, order };
1371
1389
  }
1372
- experimentalSetAppearance(appearance) {
1373
- this.params.appearance = appearance;
1374
- for (const orbitName in this.kpuzzle.definition.orbits) {
1375
- const { numPieces, numOrientations: orientations } = this.kpuzzle.definition.orbits[orbitName];
1376
- for (let pieceIdx = 0; pieceIdx < numPieces; pieceIdx++) {
1377
- for (let faceletIdx = 0; faceletIdx < orientations; faceletIdx++) {
1378
- const faceletAppearance = getFaceletAppearance(
1379
- appearance,
1380
- orbitName,
1381
- pieceIdx,
1382
- faceletIdx,
1383
- false
1384
- );
1385
- const stickerDef = this.stickers[orbitName][faceletIdx][pieceIdx];
1386
- if (this.textured && this.hintMaterialDisposable && faceletAppearance === "invisible") {
1387
- } else {
1388
- 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
+ }
1389
1409
  }
1390
1410
  }
1391
1411
  }
@@ -1405,9 +1425,7 @@ var PG3D = class extends Object3D2 {
1405
1425
  let colormods = 0;
1406
1426
  const filler = this.filler;
1407
1427
  const ind = filler.ind;
1408
- if (!this.lastPos || this.#pendingStickeringUpdate || !this.lastPos.state.experimentalToTransformation().isIdentical(
1409
- transformation
1410
- )) {
1428
+ if (!this.lastPos || this.#pendingStickeringUpdate || !this.lastPos.state.experimentalToTransformation().isIdentical(transformation)) {
1411
1429
  for (const orbit in this.stickers) {
1412
1430
  const pieces = this.stickers[orbit];
1413
1431
  const pos2 = transformation.transformationData[orbit];
@@ -1582,7 +1600,7 @@ var PG3D = class extends Object3D2 {
1582
1600
  this.hintMaterial = new MeshBasicMaterial2({
1583
1601
  vertexColors: true,
1584
1602
  transparent: true,
1585
- opacity: 0.5
1603
+ opacity: v
1586
1604
  });
1587
1605
  this.hintMaterialDisposable = true;
1588
1606
  }
@@ -1654,7 +1672,7 @@ var PG3D = class extends Object3D2 {
1654
1672
  this.hintMaterial = new MeshBasicMaterial2({
1655
1673
  map: hintTexture,
1656
1674
  side: FrontSide,
1657
- transparent: false
1675
+ transparent: true
1658
1676
  });
1659
1677
  this.hintMaterialDisposable = true;
1660
1678
  } else {
@@ -1727,4 +1745,4 @@ export {
1727
1745
  cube3DShim,
1728
1746
  pg3dShim
1729
1747
  };
1730
- //# sourceMappingURL=twisty-dynamic-3d-PU74EKRA.js.map
1748
+ //# sourceMappingURL=twisty-dynamic-3d-OAYMJ6OD.js.map