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.
- package/{src/cubing/search/inside/solve → dist}/.DS_Store +0 -0
- package/dist/bin/puzzle-geometry-bin.js +1 -1
- package/dist/bin/puzzle-geometry-bin.js.map +2 -2
- package/dist/bundle-global/cubing.bundle-global.js +876 -797
- package/dist/esm/{3d-TYWC5MQY.js → 3d-B25DP5PE.js} +3 -3
- package/dist/esm/{3d-TYWC5MQY.js.map → 3d-B25DP5PE.js.map} +0 -0
- package/dist/esm/bluetooth/index.js +1 -1
- package/dist/esm/bluetooth/index.js.map +1 -1
- package/dist/esm/{chunk-6BXLPCNQ.js → chunk-APIIMJG6.js} +98 -95
- package/dist/esm/chunk-APIIMJG6.js.map +7 -0
- package/dist/esm/{chunk-HUPF5GPN.js → chunk-CSVAFZSB.js} +3 -3
- package/dist/esm/{chunk-HUPF5GPN.js.map → chunk-CSVAFZSB.js.map} +0 -0
- package/dist/esm/{chunk-L6K5FKPV.js → chunk-MUQMBH2S.js} +48 -26
- package/dist/esm/{chunk-L6K5FKPV.js.map → chunk-MUQMBH2S.js.map} +2 -2
- package/dist/esm/puzzle-geometry/index.js +1 -1
- package/dist/esm/puzzle-geometry/index.js.map +2 -2
- package/dist/esm/puzzles/index.js +5 -5
- package/dist/esm/scramble/index.js +2 -2
- package/dist/esm/search/index.js +2 -2
- package/dist/esm/twisty/index.js +313 -78
- package/dist/esm/twisty/index.js.map +3 -3
- package/dist/esm/{worker-inside-generated-string-DOHINKQX.js → worker-inside-generated-string-KDZOUGJF.js} +20 -20
- package/dist/esm/worker-inside-generated-string-KDZOUGJF.js.map +7 -0
- package/{src/cubing/search/inside/solve/vendor/cstimer → dist/types}/.DS_Store +0 -0
- package/dist/types/bluetooth/smart-puzzle/bluetooth-puzzle.d.ts +1 -1
- package/dist/types/bluetooth/smart-puzzle/bluetooth-puzzle.d.ts.map +1 -1
- package/dist/types/cubing.bundle-global.d.ts +1 -24
- package/dist/types/cubing.bundle-global.d.ts.map +1 -1
- package/dist/types/puzzles/implementations/fto/index.d.ts +2 -2
- package/dist/types/puzzles/implementations/fto/index.d.ts.map +1 -1
- package/dist/types/puzzles/index.d.ts +5 -1
- package/dist/types/puzzles/index.d.ts.map +1 -1
- package/dist/types/puzzles/stickerings/fto-stickerings.d.ts.map +1 -1
- package/dist/types/search/inside/api.d.ts.map +1 -1
- package/dist/types/search/worker-inside-generated-string.d.ts +1 -1
- package/dist/types/search/worker-inside-generated-string.d.ts.map +1 -1
- package/dist/types/twisty/controllers/TwistyAnimationController.d.ts +4 -1
- package/dist/types/twisty/controllers/TwistyAnimationController.d.ts.map +1 -1
- package/dist/types/twisty/index.d.ts +3 -2
- package/dist/types/twisty/index.d.ts.map +1 -1
- package/dist/types/twisty/model/TwistyPlayerModel.d.ts +41 -37
- package/dist/types/twisty/model/TwistyPlayerModel.d.ts.map +1 -1
- package/dist/types/twisty/model/UserVisibleErrorTracker.d.ts +11 -0
- package/dist/types/twisty/model/UserVisibleErrorTracker.d.ts.map +1 -0
- package/dist/types/twisty/model/{TwistyProp.d.ts → props/TwistyProp.d.ts} +3 -1
- package/dist/types/twisty/model/props/TwistyProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{TwistyProp.spec.d.ts → props/TwistyProp.spec.d.ts} +0 -0
- package/dist/types/twisty/model/props/TwistyProp.spec.d.ts.map +1 -0
- package/dist/types/twisty/model/{TwistyPropDebugger.d.ts → props/TwistyPropDebugger.d.ts} +2 -2
- package/dist/types/twisty/model/props/TwistyPropDebugger.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/general}/URLProp.d.ts +0 -0
- package/dist/types/twisty/model/props/general/URLProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/puzzle/display}/HintFaceletProp.d.ts +2 -2
- package/dist/types/twisty/model/props/puzzle/display/HintFaceletProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-1 → props/puzzle/display}/SpriteProp.d.ts +1 -1
- package/dist/types/twisty/model/props/puzzle/display/SpriteProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/display/StickeringProp.d.ts +6 -0
- package/dist/types/twisty/model/props/puzzle/display/StickeringProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/puzzle/state}/AlgProp.d.ts +2 -2
- package/dist/types/twisty/model/props/puzzle/state/AlgProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-4 → props/puzzle/state}/AlgTransformationProp.d.ts +4 -4
- package/dist/types/twisty/model/props/puzzle/state/AlgTransformationProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-6 → props/puzzle/state}/AnchoredStartProp.d.ts +4 -4
- package/dist/types/twisty/model/props/puzzle/state/AnchoredStartProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/state/CatchUpMoveProp.d.ts +11 -0
- package/dist/types/twisty/model/props/puzzle/state/CatchUpMoveProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesProp.d.ts +14 -0
- package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-9 → props/puzzle/state}/CurrentLeavesSimplified.d.ts +3 -3
- package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesSimplified.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-10 → props/puzzle/state}/CurrentTransformationProp.d.ts +4 -4
- package/dist/types/twisty/model/props/puzzle/state/CurrentTransformationProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorProp.d.ts +17 -0
- package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/puzzle/state}/IndexerConstructorRequestProp.d.ts +1 -1
- package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorRequestProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/state/IndexerProp.d.ts +15 -0
- package/dist/types/twisty/model/props/puzzle/state/IndexerProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/state/LegacyPositionProp.d.ts +12 -0
- package/dist/types/twisty/model/props/puzzle/state/LegacyPositionProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-3 → props/puzzle/state}/PuzzleAlgProp.d.ts +3 -3
- package/dist/types/twisty/model/props/puzzle/state/PuzzleAlgProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/state/SetupAnchorProp.d.ts +6 -0
- package/dist/types/twisty/model/props/puzzle/state/SetupAnchorProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleDefProp.d.ts +11 -0
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleDefProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleDescriptionProp.d.ts +6 -0
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleDescriptionProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDProp.d.ts +11 -0
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.d.ts +6 -0
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleLoaderProp.d.ts +13 -0
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleLoaderProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-8 → props/timeline}/CoarseTimelineInfoProp.d.ts +3 -3
- package/dist/types/twisty/model/props/timeline/CoarseTimelineInfoProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-7 → props/timeline}/DetailedTimelineInfoProp.d.ts +4 -4
- package/dist/types/twisty/model/props/timeline/DetailedTimelineInfoProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/timeline}/PlayingInfoProp.d.ts +1 -1
- package/dist/types/twisty/model/props/timeline/PlayingInfoProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/timeline}/TempoScaleProp.d.ts +0 -0
- package/dist/types/twisty/model/props/timeline/TempoScaleProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/timeline}/TimestampRequestProp.d.ts +1 -1
- package/dist/types/twisty/model/props/timeline/TimestampRequestProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/viewer}/BackViewProp.d.ts +1 -1
- package/dist/types/twisty/model/props/viewer/BackViewProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/viewer}/BackgroundProp.d.ts +1 -1
- package/dist/types/twisty/model/props/viewer/BackgroundProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-9 → props/viewer}/ButtonAppearanceProp.d.ts +3 -3
- package/dist/types/twisty/model/props/viewer/ButtonAppearanceProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/viewer}/ControlPanelProp.d.ts +1 -1
- package/dist/types/twisty/model/props/viewer/ControlPanelProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/viewer}/LatitudeLimit.d.ts +0 -0
- package/dist/types/twisty/model/props/viewer/LatitudeLimit.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-4 → props/viewer}/OrbitCoordinatesProp.d.ts +3 -3
- package/dist/types/twisty/model/props/viewer/OrbitCoordinatesProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/viewer}/OrbitCoordinatesRequestProp.d.ts +0 -0
- package/dist/types/twisty/model/props/viewer/OrbitCoordinatesRequestProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-6 → props/viewer}/TimeRangeProp.d.ts +2 -2
- package/dist/types/twisty/model/props/viewer/TimeRangeProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/viewer}/ViewerLinkProp.d.ts +1 -1
- package/dist/types/twisty/model/props/viewer/ViewerLinkProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/viewer}/VisualizationProp.d.ts +1 -1
- package/dist/types/twisty/model/props/viewer/VisualizationProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-3 → props/viewer}/VisualizationStrategyProp.d.ts +2 -2
- package/dist/types/twisty/model/props/viewer/VisualizationStrategyProp.d.ts.map +1 -0
- package/dist/types/twisty/old/animation/indexer/AlgIndexer.d.ts.map +1 -1
- package/dist/types/twisty/old/dom/TwistyPlayer.css.d.ts.map +1 -1
- package/dist/types/twisty/old/dom/TwistyPlayerConfig.d.ts +2 -1
- package/dist/types/twisty/old/dom/TwistyPlayerConfig.d.ts.map +1 -1
- package/dist/types/twisty/old/dom/viewers/Twisty3DCanvas.d.ts +0 -1
- package/dist/types/twisty/old/dom/viewers/Twisty3DCanvas.d.ts.map +1 -1
- package/dist/types/twisty/views/3D/RendererPool.d.ts +4 -0
- package/dist/types/twisty/views/3D/RendererPool.d.ts.map +1 -0
- package/dist/types/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts +1 -1
- package/dist/types/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts.map +1 -1
- package/dist/types/twisty/views/3D/Twisty3DSceneWrapper.d.ts +2 -1
- package/dist/types/twisty/views/3D/Twisty3DSceneWrapper.d.ts.map +1 -1
- package/dist/types/twisty/views/3D/Twisty3DVantage.d.ts +5 -3
- package/dist/types/twisty/views/3D/Twisty3DVantage.d.ts.map +1 -1
- package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.d.ts +1 -1
- package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.d.ts.map +1 -1
- package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.d.ts.map +1 -1
- package/dist/types/twisty/views/TwistyAlgEditor/model.d.ts +2 -2
- package/dist/types/twisty/views/TwistyAlgEditor/model.d.ts.map +1 -1
- package/dist/types/twisty/views/TwistyPlayer.d.ts +12 -7
- package/dist/types/twisty/views/TwistyPlayer.d.ts.map +1 -1
- package/dist/types/twisty/views/TwistyPlayerSettable.d.ts +8 -8
- package/dist/types/twisty/views/TwistyPlayerSettable.d.ts.map +1 -1
- package/dist/types/twisty/views/control-panel/TwistyButtonsV2.d.ts +1 -1
- package/dist/types/twisty/views/control-panel/TwistyButtonsV2.d.ts.map +1 -1
- package/dist/types/twisty/views/control-panel/TwistyScrubberV2.d.ts +1 -1
- package/dist/types/twisty/views/control-panel/TwistyScrubberV2.d.ts.map +1 -1
- package/dist/types/vendor/three/examples/jsm/libs/stats.modified.module.d.ts +33 -0
- package/dist/types/vendor/three/examples/jsm/libs/stats.modified.module.d.ts.map +1 -0
- package/docs/.DS_Store +0 -0
- package/docs/cubing/.DS_Store +0 -0
- package/docs/cubing/scramble/index.html +35 -19
- package/package.json +5 -5
- package/src/cubing/.DS_Store +0 -0
- package/src/cubing/bluetooth/connect/index.ts +1 -1
- package/src/cubing/bluetooth/smart-puzzle/bluetooth-puzzle.ts +1 -1
- package/src/cubing/cubing.bundle-global.ts +5 -1
- package/src/cubing/puzzle-geometry/PermOriSet.ts +1 -1
- package/src/cubing/puzzles/PuzzleLoader.ts +1 -1
- package/src/cubing/puzzles/implementations/fto/index.ts +19 -11
- package/src/cubing/puzzles/index.ts +25 -18
- package/src/cubing/puzzles/stickerings/fto-stickerings.ts +9 -0
- package/src/cubing/search/inside/api.spec.ts +1 -0
- package/src/cubing/search/inside/api.ts +1 -0
- package/src/cubing/search/worker-inside-generated-string.js +1 -1
- package/src/cubing/twisty/.DS_Store +0 -0
- package/src/cubing/twisty/controllers/TwistyAnimationController.ts +80 -3
- package/src/cubing/twisty/index.ts +2 -2
- package/src/cubing/twisty/model/TwistyPlayerModel.ts +52 -41
- package/src/cubing/twisty/model/UserVisibleErrorTracker.ts +22 -0
- package/src/cubing/twisty/model/{TwistyProp.spec.ts → props/TwistyProp.spec.ts} +0 -0
- package/src/cubing/twisty/model/{TwistyProp.ts → props/TwistyProp.ts} +17 -9
- package/src/cubing/twisty/model/{TwistyPropDebugger.ts → props/TwistyPropDebugger.ts} +7 -7
- package/src/cubing/twisty/model/{depth-0 → props/general}/URLProp.ts +0 -0
- package/src/cubing/twisty/model/{depth-0 → props/puzzle/display}/HintFaceletProp.ts +2 -2
- package/src/cubing/twisty/model/{depth-1 → props/puzzle/display}/SpriteProp.ts +2 -2
- package/src/cubing/twisty/model/{depth-0 → props/puzzle/display}/StickeringProp.ts +2 -2
- package/src/cubing/twisty/model/{depth-0 → props/puzzle/state}/AlgProp.ts +3 -3
- package/src/cubing/twisty/model/{depth-4 → props/puzzle/state}/AlgTransformationProp.ts +6 -6
- package/src/cubing/twisty/model/{depth-6 → props/puzzle/state}/AnchoredStartProp.ts +4 -4
- package/src/cubing/twisty/model/props/puzzle/state/CatchUpMoveProp.ts +17 -0
- package/src/cubing/twisty/model/{depth-8 → props/puzzle/state}/CurrentLeavesProp.ts +27 -9
- package/src/cubing/twisty/model/{depth-9 → props/puzzle/state}/CurrentLeavesSimplified.ts +4 -4
- package/src/cubing/twisty/model/{depth-10 → props/puzzle/state}/CurrentTransformationProp.ts +5 -5
- package/src/cubing/twisty/model/{depth-4 → props/puzzle/state}/IndexerConstructorProp.ts +10 -10
- package/src/cubing/twisty/model/{depth-0 → props/puzzle/state}/IndexerConstructorRequestProp.ts +1 -1
- package/src/cubing/twisty/model/{depth-5 → props/puzzle/state}/IndexerProp.ts +6 -6
- package/src/cubing/twisty/model/{depth-11 → props/puzzle/state}/LegacyPositionProp.ts +4 -4
- package/src/cubing/twisty/model/{depth-3 → props/puzzle/state}/PuzzleAlgProp.ts +4 -4
- package/src/cubing/twisty/model/{depth-0 → props/puzzle/state}/SetupAnchorProp.ts +2 -2
- package/src/cubing/twisty/model/{depth-2 → props/puzzle/structure}/PuzzleDefProp.ts +3 -3
- package/src/cubing/twisty/model/{depth-0 → props/puzzle/structure}/PuzzleDescriptionProp.ts +6 -2
- package/src/cubing/twisty/model/{depth-2 → props/puzzle/structure}/PuzzleIDProp.ts +3 -3
- package/src/cubing/twisty/model/{depth-0 → props/puzzle/structure}/PuzzleIDRequestProp.ts +6 -2
- package/src/cubing/twisty/model/{depth-1 → props/puzzle/structure}/PuzzleLoaderProp.ts +11 -5
- package/src/cubing/twisty/model/{depth-8 → props/timeline}/CoarseTimelineInfoProp.ts +3 -3
- package/src/cubing/twisty/model/{depth-7 → props/timeline}/DetailedTimelineInfoProp.ts +4 -4
- package/src/cubing/twisty/model/{depth-0 → props/timeline}/PlayingInfoProp.ts +1 -1
- package/src/cubing/twisty/model/{depth-0 → props/timeline}/TempoScaleProp.ts +0 -0
- package/src/cubing/twisty/model/{depth-0 → props/timeline}/TimestampRequestProp.ts +1 -1
- package/src/cubing/twisty/model/{depth-0 → props/viewer}/BackViewProp.ts +1 -1
- package/src/cubing/twisty/model/{depth-0 → props/viewer}/BackgroundProp.ts +1 -1
- package/src/cubing/twisty/model/{depth-9 → props/viewer}/ButtonAppearanceProp.ts +4 -4
- package/src/cubing/twisty/model/{depth-0 → props/viewer}/ControlPanelProp.ts +1 -1
- package/src/cubing/twisty/model/{depth-0 → props/viewer}/LatitudeLimit.ts +0 -0
- package/src/cubing/twisty/model/{depth-4 → props/viewer}/OrbitCoordinatesProp.ts +3 -3
- package/src/cubing/twisty/model/{depth-0 → props/viewer}/OrbitCoordinatesRequestProp.ts +1 -1
- package/src/cubing/twisty/model/{depth-6 → props/viewer}/TimeRangeProp.ts +2 -2
- package/src/cubing/twisty/model/{depth-0 → props/viewer}/ViewerLinkProp.ts +1 -1
- package/src/cubing/twisty/model/{depth-0 → props/viewer}/VisualizationProp.ts +1 -1
- package/src/cubing/twisty/model/{depth-3 → props/viewer}/VisualizationStrategyProp.ts +2 -2
- package/src/cubing/twisty/old/animation/indexer/AlgIndexer.ts +1 -0
- package/src/cubing/twisty/old/dom/TwistyPlayer.css.ts +20 -0
- package/src/cubing/twisty/old/dom/TwistyPlayerConfig.ts +2 -1
- package/src/cubing/twisty/old/dom/viewers/Twisty3DCanvas.ts +3 -10
- package/src/cubing/twisty/{old → views}/.DS_Store +0 -0
- package/src/cubing/twisty/views/2D/Twisty2DPuzzle.ts +2 -2
- package/src/cubing/twisty/views/2D/Twisty2DPuzzleWrapper.ts +1 -1
- package/src/cubing/twisty/views/2D/Twisty2DSceneWrapper.ts +1 -1
- package/src/cubing/{search/inside → twisty/views/3D}/.DS_Store +0 -0
- package/src/cubing/twisty/views/3D/RendererPool.ts +53 -0
- package/src/cubing/twisty/views/3D/Twisty3DPuzzleWrapper.ts +9 -8
- package/src/cubing/twisty/views/3D/Twisty3DSceneWrapper.ts +7 -3
- package/src/cubing/twisty/views/3D/Twisty3DVantage.ts +69 -33
- package/src/cubing/twisty/views/3D/TwistyOrbitControlsV2.spec.ts +7 -7
- package/src/cubing/twisty/views/3D/TwistyOrbitControlsV2.ts +1 -1
- package/src/cubing/twisty/views/TwistyAlgEditor/TwistyAlgEditor.ts +6 -2
- package/src/cubing/twisty/views/TwistyAlgEditor/model.ts +2 -2
- package/src/cubing/twisty/views/TwistyAlgViewer.ts +2 -2
- package/src/cubing/twisty/views/TwistyPlayer.ts +67 -11
- package/src/cubing/twisty/views/TwistyPlayerSettable.ts +8 -8
- package/src/cubing/twisty/views/control-panel/TwistyButtonsV2.ts +1 -1
- package/src/cubing/twisty/views/control-panel/TwistyScrubberV2.ts +1 -1
- package/src/cubing/vendor/three/examples/jsm/libs/stats.modified.module.ts +179 -0
- package/dist/esm/chunk-6BXLPCNQ.js.map +0 -7
- package/dist/esm/worker-inside-generated-string-DOHINKQX.js.map +0 -7
- package/dist/types/twisty/model/TwistyProp.d.ts.map +0 -1
- package/dist/types/twisty/model/TwistyProp.spec.d.ts.map +0 -1
- package/dist/types/twisty/model/TwistyPropDebugger.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/AlgProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/BackViewProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/BackgroundProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/ControlPanelProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/HintFaceletProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/IndexerConstructorRequestProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/LatitudeLimit.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/OrbitCoordinatesRequestProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/PlayingInfoProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/PuzzleDescriptionProp.d.ts +0 -6
- package/dist/types/twisty/model/depth-0/PuzzleDescriptionProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/PuzzleIDRequestProp.d.ts +0 -6
- package/dist/types/twisty/model/depth-0/PuzzleIDRequestProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/SetupAnchorProp.d.ts +0 -6
- package/dist/types/twisty/model/depth-0/SetupAnchorProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/StickeringProp.d.ts +0 -6
- package/dist/types/twisty/model/depth-0/StickeringProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/TempoScaleProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/TimestampRequestProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/URLProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/ViewerLinkProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/VisualizationProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-1/PuzzleLoaderProp.d.ts +0 -13
- package/dist/types/twisty/model/depth-1/PuzzleLoaderProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-1/SpriteProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-10/CurrentTransformationProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-11/LegacyPositionProp.d.ts +0 -12
- package/dist/types/twisty/model/depth-11/LegacyPositionProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-2/PuzzleDefProp.d.ts +0 -11
- package/dist/types/twisty/model/depth-2/PuzzleDefProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-2/PuzzleIDProp.d.ts +0 -11
- package/dist/types/twisty/model/depth-2/PuzzleIDProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-3/PuzzleAlgProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-3/VisualizationStrategyProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-4/AlgTransformationProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-4/IndexerConstructorProp.d.ts +0 -17
- package/dist/types/twisty/model/depth-4/IndexerConstructorProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-4/OrbitCoordinatesProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-5/IndexerProp.d.ts +0 -15
- package/dist/types/twisty/model/depth-5/IndexerProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-6/AnchoredStartProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-6/TimeRangeProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-7/DetailedTimelineInfoProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-8/CoarseTimelineInfoProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-8/CurrentLeavesProp.d.ts +0 -12
- package/dist/types/twisty/model/depth-8/CurrentLeavesProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-9/ButtonAppearanceProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-9/CurrentLeavesSimplified.d.ts.map +0 -1
- package/dist/types/twisty/views/3D/puzzles/TwistyTestBox.d.ts +0 -9
- package/dist/types/twisty/views/3D/puzzles/TwistyTestBox.d.ts.map +0 -1
- package/dist/types/vendor/three/examples/jsm/libs/stats.module.d.ts +0 -21
- package/dist/types/vendor/three/examples/jsm/libs/stats.module.d.ts.map +0 -1
- package/src/cubing/alg/.DS_Store +0 -0
- package/src/cubing/bluetooth/.DS_Store +0 -0
- package/src/cubing/kpuzzle/.DS_Store +0 -0
- package/src/cubing/puzzles/.DS_Store +0 -0
- package/src/cubing/search/.DS_Store +0 -0
- package/src/cubing/search/inside/solve/vendor/.DS_Store +0 -0
- package/src/cubing/search/inside/solve/vendor/cstimer/src/.DS_Store +0 -0
- package/src/cubing/search/inside/solve/vendor/cstimer/src/js/.DS_Store +0 -0
- package/src/cubing/stream/.DS_Store +0 -0
- package/src/cubing/twisty/old/dom/.DS_Store +0 -0
- package/src/cubing/twisty/views/3D/puzzles/TwistyTestBox.ts +0 -22
- package/src/cubing/vendor/.DS_Store +0 -0
- package/src/cubing/vendor/three/examples/jsm/libs/stats.module.d.ts +0 -24
- 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/
|
|
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/
|
|
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
|
|
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 "./
|
|
2
|
-
import { BackgroundProp } from "./
|
|
3
|
-
import { BackViewProp } from "./
|
|
4
|
-
import { ControlPanelProp } from "./
|
|
5
|
-
import { HintFaceletProp } from "./
|
|
6
|
-
import { IndexerConstructorRequestProp } from "./
|
|
7
|
-
import { LatitudeLimitProp } from "./
|
|
8
|
-
import { OrbitCoordinatesRequestProp } from "./
|
|
9
|
-
import { PlayingInfoProp } from "./
|
|
10
|
-
import { PGPuzzleDescriptionStringProp } from "./
|
|
11
|
-
import { PuzzleIDRequestProp } from "./
|
|
12
|
-
import { PuzzleLoaderProp } from "./
|
|
13
|
-
import { SetupAnchorProp } from "./
|
|
14
|
-
import { StickeringProp } from "./
|
|
15
|
-
import { TempoScaleProp } from "./
|
|
16
|
-
import { TimestampRequestProp } from "./
|
|
17
|
-
import { URLProp } from "./
|
|
18
|
-
import { ViewerLinkProp } from "./
|
|
19
|
-
import { VisualizationFormatProp } from "./
|
|
20
|
-
import { OrbitCoordinatesProp } from "./
|
|
21
|
-
import { PuzzleIDProp } from "./
|
|
22
|
-
import { SpriteProp } from "./
|
|
23
|
-
import { VisualizationStrategyProp } from "./
|
|
24
|
-
import { IndexerConstructorProp } from "./
|
|
25
|
-
import { PuzzleAlgProp } from "./
|
|
26
|
-
import { AlgTransformationProp } from "./
|
|
27
|
-
import { IndexerProp } from "./
|
|
28
|
-
import { AnchoredStartProp } from "./
|
|
29
|
-
import { TimeRangeProp } from "./
|
|
30
|
-
import { DetailedTimelineInfoProp } from "./
|
|
31
|
-
import { CoarseTimelineInfoProp } from "./
|
|
32
|
-
import { CurrentLeavesProp } from "./
|
|
33
|
-
import { ButtonAppearanceProp } from "./
|
|
34
|
-
import { CurrentLeavesSimplifiedProp } from "./
|
|
35
|
-
import { CurrentTransformationProp } from "./
|
|
36
|
-
import { LegacyPositionProp } from "./
|
|
37
|
-
import { PuzzleDefProp } from "./
|
|
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
|
-
|
|
77
|
-
|
|
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
|
+
}
|
|
File without changes
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { from } from "
|
|
2
|
-
import { StaleDropper } from "
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
336
|
-
|
|
337
|
-
)
|
|
338
|
-
|
|
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 "
|
|
2
|
-
import { countMoves } from "
|
|
3
|
-
import { ClassListManager } from "
|
|
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 "
|
|
8
|
-
import { customElementsShim } from "
|
|
9
|
-
import type { TwistyPlayer } from "
|
|
10
|
-
import type { AlgIssues } from "./
|
|
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 {
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { HintFaceletStyle } from "
|
|
2
|
-
import { SimpleTwistyPropSource } from "
|
|
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 "
|
|
3
|
-
import { TwistyPropDerived } from "
|
|
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 "
|
|
2
|
-
import { SimpleTwistyPropSource } from "
|
|
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 "
|
|
2
|
-
import { arrayEquals } from "
|
|
3
|
-
import { TwistyPropSource } from "
|
|
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 "
|
|
2
|
-
import type { KPuzzleDefinition, Transformation } from "
|
|
3
|
-
import { KPuzzleWrapper } from "
|
|
4
|
-
import { TreeAlgIndexer } from "
|
|
5
|
-
import type { AlgWithIssues } from "
|
|
6
|
-
import { TwistyPropDerived } from "
|
|
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 "
|
|
7
|
-
import type { AlgIndexer } from "
|
|
8
|
-
import type { SetupToLocation } from "
|
|
9
|
-
import { TwistyPropDerived } from "
|
|
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 "
|
|
2
|
-
import { Direction } from "
|
|
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 "
|
|
7
|
-
import type { DetailedTimelineInfo } from "
|
|
8
|
-
import { TwistyPropDerived } from "
|
|
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
|
|
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 "
|
|
2
|
-
import type { CurrentMoveInfo } from "
|
|
3
|
-
import { arrayEqualsCompare } from "
|
|
4
|
-
import { TwistyPropDerived } from "
|
|
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;
|
package/src/cubing/twisty/model/{depth-10 → props/puzzle/state}/CurrentTransformationProp.ts
RENAMED
|
@@ -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 "
|
|
7
|
-
import type { AlgIndexer } from "
|
|
8
|
-
import type { CurrentLeavesSimplified } from "
|
|
9
|
-
import { TwistyPropDerived } from "
|
|
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 "
|
|
2
|
-
import type { IndexerConstructor } from "
|
|
3
|
-
import { SimpleAlgIndexer } from "
|
|
4
|
-
import { SimultaneousMoveIndexerV2 } from "
|
|
5
|
-
import { TreeAlgIndexer } from "
|
|
6
|
-
import type { PuzzleID } from "
|
|
7
|
-
import type { AlgWithIssues } from "
|
|
8
|
-
import type { IndexerStrategyName } from "
|
|
9
|
-
import type { VisualizationStrategy } from "
|
|
10
|
-
import { TwistyPropDerived } from "
|
|
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,9 +1,9 @@
|
|
|
1
|
-
import type { KPuzzleDefinition } from "
|
|
2
|
-
import { KPuzzleWrapper } from "
|
|
3
|
-
import type { IndexerConstructor } from "
|
|
4
|
-
import type { AlgIndexer } from "
|
|
5
|
-
import type { AlgWithIssues } from "
|
|
6
|
-
import { TwistyPropDerived } from "
|
|
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 "
|
|
2
|
-
import type { PuzzlePosition } from "
|
|
3
|
-
import type { CurrentMoveInfo } from "
|
|
4
|
-
import { TwistyPropDerived } from "
|
|
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;
|