cubing 0.21.0-pre8 → 0.21.2

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 (311) hide show
  1. package/{src/cubing/search/inside/solve → dist}/.DS_Store +0 -0
  2. package/dist/bin/puzzle-geometry-bin.js +1 -1
  3. package/dist/bin/puzzle-geometry-bin.js.map +2 -2
  4. package/dist/bundle-global/cubing.bundle-global.js +876 -797
  5. package/dist/esm/{3d-TYWC5MQY.js → 3d-B25DP5PE.js} +3 -3
  6. package/dist/esm/{3d-TYWC5MQY.js.map → 3d-B25DP5PE.js.map} +0 -0
  7. package/dist/esm/bluetooth/index.js +1 -1
  8. package/dist/esm/bluetooth/index.js.map +1 -1
  9. package/dist/esm/{chunk-6BXLPCNQ.js → chunk-APIIMJG6.js} +98 -95
  10. package/dist/esm/chunk-APIIMJG6.js.map +7 -0
  11. package/dist/esm/{chunk-HUPF5GPN.js → chunk-CSVAFZSB.js} +3 -3
  12. package/dist/esm/{chunk-HUPF5GPN.js.map → chunk-CSVAFZSB.js.map} +0 -0
  13. package/dist/esm/{chunk-L6K5FKPV.js → chunk-MUQMBH2S.js} +48 -26
  14. package/dist/esm/{chunk-L6K5FKPV.js.map → chunk-MUQMBH2S.js.map} +2 -2
  15. package/dist/esm/puzzle-geometry/index.js +1 -1
  16. package/dist/esm/puzzle-geometry/index.js.map +2 -2
  17. package/dist/esm/puzzles/index.js +5 -5
  18. package/dist/esm/scramble/index.js +2 -2
  19. package/dist/esm/search/index.js +2 -2
  20. package/dist/esm/twisty/index.js +313 -78
  21. package/dist/esm/twisty/index.js.map +3 -3
  22. package/dist/esm/{worker-inside-generated-string-DOHINKQX.js → worker-inside-generated-string-KDZOUGJF.js} +20 -20
  23. package/dist/esm/worker-inside-generated-string-KDZOUGJF.js.map +7 -0
  24. package/{src/cubing/search/inside/solve/vendor/cstimer → dist/types}/.DS_Store +0 -0
  25. package/dist/types/bluetooth/smart-puzzle/bluetooth-puzzle.d.ts +1 -1
  26. package/dist/types/bluetooth/smart-puzzle/bluetooth-puzzle.d.ts.map +1 -1
  27. package/dist/types/cubing.bundle-global.d.ts +1 -24
  28. package/dist/types/cubing.bundle-global.d.ts.map +1 -1
  29. package/dist/types/puzzles/implementations/fto/index.d.ts +2 -2
  30. package/dist/types/puzzles/implementations/fto/index.d.ts.map +1 -1
  31. package/dist/types/puzzles/index.d.ts +5 -1
  32. package/dist/types/puzzles/index.d.ts.map +1 -1
  33. package/dist/types/puzzles/stickerings/fto-stickerings.d.ts.map +1 -1
  34. package/dist/types/search/inside/api.d.ts.map +1 -1
  35. package/dist/types/search/worker-inside-generated-string.d.ts +1 -1
  36. package/dist/types/search/worker-inside-generated-string.d.ts.map +1 -1
  37. package/dist/types/twisty/controllers/TwistyAnimationController.d.ts +4 -1
  38. package/dist/types/twisty/controllers/TwistyAnimationController.d.ts.map +1 -1
  39. package/dist/types/twisty/index.d.ts +3 -2
  40. package/dist/types/twisty/index.d.ts.map +1 -1
  41. package/dist/types/twisty/model/TwistyPlayerModel.d.ts +41 -37
  42. package/dist/types/twisty/model/TwistyPlayerModel.d.ts.map +1 -1
  43. package/dist/types/twisty/model/UserVisibleErrorTracker.d.ts +11 -0
  44. package/dist/types/twisty/model/UserVisibleErrorTracker.d.ts.map +1 -0
  45. package/dist/types/twisty/model/{TwistyProp.d.ts → props/TwistyProp.d.ts} +3 -1
  46. package/dist/types/twisty/model/props/TwistyProp.d.ts.map +1 -0
  47. package/dist/types/twisty/model/{TwistyProp.spec.d.ts → props/TwistyProp.spec.d.ts} +0 -0
  48. package/dist/types/twisty/model/props/TwistyProp.spec.d.ts.map +1 -0
  49. package/dist/types/twisty/model/{TwistyPropDebugger.d.ts → props/TwistyPropDebugger.d.ts} +2 -2
  50. package/dist/types/twisty/model/props/TwistyPropDebugger.d.ts.map +1 -0
  51. package/dist/types/twisty/model/{depth-0 → props/general}/URLProp.d.ts +0 -0
  52. package/dist/types/twisty/model/props/general/URLProp.d.ts.map +1 -0
  53. package/dist/types/twisty/model/{depth-0 → props/puzzle/display}/HintFaceletProp.d.ts +2 -2
  54. package/dist/types/twisty/model/props/puzzle/display/HintFaceletProp.d.ts.map +1 -0
  55. package/dist/types/twisty/model/{depth-1 → props/puzzle/display}/SpriteProp.d.ts +1 -1
  56. package/dist/types/twisty/model/props/puzzle/display/SpriteProp.d.ts.map +1 -0
  57. package/dist/types/twisty/model/props/puzzle/display/StickeringProp.d.ts +6 -0
  58. package/dist/types/twisty/model/props/puzzle/display/StickeringProp.d.ts.map +1 -0
  59. package/dist/types/twisty/model/{depth-0 → props/puzzle/state}/AlgProp.d.ts +2 -2
  60. package/dist/types/twisty/model/props/puzzle/state/AlgProp.d.ts.map +1 -0
  61. package/dist/types/twisty/model/{depth-4 → props/puzzle/state}/AlgTransformationProp.d.ts +4 -4
  62. package/dist/types/twisty/model/props/puzzle/state/AlgTransformationProp.d.ts.map +1 -0
  63. package/dist/types/twisty/model/{depth-6 → props/puzzle/state}/AnchoredStartProp.d.ts +4 -4
  64. package/dist/types/twisty/model/props/puzzle/state/AnchoredStartProp.d.ts.map +1 -0
  65. package/dist/types/twisty/model/props/puzzle/state/CatchUpMoveProp.d.ts +11 -0
  66. package/dist/types/twisty/model/props/puzzle/state/CatchUpMoveProp.d.ts.map +1 -0
  67. package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesProp.d.ts +14 -0
  68. package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesProp.d.ts.map +1 -0
  69. package/dist/types/twisty/model/{depth-9 → props/puzzle/state}/CurrentLeavesSimplified.d.ts +3 -3
  70. package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesSimplified.d.ts.map +1 -0
  71. package/dist/types/twisty/model/{depth-10 → props/puzzle/state}/CurrentTransformationProp.d.ts +4 -4
  72. package/dist/types/twisty/model/props/puzzle/state/CurrentTransformationProp.d.ts.map +1 -0
  73. package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorProp.d.ts +17 -0
  74. package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorProp.d.ts.map +1 -0
  75. package/dist/types/twisty/model/{depth-0 → props/puzzle/state}/IndexerConstructorRequestProp.d.ts +1 -1
  76. package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorRequestProp.d.ts.map +1 -0
  77. package/dist/types/twisty/model/props/puzzle/state/IndexerProp.d.ts +15 -0
  78. package/dist/types/twisty/model/props/puzzle/state/IndexerProp.d.ts.map +1 -0
  79. package/dist/types/twisty/model/props/puzzle/state/LegacyPositionProp.d.ts +12 -0
  80. package/dist/types/twisty/model/props/puzzle/state/LegacyPositionProp.d.ts.map +1 -0
  81. package/dist/types/twisty/model/{depth-3 → props/puzzle/state}/PuzzleAlgProp.d.ts +3 -3
  82. package/dist/types/twisty/model/props/puzzle/state/PuzzleAlgProp.d.ts.map +1 -0
  83. package/dist/types/twisty/model/props/puzzle/state/SetupAnchorProp.d.ts +6 -0
  84. package/dist/types/twisty/model/props/puzzle/state/SetupAnchorProp.d.ts.map +1 -0
  85. package/dist/types/twisty/model/props/puzzle/structure/PuzzleDefProp.d.ts +11 -0
  86. package/dist/types/twisty/model/props/puzzle/structure/PuzzleDefProp.d.ts.map +1 -0
  87. package/dist/types/twisty/model/props/puzzle/structure/PuzzleDescriptionProp.d.ts +6 -0
  88. package/dist/types/twisty/model/props/puzzle/structure/PuzzleDescriptionProp.d.ts.map +1 -0
  89. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDProp.d.ts +11 -0
  90. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDProp.d.ts.map +1 -0
  91. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.d.ts +6 -0
  92. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.d.ts.map +1 -0
  93. package/dist/types/twisty/model/props/puzzle/structure/PuzzleLoaderProp.d.ts +13 -0
  94. package/dist/types/twisty/model/props/puzzle/structure/PuzzleLoaderProp.d.ts.map +1 -0
  95. package/dist/types/twisty/model/{depth-8 → props/timeline}/CoarseTimelineInfoProp.d.ts +3 -3
  96. package/dist/types/twisty/model/props/timeline/CoarseTimelineInfoProp.d.ts.map +1 -0
  97. package/dist/types/twisty/model/{depth-7 → props/timeline}/DetailedTimelineInfoProp.d.ts +4 -4
  98. package/dist/types/twisty/model/props/timeline/DetailedTimelineInfoProp.d.ts.map +1 -0
  99. package/dist/types/twisty/model/{depth-0 → props/timeline}/PlayingInfoProp.d.ts +1 -1
  100. package/dist/types/twisty/model/props/timeline/PlayingInfoProp.d.ts.map +1 -0
  101. package/dist/types/twisty/model/{depth-0 → props/timeline}/TempoScaleProp.d.ts +0 -0
  102. package/dist/types/twisty/model/props/timeline/TempoScaleProp.d.ts.map +1 -0
  103. package/dist/types/twisty/model/{depth-0 → props/timeline}/TimestampRequestProp.d.ts +1 -1
  104. package/dist/types/twisty/model/props/timeline/TimestampRequestProp.d.ts.map +1 -0
  105. package/dist/types/twisty/model/{depth-0 → props/viewer}/BackViewProp.d.ts +1 -1
  106. package/dist/types/twisty/model/props/viewer/BackViewProp.d.ts.map +1 -0
  107. package/dist/types/twisty/model/{depth-0 → props/viewer}/BackgroundProp.d.ts +1 -1
  108. package/dist/types/twisty/model/props/viewer/BackgroundProp.d.ts.map +1 -0
  109. package/dist/types/twisty/model/{depth-9 → props/viewer}/ButtonAppearanceProp.d.ts +3 -3
  110. package/dist/types/twisty/model/props/viewer/ButtonAppearanceProp.d.ts.map +1 -0
  111. package/dist/types/twisty/model/{depth-0 → props/viewer}/ControlPanelProp.d.ts +1 -1
  112. package/dist/types/twisty/model/props/viewer/ControlPanelProp.d.ts.map +1 -0
  113. package/dist/types/twisty/model/{depth-0 → props/viewer}/LatitudeLimit.d.ts +0 -0
  114. package/dist/types/twisty/model/props/viewer/LatitudeLimit.d.ts.map +1 -0
  115. package/dist/types/twisty/model/{depth-4 → props/viewer}/OrbitCoordinatesProp.d.ts +3 -3
  116. package/dist/types/twisty/model/props/viewer/OrbitCoordinatesProp.d.ts.map +1 -0
  117. package/dist/types/twisty/model/{depth-0 → props/viewer}/OrbitCoordinatesRequestProp.d.ts +0 -0
  118. package/dist/types/twisty/model/props/viewer/OrbitCoordinatesRequestProp.d.ts.map +1 -0
  119. package/dist/types/twisty/model/{depth-6 → props/viewer}/TimeRangeProp.d.ts +2 -2
  120. package/dist/types/twisty/model/props/viewer/TimeRangeProp.d.ts.map +1 -0
  121. package/dist/types/twisty/model/{depth-0 → props/viewer}/ViewerLinkProp.d.ts +1 -1
  122. package/dist/types/twisty/model/props/viewer/ViewerLinkProp.d.ts.map +1 -0
  123. package/dist/types/twisty/model/{depth-0 → props/viewer}/VisualizationProp.d.ts +1 -1
  124. package/dist/types/twisty/model/props/viewer/VisualizationProp.d.ts.map +1 -0
  125. package/dist/types/twisty/model/{depth-3 → props/viewer}/VisualizationStrategyProp.d.ts +2 -2
  126. package/dist/types/twisty/model/props/viewer/VisualizationStrategyProp.d.ts.map +1 -0
  127. package/dist/types/twisty/old/animation/indexer/AlgIndexer.d.ts.map +1 -1
  128. package/dist/types/twisty/old/dom/TwistyPlayer.css.d.ts.map +1 -1
  129. package/dist/types/twisty/old/dom/TwistyPlayerConfig.d.ts +2 -1
  130. package/dist/types/twisty/old/dom/TwistyPlayerConfig.d.ts.map +1 -1
  131. package/dist/types/twisty/old/dom/viewers/Twisty3DCanvas.d.ts +0 -1
  132. package/dist/types/twisty/old/dom/viewers/Twisty3DCanvas.d.ts.map +1 -1
  133. package/dist/types/twisty/views/3D/RendererPool.d.ts +4 -0
  134. package/dist/types/twisty/views/3D/RendererPool.d.ts.map +1 -0
  135. package/dist/types/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts +1 -1
  136. package/dist/types/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts.map +1 -1
  137. package/dist/types/twisty/views/3D/Twisty3DSceneWrapper.d.ts +2 -1
  138. package/dist/types/twisty/views/3D/Twisty3DSceneWrapper.d.ts.map +1 -1
  139. package/dist/types/twisty/views/3D/Twisty3DVantage.d.ts +5 -3
  140. package/dist/types/twisty/views/3D/Twisty3DVantage.d.ts.map +1 -1
  141. package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.d.ts +1 -1
  142. package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.d.ts.map +1 -1
  143. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.d.ts.map +1 -1
  144. package/dist/types/twisty/views/TwistyAlgEditor/model.d.ts +2 -2
  145. package/dist/types/twisty/views/TwistyAlgEditor/model.d.ts.map +1 -1
  146. package/dist/types/twisty/views/TwistyPlayer.d.ts +12 -7
  147. package/dist/types/twisty/views/TwistyPlayer.d.ts.map +1 -1
  148. package/dist/types/twisty/views/TwistyPlayerSettable.d.ts +8 -8
  149. package/dist/types/twisty/views/TwistyPlayerSettable.d.ts.map +1 -1
  150. package/dist/types/twisty/views/control-panel/TwistyButtonsV2.d.ts +1 -1
  151. package/dist/types/twisty/views/control-panel/TwistyButtonsV2.d.ts.map +1 -1
  152. package/dist/types/twisty/views/control-panel/TwistyScrubberV2.d.ts +1 -1
  153. package/dist/types/twisty/views/control-panel/TwistyScrubberV2.d.ts.map +1 -1
  154. package/dist/types/vendor/three/examples/jsm/libs/stats.modified.module.d.ts +33 -0
  155. package/dist/types/vendor/three/examples/jsm/libs/stats.modified.module.d.ts.map +1 -0
  156. package/docs/.DS_Store +0 -0
  157. package/docs/cubing/.DS_Store +0 -0
  158. package/docs/cubing/scramble/index.html +35 -19
  159. package/package.json +5 -5
  160. package/src/cubing/.DS_Store +0 -0
  161. package/src/cubing/bluetooth/connect/index.ts +1 -1
  162. package/src/cubing/bluetooth/smart-puzzle/bluetooth-puzzle.ts +1 -1
  163. package/src/cubing/cubing.bundle-global.ts +5 -1
  164. package/src/cubing/puzzle-geometry/PermOriSet.ts +1 -1
  165. package/src/cubing/puzzles/PuzzleLoader.ts +1 -1
  166. package/src/cubing/puzzles/implementations/fto/index.ts +19 -11
  167. package/src/cubing/puzzles/index.ts +25 -18
  168. package/src/cubing/puzzles/stickerings/fto-stickerings.ts +9 -0
  169. package/src/cubing/search/inside/api.spec.ts +1 -0
  170. package/src/cubing/search/inside/api.ts +1 -0
  171. package/src/cubing/search/worker-inside-generated-string.js +1 -1
  172. package/src/cubing/twisty/.DS_Store +0 -0
  173. package/src/cubing/twisty/controllers/TwistyAnimationController.ts +80 -3
  174. package/src/cubing/twisty/index.ts +2 -2
  175. package/src/cubing/twisty/model/TwistyPlayerModel.ts +52 -41
  176. package/src/cubing/twisty/model/UserVisibleErrorTracker.ts +22 -0
  177. package/src/cubing/twisty/model/{TwistyProp.spec.ts → props/TwistyProp.spec.ts} +0 -0
  178. package/src/cubing/twisty/model/{TwistyProp.ts → props/TwistyProp.ts} +17 -9
  179. package/src/cubing/twisty/model/{TwistyPropDebugger.ts → props/TwistyPropDebugger.ts} +7 -7
  180. package/src/cubing/twisty/model/{depth-0 → props/general}/URLProp.ts +0 -0
  181. package/src/cubing/twisty/model/{depth-0 → props/puzzle/display}/HintFaceletProp.ts +2 -2
  182. package/src/cubing/twisty/model/{depth-1 → props/puzzle/display}/SpriteProp.ts +2 -2
  183. package/src/cubing/twisty/model/{depth-0 → props/puzzle/display}/StickeringProp.ts +2 -2
  184. package/src/cubing/twisty/model/{depth-0 → props/puzzle/state}/AlgProp.ts +3 -3
  185. package/src/cubing/twisty/model/{depth-4 → props/puzzle/state}/AlgTransformationProp.ts +6 -6
  186. package/src/cubing/twisty/model/{depth-6 → props/puzzle/state}/AnchoredStartProp.ts +4 -4
  187. package/src/cubing/twisty/model/props/puzzle/state/CatchUpMoveProp.ts +17 -0
  188. package/src/cubing/twisty/model/{depth-8 → props/puzzle/state}/CurrentLeavesProp.ts +27 -9
  189. package/src/cubing/twisty/model/{depth-9 → props/puzzle/state}/CurrentLeavesSimplified.ts +4 -4
  190. package/src/cubing/twisty/model/{depth-10 → props/puzzle/state}/CurrentTransformationProp.ts +5 -5
  191. package/src/cubing/twisty/model/{depth-4 → props/puzzle/state}/IndexerConstructorProp.ts +10 -10
  192. package/src/cubing/twisty/model/{depth-0 → props/puzzle/state}/IndexerConstructorRequestProp.ts +1 -1
  193. package/src/cubing/twisty/model/{depth-5 → props/puzzle/state}/IndexerProp.ts +6 -6
  194. package/src/cubing/twisty/model/{depth-11 → props/puzzle/state}/LegacyPositionProp.ts +4 -4
  195. package/src/cubing/twisty/model/{depth-3 → props/puzzle/state}/PuzzleAlgProp.ts +4 -4
  196. package/src/cubing/twisty/model/{depth-0 → props/puzzle/state}/SetupAnchorProp.ts +2 -2
  197. package/src/cubing/twisty/model/{depth-2 → props/puzzle/structure}/PuzzleDefProp.ts +3 -3
  198. package/src/cubing/twisty/model/{depth-0 → props/puzzle/structure}/PuzzleDescriptionProp.ts +6 -2
  199. package/src/cubing/twisty/model/{depth-2 → props/puzzle/structure}/PuzzleIDProp.ts +3 -3
  200. package/src/cubing/twisty/model/{depth-0 → props/puzzle/structure}/PuzzleIDRequestProp.ts +6 -2
  201. package/src/cubing/twisty/model/{depth-1 → props/puzzle/structure}/PuzzleLoaderProp.ts +11 -5
  202. package/src/cubing/twisty/model/{depth-8 → props/timeline}/CoarseTimelineInfoProp.ts +3 -3
  203. package/src/cubing/twisty/model/{depth-7 → props/timeline}/DetailedTimelineInfoProp.ts +4 -4
  204. package/src/cubing/twisty/model/{depth-0 → props/timeline}/PlayingInfoProp.ts +1 -1
  205. package/src/cubing/twisty/model/{depth-0 → props/timeline}/TempoScaleProp.ts +0 -0
  206. package/src/cubing/twisty/model/{depth-0 → props/timeline}/TimestampRequestProp.ts +1 -1
  207. package/src/cubing/twisty/model/{depth-0 → props/viewer}/BackViewProp.ts +1 -1
  208. package/src/cubing/twisty/model/{depth-0 → props/viewer}/BackgroundProp.ts +1 -1
  209. package/src/cubing/twisty/model/{depth-9 → props/viewer}/ButtonAppearanceProp.ts +4 -4
  210. package/src/cubing/twisty/model/{depth-0 → props/viewer}/ControlPanelProp.ts +1 -1
  211. package/src/cubing/twisty/model/{depth-0 → props/viewer}/LatitudeLimit.ts +0 -0
  212. package/src/cubing/twisty/model/{depth-4 → props/viewer}/OrbitCoordinatesProp.ts +3 -3
  213. package/src/cubing/twisty/model/{depth-0 → props/viewer}/OrbitCoordinatesRequestProp.ts +1 -1
  214. package/src/cubing/twisty/model/{depth-6 → props/viewer}/TimeRangeProp.ts +2 -2
  215. package/src/cubing/twisty/model/{depth-0 → props/viewer}/ViewerLinkProp.ts +1 -1
  216. package/src/cubing/twisty/model/{depth-0 → props/viewer}/VisualizationProp.ts +1 -1
  217. package/src/cubing/twisty/model/{depth-3 → props/viewer}/VisualizationStrategyProp.ts +2 -2
  218. package/src/cubing/twisty/old/animation/indexer/AlgIndexer.ts +1 -0
  219. package/src/cubing/twisty/old/dom/TwistyPlayer.css.ts +20 -0
  220. package/src/cubing/twisty/old/dom/TwistyPlayerConfig.ts +2 -1
  221. package/src/cubing/twisty/old/dom/viewers/Twisty3DCanvas.ts +3 -10
  222. package/src/cubing/twisty/{old → views}/.DS_Store +0 -0
  223. package/src/cubing/twisty/views/2D/Twisty2DPuzzle.ts +2 -2
  224. package/src/cubing/twisty/views/2D/Twisty2DPuzzleWrapper.ts +1 -1
  225. package/src/cubing/twisty/views/2D/Twisty2DSceneWrapper.ts +1 -1
  226. package/src/cubing/{search/inside → twisty/views/3D}/.DS_Store +0 -0
  227. package/src/cubing/twisty/views/3D/RendererPool.ts +53 -0
  228. package/src/cubing/twisty/views/3D/Twisty3DPuzzleWrapper.ts +9 -8
  229. package/src/cubing/twisty/views/3D/Twisty3DSceneWrapper.ts +7 -3
  230. package/src/cubing/twisty/views/3D/Twisty3DVantage.ts +69 -33
  231. package/src/cubing/twisty/views/3D/TwistyOrbitControlsV2.spec.ts +7 -7
  232. package/src/cubing/twisty/views/3D/TwistyOrbitControlsV2.ts +1 -1
  233. package/src/cubing/twisty/views/TwistyAlgEditor/TwistyAlgEditor.ts +6 -2
  234. package/src/cubing/twisty/views/TwistyAlgEditor/model.ts +2 -2
  235. package/src/cubing/twisty/views/TwistyAlgViewer.ts +2 -2
  236. package/src/cubing/twisty/views/TwistyPlayer.ts +67 -11
  237. package/src/cubing/twisty/views/TwistyPlayerSettable.ts +8 -8
  238. package/src/cubing/twisty/views/control-panel/TwistyButtonsV2.ts +1 -1
  239. package/src/cubing/twisty/views/control-panel/TwistyScrubberV2.ts +1 -1
  240. package/src/cubing/vendor/three/examples/jsm/libs/stats.modified.module.ts +179 -0
  241. package/dist/esm/chunk-6BXLPCNQ.js.map +0 -7
  242. package/dist/esm/worker-inside-generated-string-DOHINKQX.js.map +0 -7
  243. package/dist/types/twisty/model/TwistyProp.d.ts.map +0 -1
  244. package/dist/types/twisty/model/TwistyProp.spec.d.ts.map +0 -1
  245. package/dist/types/twisty/model/TwistyPropDebugger.d.ts.map +0 -1
  246. package/dist/types/twisty/model/depth-0/AlgProp.d.ts.map +0 -1
  247. package/dist/types/twisty/model/depth-0/BackViewProp.d.ts.map +0 -1
  248. package/dist/types/twisty/model/depth-0/BackgroundProp.d.ts.map +0 -1
  249. package/dist/types/twisty/model/depth-0/ControlPanelProp.d.ts.map +0 -1
  250. package/dist/types/twisty/model/depth-0/HintFaceletProp.d.ts.map +0 -1
  251. package/dist/types/twisty/model/depth-0/IndexerConstructorRequestProp.d.ts.map +0 -1
  252. package/dist/types/twisty/model/depth-0/LatitudeLimit.d.ts.map +0 -1
  253. package/dist/types/twisty/model/depth-0/OrbitCoordinatesRequestProp.d.ts.map +0 -1
  254. package/dist/types/twisty/model/depth-0/PlayingInfoProp.d.ts.map +0 -1
  255. package/dist/types/twisty/model/depth-0/PuzzleDescriptionProp.d.ts +0 -6
  256. package/dist/types/twisty/model/depth-0/PuzzleDescriptionProp.d.ts.map +0 -1
  257. package/dist/types/twisty/model/depth-0/PuzzleIDRequestProp.d.ts +0 -6
  258. package/dist/types/twisty/model/depth-0/PuzzleIDRequestProp.d.ts.map +0 -1
  259. package/dist/types/twisty/model/depth-0/SetupAnchorProp.d.ts +0 -6
  260. package/dist/types/twisty/model/depth-0/SetupAnchorProp.d.ts.map +0 -1
  261. package/dist/types/twisty/model/depth-0/StickeringProp.d.ts +0 -6
  262. package/dist/types/twisty/model/depth-0/StickeringProp.d.ts.map +0 -1
  263. package/dist/types/twisty/model/depth-0/TempoScaleProp.d.ts.map +0 -1
  264. package/dist/types/twisty/model/depth-0/TimestampRequestProp.d.ts.map +0 -1
  265. package/dist/types/twisty/model/depth-0/URLProp.d.ts.map +0 -1
  266. package/dist/types/twisty/model/depth-0/ViewerLinkProp.d.ts.map +0 -1
  267. package/dist/types/twisty/model/depth-0/VisualizationProp.d.ts.map +0 -1
  268. package/dist/types/twisty/model/depth-1/PuzzleLoaderProp.d.ts +0 -13
  269. package/dist/types/twisty/model/depth-1/PuzzleLoaderProp.d.ts.map +0 -1
  270. package/dist/types/twisty/model/depth-1/SpriteProp.d.ts.map +0 -1
  271. package/dist/types/twisty/model/depth-10/CurrentTransformationProp.d.ts.map +0 -1
  272. package/dist/types/twisty/model/depth-11/LegacyPositionProp.d.ts +0 -12
  273. package/dist/types/twisty/model/depth-11/LegacyPositionProp.d.ts.map +0 -1
  274. package/dist/types/twisty/model/depth-2/PuzzleDefProp.d.ts +0 -11
  275. package/dist/types/twisty/model/depth-2/PuzzleDefProp.d.ts.map +0 -1
  276. package/dist/types/twisty/model/depth-2/PuzzleIDProp.d.ts +0 -11
  277. package/dist/types/twisty/model/depth-2/PuzzleIDProp.d.ts.map +0 -1
  278. package/dist/types/twisty/model/depth-3/PuzzleAlgProp.d.ts.map +0 -1
  279. package/dist/types/twisty/model/depth-3/VisualizationStrategyProp.d.ts.map +0 -1
  280. package/dist/types/twisty/model/depth-4/AlgTransformationProp.d.ts.map +0 -1
  281. package/dist/types/twisty/model/depth-4/IndexerConstructorProp.d.ts +0 -17
  282. package/dist/types/twisty/model/depth-4/IndexerConstructorProp.d.ts.map +0 -1
  283. package/dist/types/twisty/model/depth-4/OrbitCoordinatesProp.d.ts.map +0 -1
  284. package/dist/types/twisty/model/depth-5/IndexerProp.d.ts +0 -15
  285. package/dist/types/twisty/model/depth-5/IndexerProp.d.ts.map +0 -1
  286. package/dist/types/twisty/model/depth-6/AnchoredStartProp.d.ts.map +0 -1
  287. package/dist/types/twisty/model/depth-6/TimeRangeProp.d.ts.map +0 -1
  288. package/dist/types/twisty/model/depth-7/DetailedTimelineInfoProp.d.ts.map +0 -1
  289. package/dist/types/twisty/model/depth-8/CoarseTimelineInfoProp.d.ts.map +0 -1
  290. package/dist/types/twisty/model/depth-8/CurrentLeavesProp.d.ts +0 -12
  291. package/dist/types/twisty/model/depth-8/CurrentLeavesProp.d.ts.map +0 -1
  292. package/dist/types/twisty/model/depth-9/ButtonAppearanceProp.d.ts.map +0 -1
  293. package/dist/types/twisty/model/depth-9/CurrentLeavesSimplified.d.ts.map +0 -1
  294. package/dist/types/twisty/views/3D/puzzles/TwistyTestBox.d.ts +0 -9
  295. package/dist/types/twisty/views/3D/puzzles/TwistyTestBox.d.ts.map +0 -1
  296. package/dist/types/vendor/three/examples/jsm/libs/stats.module.d.ts +0 -21
  297. package/dist/types/vendor/three/examples/jsm/libs/stats.module.d.ts.map +0 -1
  298. package/src/cubing/alg/.DS_Store +0 -0
  299. package/src/cubing/bluetooth/.DS_Store +0 -0
  300. package/src/cubing/kpuzzle/.DS_Store +0 -0
  301. package/src/cubing/puzzles/.DS_Store +0 -0
  302. package/src/cubing/search/.DS_Store +0 -0
  303. package/src/cubing/search/inside/solve/vendor/.DS_Store +0 -0
  304. package/src/cubing/search/inside/solve/vendor/cstimer/src/.DS_Store +0 -0
  305. package/src/cubing/search/inside/solve/vendor/cstimer/src/js/.DS_Store +0 -0
  306. package/src/cubing/stream/.DS_Store +0 -0
  307. package/src/cubing/twisty/old/dom/.DS_Store +0 -0
  308. package/src/cubing/twisty/views/3D/puzzles/TwistyTestBox.ts +0 -22
  309. package/src/cubing/vendor/.DS_Store +0 -0
  310. package/src/cubing/vendor/three/examples/jsm/libs/stats.module.d.ts +0 -24
  311. package/src/cubing/vendor/three/examples/jsm/libs/stats.module.js +0 -179
Binary file
@@ -9,24 +9,87 @@ import { RenderScheduler } from "../old/animation/RenderScheduler";
9
9
  import type {
10
10
  PlayingInfo,
11
11
  SimpleDirection,
12
- } from "../model/depth-0/PlayingInfoProp";
12
+ } from "../model/props/timeline/PlayingInfoProp";
13
13
  import type { TwistyPlayerModel } from "../model/TwistyPlayerModel";
14
14
  import { StaleDropper } from "../model/PromiseFreshener";
15
15
  import type { CurrentMoveInfo } from "../old/animation/indexer/AlgIndexer";
16
- import type { TimestampRequest } from "../model/depth-0/TimestampRequestProp";
16
+ import type { TimestampRequest } from "../model/props/timeline/TimestampRequestProp";
17
17
  import { modIntoRange } from "../model/helpers";
18
+ import type { CatchUpMove } from "../model/props/puzzle/state/CatchUpMoveProp";
18
19
 
19
20
  // TODO: Figure out a better way for the controller to instruct the player.
20
21
  export interface TwistyAnimationControllerDelegate {
21
22
  flash(): void;
22
23
  }
23
24
 
25
+ // We use a separate helper to separate the anim frame callbacks (and their cancellations).
26
+ // TODO: fold this into the main controller
27
+ class CatchUpHelper {
28
+ catchingUp: boolean = false;
29
+ pendingFrame = false;
30
+
31
+ constructor(private model: TwistyPlayerModel) {}
32
+
33
+ private scheduler: RenderScheduler = new RenderScheduler(
34
+ this.animFrame.bind(this),
35
+ );
36
+
37
+ start(): void {
38
+ if (!this.catchingUp) {
39
+ this.lastTimestamp = performance.now();
40
+ }
41
+ this.catchingUp = true;
42
+ this.pendingFrame = true;
43
+ this.scheduler.requestAnimFrame();
44
+ }
45
+
46
+ stop(): void {
47
+ this.catchingUp = false;
48
+ this.scheduler.cancelAnimFrame();
49
+ }
50
+
51
+ catchUpMs = 500;
52
+ lastTimestamp = 0;
53
+ animFrame(timestamp: MillisecondTimestamp): void {
54
+ this.scheduler.requestAnimFrame();
55
+ const delta = (timestamp - this.lastTimestamp) / this.catchUpMs;
56
+ this.lastTimestamp = timestamp;
57
+
58
+ this.model.catchUpMoveProp.set(
59
+ (async () => {
60
+ const previousCatchUpMove = await this.model.catchUpMoveProp.get();
61
+ if (previousCatchUpMove.move === null) {
62
+ return previousCatchUpMove;
63
+ }
64
+
65
+ const amount = previousCatchUpMove.amount + delta; // TODO: use tempo scale?
66
+ if (amount >= 1) {
67
+ this.pendingFrame = true;
68
+ this.stop();
69
+ this.model.timestampRequestProp.set("end");
70
+ return {
71
+ move: null,
72
+ amount: 0,
73
+ };
74
+ }
75
+ this.pendingFrame = false;
76
+ return {
77
+ move: previousCatchUpMove.move,
78
+ amount: amount,
79
+ };
80
+ })(),
81
+ );
82
+ }
83
+ }
84
+
24
85
  // This controls the logic for animation, so that the main controller can focus on the right API abstractions.
25
86
  export class TwistyAnimationController {
26
87
  // TODO: #private?
27
88
  private playing: boolean = false;
28
89
  private direction: Direction = Direction.Forwards;
29
90
 
91
+ private catchUpHelper: CatchUpHelper;
92
+
30
93
  private model: TwistyPlayerModel;
31
94
 
32
95
  private lastDatestamp: MillisecondTimestamp = 0;
@@ -44,6 +107,11 @@ export class TwistyAnimationController {
44
107
  this.lastTimestampPromise = this.#effectiveTimestampMilliseconds();
45
108
 
46
109
  this.model.playingInfoProp.addFreshListener(this.onPlayingProp.bind(this)); // TODO
110
+
111
+ this.catchUpHelper = new CatchUpHelper(this.model);
112
+ this.model.catchUpMoveProp.addFreshListener(
113
+ this.onCatchUpMoveProp.bind(this),
114
+ ); // TODO
47
115
  }
48
116
 
49
117
  // TODO: Do we need this?
@@ -53,6 +121,15 @@ export class TwistyAnimationController {
53
121
  }
54
122
  }
55
123
 
124
+ // TODO: Do we need this?
125
+ async onCatchUpMoveProp(catchUpMove: CatchUpMove): Promise<void> {
126
+ const catchingUp = catchUpMove.move !== null;
127
+ if (catchingUp !== this.catchUpHelper.catchingUp) {
128
+ catchingUp ? this.catchUpHelper.start() : this.catchUpHelper.stop();
129
+ }
130
+ this.scheduler.requestAnimFrame();
131
+ }
132
+
56
133
  async #effectiveTimestampMilliseconds(): Promise<MillisecondTimestamp> {
57
134
  return (await this.model.detailedTimelineInfoProp.get()).timestamp;
58
135
  }
@@ -161,7 +238,7 @@ export class TwistyAnimationController {
161
238
  freshenerResult;
162
239
 
163
240
  // TODO: Get this without wasting time on the others?
164
- if (playingInfo.playing === false) {
241
+ if (!playingInfo.playing) {
165
242
  this.playing = false;
166
243
  // TODO: Ideally we'd cancel the anim frame from the top of this method.
167
244
  // But `this.scheduler.cancelAnimFrame();` might accidentally cancel a
@@ -2,13 +2,13 @@ export { TwistyPlayer } from "./views/TwistyPlayer";
2
2
  export { TwistyAlgViewer } from "./views/TwistyAlgViewer";
3
3
  export { TwistyAlgEditor } from "./views/TwistyAlgEditor/TwistyAlgEditor";
4
4
  export type { TwistyPlayerConfig } from "./views/TwistyPlayer";
5
+ export { experimentalForceNewRendererSharing } from "./views/3D/Twisty3DVantage";
5
6
 
6
- export { NO_VALUE as EXPERIMENTAL_PROP_NO_VALUE } from "./model/TwistyProp";
7
+ export { NO_VALUE as EXPERIMENTAL_PROP_NO_VALUE } from "./model/props/TwistyProp";
7
8
 
8
9
  // Old
9
10
  export type { Twisty3DPuzzle } from "./views/3D/puzzles/Twisty3DPuzzle";
10
11
  export {
11
- experimentalSetShareAllNewRenderers,
12
12
  experimentalShowRenderStats,
13
13
  Twisty3DCanvas,
14
14
  } from "./old/dom/viewers/Twisty3DCanvas";
@@ -1,42 +1,48 @@
1
- import { AlgProp } from "./depth-0/AlgProp";
2
- import { BackgroundProp } from "./depth-0/BackgroundProp";
3
- import { BackViewProp } from "./depth-0/BackViewProp";
4
- import { ControlPanelProp } from "./depth-0/ControlPanelProp";
5
- import { HintFaceletProp } from "./depth-0/HintFaceletProp";
6
- import { IndexerConstructorRequestProp } from "./depth-0/IndexerConstructorRequestProp";
7
- import { LatitudeLimitProp } from "./depth-0/LatitudeLimit";
8
- import { OrbitCoordinatesRequestProp } from "./depth-0/OrbitCoordinatesRequestProp";
9
- import { PlayingInfoProp } from "./depth-0/PlayingInfoProp";
10
- import { PGPuzzleDescriptionStringProp } from "./depth-0/PuzzleDescriptionProp";
11
- import { PuzzleIDRequestProp } from "./depth-0/PuzzleIDRequestProp";
12
- import { PuzzleLoaderProp } from "./depth-1/PuzzleLoaderProp";
13
- import { SetupAnchorProp } from "./depth-0/SetupAnchorProp";
14
- import { StickeringProp } from "./depth-0/StickeringProp";
15
- import { TempoScaleProp } from "./depth-0/TempoScaleProp";
16
- import { TimestampRequestProp } from "./depth-0/TimestampRequestProp";
17
- import { URLProp } from "./depth-0/URLProp";
18
- import { ViewerLinkProp } from "./depth-0/ViewerLinkProp";
19
- import { VisualizationFormatProp } from "./depth-0/VisualizationProp";
20
- import { OrbitCoordinatesProp } from "./depth-4/OrbitCoordinatesProp";
21
- import { PuzzleIDProp } from "./depth-2/PuzzleIDProp";
22
- import { SpriteProp } from "./depth-1/SpriteProp";
23
- import { VisualizationStrategyProp } from "./depth-3/VisualizationStrategyProp";
24
- import { IndexerConstructorProp } from "./depth-4/IndexerConstructorProp";
25
- import { PuzzleAlgProp } from "./depth-3/PuzzleAlgProp";
26
- import { AlgTransformationProp } from "./depth-4/AlgTransformationProp";
27
- import { IndexerProp } from "./depth-5/IndexerProp";
28
- import { AnchoredStartProp } from "./depth-6/AnchoredStartProp";
29
- import { TimeRangeProp } from "./depth-6/TimeRangeProp";
30
- import { DetailedTimelineInfoProp } from "./depth-7/DetailedTimelineInfoProp";
31
- import { CoarseTimelineInfoProp } from "./depth-8/CoarseTimelineInfoProp";
32
- import { CurrentLeavesProp } from "./depth-8/CurrentLeavesProp";
33
- import { ButtonAppearanceProp } from "./depth-9/ButtonAppearanceProp";
34
- import { CurrentLeavesSimplifiedProp } from "./depth-9/CurrentLeavesSimplified";
35
- import { CurrentTransformationProp } from "./depth-10/CurrentTransformationProp";
36
- import { LegacyPositionProp } from "./depth-11/LegacyPositionProp";
37
- import { PuzzleDefProp } from "./depth-2/PuzzleDefProp";
1
+ import { AlgProp } from "./props/puzzle/state/AlgProp";
2
+ import { BackgroundProp } from "./props/viewer/BackgroundProp";
3
+ import { BackViewProp } from "./props/viewer/BackViewProp";
4
+ import { ControlPanelProp } from "./props/viewer/ControlPanelProp";
5
+ import { HintFaceletProp } from "./props/puzzle/display/HintFaceletProp";
6
+ import { IndexerConstructorRequestProp } from "./props/puzzle/state/IndexerConstructorRequestProp";
7
+ import { LatitudeLimitProp } from "./props/viewer/LatitudeLimit";
8
+ import { OrbitCoordinatesRequestProp } from "./props/viewer/OrbitCoordinatesRequestProp";
9
+ import { PlayingInfoProp } from "./props/timeline/PlayingInfoProp";
10
+ import { PGPuzzleDescriptionStringProp } from "./props/puzzle/structure/PuzzleDescriptionProp";
11
+ import { PuzzleIDRequestProp } from "./props/puzzle/structure/PuzzleIDRequestProp";
12
+ import { PuzzleLoaderProp } from "./props/puzzle/structure/PuzzleLoaderProp";
13
+ import { SetupAnchorProp } from "./props/puzzle/state/SetupAnchorProp";
14
+ import { StickeringProp } from "./props/puzzle/display/StickeringProp";
15
+ import { TempoScaleProp } from "./props/timeline/TempoScaleProp";
16
+ import { TimestampRequestProp } from "./props/timeline/TimestampRequestProp";
17
+ import { URLProp } from "./props/general/URLProp";
18
+ import { ViewerLinkProp } from "./props/viewer/ViewerLinkProp";
19
+ import { VisualizationFormatProp } from "./props/viewer/VisualizationProp";
20
+ import { OrbitCoordinatesProp } from "./props/viewer/OrbitCoordinatesProp";
21
+ import { PuzzleIDProp } from "./props/puzzle/structure/PuzzleIDProp";
22
+ import { SpriteProp } from "./props/puzzle/display/SpriteProp";
23
+ import { VisualizationStrategyProp } from "./props/viewer/VisualizationStrategyProp";
24
+ import { IndexerConstructorProp } from "./props/puzzle/state/IndexerConstructorProp";
25
+ import { PuzzleAlgProp } from "./props/puzzle/state/PuzzleAlgProp";
26
+ import { AlgTransformationProp } from "./props/puzzle/state/AlgTransformationProp";
27
+ import { IndexerProp } from "./props/puzzle/state/IndexerProp";
28
+ import { AnchoredStartProp } from "./props/puzzle/state/AnchoredStartProp";
29
+ import { TimeRangeProp } from "./props/viewer/TimeRangeProp";
30
+ import { DetailedTimelineInfoProp } from "./props/timeline/DetailedTimelineInfoProp";
31
+ import { CoarseTimelineInfoProp } from "./props/timeline/CoarseTimelineInfoProp";
32
+ import { CurrentLeavesProp } from "./props/puzzle/state/CurrentLeavesProp";
33
+ import { ButtonAppearanceProp } from "./props/viewer/ButtonAppearanceProp";
34
+ import { CurrentLeavesSimplifiedProp } from "./props/puzzle/state/CurrentLeavesSimplified";
35
+ import { CurrentTransformationProp } from "./props/puzzle/state/CurrentTransformationProp";
36
+ import { LegacyPositionProp } from "./props/puzzle/state/LegacyPositionProp";
37
+ import { PuzzleDefProp } from "./props/puzzle/structure/PuzzleDefProp";
38
+ import { UserVisibleErrorTracker } from "./UserVisibleErrorTracker";
39
+ import { CatchUpMoveProp } from "./props/puzzle/state/CatchUpMoveProp";
38
40
 
39
41
  export class TwistyPlayerModel {
42
+ // TODO: incorporate error handling into the entire prop graph.
43
+ // TODO: Make this something that can't get confused with normal props?
44
+ userVisibleErrorTracker = new UserVisibleErrorTracker();
45
+
40
46
  // TODO: Redistribute and group props with controllers.
41
47
 
42
48
  // Depth 0
@@ -44,6 +50,7 @@ export class TwistyPlayerModel {
44
50
  backgroundProp = new BackgroundProp();
45
51
  backViewProp = new BackViewProp();
46
52
  controlPanelProp = new ControlPanelProp();
53
+ catchUpMoveProp = new CatchUpMoveProp();
47
54
  foundationStickerSpriteURL = new URLProp();
48
55
  hintFaceletProp = new HintFaceletProp();
49
56
  hintStickerSpriteURL = new URLProp();
@@ -72,10 +79,13 @@ export class TwistyPlayerModel {
72
79
  spriteURL: this.hintStickerSpriteURL,
73
80
  });
74
81
 
75
- puzzleLoaderProp = new PuzzleLoaderProp({
76
- puzzleIDRequest: this.puzzleIDRequestProp,
77
- puzzleDescriptionRequest: this.puzzleDescriptionRequestProp,
78
- });
82
+ puzzleLoaderProp = new PuzzleLoaderProp(
83
+ {
84
+ puzzleIDRequest: this.puzzleIDRequestProp,
85
+ puzzleDescriptionRequest: this.puzzleDescriptionRequestProp,
86
+ },
87
+ this.userVisibleErrorTracker,
88
+ );
79
89
 
80
90
  // Depth 2
81
91
  puzzleDefProp = new PuzzleDefProp({ puzzleLoader: this.puzzleLoaderProp });
@@ -155,6 +165,7 @@ export class TwistyPlayerModel {
155
165
  currentLeavesProp = new CurrentLeavesProp({
156
166
  indexer: this.indexerProp,
157
167
  detailedTimelineInfo: this.detailedTimelineInfoProp,
168
+ catchUpMove: this.catchUpMoveProp,
158
169
  });
159
170
 
160
171
  // Depth 9
@@ -0,0 +1,22 @@
1
+ import { arrayEquals } from "./helpers";
2
+ import { SimpleTwistyPropSource } from "./props/TwistyProp";
3
+
4
+ interface UserVisibleError {
5
+ errors: string[];
6
+ }
7
+
8
+ const EMPTY_ERRORS = { errors: [] };
9
+
10
+ export class UserVisibleErrorTracker extends SimpleTwistyPropSource<UserVisibleError> {
11
+ override getDefaultValue(): UserVisibleError {
12
+ return EMPTY_ERRORS;
13
+ }
14
+
15
+ reset() {
16
+ this.set(this.getDefaultValue());
17
+ }
18
+
19
+ canReuseValue(_v1: UserVisibleError, _v2: UserVisibleError): boolean {
20
+ return arrayEquals(_v1.errors, _v2.errors);
21
+ }
22
+ }
@@ -1,5 +1,6 @@
1
- import { from } from "../../vendor/p-lazy/p-lazy";
2
- import { StaleDropper } from "./PromiseFreshener";
1
+ import { from } from "../../../vendor/p-lazy/p-lazy";
2
+ import { StaleDropper } from "../PromiseFreshener";
3
+ import type { UserVisibleErrorTracker } from "../UserVisibleErrorTracker";
3
4
 
4
5
  /*eslint @typescript-eslint/ban-types:off */
5
6
  type InputRecord = {};
@@ -200,7 +201,10 @@ export abstract class TwistyPropDerived<
200
201
  // cachedInputs:
201
202
  #parents: InputProps<InputTypes>;
202
203
 
203
- constructor(parents: InputProps<InputTypes>) {
204
+ constructor(
205
+ parents: InputProps<InputTypes>,
206
+ protected userVisibleErrorTracker?: UserVisibleErrorTracker,
207
+ ) {
204
208
  super();
205
209
  this.#parents = parents;
206
210
  for (const parent of Object.values(parents)) {
@@ -238,6 +242,7 @@ export abstract class TwistyPropDerived<
238
242
  };
239
243
  this.#cachedLatestGenerationCalculation = latestGenerationCalculation;
240
244
 
245
+ this.userVisibleErrorTracker?.reset();
241
246
  return latestGenerationCalculation.output;
242
247
  }
243
248
 
@@ -306,7 +311,8 @@ export class FreshListenerManager {
306
311
  let disconnected = false;
307
312
  const wrappedListener = (value: T) => {
308
313
  if (disconnected) {
309
- console.warn("Should be disconnected!");
314
+ // TODO
315
+ // console.warn("Should be disconnected!");
310
316
  return;
311
317
  }
312
318
  listener(value);
@@ -327,15 +333,17 @@ export class FreshListenerManager {
327
333
  let disconnected = false;
328
334
  const wrappedListener = async (_: any) => {
329
335
  if (disconnected) {
330
- console.warn("Should be disconnected!");
336
+ // TODO
337
+ // console.warn("Should be disconnected!");
331
338
  return;
332
339
  }
333
340
  // We rely on `TwistyProp` caching to give us the full set of latest
334
341
  // values efficiently.
335
- const values = (await Promise.all(
336
- props.map((prop) => prop.get() as Promise<U | V>),
337
- )) as [U, V];
338
- listener(values);
342
+ const promises = (props as TwistyPropParent<any>[]).map((prop) =>
343
+ prop.get(),
344
+ );
345
+ const values = await Promise.all(promises);
346
+ listener(values as any); // TODO: fix up types
339
347
  };
340
348
 
341
349
  for (const prop of props) {
@@ -1,13 +1,13 @@
1
- import type { Alg } from "../../alg";
2
- import { countMoves } from "../../notation";
3
- import { ClassListManager } from "../old/dom/element/ClassListManager";
1
+ import type { Alg } from "../../../alg";
2
+ import { countMoves } from "../../../notation";
3
+ import { ClassListManager } from "../../old/dom/element/ClassListManager";
4
4
  import {
5
5
  CSSSource,
6
6
  ManagedCustomElement,
7
- } from "../old/dom/element/ManagedCustomElement";
8
- import { customElementsShim } from "../old/dom/element/node-custom-element-shims";
9
- import type { TwistyPlayer } from "../views/TwistyPlayer";
10
- import type { AlgIssues } from "./depth-0/AlgProp";
7
+ } from "../../old/dom/element/ManagedCustomElement";
8
+ import { customElementsShim } from "../../old/dom/element/node-custom-element-shims";
9
+ import type { TwistyPlayer } from "../../views/TwistyPlayer";
10
+ import type { AlgIssues } from "./puzzle/state/AlgProp";
11
11
  import type { TwistyPropParent } from "./TwistyProp";
12
12
 
13
13
  export function splitFieldName(s: string): string {
@@ -1,5 +1,5 @@
1
- import type { HintFaceletStyle } from "../../old/dom/TwistyPlayerConfig";
2
- import { SimpleTwistyPropSource } from "../TwistyProp";
1
+ import type { HintFaceletStyle } from "../../../../old/dom/TwistyPlayerConfig";
2
+ import { SimpleTwistyPropSource } from "../../TwistyProp";
3
3
 
4
4
  export type HintFaceletStyleWithAuto = HintFaceletStyle | "auto";
5
5
 
@@ -1,6 +1,6 @@
1
1
  import type { Texture, TextureLoader } from "three";
2
- import { THREEJS } from "../../heavy-code-imports/3d";
3
- import { TwistyPropDerived } from "../TwistyProp";
2
+ import { THREEJS } from "../../../../heavy-code-imports/3d";
3
+ import { TwistyPropDerived } from "../../TwistyProp";
4
4
 
5
5
  let cachedLoader: TextureLoader | null = null;
6
6
  async function loader(): Promise<TextureLoader> {
@@ -1,5 +1,5 @@
1
- import type { ExperimentalStickering } from "../../../twisty";
2
- import { SimpleTwistyPropSource } from "../TwistyProp";
1
+ import type { ExperimentalStickering } from "../../../..";
2
+ import { SimpleTwistyPropSource } from "../../TwistyProp";
3
3
 
4
4
  export class StickeringProp extends SimpleTwistyPropSource<ExperimentalStickering> {
5
5
  getDefaultValue(): ExperimentalStickering {
@@ -1,6 +1,6 @@
1
- import { Alg } from "../../../alg";
2
- import { arrayEquals } from "../helpers";
3
- import { TwistyPropSource } from "../TwistyProp";
1
+ import { Alg } from "../../../../../alg";
2
+ import { arrayEquals } from "../../../helpers";
3
+ import { TwistyPropSource } from "../../TwistyProp";
4
4
 
5
5
  export class AlgIssues {
6
6
  // TODO: (string | Error)[]
@@ -1,9 +1,9 @@
1
- import type { Alg } from "../../../alg";
2
- import type { KPuzzleDefinition, Transformation } from "../../../kpuzzle";
3
- import { KPuzzleWrapper } from "../../views/3D/puzzles/KPuzzleWrapper";
4
- import { TreeAlgIndexer } from "../../old/animation/indexer/tree/TreeAlgIndexer";
5
- import type { AlgWithIssues } from "../depth-0/AlgProp";
6
- import { TwistyPropDerived } from "../TwistyProp";
1
+ import type { Alg } from "../../../../../alg";
2
+ import type { KPuzzleDefinition, Transformation } from "../../../../../kpuzzle";
3
+ import { KPuzzleWrapper } from "../../../../views/3D/puzzles/KPuzzleWrapper";
4
+ import { TreeAlgIndexer } from "../../../../old/animation/indexer/tree/TreeAlgIndexer";
5
+ import type { AlgWithIssues } from "./AlgProp";
6
+ import { TwistyPropDerived } from "../../TwistyProp";
7
7
 
8
8
  type AlgTransformationPropInputs = {
9
9
  alg: AlgWithIssues;
@@ -3,10 +3,10 @@ import {
3
3
  invertTransformation,
4
4
  KPuzzleDefinition,
5
5
  Transformation,
6
- } from "../../../kpuzzle";
7
- import type { AlgIndexer } from "../../old/animation/indexer/AlgIndexer";
8
- import type { SetupToLocation } from "../../old/dom/TwistyPlayerConfig";
9
- import { TwistyPropDerived } from "../TwistyProp";
6
+ } from "../../../../../kpuzzle";
7
+ import type { AlgIndexer } from "../../../../old/animation/indexer/AlgIndexer";
8
+ import type { SetupToLocation } from "../../../../old/dom/TwistyPlayerConfig";
9
+ import { TwistyPropDerived } from "../../TwistyProp";
10
10
 
11
11
  interface AnchoredStartPropInputs {
12
12
  setupAnchor: SetupToLocation;
@@ -0,0 +1,17 @@
1
+ import type { Move } from "../../../../../alg";
2
+ import { SimpleTwistyPropSource } from "../../TwistyProp";
3
+
4
+ export interface CatchUpMove {
5
+ move: Move | null;
6
+ amount: number;
7
+ }
8
+
9
+ export class CatchUpMoveProp extends SimpleTwistyPropSource<CatchUpMove> {
10
+ getDefaultValue(): CatchUpMove {
11
+ return { move: null, amount: 0 };
12
+ }
13
+
14
+ canReuseValue(v1: CatchUpMove, v2: CatchUpMove) {
15
+ return v1.move === v2.move && v1.amount === v2.amount;
16
+ }
17
+ }
@@ -1,15 +1,17 @@
1
- import { Move } from "../../../alg";
2
- import { Direction } from "../../old/animation/cursor/CursorTypes";
1
+ import { Move } from "../../../../../alg";
2
+ import { Direction } from "../../../../old/animation/cursor/CursorTypes";
3
3
  import type {
4
4
  AlgIndexer,
5
5
  CurrentMoveInfo,
6
- } from "../../old/animation/indexer/AlgIndexer";
7
- import type { DetailedTimelineInfo } from "../depth-7/DetailedTimelineInfoProp";
8
- import { TwistyPropDerived } from "../TwistyProp";
6
+ } from "../../../../old/animation/indexer/AlgIndexer";
7
+ import type { DetailedTimelineInfo } from "../../timeline/DetailedTimelineInfoProp";
8
+ import { TwistyPropDerived } from "../../TwistyProp";
9
+ import type { CatchUpMove } from "./CatchUpMoveProp";
9
10
 
10
11
  interface PositionPropInputs {
11
12
  indexer: AlgIndexer<any>;
12
13
  detailedTimelineInfo: DetailedTimelineInfo;
14
+ catchUpMove: CatchUpMove;
13
15
  }
14
16
 
15
17
  // TODO: Rename "current" (implies a single one) to "active"?
@@ -18,10 +20,26 @@ export class CurrentLeavesProp extends TwistyPropDerived<
18
20
  CurrentMoveInfo
19
21
  > {
20
22
  derive(inputs: PositionPropInputs): CurrentMoveInfo {
23
+ function addCatchUpMove(currentMoveInfo: CurrentMoveInfo): CurrentMoveInfo {
24
+ if (
25
+ inputs.detailedTimelineInfo.atEnd &&
26
+ inputs.catchUpMove.move !== null
27
+ ) {
28
+ currentMoveInfo.currentMoves.push({
29
+ move: inputs.catchUpMove.move,
30
+ direction: Direction.Backwards,
31
+ fraction: 1 - inputs.catchUpMove.amount,
32
+ startTimestamp: -1, // TODO
33
+ endTimestamp: -1, // TODO
34
+ });
35
+ }
36
+ return currentMoveInfo;
37
+ }
38
+
21
39
  // Copied from AlgCursor
22
40
  if (inputs.indexer.currentMoveInfo) {
23
- return inputs.indexer.currentMoveInfo(
24
- inputs.detailedTimelineInfo.timestamp,
41
+ return addCatchUpMove(
42
+ inputs.indexer.currentMoveInfo(inputs.detailedTimelineInfo.timestamp),
25
43
  );
26
44
  } else {
27
45
  const idx = inputs.indexer.timestampToIndex(
@@ -40,7 +58,7 @@ export class CurrentLeavesProp extends TwistyPropDerived<
40
58
  if (inputs.indexer.numAnimatedLeaves() > 0) {
41
59
  const move = inputs.indexer.getAnimLeaf(idx)?.as(Move);
42
60
  if (!move) {
43
- return currentMoveInfo;
61
+ return addCatchUpMove(currentMoveInfo);
44
62
  }
45
63
  const start = inputs.indexer.indexToMoveStartTimestamp(idx);
46
64
  const duration = inputs.indexer.moveDuration(idx);
@@ -85,7 +103,7 @@ export class CurrentLeavesProp extends TwistyPropDerived<
85
103
  // }
86
104
  // }
87
105
  }
88
- return currentMoveInfo;
106
+ return addCatchUpMove(currentMoveInfo);
89
107
  }
90
108
  }
91
109
  }
@@ -1,7 +1,7 @@
1
- import type { Move } from "../../../alg";
2
- import type { CurrentMoveInfo } from "../../old/animation/indexer/AlgIndexer";
3
- import { arrayEqualsCompare } from "../helpers";
4
- import { TwistyPropDerived } from "../TwistyProp";
1
+ import type { Move } from "../../../../../alg";
2
+ import type { CurrentMoveInfo } from "../../../../old/animation/indexer/AlgIndexer";
3
+ import { arrayEqualsCompare } from "../../../helpers";
4
+ import { TwistyPropDerived } from "../../TwistyProp";
5
5
 
6
6
  interface CurrentLeavesSimplifiedPropInputs {
7
7
  currentMoveInfo: CurrentMoveInfo;
@@ -1,12 +1,12 @@
1
- import { KSolvePuzzle } from "../..";
1
+ import { KSolvePuzzle } from "../../../..";
2
2
  import {
3
3
  combineTransformations,
4
4
  KPuzzleDefinition,
5
5
  Transformation,
6
- } from "../../../kpuzzle";
7
- import type { AlgIndexer } from "../../old/animation/indexer/AlgIndexer";
8
- import type { CurrentLeavesSimplified } from "../depth-9/CurrentLeavesSimplified";
9
- import { TwistyPropDerived } from "../TwistyProp";
6
+ } from "../../../../../kpuzzle";
7
+ import type { AlgIndexer } from "../../../../old/animation/indexer/AlgIndexer";
8
+ import type { CurrentLeavesSimplified } from "./CurrentLeavesSimplified";
9
+ import { TwistyPropDerived } from "../../TwistyProp";
10
10
 
11
11
  interface CurrentTransformationPropInputs {
12
12
  anchoredStart: Transformation;
@@ -1,13 +1,13 @@
1
- import { countMoves } from "../../../notation";
2
- import type { IndexerConstructor } from "../../old/animation/cursor/AlgCursor";
3
- import { SimpleAlgIndexer } from "../../old/animation/indexer/SimpleAlgIndexer";
4
- import { SimultaneousMoveIndexerV2 } from "../../old/animation/indexer/simultaneous-moves/SimultaneousMoveIndexerV2";
5
- import { TreeAlgIndexer } from "../../old/animation/indexer/tree/TreeAlgIndexer";
6
- import type { PuzzleID } from "../../old/dom/TwistyPlayerConfig";
7
- import type { AlgWithIssues } from "../depth-0/AlgProp";
8
- import type { IndexerStrategyName } from "../depth-0/IndexerConstructorRequestProp";
9
- import type { VisualizationStrategy } from "../depth-3/VisualizationStrategyProp";
10
- import { TwistyPropDerived } from "../TwistyProp";
1
+ import { countMoves } from "../../../../../notation";
2
+ import type { IndexerConstructor } from "../../../../old/animation/cursor/AlgCursor";
3
+ import { SimpleAlgIndexer } from "../../../../old/animation/indexer/SimpleAlgIndexer";
4
+ import { SimultaneousMoveIndexerV2 } from "../../../../old/animation/indexer/simultaneous-moves/SimultaneousMoveIndexerV2";
5
+ import { TreeAlgIndexer } from "../../../../old/animation/indexer/tree/TreeAlgIndexer";
6
+ import type { PuzzleID } from "../../../../old/dom/TwistyPlayerConfig";
7
+ import type { AlgWithIssues } from "./AlgProp";
8
+ import type { IndexerStrategyName } from "./IndexerConstructorRequestProp";
9
+ import type { VisualizationStrategy } from "../../viewer/VisualizationStrategyProp";
10
+ import { TwistyPropDerived } from "../../TwistyProp";
11
11
 
12
12
  interface IndexerConstructorPropInputs {
13
13
  puzzle: PuzzleID;
@@ -1,4 +1,4 @@
1
- import { SimpleTwistyPropSource } from "../TwistyProp";
1
+ import { SimpleTwistyPropSource } from "../../TwistyProp";
2
2
 
3
3
  export const indexerStrategyNames = {
4
4
  auto: true,
@@ -1,9 +1,9 @@
1
- import type { KPuzzleDefinition } from "../../../kpuzzle";
2
- import { KPuzzleWrapper } from "../../views/3D/puzzles/KPuzzleWrapper";
3
- import type { IndexerConstructor } from "../../old/animation/cursor/AlgCursor";
4
- import type { AlgIndexer } from "../../old/animation/indexer/AlgIndexer";
5
- import type { AlgWithIssues } from "../depth-0/AlgProp";
6
- import { TwistyPropDerived } from "../TwistyProp";
1
+ import type { KPuzzleDefinition } from "../../../../../kpuzzle";
2
+ import { KPuzzleWrapper } from "../../../../views/3D/puzzles/KPuzzleWrapper";
3
+ import type { IndexerConstructor } from "../../../../old/animation/cursor/AlgCursor";
4
+ import type { AlgIndexer } from "../../../../old/animation/indexer/AlgIndexer";
5
+ import type { AlgWithIssues } from "./AlgProp";
6
+ import { TwistyPropDerived } from "../../TwistyProp";
7
7
 
8
8
  type IndexerPropInputs = {
9
9
  indexerConstructor: IndexerConstructor;
@@ -1,7 +1,7 @@
1
- import type { Transformation } from "../../../kpuzzle";
2
- import type { PuzzlePosition } from "../../old/animation/cursor/CursorTypes";
3
- import type { CurrentMoveInfo } from "../../old/animation/indexer/AlgIndexer";
4
- import { TwistyPropDerived } from "../TwistyProp";
1
+ import type { Transformation } from "../../../../../kpuzzle";
2
+ import type { PuzzlePosition } from "../../../../old/animation/cursor/CursorTypes";
3
+ import type { CurrentMoveInfo } from "../../../../old/animation/indexer/AlgIndexer";
4
+ import { TwistyPropDerived } from "../../TwistyProp";
5
5
 
6
6
  export interface LegacyPositionPropInputs {
7
7
  currentMoveInfo: CurrentMoveInfo;