cubing 0.25.2 → 0.25.6

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 (98) hide show
  1. package/README.md +12 -30
  2. package/dist/esm/{2x2x2.sgs.json-NUOQFJWU.js → 2x2x2.sgs.json-GQVTWF7L.js} +3 -3
  3. package/dist/esm/{2x2x2.sgs.json-NUOQFJWU.js.map → 2x2x2.sgs.json-GQVTWF7L.js.map} +0 -0
  4. package/dist/esm/{3d-dynamic-AKACURPM.js → 3d-dynamic-DKWMBHRS.js} +19 -17
  5. package/dist/esm/{3d-dynamic-AKACURPM.js.map → 3d-dynamic-DKWMBHRS.js.map} +2 -2
  6. package/dist/esm/{444-solver-GNQ5BHCL.js → 444-solver-ZBJQH3QR.js} +4 -4
  7. package/dist/esm/{444-solver-GNQ5BHCL.js.map → 444-solver-ZBJQH3QR.js.map} +0 -0
  8. package/dist/esm/bluetooth/index.js +3 -3
  9. package/dist/esm/chunk-BEXHMXCT.js +9 -0
  10. package/dist/esm/chunk-BEXHMXCT.js.map +7 -0
  11. package/dist/esm/{chunk-SNWS6JXI.js → chunk-BOKO2BWT.js} +101 -27
  12. package/dist/esm/chunk-BOKO2BWT.js.map +7 -0
  13. package/dist/esm/{chunk-KRL5KQQK.js → chunk-F5WNHV7V.js} +2 -2
  14. package/dist/esm/{chunk-KRL5KQQK.js.map → chunk-F5WNHV7V.js.map} +2 -2
  15. package/dist/esm/{chunk-Y32HHZUY.js → chunk-FE3HTWQK.js} +8 -2
  16. package/dist/esm/chunk-FE3HTWQK.js.map +7 -0
  17. package/dist/esm/{chunk-CYKV7QC5.js → chunk-HTPDDD3Q.js} +2 -2
  18. package/dist/esm/{chunk-CYKV7QC5.js.map → chunk-HTPDDD3Q.js.map} +0 -0
  19. package/dist/esm/chunk-IVQ4ITE2.js +33 -0
  20. package/dist/esm/chunk-IVQ4ITE2.js.map +7 -0
  21. package/dist/esm/{chunk-QMZKTP7F.js → chunk-L73RWUDG.js} +3 -3
  22. package/dist/esm/{chunk-QMZKTP7F.js.map → chunk-L73RWUDG.js.map} +0 -0
  23. package/dist/esm/{chunk-TXTMBIUR.js → chunk-L7AOT5LY.js} +2 -2
  24. package/dist/esm/{chunk-TXTMBIUR.js.map → chunk-L7AOT5LY.js.map} +0 -0
  25. package/dist/esm/{chunk-T5KQKRR3.js → chunk-LZGPOT2V.js} +3 -3
  26. package/dist/esm/{chunk-T5KQKRR3.js.map → chunk-LZGPOT2V.js.map} +0 -0
  27. package/dist/esm/{chunk-ASJ2DADD.js → chunk-ME2QTCHN.js} +3 -3
  28. package/dist/esm/{chunk-ASJ2DADD.js.map → chunk-ME2QTCHN.js.map} +0 -0
  29. package/dist/esm/{chunk-FZJDXPAH.js → chunk-T2BDGTK3.js} +11 -34
  30. package/dist/esm/chunk-T2BDGTK3.js.map +7 -0
  31. package/dist/esm/{chunk-L3PZ4XAT.js → chunk-TG5KP5IL.js} +7 -2
  32. package/dist/esm/{chunk-L3PZ4XAT.js.map → chunk-TG5KP5IL.js.map} +2 -2
  33. package/dist/esm/{chunk-5O24MNND.js → chunk-WDJDRVZZ.js} +6 -3
  34. package/dist/esm/chunk-WDJDRVZZ.js.map +7 -0
  35. package/dist/esm/{fto.dynamic-A3AASYQ6.js → fto.dynamic-ZH5IVUKX.js} +3 -3
  36. package/dist/esm/{fto.dynamic-A3AASYQ6.js.map → fto.dynamic-ZH5IVUKX.js.map} +0 -0
  37. package/dist/esm/kilominx.kpuzzle.svg-7XJBOKFU.js +83 -0
  38. package/dist/esm/kilominx.kpuzzle.svg-7XJBOKFU.js.map +7 -0
  39. package/dist/esm/kilosolver-N6JM5PUY.js +713 -0
  40. package/dist/esm/kilosolver-N6JM5PUY.js.map +7 -0
  41. package/dist/esm/kpuzzle/index.js +1 -1
  42. package/dist/esm/{megaminx.sgs.json-KKR4VPHV.js → megaminx.sgs.json-JXXOXGQE.js} +4 -4
  43. package/dist/esm/{megaminx.sgs.json-KKR4VPHV.js.map → megaminx.sgs.json-JXXOXGQE.js.map} +0 -0
  44. package/dist/esm/protocol/index.js +2 -2
  45. package/dist/esm/puzzle-geometry/index.js +1 -1
  46. package/dist/esm/puzzles/index.js +4 -2
  47. package/dist/esm/{pyraminx.sgs.json-X37XL7MA.js → pyraminx.sgs.json-EHYGSC7B.js} +4 -4
  48. package/dist/esm/{pyraminx.sgs.json-X37XL7MA.js.map → pyraminx.sgs.json-EHYGSC7B.js.map} +0 -0
  49. package/dist/esm/redi_cube-E5F64NIQ.js +564 -0
  50. package/dist/esm/redi_cube-E5F64NIQ.js.map +7 -0
  51. package/dist/esm/redi_cube.kpuzzle.json-EPBKWOMV.js +66 -0
  52. package/dist/esm/redi_cube.kpuzzle.json-EPBKWOMV.js.map +7 -0
  53. package/dist/esm/redi_cube.kpuzzle.svg-BSHCMC2Z.js +160 -0
  54. package/dist/esm/redi_cube.kpuzzle.svg-BSHCMC2Z.js.map +7 -0
  55. package/dist/esm/scramble/index.js +6 -4
  56. package/dist/esm/search/index.js +6 -4
  57. package/dist/esm/{entry-2KUJYJBJ.js → search-worker-js-entry-BDMABBZV.js} +42 -20
  58. package/dist/esm/search-worker-js-entry-BDMABBZV.js.map +7 -0
  59. package/dist/esm/search-worker-ts-entry-3B5U6XER.js +22 -0
  60. package/dist/esm/search-worker-ts-entry-3B5U6XER.js.map +7 -0
  61. package/dist/esm/{skewb.sgs.json-MWONK6HT.js → skewb.sgs.json-F5FL7533.js} +4 -4
  62. package/dist/esm/{skewb.sgs.json-MWONK6HT.js.map → skewb.sgs.json-F5FL7533.js.map} +0 -0
  63. package/dist/esm/twisty/index.js +8 -3
  64. package/dist/esm/twisty/index.js.map +2 -2
  65. package/dist/esm/worker-inside-generated-string-AHMSHHSF.js +3674 -0
  66. package/dist/esm/worker-inside-generated-string-AHMSHHSF.js.map +7 -0
  67. package/dist/types/kpuzzle/KPuzzleDefinition.d.ts +1 -0
  68. package/dist/types/puzzles/events.d.ts +8 -0
  69. package/dist/types/puzzles/implementations/kilominx/index.d.ts +2 -0
  70. package/dist/types/puzzles/implementations/kilominx/kilominx.kpuzzle.svg.d.ts +1 -0
  71. package/dist/types/puzzles/implementations/redi-cube/index.d.ts +2 -0
  72. package/dist/types/puzzles/implementations/redi-cube/redi_cube.kpuzzle.json.d.ts +2 -0
  73. package/dist/types/puzzles/implementations/redi-cube/redi_cube.kpuzzle.svg.d.ts +1 -0
  74. package/dist/types/puzzles/index.d.ts +6 -11
  75. package/dist/types/search/inside/{entry.d.ts → search-worker-js-entry.d.ts} +0 -0
  76. package/dist/types/search/inside/{search-worker-entry-path-getter.d.ts → search-worker-ts-entry-path-getter.d.ts} +0 -0
  77. package/dist/types/search/inside/{search-worker-entry.d.ts → search-worker-ts-entry.d.ts} +0 -0
  78. package/dist/types/search/inside/solve/puzzles/kilominx.d.ts +2 -0
  79. package/dist/types/search/inside/solve/puzzles/redi_cube.d.ts +2 -0
  80. package/dist/types/search/inside/worker-guard.d.ts +3 -0
  81. package/dist/types/search/worker-inside-generated-string.d.ts +1 -1
  82. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.d.ts +2 -0
  83. package/dist/types/vendor/comlink-everywhere/inside/index.d.ts +3 -1
  84. package/dist/types/vendor/xyzzy/fto-solver-original.d.ts +1 -56
  85. package/dist/types/vendor/xyzzy/kilosolver.d.ts +2 -140
  86. package/dist/types/vendor/xyzzy/redi_cube.d.ts +2 -0
  87. package/package.json +65 -70
  88. package/dist/esm/chunk-5O24MNND.js.map +0 -7
  89. package/dist/esm/chunk-FZJDXPAH.js.map +0 -7
  90. package/dist/esm/chunk-SNWS6JXI.js.map +0 -7
  91. package/dist/esm/chunk-Y32HHZUY.js.map +0 -7
  92. package/dist/esm/entry-2KUJYJBJ.js.map +0 -7
  93. package/dist/esm/search-worker-entry-ZJAXYGSH.js +0 -18
  94. package/dist/esm/search-worker-entry-ZJAXYGSH.js.map +0 -7
  95. package/dist/esm/worker-inside-generated-string-OBSDMXAS.js +0 -3447
  96. package/dist/esm/worker-inside-generated-string-OBSDMXAS.js.map +0 -7
  97. package/dist/types/search/esm-test-worker.d.ts +0 -3
  98. package/dist/types/vendor/xyzzy/rediscrambler.d.ts +0 -94
package/README.md CHANGED
@@ -11,66 +11,48 @@
11
11
 
12
12
  <a href="https://alpha.twizzle.net/"><img src="./src/sites/alpha.twizzle.net/twizzle-social-media-image.png" width="256">
13
13
 
14
- Twizzle</a> is the spiritual successor to [alg.cubing.net](https://alg.cubing.net/), based on `cubing.js`. It is currently being developed at [src/sites/alpha.twizzle.net](./src/sites/alpha.twizzle.net/).
15
-
16
- See the [Twizzle Diaries](https://www.youtube.com/watch?v=9_kqXn0Mq-o&list=PLFh3NgpDbzN4VkcfjEZSQ_TYQv_OEjbjF) video series for more information on Twizzle's vision and use cases.
14
+ Twizzle</a> is the spiritual successor to [alg.cubing.net](https://alg.cubing.net/), based on `cubing.js`. It is currently being developed at [src/sites/alpha.twizzle.net](./src/sites/alpha.twizzle.net/). See the [Twizzle Diaries](https://www.youtube.com/watch?v=9_kqXn0Mq-o&list=PLFh3NgpDbzN4VkcfjEZSQ_TYQv_OEjbjF) video series for more information on Twizzle's vision and use cases.
17
15
 
18
16
  ## Getting started
19
17
 
20
- If you aren't sure where to get started, you should start with `cdn.cubing.net`, which lets you implement cubing.js in a website.
21
-
22
- If you're already comfortable with writing web apps using `npm`, see the "`Using with Node.js`" section below.
23
-
24
- The following code is a good way to get started with `cdn.cubing.net`:
18
+ If you're just getting started, the easiest way to use `cubing.js` is throught `cdn.cubing.net`:
25
19
 
26
20
  ```html
27
21
  <script src="https://cdn.cubing.net/js/cubing/twisty" type="module"></script>
28
22
  <twisty-player alg="R U R' U R U2' R'"></twisty-player>
29
23
  ```
30
24
 
31
- You can find more documentation at [js.cubing.net/cubing/](https://js.cubing.net/cubing).
32
- The source for the documentation site is currently inside the [docs](./docs/) folder of this repository.
25
+ You can find more documentation at [js.cubing.net/cubing/](https://js.cubing.net/cubing).
33
26
 
34
- ## Using with Node.js
27
+ ## Using with `node` and `npm`
35
28
 
36
- If you would like to use cubing.js as a library in your Node projects, make sure you have [node](https://nodejs.org/en/) and [npm](https://docs.npmjs.com/getting-started) installed (installing `node` will install `npm` as well). Once you have installed those, you can run:
29
+ If you would like to use cubing.js as a library in your package-based projects, make sure you have [node](https://nodejs.org/en/) and [npm](https://docs.npmjs.com/getting-started) installed (installing `node` will install `npm` as well). Once you have installed those, you can run:
37
30
 
38
31
  ```shell
39
32
  npm install cubing
40
33
  ```
41
34
 
42
- The following modules are a good starting point:
35
+ Then you can use modules like this:
43
36
 
44
- ```shell
37
+ ```js
45
38
  import { Alg } from "cubing/alg";
46
39
  import { TwistyPlayer } from "cubing/twisty";
47
40
  ```
48
41
 
49
42
  ## Contributing
50
43
 
51
- ## Developing `cubing.js`
44
+ If you would like to contribute to the development of `cubing.js`, please refer to our [contribution guidelines](./CONTRIBUTING.md).
52
45
 
53
- If you would like to contribute to the development of `cubing.js`, please refer to our [contribution guidelines](CONTRIBUTING.md).
46
+ ## Developing `cubing.js` itself
54
47
 
55
- To work on the `cubing.js` source code, you'll need to install [`node`](https://nodejs.org/en/) and [npm](https://docs.npmjs.com/getting-started) (installing `node` will install `npm` as well). Once you have installed those, you can run:
48
+ If you have `git`, `node`, and `npm` installed, you can run the `cubing.js` source like this (see the [contribution guidelines](./CONTRIBUTING.md) for more details):
56
49
 
57
50
  ```shell
58
51
  git clone https://github.com/cubing/cubing.js && cd cubing.js
59
52
  make dev
53
+ # Now visit http://localhost:3333
60
54
  ```
61
55
 
62
- This should install a few dependencies and start the server, after which you can open <http://localhost:3333/>. Some tips:
63
-
64
- The core library code for `cubing.js` is in [`src/cubing`](./src/cubing/). To test changes, use:
65
-
66
- ```shell
67
- make test
68
- ```
69
-
70
- - See [`src/README.md`](./src/README.md) for the source code structure.
71
- - The core library code for `cubing.js` is in [`src/cubing`](./src/cubing/).
72
- - The code for Twizzle and dev experiments is in [`src/sites`](./src/sites/).
73
-
74
56
  ## Acknowledgments
75
57
 
76
58
  As of this time, `cubing.js` primarily contains code by [Lucas Garron (@lgarron)](https://github.com/lgarron) and [Tom Rokicki (@rokicki)](https://github.com/rokicki). Significant parts of the cubing code also are from:
@@ -78,7 +60,7 @@ As of this time, `cubing.js` primarily contains code by [Lucas Garron (@lgarron)
78
60
  - [Chen Shuang (@cs0x7f)](https://github.com/cs0x7f): Scramblers for 3x3x3, 4x4x4, and Square-1
79
61
  - [`xyxxy` (@torchlight)](https://github.com/torchlight): Scramblers for unofficial events
80
62
 
81
- It also uses the [`three.js`](https://github.com/mrdoob/three.js), [`comlink`](https://github.com/GoogleChromeLabs/comlink), and [`p-lazy`](https://github.com/sindresorhus/p-lazy) libraries.
63
+ It also uses the [`three.js`](https://github.com/mrdoob/three.js), [`comlink`](https://github.com/GoogleChromeLabs/comlink), and [`p-lazy`](https://github.com/sindresorhus/p-lazy) libraries. Twizzle also uses the [Ubuntu font](https://design.ubuntu.com/font/).
82
64
 
83
65
  ## License
84
66
 
@@ -3,8 +3,8 @@ import {
3
3
  } from "./chunk-27KJGD3S.js";
4
4
  import {
5
5
  cube2x2x2
6
- } from "./chunk-SNWS6JXI.js";
7
- import "./chunk-Y32HHZUY.js";
6
+ } from "./chunk-BOKO2BWT.js";
7
+ import "./chunk-FE3HTWQK.js";
8
8
  import "./chunk-EWRBHQFX.js";
9
9
  import "./chunk-WO2AXYFE.js";
10
10
 
@@ -119,4 +119,4 @@ export {
119
119
  cachedData222,
120
120
  data222
121
121
  };
122
- //# sourceMappingURL=2x2x2.sgs.json-NUOQFJWU.js.map
122
+ //# sourceMappingURL=2x2x2.sgs.json-GQVTWF7L.js.map
@@ -3,13 +3,13 @@ import {
3
3
  THREEJS,
4
4
  experimentalStickerings,
5
5
  hintFaceletStyles
6
- } from "./chunk-L3PZ4XAT.js";
6
+ } from "./chunk-TG5KP5IL.js";
7
7
  import {
8
8
  cube3x3x3,
9
9
  getFaceletAppearance,
10
10
  puzzles
11
- } from "./chunk-SNWS6JXI.js";
12
- import "./chunk-Y32HHZUY.js";
11
+ } from "./chunk-BOKO2BWT.js";
12
+ import "./chunk-FE3HTWQK.js";
13
13
  import {
14
14
  Move
15
15
  } from "./chunk-EWRBHQFX.js";
@@ -1168,16 +1168,16 @@ var PG3D = class extends Object3D2 {
1168
1168
  for (let faceletIdx = 0; faceletIdx < orientations; faceletIdx++) {
1169
1169
  const faceletAppearance = getFaceletAppearance(appearance, orbitName, pieceIdx, faceletIdx, false);
1170
1170
  const stickerDef = this.stickers[orbitName][faceletIdx][pieceIdx];
1171
- stickerDef.setAppearance(this.filler, faceletAppearance);
1171
+ if (this.textured && this.hintMaterialDisposable && faceletAppearance === "invisible") {
1172
+ } else {
1173
+ stickerDef.setAppearance(this.filler, faceletAppearance);
1174
+ }
1172
1175
  }
1173
1176
  }
1174
1177
  }
1175
- if (this.scheduleRenderCallback) {
1176
- __privateSet(this, _pendingStickeringUpdate, true);
1177
- if (this.lastPos) {
1178
- this.onPositionChange(this.lastPos);
1179
- }
1180
- this.scheduleRenderCallback();
1178
+ __privateSet(this, _pendingStickeringUpdate, true);
1179
+ if (this.lastPos) {
1180
+ this.onPositionChange(this.lastPos);
1181
1181
  }
1182
1182
  }
1183
1183
  onPositionChange(p) {
@@ -1221,7 +1221,6 @@ var PG3D = class extends Object3D2 {
1221
1221
  }
1222
1222
  }
1223
1223
  this.lastPos = p;
1224
- __privateSet(this, _pendingStickeringUpdate, false);
1225
1224
  }
1226
1225
  let vismods = 0;
1227
1226
  for (const moveProgress of p.movesInProgress) {
@@ -1278,17 +1277,18 @@ var PG3D = class extends Object3D2 {
1278
1277
  this.lastMoveTransformation = quantumTransformation;
1279
1278
  }
1280
1279
  }
1281
- if (vismods) {
1280
+ if (__privateGet(this, _pendingStickeringUpdate) || vismods) {
1282
1281
  this.filler.makeGroups(this.fixedGeo);
1283
1282
  }
1284
- if (colormods) {
1283
+ if (__privateGet(this, _pendingStickeringUpdate) || colormods) {
1285
1284
  if (this.textured) {
1286
1285
  this.fixedGeo.getAttribute("uv").updateRange = {
1287
1286
  offset: 0,
1288
1287
  count: 6 * this.foundationBound
1289
1288
  };
1290
1289
  this.fixedGeo.getAttribute("uv").needsUpdate = true;
1291
- } else {
1290
+ }
1291
+ if (__privateGet(this, _pendingStickeringUpdate) || !this.textured) {
1292
1292
  this.fixedGeo.getAttribute("color").updateRange = {
1293
1293
  offset: 0,
1294
1294
  count: 9 * this.foundationBound
@@ -1297,6 +1297,7 @@ var PG3D = class extends Object3D2 {
1297
1297
  }
1298
1298
  }
1299
1299
  this.scheduleRenderCallback();
1300
+ __privateSet(this, _pendingStickeringUpdate, false);
1300
1301
  }
1301
1302
  ease(fraction) {
1302
1303
  return smootherStep(fraction);
@@ -1387,8 +1388,6 @@ var PG3D = class extends Object3D2 {
1387
1388
  experimentalUpdateTexture(enabled, stickerTexture, hintTexture) {
1388
1389
  if (!stickerTexture) {
1389
1390
  enabled = false;
1390
- } else if (!hintTexture) {
1391
- hintTexture = stickerTexture;
1392
1391
  }
1393
1392
  if (enabled && !this.filler.uvs) {
1394
1393
  this.adduvs();
@@ -1422,6 +1421,9 @@ var PG3D = class extends Object3D2 {
1422
1421
  } else {
1423
1422
  this.hintMaterial = basicStickerMaterial;
1424
1423
  }
1424
+ if (enabled) {
1425
+ this.showHintFacelets(hintTexture !== null);
1426
+ }
1425
1427
  this.updateMaterialArrays();
1426
1428
  __privateSet(this, _pendingStickeringUpdate, true);
1427
1429
  if (this.lastPos) {
@@ -1494,4 +1496,4 @@ export {
1494
1496
  cube3DShim,
1495
1497
  pg3dShim
1496
1498
  };
1497
- //# sourceMappingURL=3d-dynamic-AKACURPM.js.map
1499
+ //# sourceMappingURL=3d-dynamic-DKWMBHRS.js.map