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
@@ -1,7 +1,7 @@
1
- import { Alg } from "../../../alg";
2
- import { KPuzzle, KPuzzleDefinition } from "../../../kpuzzle";
3
- import { AlgIssues, AlgWithIssues } from "../depth-0/AlgProp";
4
- import { TwistyPropDerived } from "../TwistyProp";
1
+ import { Alg } from "../../../../../alg";
2
+ import { KPuzzle, KPuzzleDefinition } from "../../../../../kpuzzle";
3
+ import { AlgIssues, AlgWithIssues } from "./AlgProp";
4
+ import { TwistyPropDerived } from "../../TwistyProp";
5
5
 
6
6
  export class PuzzleAlgProp extends TwistyPropDerived<
7
7
  { algWithIssues: AlgWithIssues; puzzleDef: KPuzzleDefinition },
@@ -1,5 +1,5 @@
1
- import type { SetupToLocation } from "../../old/dom/TwistyPlayerConfig";
2
- import { SimpleTwistyPropSource } from "../TwistyProp";
1
+ import type { SetupToLocation } from "../../../../old/dom/TwistyPlayerConfig";
2
+ import { SimpleTwistyPropSource } from "../../TwistyProp";
3
3
 
4
4
  export class SetupAnchorProp extends SimpleTwistyPropSource<SetupToLocation> {
5
5
  getDefaultValue(): SetupToLocation {
@@ -1,6 +1,6 @@
1
- import type { KPuzzleDefinition } from "../../../kpuzzle";
2
- import type { PuzzleLoader } from "../../../puzzles";
3
- import { TwistyPropDerived } from "../TwistyProp";
1
+ import type { KPuzzleDefinition } from "../../../../../kpuzzle";
2
+ import type { PuzzleLoader } from "../../../../../puzzles";
3
+ import { TwistyPropDerived } from "../../TwistyProp";
4
4
 
5
5
  export class PuzzleDefProp extends TwistyPropDerived<
6
6
  { puzzleLoader: PuzzleLoader },
@@ -1,5 +1,9 @@
1
- import type { PuzzleDescriptionString } from "../../../puzzle-geometry/PGPuzzles";
2
- import { NoValueType, NO_VALUE, SimpleTwistyPropSource } from "../TwistyProp";
1
+ import type { PuzzleDescriptionString } from "../../../../../puzzle-geometry/PGPuzzles";
2
+ import {
3
+ NoValueType,
4
+ NO_VALUE,
5
+ SimpleTwistyPropSource,
6
+ } from "../../TwistyProp";
3
7
 
4
8
  export class PGPuzzleDescriptionStringProp extends SimpleTwistyPropSource<
5
9
  PuzzleDescriptionString | NoValueType
@@ -1,6 +1,6 @@
1
- import type { PuzzleLoader } from "../../../puzzles";
2
- import type { PuzzleID } from "../../old/dom/TwistyPlayerConfig";
3
- import { TwistyPropDerived } from "../TwistyProp";
1
+ import type { PuzzleLoader } from "../../../../../puzzles";
2
+ import type { PuzzleID } from "../../../../old/dom/TwistyPlayerConfig";
3
+ import { TwistyPropDerived } from "../../TwistyProp";
4
4
 
5
5
  export class PuzzleIDProp extends TwistyPropDerived<
6
6
  { puzzleLoader: PuzzleLoader },
@@ -1,5 +1,9 @@
1
- import type { PuzzleID } from "../../old/dom/TwistyPlayerConfig";
2
- import { NoValueType, NO_VALUE, SimpleTwistyPropSource } from "../TwistyProp";
1
+ import type { PuzzleID } from "../../../../old/dom/TwistyPlayerConfig";
2
+ import {
3
+ NoValueType,
4
+ NO_VALUE,
5
+ SimpleTwistyPropSource,
6
+ } from "../../TwistyProp";
3
7
 
4
8
  // TODO: Ideally we'd use `null` to mean "no value", but `null` has a special meaning
5
9
  // for `TwistyProp` and might mess with caching.
@@ -1,12 +1,12 @@
1
- import type { PuzzleDescriptionString } from "../../../puzzle-geometry/PGPuzzles";
1
+ import type { PuzzleDescriptionString } from "../../../../../puzzle-geometry/PGPuzzles";
2
2
  import {
3
3
  cube3x3x3,
4
4
  experimentalCustomPGPuzzleLoader,
5
5
  PuzzleLoader,
6
6
  puzzles,
7
- } from "../../../puzzles";
8
- import type { PuzzleID } from "../../old/dom/TwistyPlayerConfig";
9
- import { NoValueType, NO_VALUE, TwistyPropDerived } from "../TwistyProp";
7
+ } from "../../../../../puzzles";
8
+ import type { PuzzleID } from "../../../../old/dom/TwistyPlayerConfig";
9
+ import { NoValueType, NO_VALUE, TwistyPropDerived } from "../../TwistyProp";
10
10
  8;
11
11
  interface PuzzleLoaderPropInputs {
12
12
  puzzleIDRequest: PuzzleID | NoValueType;
@@ -19,7 +19,13 @@ export class PuzzleLoaderProp extends TwistyPropDerived<
19
19
  > {
20
20
  derive(inputs: PuzzleLoaderPropInputs): PuzzleLoader {
21
21
  if (inputs.puzzleIDRequest && inputs.puzzleIDRequest !== NO_VALUE) {
22
- return puzzles[inputs.puzzleIDRequest];
22
+ const puzzleLoader = puzzles[inputs.puzzleIDRequest];
23
+ if (!puzzleLoader) {
24
+ this.userVisibleErrorTracker!.set({
25
+ errors: [`Invalid puzzle ID: ${inputs.puzzleIDRequest}`],
26
+ });
27
+ }
28
+ return puzzleLoader;
23
29
  }
24
30
  if (
25
31
  inputs.puzzleDescriptionRequest &&
@@ -1,6 +1,6 @@
1
- import type { ButtonCommand } from "../../views/control-panel/TwistyButtonsV2";
2
- import type { PlayingInfo } from "../depth-0/PlayingInfoProp";
3
- import type { DetailedTimelineInfo } from "../depth-7/DetailedTimelineInfoProp";
1
+ import type { ButtonCommand } from "../../../views/control-panel/TwistyButtonsV2";
2
+ import type { PlayingInfo } from "./PlayingInfoProp";
3
+ import type { DetailedTimelineInfo } from "./DetailedTimelineInfoProp";
4
4
  import { TwistyPropDerived } from "../TwistyProp";
5
5
 
6
6
  interface ButtonAppearance {
@@ -1,7 +1,7 @@
1
- import type { TimeRange } from "../../old/animation/cursor/AlgCursor";
2
- import type { MillisecondTimestamp } from "../../old/animation/cursor/CursorTypes";
3
- import type { SetupToLocation } from "../../old/dom/TwistyPlayerConfig";
4
- import type { TimestampRequest } from "../depth-0/TimestampRequestProp";
1
+ import type { TimeRange } from "../../../old/animation/cursor/AlgCursor";
2
+ import type { MillisecondTimestamp } from "../../../old/animation/cursor/CursorTypes";
3
+ import type { SetupToLocation } from "../../../old/dom/TwistyPlayerConfig";
4
+ import type { TimestampRequest } from "./TimestampRequestProp";
5
5
  import { TwistyPropDerived } from "../TwistyProp";
6
6
 
7
7
  interface DetailedTimelineInfoInputs {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  BoundaryType,
3
3
  Direction,
4
- } from "../../old/animation/cursor/CursorTypes";
4
+ } from "../../../old/animation/cursor/CursorTypes";
5
5
  import { TwistyPropSource } from "../TwistyProp";
6
6
 
7
7
  export type SimpleDirection = Direction.Forwards | Direction.Backwards;
@@ -1,4 +1,4 @@
1
- import type { MillisecondTimestamp } from "../../old/animation/cursor/CursorTypes";
1
+ import type { MillisecondTimestamp } from "../../../old/animation/cursor/CursorTypes";
2
2
  import { SimpleTwistyPropSource } from "../TwistyProp";
3
3
 
4
4
  const smartTimestamps = {
@@ -1,4 +1,4 @@
1
- import type { BackViewLayout } from "../../old/dom/viewers/TwistyViewerWrapper";
1
+ import type { BackViewLayout } from "../../../old/dom/viewers/TwistyViewerWrapper";
2
2
  import { SimpleTwistyPropSource } from "../TwistyProp";
3
3
 
4
4
  export type BackViewLayoutWithAuto = BackViewLayout | "auto";
@@ -1,4 +1,4 @@
1
- import type { BackgroundTheme } from "../../old/dom/TwistyPlayerConfig";
1
+ import type { BackgroundTheme } from "../../../old/dom/TwistyPlayerConfig";
2
2
  import { SimpleTwistyPropSource } from "../TwistyProp";
3
3
 
4
4
  export type BackgroundThemeWithAuto = BackgroundTheme | "auto";
@@ -1,7 +1,7 @@
1
- import type { ButtonCommand } from "../../views/control-panel/TwistyButtonsV2";
2
- import { fullscreenEnabled } from "../../views/control-panel/webkit-fullscreen";
3
- import type { ViewerLinkPageWithAuto } from "../depth-0/ViewerLinkProp";
4
- import type { CoarseTimelineInfo as CoarseTimelineInfo } from "../depth-8/CoarseTimelineInfoProp";
1
+ import type { ButtonCommand } from "../../../views/control-panel/TwistyButtonsV2";
2
+ import { fullscreenEnabled } from "../../../views/control-panel/webkit-fullscreen";
3
+ import type { ViewerLinkPageWithAuto } from "./ViewerLinkProp";
4
+ import type { CoarseTimelineInfo as CoarseTimelineInfo } from "../timeline/CoarseTimelineInfoProp";
5
5
  import { TwistyPropDerived } from "../TwistyProp";
6
6
 
7
7
  export const buttonIcons = [
@@ -1,4 +1,4 @@
1
- import type { ControlsLocation } from "../../old/dom/TwistyPlayerConfig";
1
+ import type { ControlsLocation } from "../../../old/dom/TwistyPlayerConfig";
2
2
  import { SimpleTwistyPropSource } from "../TwistyProp";
3
3
 
4
4
  export type ControlPanelThemeWithAuto = ControlsLocation | "auto";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  defaultCameraOrbitCoordinates,
3
3
  PuzzleID,
4
- } from "../../old/dom/TwistyPlayerConfig";
4
+ } from "../../../old/dom/TwistyPlayerConfig";
5
5
  import {
6
6
  CoordinateDegrees,
7
7
  orbitCoordinatesEqual,
8
8
  OrbitCoordinatesRequest,
9
9
  OrbitCoordinatesV2,
10
- } from "../depth-0/OrbitCoordinatesRequestProp";
10
+ } from "./OrbitCoordinatesRequestProp";
11
11
  import { TwistyPropDerived } from "../TwistyProp";
12
- import type { VisualizationStrategy } from "../depth-3/VisualizationStrategyProp";
12
+ import type { VisualizationStrategy } from "./VisualizationStrategyProp";
13
13
 
14
14
  interface OrbitCoordinatesPropInputs {
15
15
  orbitCoordinatesRequest: OrbitCoordinatesRequest;
@@ -1,4 +1,4 @@
1
- import { mod } from "../helpers";
1
+ import { mod } from "../../helpers";
2
2
  import { TwistyPropSource } from "../TwistyProp";
3
3
 
4
4
  export type CoordinateDegrees = number;
@@ -1,5 +1,5 @@
1
- import type { TimeRange } from "../../old/animation/cursor/AlgCursor";
2
- import type { AlgIndexer } from "../../old/animation/indexer/AlgIndexer";
1
+ import type { TimeRange } from "../../../old/animation/cursor/AlgCursor";
2
+ import type { AlgIndexer } from "../../../old/animation/indexer/AlgIndexer";
3
3
  import { TwistyPropDerived } from "../TwistyProp";
4
4
 
5
5
  export class TimeRangeProp extends TwistyPropDerived<
@@ -1,4 +1,4 @@
1
- import type { ViewerLinkPage } from "../../old/dom/TwistyPlayerConfig";
1
+ import type { ViewerLinkPage } from "../../../old/dom/TwistyPlayerConfig";
2
2
  import { SimpleTwistyPropSource } from "../TwistyProp";
3
3
 
4
4
  export type ViewerLinkPageWithAuto = ViewerLinkPage | "auto";
@@ -1,4 +1,4 @@
1
- import type { VisualizationFormat } from "../../old/dom/TwistyPlayerConfig";
1
+ import type { VisualizationFormat } from "../../../old/dom/TwistyPlayerConfig";
2
2
  import { SimpleTwistyPropSource } from "../TwistyProp";
3
3
 
4
4
  export type VisualizationFormatWithAuto = VisualizationFormat | "auto";
@@ -1,5 +1,5 @@
1
- import type { PuzzleID } from "../../old/dom/TwistyPlayerConfig";
2
- import type { VisualizationFormatWithAuto } from "../depth-0/VisualizationProp";
1
+ import type { PuzzleID } from "../../../old/dom/TwistyPlayerConfig";
2
+ import type { VisualizationFormatWithAuto } from "./VisualizationProp";
3
3
  import { TwistyPropDerived } from "../TwistyProp";
4
4
 
5
5
  type VisualizationStrategyPropInputs = {
@@ -41,6 +41,7 @@ export function currentMoveArrayEquals(
41
41
 
42
42
  export interface CurrentMoveInfo {
43
43
  stateIndex: number;
44
+ // Note: some moves may not be part of the alg!
44
45
  currentMoves: CurrentMove[];
45
46
  // Moves that are reaching a fraction of 1 at this exact timestamp.
46
47
  movesFinishing: CurrentMove[];
@@ -47,4 +47,24 @@ twisty-scrubber {
47
47
  width: 100%;
48
48
  height: 100%;
49
49
  }
50
+
51
+ .error-elem {
52
+ width: 100%;
53
+ height: 100%;
54
+ display: none;
55
+ place-content: center;
56
+ font-family: sans-serif;
57
+ box-shadow: inset 0 0 2em rgb(255, 0, 0);
58
+ color: red;
59
+ text-shadow: 0 0 0.2em white;
60
+ background: rgba(255, 255, 255, 0.25);
61
+ }
62
+
63
+ .wrapper.error .visualization-wrapper {
64
+ display: none;
65
+ }
66
+
67
+ .wrapper.error .error-elem {
68
+ display: grid;
69
+ }
50
70
  `);
@@ -1,6 +1,6 @@
1
1
  import { Vector3 } from "three";
2
2
  import type { Alg } from "../../../alg";
3
- import type { VisualizationStrategy } from "../../model/depth-3/VisualizationStrategyProp";
3
+ import type { VisualizationStrategy } from "../../model/props/viewer/VisualizationStrategyProp";
4
4
  import { DEGREES_PER_RADIAN } from "../../views/3D/TAU";
5
5
  import {
6
6
  AlgAttribute,
@@ -151,6 +151,7 @@ export const experimentalStickerings = {
151
151
  "experimental-fto-sc": true,
152
152
  "experimental-fto-l2c": true,
153
153
  "experimental-fto-lbt": true,
154
+ "experimental-fto-l3t": true,
154
155
  "experimental-global-custom-1": true,
155
156
  "experimental-global-custom-2": true,
156
157
  };
@@ -7,7 +7,7 @@ import { twisty3DCanvasCSS } from "./Twisty3DCanvas.css";
7
7
  import { OrbitCoordinates, TwistyOrbitControls } from "./TwistyOrbitControls";
8
8
  import type { TwistyViewerElement } from "./TwistyViewerElement";
9
9
  import { customElementsShim } from "../element/node-custom-element-shims";
10
- import { Stats } from "../../../../vendor/three/examples/jsm/libs/stats.module";
10
+ import { Stats } from "../../../../vendor/three/examples/jsm/libs/stats.modified.module";
11
11
  import type { CameraLatitudeLimits } from "../TwistyPlayerConfig";
12
12
 
13
13
  let SHOW_STATS = false;
@@ -15,14 +15,7 @@ let SHOW_STATS = false;
15
15
  export function experimentalShowRenderStats(show: boolean): void {
16
16
  SHOW_STATS = show;
17
17
  }
18
- let shareAllNewRenderers: boolean = false;
19
-
20
- // WARNING: The current shared renderer implementation is not every efficient.
21
- // Avoid using for players that are likely to have dimensions approaching 1 megapixel or higher.
22
- // TODO: use a dedicated renderer while fullscreen?
23
- export function experimentalSetShareAllNewRenderers(share: boolean): void {
24
- shareAllNewRenderers = share;
25
- }
18
+ const shareAllNewRenderers: boolean = false;
26
19
 
27
20
  let sharedRenderer: WebGLRenderer | null = null;
28
21
 
@@ -72,7 +65,7 @@ export class Twisty3DCanvas
72
65
  this.scene = scene!;
73
66
  this.scene?.addRenderTarget(this); // TODO
74
67
  if (SHOW_STATS) {
75
- this.stats = Stats();
68
+ this.stats = new Stats();
76
69
  this.stats.dom.style.position = "absolute";
77
70
  this.addElement(this.stats.dom);
78
71
  }
@@ -15,7 +15,7 @@ import { RenderScheduler } from "../../old/animation/RenderScheduler";
15
15
  import { ManagedCustomElement } from "../../old/dom/element/ManagedCustomElement";
16
16
  import { customElementsShim } from "../../old/dom/element/node-custom-element-shims";
17
17
  import type { TwistyPlayerModel } from "../../model/TwistyPlayerModel";
18
- import { FreshListenerManager } from "../../model/TwistyProp";
18
+ import { FreshListenerManager } from "../../model/props/TwistyProp";
19
19
  import type {
20
20
  ExperimentalStickering,
21
21
  PuzzleID,
@@ -101,7 +101,7 @@ export class Twisty2DPuzzle
101
101
  }
102
102
  } catch (e) {
103
103
  console.warn(
104
- "Bad position. Pre-emptively disconnecting:",
104
+ "Bad position (this doesn't necessarily mean something is wrong). Pre-emptively disconnecting:",
105
105
  this.puzzleLoader?.id,
106
106
  e,
107
107
  );
@@ -1,7 +1,7 @@
1
1
  import type { PuzzleLoader } from "../../../puzzles";
2
2
  import type { ExperimentalStickering } from "../../../twisty";
3
3
  import type { TwistyPlayerModel } from "../../model/TwistyPlayerModel";
4
- import { FreshListenerManager } from "../../model/TwistyProp";
4
+ import { FreshListenerManager } from "../../model/props/TwistyProp";
5
5
  import type { Schedulable } from "../../old/animation/RenderScheduler";
6
6
  import { Twisty2DPuzzle } from "./Twisty2DPuzzle";
7
7
 
@@ -2,7 +2,7 @@ import type { Scene as ThreeScene } from "three";
2
2
  import type { PuzzleLoader } from "../../../puzzles";
3
3
  import { THREEJS } from "../../heavy-code-imports/3d";
4
4
  import type { TwistyPlayerModel } from "../../model/TwistyPlayerModel";
5
- import { FreshListenerManager } from "../../model/TwistyProp";
5
+ import { FreshListenerManager } from "../../model/props/TwistyProp";
6
6
  import type { Schedulable } from "../../old/animation/RenderScheduler";
7
7
  import { ManagedCustomElement } from "../../old/dom/element/ManagedCustomElement";
8
8
  import { customElementsShim } from "../../old/dom/element/node-custom-element-shims";
@@ -0,0 +1,53 @@
1
+ // TODO: https://stackoverflow.com/a/40443642
2
+
3
+ // let shareAllNewRenderers: boolean = false;
4
+
5
+ // // WARNING: The current shared renderer implementation is not every efficient.
6
+ // // Avoid using for players that are likely to have dimensions approaching 1 megapixel or higher.
7
+ // // TODO: use a dedicated renderer while fullscreen?
8
+ // export function experimentalSetShareAllNewRenderers(share: boolean): void {
9
+ // shareAllNewRenderers = share;
10
+ // }
11
+
12
+ // const sharedRenderer: WebGLRenderer | null = null;
13
+
14
+ import { THREEJS } from "../../heavy-code-imports/3d";
15
+ import type { Camera, Scene, WebGLRenderer } from "three";
16
+ import { pixelRatio } from "../../old/dom/viewers/canvas";
17
+
18
+ const renderers: Promise<WebGLRenderer>[] = [];
19
+
20
+ // let haveSet = false;
21
+ export async function renderPooled(
22
+ width: number,
23
+ height: number,
24
+ canvas: HTMLCanvasElement,
25
+ scene: Scene,
26
+ camera: Camera,
27
+ ): Promise<void> {
28
+ if (width === 0 || height === 0) {
29
+ return;
30
+ }
31
+ // At most one in the pool for now.
32
+ if (renderers.length === 0) {
33
+ renderers.push(newRenderer());
34
+ }
35
+ const renderer = await renderers[0];
36
+ // TODO: scissoring
37
+ renderer.setSize(width, height); // TODO: is it faster if we cache values and only call this when necessary?
38
+ renderer.render(scene, camera);
39
+
40
+ const context = canvas.getContext("2d")!;
41
+ context.clearRect(0, 0, canvas.width, canvas.height);
42
+ context.drawImage(renderer.domElement, 0, 0);
43
+ }
44
+
45
+ export async function newRenderer(): Promise<WebGLRenderer> {
46
+ const rendererConstructor = (await THREEJS).WebGLRenderer;
47
+ const renderer = new rendererConstructor({
48
+ antialias: true,
49
+ alpha: true,
50
+ });
51
+ renderer.setPixelRatio(pixelRatio());
52
+ return renderer;
53
+ }
@@ -3,10 +3,10 @@ import { experimentalCubeAppearance, PuzzleLoader } from "../../../puzzles";
3
3
  import type { ExperimentalStickering } from "../../../twisty";
4
4
  import { proxy3D } from "../../heavy-code-imports/3d";
5
5
  import type { Cube3D, PG3D } from "../../heavy-code-imports/dynamic-entries/3d";
6
- import type { HintFaceletStyleWithAuto } from "../../model/depth-0/HintFaceletProp";
7
- import type { VisualizationStrategy } from "../../model/depth-3/VisualizationStrategyProp";
6
+ import type { HintFaceletStyleWithAuto } from "../../model/props/puzzle/display/HintFaceletProp";
7
+ import type { VisualizationStrategy } from "../../model/props/viewer/VisualizationStrategyProp";
8
8
  import type { TwistyPlayerModel } from "../../model/TwistyPlayerModel";
9
- import { FreshListenerManager } from "../../model/TwistyProp";
9
+ import { FreshListenerManager } from "../../model/props/TwistyProp";
10
10
  import type { PuzzlePosition } from "../../old/animation/cursor/CursorTypes";
11
11
  import type { Schedulable } from "../../old/animation/RenderScheduler";
12
12
  import type { Twisty3DPuzzle } from "./puzzles/Twisty3DPuzzle";
@@ -38,11 +38,12 @@ export class Twisty3DPuzzleWrapper implements Schedulable {
38
38
  (await this.twisty3DPuzzle()).onPositionChange(position);
39
39
  this.scheduleRender();
40
40
  } catch (e) {
41
- console.warn(
42
- "Bad position. Pre-emptively disconnecting:",
43
- this.puzzleLoader.id,
44
- e,
45
- );
41
+ // TODO
42
+ // console.warn(
43
+ // "Bad position (this doesn't necessarily mean something is wrong). Pre-emptively disconnecting:",
44
+ // this.puzzleLoader.id,
45
+ // e,
46
+ // );
46
47
  this.disconnect();
47
48
  }
48
49
  },
@@ -1,11 +1,11 @@
1
1
  import type { Scene as ThreeScene } from "three";
2
2
  import type { PuzzleLoader } from "../../../puzzles";
3
3
  import { THREEJS } from "../../heavy-code-imports/3d";
4
- import type { BackViewLayoutWithAuto } from "../../model/depth-0/BackViewProp";
5
- import type { VisualizationStrategy } from "../../model/depth-3/VisualizationStrategyProp";
4
+ import type { BackViewLayoutWithAuto } from "../../model/props/viewer/BackViewProp";
5
+ import type { VisualizationStrategy } from "../../model/props/viewer/VisualizationStrategyProp";
6
6
  import { StaleDropper } from "../../model/PromiseFreshener";
7
7
  import type { TwistyPlayerModel } from "../../model/TwistyPlayerModel";
8
- import { FreshListenerManager } from "../../model/TwistyProp";
8
+ import { FreshListenerManager } from "../../model/props/TwistyProp";
9
9
  import type { Schedulable } from "../../old/animation/RenderScheduler";
10
10
  import { ClassListManager } from "../../old/dom/element/ClassListManager";
11
11
  import { ManagedCustomElement } from "../../old/dom/element/ManagedCustomElement";
@@ -97,6 +97,10 @@ export class Twisty3DSceneWrapper
97
97
  this.#currentTwisty3DPuzzleWrapper?.disconnect();
98
98
  }
99
99
 
100
+ experimentalVantages(): Iterable<Twisty3DVantage> {
101
+ return this.#vantages.values();
102
+ }
103
+
100
104
  scheduleRender(): void {
101
105
  for (const vantage of this.#vantages) {
102
106
  vantage.scheduleRender();