cubing 0.20.2 → 0.21.0-pre12
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/README.md +6 -9
- package/dist/.DS_Store +0 -0
- package/dist/bin/puzzle-geometry-bin.js +1124 -1128
- package/dist/bin/puzzle-geometry-bin.js.map +3 -3
- package/dist/bundle-global/cubing.bundle-global.js +3978 -3587
- package/dist/esm/.DS_Store +0 -0
- package/dist/esm/{2x2x2.kpuzzle.json_-ZLJSYD5K.js → 2x2x2.kpuzzle.json-JOGUSQ4N.js} +3 -3
- package/dist/esm/{2x2x2.kpuzzle.json_-ZLJSYD5K.js.map → 2x2x2.kpuzzle.json-JOGUSQ4N.js.map} +1 -1
- package/dist/esm/{2x2x2.kpuzzle.svg-BNXPAM3A.js → 2x2x2.kpuzzle.svg-CQF2FTV7.js} +2 -2
- package/dist/esm/{2x2x2.kpuzzle.svg-BNXPAM3A.js.map → 2x2x2.kpuzzle.svg-CQF2FTV7.js.map} +0 -0
- package/dist/esm/3d-JZD3V366.js +39 -0
- package/dist/esm/3d-JZD3V366.js.map +7 -0
- package/dist/esm/{3x3x3-ll.kpuzzle.svg-EC42JHOH.js → 3x3x3-ll.kpuzzle.svg-53CBPG5O.js} +2 -2
- package/dist/esm/{3x3x3-ll.kpuzzle.svg-EC42JHOH.js.map → 3x3x3-ll.kpuzzle.svg-53CBPG5O.js.map} +0 -0
- package/dist/esm/{3x3x3.kpuzzle.svg-DUKG2WHC.js → 3x3x3.kpuzzle.svg-ERSSH66P.js} +2 -2
- package/dist/esm/{3x3x3.kpuzzle.svg-DUKG2WHC.js.map → 3x3x3.kpuzzle.svg-ERSSH66P.js.map} +0 -0
- package/dist/esm/alg/index.js +2 -2
- package/dist/esm/bluetooth/index.js +13 -11
- package/dist/esm/bluetooth/index.js.map +2 -2
- package/dist/esm/chunk-5DN4DAAX.js +2512 -0
- package/dist/esm/chunk-5DN4DAAX.js.map +7 -0
- package/dist/esm/{chunk-KKSDHNLH.js → chunk-7GADUDIG.js} +49 -71
- package/dist/esm/chunk-7GADUDIG.js.map +7 -0
- package/dist/esm/{chunk-YNB7QLBF.js → chunk-BU5PUJK3.js} +9 -10
- package/dist/esm/chunk-BU5PUJK3.js.map +7 -0
- package/dist/esm/chunk-CQS6JZ7G.js +762 -0
- package/dist/esm/chunk-CQS6JZ7G.js.map +7 -0
- package/dist/esm/{chunk-2GRKPQQL.js → chunk-RE7MIN5R.js} +2 -2
- package/dist/esm/{chunk-2GRKPQQL.js.map → chunk-RE7MIN5R.js.map} +0 -0
- package/dist/esm/{chunk-WJ7AVUI7.js → chunk-WO2AXYFE.js} +12 -1
- package/dist/esm/{chunk-WJ7AVUI7.js.map → chunk-WO2AXYFE.js.map} +0 -0
- package/dist/esm/{chunk-CWVB5RRW.js → chunk-YV3RT5PX.js} +625 -1282
- package/dist/esm/chunk-YV3RT5PX.js.map +7 -0
- package/dist/esm/{clock.kpuzzle.json_-PXORG6YF.js → clock.kpuzzle.json-EKWRMHJM.js} +3 -3
- package/dist/esm/{clock.kpuzzle.json_-PXORG6YF.js.map → clock.kpuzzle.json-EKWRMHJM.js.map} +1 -1
- package/dist/esm/{clock.kpuzzle.svg-E52B5OQV.js → clock.kpuzzle.svg-B7TMN3SY.js} +2 -2
- package/dist/esm/{clock.kpuzzle.svg-E52B5OQV.js.map → clock.kpuzzle.svg-B7TMN3SY.js.map} +0 -0
- package/dist/esm/esm-test-worker.js +2 -2
- package/dist/esm/esm-test-worker.js.map +1 -1
- package/dist/esm/kpuzzle/index.js +5 -3
- package/dist/esm/{node-SIGYKAZG.js → node-BSAQKO3G.js} +2 -2
- package/dist/esm/{node-SIGYKAZG.js.map → node-BSAQKO3G.js.map} +0 -0
- package/dist/esm/{node-BHGOVUN3.js → node-WEHVBEKP.js} +2 -2
- package/dist/esm/{node-BHGOVUN3.js.map → node-WEHVBEKP.js.map} +0 -0
- package/dist/esm/notation/index.js +3 -3
- package/dist/esm/protocol/index.js +3 -3
- package/dist/esm/puzzle-geometry/index.js +1085 -1179
- package/dist/esm/puzzle-geometry/index.js.map +3 -3
- package/dist/esm/puzzles/index.js +10 -4
- package/dist/esm/{pyraminx.kpuzzle.svg-QKUJX37T.js → pyraminx.kpuzzle.svg-QBBMZVDY.js} +2 -2
- package/dist/esm/{pyraminx.kpuzzle.svg-QKUJX37T.js.map → pyraminx.kpuzzle.svg-QBBMZVDY.js.map} +0 -0
- package/dist/esm/scramble/index.js +5 -4
- package/dist/esm/search/index.js +7 -4
- package/dist/esm/{sq1-hyperorbit.kpuzzle.json_-7KW5LSXC.js → sq1-hyperorbit.kpuzzle.json-N3FGCPML.js} +3 -3
- package/dist/esm/{sq1-hyperorbit.kpuzzle.json_-7KW5LSXC.js.map → sq1-hyperorbit.kpuzzle.json-N3FGCPML.js.map} +1 -1
- package/dist/esm/{sq1-hyperorbit.kpuzzle.svg-7Y7N37NN.js → sq1-hyperorbit.kpuzzle.svg-ID57EER7.js} +2 -2
- package/dist/esm/{sq1-hyperorbit.kpuzzle.svg-7Y7N37NN.js.map → sq1-hyperorbit.kpuzzle.svg-ID57EER7.js.map} +0 -0
- package/dist/esm/stream/index.js +3 -3
- package/dist/esm/stream/index.js.map +2 -2
- package/dist/esm/twisty/index.js +4442 -3214
- package/dist/esm/twisty/index.js.map +3 -3
- package/dist/esm/worker-inside-generated-string-KDZOUGJF.js +2831 -0
- package/dist/esm/worker-inside-generated-string-KDZOUGJF.js.map +7 -0
- package/dist/types/alg/Alg.d.ts +88 -0
- package/dist/types/alg/Alg.d.ts.map +1 -1
- package/dist/types/alg/Alg.spec.d.ts +2 -0
- package/dist/types/alg/Alg.spec.d.ts.map +1 -0
- package/dist/types/alg/common.d.ts.map +1 -1
- package/dist/types/alg/operation.spec.d.ts +2 -0
- package/dist/types/alg/operation.spec.d.ts.map +1 -0
- package/dist/types/alg/parse.spec.d.ts +2 -0
- package/dist/types/alg/parse.spec.d.ts.map +1 -0
- package/dist/types/alg/test/alg-comparison.d.ts.map +1 -1
- package/dist/types/alg/test/alg.spec.d.ts +2 -0
- package/dist/types/alg/test/alg.spec.d.ts.map +1 -0
- package/dist/types/alg/units/leaves/LineComment.spec.d.ts +2 -0
- package/dist/types/alg/units/leaves/LineComment.spec.d.ts.map +1 -0
- package/dist/types/alg/units/leaves/Move.spec.d.ts +2 -0
- package/dist/types/alg/units/leaves/Move.spec.d.ts.map +1 -0
- package/dist/types/alg/url.spec.d.ts +2 -0
- package/dist/types/alg/url.spec.d.ts.map +1 -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/bluetooth/smart-puzzle/giiker.spec.d.ts +5 -0
- package/dist/types/bluetooth/smart-puzzle/giiker.spec.d.ts.map +1 -0
- package/dist/types/kpuzzle/3x3x3/3x3x3.kpuzzle.json.d.ts +3 -0
- package/dist/types/kpuzzle/3x3x3/3x3x3.kpuzzle.json.d.ts.map +1 -0
- package/dist/types/kpuzzle/3x3x3/3x3x3.kpuzzle.json.spec.d.ts +2 -0
- package/dist/types/kpuzzle/3x3x3/3x3x3.kpuzzle.json.spec.d.ts.map +1 -0
- package/dist/types/kpuzzle/canon.spec.d.ts +2 -0
- package/dist/types/kpuzzle/canon.spec.d.ts.map +1 -0
- package/dist/types/kpuzzle/index.d.ts +1 -0
- package/dist/types/kpuzzle/index.d.ts.map +1 -1
- package/dist/types/kpuzzle/kpuzzle.spec.d.ts +2 -0
- package/dist/types/kpuzzle/kpuzzle.spec.d.ts.map +1 -0
- package/dist/types/kpuzzle/prunetable.spec.d.ts +2 -0
- package/dist/types/kpuzzle/prunetable.spec.d.ts.map +1 -0
- package/dist/types/kpuzzle/svg.d.ts.map +1 -1
- package/dist/types/kpuzzle/transformations.spec.d.ts +2 -0
- package/dist/types/kpuzzle/transformations.spec.d.ts.map +1 -0
- package/dist/types/protocol/binary/binary3x3x3.spec.d.ts +2 -0
- package/dist/types/protocol/binary/binary3x3x3.spec.d.ts.map +1 -0
- package/dist/types/protocol/binary/hex.spec.d.ts +2 -0
- package/dist/types/protocol/binary/hex.spec.d.ts.map +1 -0
- package/dist/types/protocol/binary/orbit-indexing.spec.d.ts +2 -0
- package/dist/types/protocol/binary/orbit-indexing.spec.d.ts.map +1 -0
- package/dist/types/puzzle-geometry/Options.d.ts +45 -1
- package/dist/types/puzzle-geometry/Options.d.ts.map +1 -1
- package/dist/types/puzzle-geometry/PGPuzzles.spec.d.ts +2 -0
- package/dist/types/puzzle-geometry/PGPuzzles.spec.d.ts.map +1 -0
- package/dist/types/puzzle-geometry/PermOriSet.d.ts +39 -39
- package/dist/types/puzzle-geometry/PermOriSet.d.ts.map +1 -1
- package/dist/types/puzzle-geometry/PuzzleGeometry.d.ts +118 -110
- package/dist/types/puzzle-geometry/PuzzleGeometry.d.ts.map +1 -1
- package/dist/types/puzzle-geometry/Quat.d.ts +0 -11
- package/dist/types/puzzle-geometry/Quat.d.ts.map +1 -1
- package/dist/types/puzzle-geometry/Quat.spec.d.ts +2 -0
- package/dist/types/puzzle-geometry/Quat.spec.d.ts.map +1 -0
- package/dist/types/puzzle-geometry/SchreierSims.d.ts.map +1 -1
- package/dist/types/puzzle-geometry/index.d.ts +2 -4
- package/dist/types/puzzle-geometry/index.d.ts.map +1 -1
- package/dist/types/puzzle-geometry/interfaces.d.ts +1 -21
- package/dist/types/puzzle-geometry/interfaces.d.ts.map +1 -1
- package/dist/types/puzzle-geometry/orientcenters.spec.d.ts +2 -0
- package/dist/types/puzzle-geometry/orientcenters.spec.d.ts.map +1 -0
- package/dist/types/puzzles/async/async-pg3d.d.ts.map +1 -1
- package/dist/types/puzzles/customPGPuzzleLoader.d.ts +12 -0
- package/dist/types/puzzles/customPGPuzzleLoader.d.ts.map +1 -0
- package/dist/types/puzzles/implementations/2x2x2/{2x2x2.kpuzzle.json_.d.ts → 2x2x2.kpuzzle.json.d.ts} +1 -1
- package/dist/types/puzzles/implementations/2x2x2/2x2x2.kpuzzle.json.d.ts.map +1 -0
- package/dist/types/puzzles/implementations/3x3x3/index.d.ts.map +1 -1
- package/dist/types/puzzles/implementations/clock/{clock.kpuzzle.json_.d.ts → clock.kpuzzle.json.d.ts} +1 -1
- package/dist/types/puzzles/implementations/clock/clock.kpuzzle.json.d.ts.map +1 -0
- 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/implementations/pyraminx/{pyraminx.kpuzzle.json_.d.ts → pyraminx.kpuzzle.json.d.ts} +1 -1
- package/dist/types/puzzles/implementations/pyraminx/pyraminx.kpuzzle.json.d.ts.map +1 -0
- package/dist/types/puzzles/implementations/square1/index.d.ts.map +1 -1
- package/dist/types/puzzles/implementations/square1/{sq1-hyperorbit.kpuzzle.json_.d.ts → sq1-hyperorbit.kpuzzle.json.d.ts} +1 -1
- package/dist/types/puzzles/implementations/square1/sq1-hyperorbit.kpuzzle.json.d.ts.map +1 -0
- package/dist/types/puzzles/index.d.ts +4 -2
- package/dist/types/puzzles/index.d.ts.map +1 -1
- package/dist/types/puzzles/stickerings/appearance.d.ts +9 -9
- package/dist/types/puzzles/stickerings/appearance.d.ts.map +1 -1
- package/dist/types/puzzles/stickerings/cube-stickerings.d.ts.map +1 -1
- package/dist/types/puzzles/stickerings/fto-stickerings.d.ts.map +1 -1
- package/dist/types/puzzles/stickerings/global-custom-stickering-hack.d.ts +3 -0
- package/dist/types/puzzles/stickerings/global-custom-stickering-hack.d.ts.map +1 -0
- package/dist/types/search/index.d.ts +1 -1
- package/dist/types/search/index.d.ts.map +1 -1
- package/dist/types/search/inside/api.d.ts +2 -1
- package/dist/types/search/inside/api.d.ts.map +1 -1
- package/dist/types/search/inside/api.spec.d.ts +2 -0
- package/dist/types/search/inside/api.spec.d.ts.map +1 -0
- package/dist/types/search/inside/solve/parseSGS.d.ts.map +1 -1
- package/dist/types/search/inside/solve/puzzles/3x3x3/filter.d.ts.map +1 -1
- package/dist/types/search/inside/solve/puzzles/3x3x3/index.d.ts.map +1 -1
- package/dist/types/search/inside/solve/puzzles/megaminx.sgs.json.d.ts.map +1 -1
- package/dist/types/search/inside/solve/puzzles/sgs-defs.spec.d.ts +2 -0
- package/dist/types/search/inside/solve/puzzles/sgs-defs.spec.d.ts.map +1 -0
- package/dist/types/search/inside/solve/puzzles/skewb.sgs.json.d.ts.map +1 -1
- package/dist/types/search/inside/solve/tremble.d.ts.map +1 -1
- package/dist/types/search/inside/solve/vendor/cstimer/src/js/lib/mathlib.d.ts +4 -31
- package/dist/types/search/inside/solve/vendor/cstimer/src/js/lib/mathlib.d.ts.map +1 -1
- package/dist/types/search/inside/solve/vendor/cstimer/src/js/scramble/scramble_444.d.ts.map +1 -1
- package/dist/types/search/inside/solve/vendor/min2phase/gwt.d.ts +3 -0
- package/dist/types/search/inside/solve/vendor/min2phase/gwt.d.ts.map +1 -0
- package/dist/types/search/inside/solve/vendor/random-uint-below/get-random-values.d.ts.map +1 -1
- package/dist/types/search/inside/solve/vendor/random-uint-below/random-int.d.ts.map +1 -1
- package/dist/types/search/inside/solve/vendor/sq12phase/scramble_sq1.d.ts.map +1 -1
- package/dist/types/search/instantiator.d.ts.map +1 -1
- package/dist/types/search/outside.d.ts +4 -2
- package/dist/types/search/outside.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/stream/twizzle/TwizzleStream.d.ts +9 -8
- package/dist/types/stream/twizzle/TwizzleStream.d.ts.map +1 -1
- package/dist/types/stream/websocket-proxy.d.ts +1 -1
- package/dist/types/stream/websocket-proxy.d.ts.map +1 -1
- package/dist/types/twisty/controllers/TwistyAnimationController.d.ts +34 -0
- package/dist/types/twisty/controllers/TwistyAnimationController.d.ts.map +1 -0
- package/dist/types/twisty/controllers/TwistyPlayerController.d.ts +16 -0
- package/dist/types/twisty/controllers/TwistyPlayerController.d.ts.map +1 -0
- package/dist/types/twisty/heavy-code-imports/3d.d.ts +3 -0
- package/dist/types/twisty/heavy-code-imports/3d.d.ts.map +1 -0
- package/dist/types/twisty/heavy-code-imports/dynamic-entries/3d.d.ts +12 -0
- package/dist/types/twisty/heavy-code-imports/dynamic-entries/3d.d.ts.map +1 -0
- package/dist/types/twisty/index.d.ts +20 -15
- package/dist/types/twisty/index.d.ts.map +1 -1
- package/dist/types/twisty/model/PromiseFreshener.d.ts +14 -0
- package/dist/types/twisty/model/PromiseFreshener.d.ts.map +1 -0
- package/dist/types/twisty/model/TwistyPlayerModel.d.ts +84 -0
- package/dist/types/twisty/model/TwistyPlayerModel.d.ts.map +1 -0
- 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/helpers.d.ts +5 -0
- package/dist/types/twisty/model/helpers.d.ts.map +1 -0
- package/dist/types/twisty/model/props/TwistyProp.d.ts +60 -0
- package/dist/types/twisty/model/props/TwistyProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/TwistyProp.spec.d.ts +5 -0
- package/dist/types/twisty/model/props/TwistyProp.spec.d.ts.map +1 -0
- package/dist/types/twisty/model/props/TwistyPropDebugger.d.ts +28 -0
- package/dist/types/twisty/model/props/TwistyPropDebugger.d.ts.map +1 -0
- package/dist/types/twisty/model/props/general/URLProp.d.ts +6 -0
- package/dist/types/twisty/model/props/general/URLProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/display/HintFaceletProp.d.ts +7 -0
- package/dist/types/twisty/model/props/puzzle/display/HintFaceletProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/display/SpriteProp.d.ts +10 -0
- 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/props/puzzle/state/AlgProp.d.ts +27 -0
- package/dist/types/twisty/model/props/puzzle/state/AlgProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/state/AlgTransformationProp.d.ts +14 -0
- package/dist/types/twisty/model/props/puzzle/state/AlgTransformationProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/state/AnchoredStartProp.d.ts +15 -0
- package/dist/types/twisty/model/props/puzzle/state/AnchoredStartProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesProp.d.ts +12 -0
- package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesSimplified.d.ts +17 -0
- package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesSimplified.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/state/CurrentTransformationProp.d.ts +15 -0
- 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/props/puzzle/state/IndexerConstructorRequestProp.d.ts +12 -0
- 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/props/puzzle/state/PuzzleAlgProp.d.ts +13 -0
- 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/props/timeline/CoarseTimelineInfoProp.d.ts +25 -0
- package/dist/types/twisty/model/props/timeline/CoarseTimelineInfoProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/timeline/DetailedTimelineInfoProp.d.ts +23 -0
- package/dist/types/twisty/model/props/timeline/DetailedTimelineInfoProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/timeline/PlayingInfoProp.d.ts +15 -0
- package/dist/types/twisty/model/props/timeline/PlayingInfoProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/timeline/TempoScaleProp.d.ts +6 -0
- package/dist/types/twisty/model/props/timeline/TempoScaleProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/timeline/TimestampRequestProp.d.ts +16 -0
- package/dist/types/twisty/model/props/timeline/TimestampRequestProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/viewer/BackViewProp.d.ts +7 -0
- package/dist/types/twisty/model/props/viewer/BackViewProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/viewer/BackgroundProp.d.ts +7 -0
- package/dist/types/twisty/model/props/viewer/BackgroundProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/viewer/ButtonAppearanceProp.d.ts +22 -0
- package/dist/types/twisty/model/props/viewer/ButtonAppearanceProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/viewer/ControlPanelProp.d.ts +7 -0
- package/dist/types/twisty/model/props/viewer/ControlPanelProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/viewer/LatitudeLimit.d.ts +6 -0
- package/dist/types/twisty/model/props/viewer/LatitudeLimit.d.ts.map +1 -0
- package/dist/types/twisty/model/props/viewer/OrbitCoordinatesProp.d.ts +16 -0
- package/dist/types/twisty/model/props/viewer/OrbitCoordinatesProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/viewer/OrbitCoordinatesRequestProp.d.ts +15 -0
- package/dist/types/twisty/model/props/viewer/OrbitCoordinatesRequestProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/viewer/TimeRangeProp.d.ts +11 -0
- package/dist/types/twisty/model/props/viewer/TimeRangeProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/viewer/ViewerLinkProp.d.ts +7 -0
- package/dist/types/twisty/model/props/viewer/ViewerLinkProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/viewer/VisualizationProp.d.ts +7 -0
- package/dist/types/twisty/model/props/viewer/VisualizationProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/viewer/VisualizationStrategyProp.d.ts +13 -0
- package/dist/types/twisty/model/props/viewer/VisualizationStrategyProp.d.ts.map +1 -0
- package/dist/types/twisty/{animation → old/animation}/RenderScheduler.d.ts +3 -0
- package/dist/types/twisty/old/animation/RenderScheduler.d.ts.map +1 -0
- package/dist/types/twisty/{animation → old/animation}/Timeline.d.ts +0 -0
- package/dist/types/twisty/old/animation/Timeline.d.ts.map +1 -0
- package/dist/types/twisty/{animation → old/animation}/cursor/AlgCursor.d.ts +4 -4
- package/dist/types/twisty/old/animation/cursor/AlgCursor.d.ts.map +1 -0
- package/dist/types/twisty/{animation → old/animation}/cursor/CursorTypes.d.ts +4 -4
- package/dist/types/twisty/old/animation/cursor/CursorTypes.d.ts.map +1 -0
- package/dist/types/twisty/{animation → old/animation}/easing.d.ts +0 -0
- package/dist/types/twisty/old/animation/easing.d.ts.map +1 -0
- package/dist/types/twisty/{animation → old/animation}/indexer/AlgDuration.d.ts +1 -1
- package/dist/types/twisty/old/animation/indexer/AlgDuration.d.ts.map +1 -0
- package/dist/types/twisty/old/animation/indexer/AlgIndexer.d.ts +36 -0
- package/dist/types/twisty/old/animation/indexer/AlgIndexer.d.ts.map +1 -0
- package/dist/types/twisty/{animation → old/animation}/indexer/SimpleAlgIndexer.d.ts +3 -3
- package/dist/types/twisty/old/animation/indexer/SimpleAlgIndexer.d.ts.map +1 -0
- package/dist/types/twisty/{animation → old/animation}/indexer/simultaneous-moves/SimultaneousMoveIndexer.d.ts +6 -5
- package/dist/types/twisty/old/animation/indexer/simultaneous-moves/SimultaneousMoveIndexer.d.ts.map +1 -0
- package/dist/types/twisty/old/animation/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.d.ts +22 -0
- package/dist/types/twisty/old/animation/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.d.ts.map +1 -0
- package/dist/types/twisty/old/animation/indexer/simultaneous-moves/simul-moves.d.ts +26 -0
- package/dist/types/twisty/old/animation/indexer/simultaneous-moves/simul-moves.d.ts.map +1 -0
- package/dist/types/twisty/{animation → old/animation}/indexer/tree/AlgWalker.d.ts +2 -2
- package/dist/types/twisty/old/animation/indexer/tree/AlgWalker.d.ts.map +1 -0
- package/dist/types/twisty/{animation → old/animation}/indexer/tree/TreeAlgIndexer.d.ts +3 -3
- package/dist/types/twisty/old/animation/indexer/tree/TreeAlgIndexer.d.ts.map +1 -0
- package/dist/types/twisty/old/animation/indexer/tree/chunkAlgs.d.ts +3 -0
- package/dist/types/twisty/old/animation/indexer/tree/chunkAlgs.d.ts.map +1 -0
- package/dist/types/twisty/{animation → old/animation}/stream/timeline-move-calculation-draft.d.ts +1 -1
- package/dist/types/twisty/old/animation/stream/timeline-move-calculation-draft.d.ts.map +1 -0
- package/dist/types/twisty/{dom/TwistyAlgViewer.css_.d.ts → old/dom/TwistyAlgViewerV1.css.d.ts} +1 -1
- package/dist/types/twisty/old/dom/TwistyAlgViewerV1.css.d.ts.map +1 -0
- package/dist/types/twisty/old/dom/TwistyAlgViewerV1.d.ts +52 -0
- package/dist/types/twisty/old/dom/TwistyAlgViewerV1.d.ts.map +1 -0
- package/dist/types/twisty/{dom/TwistyPlayer.css_.d.ts → old/dom/TwistyPlayer.css.d.ts} +1 -1
- package/dist/types/twisty/old/dom/TwistyPlayer.css.d.ts.map +1 -0
- package/dist/types/twisty/{dom → old/dom}/TwistyPlayer.d.ts +8 -8
- package/dist/types/twisty/old/dom/TwistyPlayer.d.ts.map +1 -0
- package/dist/types/twisty/old/dom/TwistyPlayer.spec.d.ts +5 -0
- package/dist/types/twisty/old/dom/TwistyPlayer.spec.d.ts.map +1 -0
- package/dist/types/twisty/{dom → old/dom}/TwistyPlayerConfig.d.ts +10 -5
- package/dist/types/twisty/old/dom/TwistyPlayerConfig.d.ts.map +1 -0
- package/dist/types/twisty/old/dom/controls/TwistyControlElement.d.ts +2 -0
- package/dist/types/twisty/old/dom/controls/TwistyControlElement.d.ts.map +1 -0
- package/dist/types/twisty/{dom/controls/TwistyScrubber.css_.d.ts → old/dom/controls/TwistyScrubber.css.d.ts} +1 -1
- package/dist/types/twisty/old/dom/controls/TwistyScrubber.css.d.ts.map +1 -0
- package/dist/types/twisty/{dom → old/dom}/controls/TwistyScrubber.d.ts +1 -1
- package/dist/types/twisty/old/dom/controls/TwistyScrubber.d.ts.map +1 -0
- package/dist/types/twisty/{dom/controls/buttons.css_.d.ts → old/dom/controls/buttons.css.d.ts} +1 -1
- package/dist/types/twisty/old/dom/controls/buttons.css.d.ts.map +1 -0
- package/dist/types/twisty/{dom → old/dom}/controls/buttons.d.ts +1 -1
- package/dist/types/twisty/old/dom/controls/buttons.d.ts.map +1 -0
- package/dist/types/twisty/old/dom/controls/buttons.spec.d.ts +5 -0
- package/dist/types/twisty/old/dom/controls/buttons.spec.d.ts.map +1 -0
- package/dist/types/twisty/{dom → old/dom}/element/ClassListManager.d.ts +0 -0
- package/dist/types/twisty/old/dom/element/ClassListManager.d.ts.map +1 -0
- package/dist/types/twisty/{dom → old/dom}/element/ElementConfig.d.ts +1 -1
- package/dist/types/twisty/old/dom/element/ElementConfig.d.ts.map +1 -0
- package/dist/types/twisty/{dom → old/dom}/element/ManagedCustomElement.d.ts +0 -0
- package/dist/types/twisty/old/dom/element/ManagedCustomElement.d.ts.map +1 -0
- package/dist/types/twisty/{dom → old/dom}/element/node-custom-element-shims.d.ts +0 -0
- package/dist/types/twisty/old/dom/element/node-custom-element-shims.d.ts.map +1 -0
- package/dist/types/twisty/{dom/stream/TwistyStreamSource.css_.d.ts → old/dom/stream/TwistyStreamSource.css.d.ts} +1 -1
- package/dist/types/twisty/old/dom/stream/TwistyStreamSource.css.d.ts.map +1 -0
- package/dist/types/twisty/{dom → old/dom}/stream/TwistyStreamSource.d.ts +0 -0
- package/dist/types/twisty/old/dom/stream/TwistyStreamSource.d.ts.map +1 -0
- package/dist/types/twisty/{dom → old/dom}/viewers/Twisty2DSVG.d.ts +2 -2
- package/dist/types/twisty/old/dom/viewers/Twisty2DSVG.d.ts.map +1 -0
- package/dist/types/twisty/{dom/viewers/Twisty2DSVGView.css_.d.ts → old/dom/viewers/Twisty2DSVGView.css.d.ts} +1 -1
- package/dist/types/twisty/old/dom/viewers/Twisty2DSVGView.css.d.ts.map +1 -0
- package/dist/types/twisty/{dom/viewers/Twisty3DCanvas.css_.d.ts → old/dom/viewers/Twisty3DCanvas.css.d.ts} +1 -1
- package/dist/types/twisty/old/dom/viewers/Twisty3DCanvas.css.d.ts.map +1 -0
- package/dist/types/twisty/{dom → old/dom}/viewers/Twisty3DCanvas.d.ts +1 -2
- package/dist/types/twisty/old/dom/viewers/Twisty3DCanvas.d.ts.map +1 -0
- package/dist/types/twisty/{dom → old/dom}/viewers/TwistyOrbitControls.d.ts +0 -0
- package/dist/types/twisty/old/dom/viewers/TwistyOrbitControls.d.ts.map +1 -0
- package/dist/types/twisty/old/dom/viewers/TwistyViewerElement.d.ts +4 -0
- package/dist/types/twisty/old/dom/viewers/TwistyViewerElement.d.ts.map +1 -0
- package/dist/types/twisty/{dom/viewers/TwistyViewerWrapper.css_.d.ts → old/dom/viewers/TwistyViewerWrapper.css.d.ts} +1 -1
- package/dist/types/twisty/old/dom/viewers/TwistyViewerWrapper.css.d.ts.map +1 -0
- package/dist/types/twisty/{dom → old/dom}/viewers/TwistyViewerWrapper.d.ts +0 -0
- package/dist/types/twisty/old/dom/viewers/TwistyViewerWrapper.d.ts.map +1 -0
- package/dist/types/twisty/old/dom/viewers/canvas.d.ts +3 -0
- package/dist/types/twisty/old/dom/viewers/canvas.d.ts.map +1 -0
- package/dist/types/twisty/views/2D/Twisty2DPuzzle.d.ts +29 -0
- package/dist/types/twisty/views/2D/Twisty2DPuzzle.d.ts.map +1 -0
- package/dist/types/twisty/views/2D/Twisty2DPuzzleWrapper.d.ts +16 -0
- package/dist/types/twisty/views/2D/Twisty2DPuzzleWrapper.d.ts.map +1 -0
- package/dist/types/twisty/views/2D/Twisty2DSceneWrapper.d.ts +20 -0
- package/dist/types/twisty/views/2D/Twisty2DSceneWrapper.d.ts.map +1 -0
- 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/{3D → views/3D}/TAU.d.ts +0 -0
- package/dist/types/twisty/views/3D/TAU.d.ts.map +1 -0
- package/dist/types/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts +17 -0
- package/dist/types/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts.map +1 -0
- package/dist/types/twisty/{3D → views/3D}/Twisty3DRenderTarget.d.ts +0 -0
- package/dist/types/twisty/views/3D/Twisty3DRenderTarget.d.ts.map +1 -0
- package/dist/types/twisty/{3D → views/3D}/Twisty3DScene.d.ts +0 -0
- package/dist/types/twisty/views/3D/Twisty3DScene.d.ts.map +1 -0
- package/dist/types/twisty/views/3D/Twisty3DSceneWrapper.d.ts +28 -0
- package/dist/types/twisty/views/3D/Twisty3DSceneWrapper.d.ts.map +1 -0
- package/dist/types/twisty/views/3D/Twisty3DVantage.d.ts +32 -0
- package/dist/types/twisty/views/3D/Twisty3DVantage.d.ts.map +1 -0
- package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.d.ts +41 -0
- package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.d.ts.map +1 -0
- package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.spec.d.ts +5 -0
- package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.spec.d.ts.map +1 -0
- package/dist/types/twisty/{3D → views/3D}/puzzles/Cube3D.d.ts +11 -7
- package/dist/types/twisty/views/3D/puzzles/Cube3D.d.ts.map +1 -0
- package/dist/types/twisty/{3D → views/3D}/puzzles/KPuzzleWrapper.d.ts +2 -2
- package/dist/types/twisty/views/3D/puzzles/KPuzzleWrapper.d.ts.map +1 -0
- package/dist/types/twisty/views/3D/puzzles/PG3D.d.ts +57 -0
- package/dist/types/twisty/views/3D/puzzles/PG3D.d.ts.map +1 -0
- package/dist/types/twisty/{3D → views/3D}/puzzles/Twisty3DPuzzle.d.ts +1 -1
- package/dist/types/twisty/views/3D/puzzles/Twisty3DPuzzle.d.ts.map +1 -0
- package/dist/types/twisty/{3D → views/3D}/puzzles/TwistyTestBox.d.ts +2 -2
- package/dist/types/twisty/views/3D/puzzles/TwistyTestBox.d.ts.map +1 -0
- package/dist/types/twisty/views/TwistyAlgEditor/LeafTokens.d.ts +18 -0
- package/dist/types/twisty/views/TwistyAlgEditor/LeafTokens.d.ts.map +1 -0
- package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.css.d.ts +3 -0
- package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.css.d.ts.map +1 -0
- package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.d.ts +40 -0
- package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.d.ts.map +1 -0
- package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.spec.d.ts +5 -0
- package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.spec.d.ts.map +1 -0
- package/dist/types/twisty/views/TwistyAlgEditor/model.d.ts +61 -0
- package/dist/types/twisty/views/TwistyAlgEditor/model.d.ts.map +1 -0
- package/dist/types/twisty/views/TwistyAlgViewer.css.d.ts +3 -0
- package/dist/types/twisty/views/TwistyAlgViewer.css.d.ts.map +1 -0
- package/dist/types/twisty/{dom → views}/TwistyAlgViewer.d.ts +6 -6
- package/dist/types/twisty/views/TwistyAlgViewer.d.ts.map +1 -0
- package/dist/types/twisty/views/TwistyPlayer.d.ts +97 -0
- package/dist/types/twisty/views/TwistyPlayer.d.ts.map +1 -0
- package/dist/types/twisty/views/TwistyPlayerSettable.d.ts +71 -0
- package/dist/types/twisty/views/TwistyPlayerSettable.d.ts.map +1 -0
- package/dist/types/twisty/views/control-panel/TwistyButtonsV2.d.ts +33 -0
- package/dist/types/twisty/views/control-panel/TwistyButtonsV2.d.ts.map +1 -0
- package/dist/types/twisty/views/control-panel/TwistyScrubberV2.d.ts +14 -0
- package/dist/types/twisty/views/control-panel/TwistyScrubberV2.d.ts.map +1 -0
- package/dist/types/twisty/views/control-panel/webkit-fullscreen.d.ts +15 -0
- package/dist/types/twisty/views/control-panel/webkit-fullscreen.d.ts.map +1 -0
- package/dist/types/twisty/views/document.d.ts +2 -0
- package/dist/types/twisty/views/document.d.ts.map +1 -0
- package/dist/types/twisty/views/screenshot.d.ts +12 -0
- package/dist/types/twisty/views/screenshot.d.ts.map +1 -0
- package/dist/types/vendor/p-lazy/p-lazy.d.ts +10 -0
- package/dist/types/vendor/p-lazy/p-lazy.d.ts.map +1 -0
- 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/alg/index.html +37 -23
- package/docs/cubing/index.html +56 -252
- package/docs/cubing/scramble/index.html +122 -0
- package/docs/cubing/twisty/index.html +329 -0
- package/docs/main.css +15 -3
- package/package.json +83 -57
- package/src/cubing/.DS_Store +0 -0
- package/src/cubing/alg/.DS_Store +0 -0
- package/src/cubing/alg/Alg.ts +89 -0
- package/src/cubing/alg/common.ts +4 -2
- package/src/cubing/alg/iteration.ts +1 -1
- package/src/cubing/alg/parse.ts +2 -0
- package/src/cubing/alg/test/alg-comparison.ts +1 -0
- package/src/cubing/alg/units/.DS_Store +0 -0
- package/src/cubing/alg/units/Unit.ts +0 -3
- package/src/cubing/alg/units/containers/Commutator.ts +1 -1
- package/src/cubing/alg/units/leaves/Move.ts +4 -4
- package/src/cubing/bluetooth/.DS_Store +0 -0
- package/src/cubing/bluetooth/connect/index.ts +1 -1
- package/src/cubing/bluetooth/smart-puzzle/Heykube.ts +1 -1
- package/src/cubing/bluetooth/smart-puzzle/bluetooth-puzzle.ts +1 -1
- package/src/cubing/bluetooth/smart-puzzle/gan.ts +5 -5
- package/src/cubing/bluetooth/smart-puzzle/giiker.ts +2 -2
- package/src/cubing/bluetooth/smart-puzzle/gocube.ts +5 -5
- package/src/cubing/bluetooth/smart-robot/GanRobot.ts +5 -5
- package/src/cubing/bluetooth/smart-timer/GanTimer.ts +2 -2
- package/src/cubing/kpuzzle/.DS_Store +0 -0
- package/src/cubing/kpuzzle/3x3x3/3x3x3.kpuzzle.json.spec.ts +40 -0
- package/src/cubing/{puzzles/implementations/3x3x3/3x3x3.kpuzzle.json_.ts → kpuzzle/3x3x3/3x3x3.kpuzzle.json.ts} +11 -6
- package/src/cubing/kpuzzle/canon.spec.ts +6 -11
- package/src/cubing/kpuzzle/canonicalize.ts +1 -1
- package/src/cubing/kpuzzle/definition_types.ts +0 -3
- package/src/cubing/kpuzzle/index.ts +1 -0
- package/src/cubing/kpuzzle/prunetable.spec.ts +2 -4
- package/src/cubing/kpuzzle/puzzle-orientation.ts +1 -1
- package/src/cubing/kpuzzle/svg.ts +4 -9
- package/src/cubing/kpuzzle/transformations.ts +1 -1
- package/src/cubing/protocol/binary/binary3x3x3.spec.ts +5 -2
- package/src/cubing/protocol/binary/hex.ts +4 -4
- package/src/cubing/protocol/binary/orbit-indexing.ts +2 -2
- package/src/cubing/protocol/binary/puzzle-orientation.ts +2 -2
- package/src/cubing/puzzle-geometry/Options.ts +151 -22
- package/src/cubing/puzzle-geometry/PGPuzzles.spec.ts +24 -28
- package/src/cubing/puzzle-geometry/PermOriSet.ts +99 -98
- package/src/cubing/puzzle-geometry/PlatonicGenerator.ts +1 -1
- package/src/cubing/puzzle-geometry/PuzzleGeometry.ts +836 -867
- package/src/cubing/puzzle-geometry/Quat.ts +1 -68
- package/src/cubing/puzzle-geometry/SchreierSims.ts +2 -13
- package/src/cubing/puzzle-geometry/index.ts +2 -11
- package/src/cubing/puzzle-geometry/interfaces.ts +1 -27
- package/src/cubing/puzzle-geometry/orientcenters.spec.ts +24 -30
- package/src/cubing/puzzles/.DS_Store +0 -0
- package/src/cubing/puzzles/PuzzleLoader.ts +1 -1
- package/src/cubing/puzzles/async/async-pg3d.ts +5 -8
- package/src/cubing/puzzles/customPGPuzzleLoader.ts +60 -0
- package/src/cubing/puzzles/implementations/.DS_Store +0 -0
- package/src/cubing/puzzles/implementations/2x2x2/{2x2x2.kpuzzle.json_.ts → 2x2x2.kpuzzle.json.ts} +0 -0
- package/src/cubing/puzzles/implementations/2x2x2/index.ts +1 -1
- package/src/cubing/puzzles/implementations/3x3x3/index.ts +2 -3
- package/src/cubing/puzzles/implementations/clock/{clock.kpuzzle.json_.ts → clock.kpuzzle.json.ts} +0 -0
- package/src/cubing/puzzles/implementations/clock/index.ts +1 -1
- package/src/cubing/puzzles/implementations/fto/index.ts +19 -11
- package/src/cubing/puzzles/implementations/pyraminx/{pyraminx.kpuzzle.json_.ts → pyraminx.kpuzzle.json.ts} +0 -0
- package/src/cubing/puzzles/implementations/square1/index.ts +1 -2
- package/src/cubing/puzzles/implementations/square1/{sq1-hyperorbit.kpuzzle.json_.ts → sq1-hyperorbit.kpuzzle.json.ts} +0 -0
- package/src/cubing/puzzles/index.ts +30 -20
- package/src/cubing/puzzles/stickerings/appearance.ts +10 -9
- package/src/cubing/puzzles/stickerings/cube-stickerings.ts +8 -0
- package/src/cubing/puzzles/stickerings/fto-stickerings.ts +9 -0
- package/src/cubing/puzzles/stickerings/global-custom-stickering-hack.ts +61 -0
- package/src/cubing/search/.DS_Store +0 -0
- package/src/cubing/search/.gitignore +1 -2
- package/src/cubing/search/esm-test-worker.js +1 -1
- package/src/cubing/search/index.ts +1 -0
- package/src/cubing/search/inside/api.spec.ts +1 -0
- package/src/cubing/search/inside/api.ts +6 -1
- package/src/cubing/search/inside/solve/parseSGS.ts +7 -11
- package/src/cubing/search/inside/solve/puzzles/2x2x2.ts +3 -3
- package/src/cubing/search/inside/solve/puzzles/3x3x3/filter.ts +0 -6
- package/src/cubing/search/inside/solve/puzzles/3x3x3/index.ts +0 -2
- package/src/cubing/search/inside/solve/puzzles/FTO.sgs +264 -0
- package/src/cubing/search/inside/solve/puzzles/megaminx.sgs.json.ts +4 -6
- package/src/cubing/search/inside/solve/puzzles/skewb.sgs.json.ts +4 -6
- package/src/cubing/search/inside/solve/tremble.ts +6 -9
- package/src/cubing/search/inside/solve/vendor/cstimer/src/js/lib/mathlib.ts +20 -822
- package/src/cubing/search/inside/solve/vendor/cstimer/src/js/scramble/scramble_444.ts +177 -252
- package/src/cubing/search/inside/solve/vendor/min2phase/gwt.js +62 -222
- package/src/cubing/search/inside/solve/vendor/random-uint-below/get-random-values.ts +4 -5
- package/src/cubing/search/inside/solve/vendor/random-uint-below/random-int.ts +9 -11
- package/src/cubing/search/inside/solve/vendor/sq12phase/scramble_sq1.js +13 -582
- package/src/cubing/search/instantiator.ts +11 -7
- package/src/cubing/search/outside.ts +8 -2
- package/src/cubing/search/worker-inside-generated-string.js +1 -1
- package/src/cubing/stream/.DS_Store +0 -0
- package/src/cubing/stream/process/ReorientedStream.ts +1 -1
- package/src/cubing/stream/twizzle/TwizzleStream.ts +11 -8
- package/src/cubing/stream/websocket-proxy.ts +1 -3
- package/src/cubing/twisty/.DS_Store +0 -0
- package/src/cubing/twisty/controllers/TwistyAnimationController.ts +248 -0
- package/src/cubing/twisty/controllers/TwistyPlayerController.ts +38 -0
- package/src/cubing/twisty/heavy-code-imports/3d.ts +18 -0
- package/src/cubing/twisty/heavy-code-imports/dynamic-entries/3d.ts +41 -0
- package/src/cubing/twisty/index.ts +24 -17
- package/src/cubing/twisty/model/.DS_Store +0 -0
- package/src/cubing/twisty/model/PromiseFreshener.ts +49 -0
- package/src/cubing/twisty/model/TwistyPlayerModel.ts +222 -0
- package/src/cubing/twisty/model/UserVisibleErrorTracker.ts +22 -0
- package/src/cubing/twisty/model/helpers.ts +47 -0
- package/src/cubing/{search/vendor → twisty/model/props}/.DS_Store +0 -0
- package/src/cubing/twisty/model/props/TwistyProp.spec.ts +38 -0
- package/src/cubing/twisty/model/props/TwistyProp.ts +366 -0
- package/src/cubing/twisty/model/props/TwistyPropDebugger.ts +370 -0
- package/src/cubing/twisty/model/props/general/URLProp.ts +14 -0
- package/src/cubing/{solve → twisty/model/props/puzzle}/.DS_Store +0 -0
- package/src/cubing/twisty/model/props/puzzle/display/HintFaceletProp.ts +10 -0
- package/src/cubing/twisty/model/props/puzzle/display/SpriteProp.ts +43 -0
- package/src/cubing/twisty/model/props/puzzle/display/StickeringProp.ts +8 -0
- package/src/cubing/twisty/model/props/puzzle/state/AlgProp.ts +91 -0
- package/src/cubing/twisty/model/props/puzzle/state/AlgTransformationProp.ts +28 -0
- package/src/cubing/twisty/model/props/puzzle/state/AnchoredStartProp.ts +44 -0
- package/src/cubing/twisty/model/props/puzzle/state/CurrentLeavesProp.ts +91 -0
- package/src/cubing/twisty/model/props/puzzle/state/CurrentLeavesSimplified.ts +48 -0
- package/src/cubing/twisty/model/props/puzzle/state/CurrentTransformationProp.ts +46 -0
- package/src/cubing/twisty/model/props/puzzle/state/IndexerConstructorProp.ts +46 -0
- package/src/cubing/twisty/model/props/puzzle/state/IndexerConstructorRequestProp.ts +15 -0
- package/src/cubing/twisty/model/props/puzzle/state/IndexerProp.ts +24 -0
- package/src/cubing/twisty/model/props/puzzle/state/LegacyPositionProp.ts +22 -0
- package/src/cubing/twisty/model/props/puzzle/state/PuzzleAlgProp.ts +28 -0
- package/src/cubing/twisty/model/props/puzzle/state/SetupAnchorProp.ts +8 -0
- package/src/cubing/twisty/model/props/puzzle/structure/PuzzleDefProp.ts +14 -0
- package/src/cubing/twisty/model/props/puzzle/structure/PuzzleDescriptionProp.ts +14 -0
- package/src/cubing/twisty/model/props/puzzle/structure/PuzzleIDProp.ts +12 -0
- package/src/cubing/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.ts +17 -0
- package/src/cubing/twisty/model/props/puzzle/structure/PuzzleLoaderProp.ts +38 -0
- package/src/cubing/twisty/model/props/timeline/CoarseTimelineInfoProp.ts +45 -0
- package/src/cubing/twisty/model/props/timeline/DetailedTimelineInfoProp.ts +76 -0
- package/src/cubing/twisty/model/props/timeline/PlayingInfoProp.ts +51 -0
- package/src/cubing/twisty/model/props/timeline/TempoScaleProp.ts +13 -0
- package/src/cubing/twisty/model/props/timeline/TimestampRequestProp.ts +38 -0
- package/src/cubing/twisty/model/props/viewer/BackViewProp.ts +10 -0
- package/src/cubing/twisty/model/props/viewer/BackgroundProp.ts +10 -0
- package/src/cubing/twisty/model/props/viewer/ButtonAppearanceProp.ts +86 -0
- package/src/cubing/twisty/model/props/viewer/ControlPanelProp.ts +10 -0
- package/src/cubing/twisty/model/props/viewer/LatitudeLimit.ts +11 -0
- package/src/cubing/twisty/model/props/viewer/OrbitCoordinatesProp.ts +56 -0
- package/src/cubing/twisty/model/props/viewer/OrbitCoordinatesRequestProp.ts +69 -0
- package/src/cubing/twisty/model/props/viewer/TimeRangeProp.ts +15 -0
- package/src/cubing/twisty/model/props/viewer/ViewerLinkProp.ts +10 -0
- package/src/cubing/twisty/model/props/viewer/VisualizationProp.ts +10 -0
- package/src/cubing/twisty/model/props/viewer/VisualizationStrategyProp.ts +45 -0
- package/src/cubing/twisty/old/.DS_Store +0 -0
- package/src/cubing/twisty/old/animation/.DS_Store +0 -0
- package/src/cubing/twisty/{animation → old/animation}/RenderScheduler.ts +5 -0
- package/src/cubing/twisty/{animation → old/animation}/Timeline.ts +0 -0
- package/src/cubing/twisty/{animation → old/animation}/cursor/AlgCursor.ts +15 -8
- package/src/cubing/twisty/{animation → old/animation}/cursor/CursorTypes.ts +4 -4
- package/src/cubing/twisty/{animation → old/animation}/easing.ts +0 -0
- package/src/cubing/{search/inside → twisty/old/animation/indexer}/.DS_Store +0 -0
- package/src/cubing/twisty/{animation → old/animation}/indexer/AlgDuration.ts +1 -1
- package/src/cubing/twisty/old/animation/indexer/AlgIndexer.ts +86 -0
- package/src/cubing/twisty/{animation → old/animation}/indexer/SimpleAlgIndexer.ts +9 -6
- package/src/cubing/twisty/old/animation/indexer/simultaneous-moves/SimultaneousMoveIndexer.ts +181 -0
- package/src/cubing/twisty/old/animation/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.ts +243 -0
- package/src/cubing/twisty/{animation → old/animation}/indexer/simultaneous-moves/simul-moves.ts +46 -34
- package/src/cubing/twisty/{animation → old/animation}/indexer/tree/AlgWalker.ts +6 -3
- package/src/cubing/twisty/{animation → old/animation}/indexer/tree/TreeAlgIndexer.ts +8 -5
- package/src/cubing/twisty/{animation → old/animation}/indexer/tree/chunkAlgs.ts +2 -2
- package/src/cubing/twisty/{animation → old/animation}/stream/timeline-move-calculation-draft.spec.ts.TODO +0 -0
- package/src/cubing/twisty/{animation → old/animation}/stream/timeline-move-calculation-draft.ts +2 -2
- package/src/cubing/twisty/old/dom/.DS_Store +0 -0
- package/src/cubing/twisty/{dom/TwistyAlgViewer.css_.ts → old/dom/TwistyAlgViewerV1.css.ts} +0 -0
- package/src/cubing/twisty/{dom/TwistyAlgViewer.ts → old/dom/TwistyAlgViewerV1.ts} +43 -36
- package/src/cubing/twisty/{dom/TwistyPlayer.css_.ts → old/dom/TwistyPlayer.css.ts} +28 -1
- package/src/cubing/twisty/{dom → old/dom}/TwistyPlayer.spec.ts +5 -6
- package/src/cubing/twisty/{dom → old/dom}/TwistyPlayer.ts +36 -43
- package/src/cubing/twisty/{dom → old/dom}/TwistyPlayerConfig.ts +27 -10
- package/src/cubing/twisty/{dom/controls/TwistyControlElement.ts.ts → old/dom/controls/TwistyControlElement.ts} +0 -0
- package/src/cubing/twisty/{dom/controls/TwistyScrubber.css_.ts → old/dom/controls/TwistyScrubber.css.ts} +0 -0
- package/src/cubing/twisty/{dom → old/dom}/controls/TwistyScrubber.ts +3 -3
- package/src/cubing/twisty/{dom/controls/buttons.css_.ts → old/dom/controls/buttons.css.ts} +14 -1
- package/src/cubing/twisty/{dom → old/dom}/controls/buttons.spec.ts +1 -1
- package/src/cubing/twisty/{dom → old/dom}/controls/buttons.ts +15 -15
- package/src/cubing/twisty/{dom → old/dom}/element/ClassListManager.ts +0 -0
- package/src/cubing/twisty/{dom → old/dom}/element/ElementConfig.ts +1 -1
- package/src/cubing/twisty/{dom → old/dom}/element/ManagedCustomElement.ts +0 -0
- package/src/cubing/twisty/{dom → old/dom}/element/node-custom-element-shims.ts +0 -0
- package/src/cubing/twisty/{dom/stream/TwistyStreamSource.css_.ts → old/dom/stream/TwistyStreamSource.css.ts} +0 -0
- package/src/cubing/twisty/{dom → old/dom}/stream/TwistyStreamSource.ts +8 -8
- package/src/cubing/twisty/{dom → old/dom}/viewers/Twisty2DSVG.ts +7 -9
- package/src/cubing/twisty/{dom/viewers/Twisty2DSVGView.css_.ts → old/dom/viewers/Twisty2DSVGView.css.ts} +0 -0
- package/src/cubing/twisty/{dom/viewers/Twisty3DCanvas.css_.ts → old/dom/viewers/Twisty3DCanvas.css.ts} +0 -0
- package/src/cubing/twisty/{dom → old/dom}/viewers/Twisty3DCanvas.ts +5 -12
- package/src/cubing/twisty/{dom → old/dom}/viewers/TwistyOrbitControls.ts +53 -20
- package/src/cubing/twisty/{dom → old/dom}/viewers/TwistyViewerElement.ts +1 -1
- package/src/cubing/twisty/{dom/viewers/TwistyViewerWrapper.css_.ts → old/dom/viewers/TwistyViewerWrapper.css.ts} +0 -0
- package/src/cubing/twisty/{dom → old/dom}/viewers/TwistyViewerWrapper.ts +1 -1
- package/src/cubing/twisty/old/dom/viewers/canvas.ts +9 -0
- package/src/cubing/twisty/views/.DS_Store +0 -0
- package/src/cubing/twisty/views/2D/Twisty2DPuzzle.ts +150 -0
- package/src/cubing/twisty/views/2D/Twisty2DPuzzleWrapper.ts +52 -0
- package/src/cubing/twisty/views/2D/Twisty2DSceneWrapper.ts +77 -0
- package/src/cubing/twisty/views/3D/RendererPool.ts +53 -0
- package/src/cubing/twisty/{3D → views/3D}/TAU.ts +0 -0
- package/src/cubing/twisty/views/3D/Twisty3DPuzzleWrapper.ts +168 -0
- package/src/cubing/twisty/{3D → views/3D}/Twisty3DRenderTarget.ts +0 -0
- package/src/cubing/twisty/{3D → views/3D}/Twisty3DScene.ts +0 -0
- package/src/cubing/twisty/views/3D/Twisty3DSceneWrapper.ts +144 -0
- package/src/cubing/twisty/views/3D/Twisty3DVantage.ts +244 -0
- package/src/cubing/twisty/views/3D/TwistyOrbitControlsV2.spec.ts +209 -0
- package/src/cubing/twisty/views/3D/TwistyOrbitControlsV2.ts +270 -0
- package/src/cubing/twisty/{3D → views/3D}/puzzles/Cube3D.ts +36 -15
- package/src/cubing/twisty/{3D → views/3D}/puzzles/KPuzzleWrapper.ts +4 -5
- package/src/cubing/twisty/views/3D/puzzles/PG3D.ts +988 -0
- package/src/cubing/twisty/views/3D/puzzles/Twisty3DPuzzle.ts +6 -0
- package/src/cubing/twisty/{3D → views/3D}/puzzles/TwistyTestBox.ts +2 -2
- package/src/cubing/twisty/views/TwistyAlgEditor/LeafTokens.ts +116 -0
- package/src/cubing/twisty/{dom/TwistyAlgEditor.css_.ts → views/TwistyAlgEditor/TwistyAlgEditor.css.ts} +3 -1
- package/src/cubing/twisty/{dom → views/TwistyAlgEditor}/TwistyAlgEditor.spec.ts +7 -6
- package/src/cubing/twisty/views/TwistyAlgEditor/TwistyAlgEditor.ts +360 -0
- package/src/cubing/twisty/views/TwistyAlgEditor/model.ts +179 -0
- package/src/cubing/twisty/views/TwistyAlgViewer.css.ts +25 -0
- package/src/cubing/twisty/views/TwistyAlgViewer.ts +502 -0
- package/src/cubing/twisty/views/TwistyPlayer.ts +327 -0
- package/src/cubing/twisty/views/TwistyPlayerSettable.ts +111 -0
- package/src/cubing/twisty/views/control-panel/TwistyButtonsV2.ts +159 -0
- package/src/cubing/twisty/views/control-panel/TwistyScrubberV2.ts +145 -0
- package/src/cubing/twisty/views/control-panel/webkit-fullscreen.ts +44 -0
- package/src/cubing/twisty/views/document.ts +4 -0
- package/src/cubing/twisty/views/screenshot.ts +90 -0
- package/src/cubing/vendor/.DS_Store +0 -0
- package/src/cubing/vendor/p-lazy/license +9 -0
- package/src/cubing/vendor/p-lazy/p-lazy.ts +52 -0
- package/src/cubing/vendor/p-lazy/readme.md +54 -0
- package/src/cubing/vendor/three/examples/jsm/libs/stats.modified.module.ts +179 -0
- package/dist/esm/chunk-CWVB5RRW.js.map +0 -7
- package/dist/esm/chunk-KKSDHNLH.js.map +0 -7
- package/dist/esm/chunk-YNB7QLBF.js.map +0 -7
- package/dist/esm/worker-inside-generated-string-LT4NV55Q.js +0 -2826
- package/dist/esm/worker-inside-generated-string-LT4NV55Q.js.map +0 -7
- package/dist/types/puzzles/implementations/2x2x2/2x2x2.kpuzzle.json_.d.ts.map +0 -1
- package/dist/types/puzzles/implementations/3x3x3/3x3x3.kpuzzle.json_.d.ts +0 -3
- package/dist/types/puzzles/implementations/3x3x3/3x3x3.kpuzzle.json_.d.ts.map +0 -1
- package/dist/types/puzzles/implementations/clock/clock.kpuzzle.json_.d.ts.map +0 -1
- package/dist/types/puzzles/implementations/pyraminx/pyraminx.kpuzzle.json_.d.ts.map +0 -1
- package/dist/types/puzzles/implementations/square1/sq1-hyperorbit.kpuzzle.json_.d.ts.map +0 -1
- package/dist/types/search/inside/solve/vendor/cstimer/src/js/lgarron-additions-for-typescript/shim-lib.d.ts +0 -3
- package/dist/types/search/inside/solve/vendor/cstimer/src/js/lgarron-additions-for-typescript/shim-lib.d.ts.map +0 -1
- package/dist/types/twisty/3D/TAU.d.ts.map +0 -1
- package/dist/types/twisty/3D/Twisty3DRenderTarget.d.ts.map +0 -1
- package/dist/types/twisty/3D/Twisty3DScene.d.ts.map +0 -1
- package/dist/types/twisty/3D/puzzles/Cube3D.d.ts.map +0 -1
- package/dist/types/twisty/3D/puzzles/KPuzzleWrapper.d.ts.map +0 -1
- package/dist/types/twisty/3D/puzzles/PG3D.d.ts +0 -51
- package/dist/types/twisty/3D/puzzles/PG3D.d.ts.map +0 -1
- package/dist/types/twisty/3D/puzzles/Twisty3DPuzzle.d.ts.map +0 -1
- package/dist/types/twisty/3D/puzzles/TwistyTestBox.d.ts.map +0 -1
- package/dist/types/twisty/animation/RenderScheduler.d.ts.map +0 -1
- package/dist/types/twisty/animation/Timeline.d.ts.map +0 -1
- package/dist/types/twisty/animation/cursor/AlgCursor.d.ts.map +0 -1
- package/dist/types/twisty/animation/cursor/CursorTypes.d.ts.map +0 -1
- package/dist/types/twisty/animation/easing.d.ts.map +0 -1
- package/dist/types/twisty/animation/indexer/AlgDuration.d.ts.map +0 -1
- package/dist/types/twisty/animation/indexer/AlgIndexer.d.ts +0 -15
- package/dist/types/twisty/animation/indexer/AlgIndexer.d.ts.map +0 -1
- package/dist/types/twisty/animation/indexer/SimpleAlgIndexer.d.ts.map +0 -1
- package/dist/types/twisty/animation/indexer/simultaneous-moves/SimultaneousMoveIndexer.d.ts.map +0 -1
- package/dist/types/twisty/animation/indexer/simultaneous-moves/simul-moves.d.ts +0 -25
- package/dist/types/twisty/animation/indexer/simultaneous-moves/simul-moves.d.ts.map +0 -1
- package/dist/types/twisty/animation/indexer/tree/AlgWalker.d.ts.map +0 -1
- package/dist/types/twisty/animation/indexer/tree/TreeAlgIndexer.d.ts.map +0 -1
- package/dist/types/twisty/animation/indexer/tree/chunkAlgs.d.ts +0 -3
- package/dist/types/twisty/animation/indexer/tree/chunkAlgs.d.ts.map +0 -1
- package/dist/types/twisty/animation/stream/timeline-move-calculation-draft.d.ts.map +0 -1
- package/dist/types/twisty/dom/TwistyAlgEditor.css_.d.ts +0 -3
- package/dist/types/twisty/dom/TwistyAlgEditor.css_.d.ts.map +0 -1
- package/dist/types/twisty/dom/TwistyAlgEditor.d.ts +0 -27
- package/dist/types/twisty/dom/TwistyAlgEditor.d.ts.map +0 -1
- package/dist/types/twisty/dom/TwistyAlgEditorStartCharSearch.d.ts +0 -26
- package/dist/types/twisty/dom/TwistyAlgEditorStartCharSearch.d.ts.map +0 -1
- package/dist/types/twisty/dom/TwistyAlgViewer.css_.d.ts.map +0 -1
- package/dist/types/twisty/dom/TwistyAlgViewer.d.ts.map +0 -1
- package/dist/types/twisty/dom/TwistyPlayer.css_.d.ts.map +0 -1
- package/dist/types/twisty/dom/TwistyPlayer.d.ts.map +0 -1
- package/dist/types/twisty/dom/TwistyPlayerConfig.d.ts.map +0 -1
- package/dist/types/twisty/dom/controls/TwistyControlElement.ts.d.ts +0 -2
- package/dist/types/twisty/dom/controls/TwistyControlElement.ts.d.ts.map +0 -1
- package/dist/types/twisty/dom/controls/TwistyScrubber.css_.d.ts.map +0 -1
- package/dist/types/twisty/dom/controls/TwistyScrubber.d.ts.map +0 -1
- package/dist/types/twisty/dom/controls/buttons.css_.d.ts.map +0 -1
- package/dist/types/twisty/dom/controls/buttons.d.ts.map +0 -1
- package/dist/types/twisty/dom/element/ClassListManager.d.ts.map +0 -1
- package/dist/types/twisty/dom/element/ElementConfig.d.ts.map +0 -1
- package/dist/types/twisty/dom/element/ManagedCustomElement.d.ts.map +0 -1
- package/dist/types/twisty/dom/element/node-custom-element-shims.d.ts.map +0 -1
- package/dist/types/twisty/dom/stream/TwistyStreamSource.css_.d.ts.map +0 -1
- package/dist/types/twisty/dom/stream/TwistyStreamSource.d.ts.map +0 -1
- package/dist/types/twisty/dom/viewers/Twisty2DSVG.d.ts.map +0 -1
- package/dist/types/twisty/dom/viewers/Twisty2DSVGView.css_.d.ts.map +0 -1
- package/dist/types/twisty/dom/viewers/Twisty3DCanvas.css_.d.ts.map +0 -1
- package/dist/types/twisty/dom/viewers/Twisty3DCanvas.d.ts.map +0 -1
- package/dist/types/twisty/dom/viewers/TwistyOrbitControls.d.ts.map +0 -1
- package/dist/types/twisty/dom/viewers/TwistyViewerElement.d.ts +0 -4
- package/dist/types/twisty/dom/viewers/TwistyViewerElement.d.ts.map +0 -1
- package/dist/types/twisty/dom/viewers/TwistyViewerWrapper.css_.d.ts.map +0 -1
- package/dist/types/twisty/dom/viewers/TwistyViewerWrapper.d.ts.map +0 -1
- package/dist/types/twisty/dom/viewers/canvas.d.ts +0 -2
- package/dist/types/twisty/dom/viewers/canvas.d.ts.map +0 -1
- package/dist/types/vendor/three/examples/jsm/libs/stats.module.d.ts +0 -2
- package/dist/types/vendor/three/examples/jsm/libs/stats.module.d.ts.map +0 -1
- package/dist/types/vendor/three/examples/jsm/libs/stats.module.wrapped.d.ts +0 -21
- package/dist/types/vendor/three/examples/jsm/libs/stats.module.wrapped.d.ts.map +0 -1
- package/src/cubing/protocol/.DS_Store +0 -0
- package/src/cubing/puzzle-geometry/.DS_Store +0 -0
- package/src/cubing/search/inside/solve/.DS_Store +0 -0
- package/src/cubing/search/inside/solve/puzzles/.DS_Store +0 -0
- package/src/cubing/search/inside/solve/puzzles/3x3x3/.DS_Store +0 -0
- package/src/cubing/search/inside/solve/vendor/.DS_Store +0 -0
- package/src/cubing/search/inside/solve/vendor/cstimer/.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/search/inside/solve/vendor/cstimer/src/js/lgarron-additions-for-typescript/.DS_Store +0 -0
- package/src/cubing/search/inside/solve/vendor/cstimer/src/js/lgarron-additions-for-typescript/shim-lib.ts +0 -13
- package/src/cubing/search/inside/solve/vendor/cstimer/src/js/lib/.DS_Store +0 -0
- package/src/cubing/search/inside/solve/vendor/cstimer/src/js/scramble/.DS_Store +0 -0
- package/src/cubing/search/inside/solve/vendor/sgs/.DS_Store +0 -0
- package/src/cubing/search/inside/solve/vendor/sgs/src/.DS_Store +0 -0
- package/src/cubing/search/inside/solve/vendor/sgs/src/test/.DS_Store +0 -0
- package/src/cubing/search/vendor/comlink-everywhere/.DS_Store +0 -0
- package/src/cubing/twisty/3D/puzzles/PG3D.ts +0 -600
- package/src/cubing/twisty/3D/puzzles/Twisty3DPuzzle.ts +0 -9
- package/src/cubing/twisty/3D/puzzles/mkbhd.svg +0 -5
- package/src/cubing/twisty/animation/indexer/AlgIndexer.ts +0 -25
- package/src/cubing/twisty/animation/indexer/simultaneous-moves/SimultaneousMoveIndexer.ts +0 -168
- package/src/cubing/twisty/dom/TwistyAlgEditor.ts +0 -373
- package/src/cubing/twisty/dom/TwistyAlgEditorStartCharSearch.ts +0 -138
- package/src/cubing/twisty/dom/viewers/canvas.ts +0 -4
- package/src/cubing/twisty/views/3D/.DS_Store +0 -0
- package/src/cubing/vendor/three/.DS_Store +0 -0
- package/src/cubing/vendor/three/examples/jsm/libs/stats.module.ts +0 -2
- package/src/cubing/vendor/three/examples/jsm/libs/stats.module.wrapped.d.ts +0 -24
- package/src/cubing/vendor/three/examples/jsm/libs/stats.module.wrapped.js +0 -178
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { Move } from "../../../../../alg";
|
|
2
|
+
import { Direction } from "../../../../old/animation/cursor/CursorTypes";
|
|
3
|
+
import type {
|
|
4
|
+
AlgIndexer,
|
|
5
|
+
CurrentMoveInfo,
|
|
6
|
+
} from "../../../../old/animation/indexer/AlgIndexer";
|
|
7
|
+
import type { DetailedTimelineInfo } from "../../timeline/DetailedTimelineInfoProp";
|
|
8
|
+
import { TwistyPropDerived } from "../../TwistyProp";
|
|
9
|
+
|
|
10
|
+
interface PositionPropInputs {
|
|
11
|
+
indexer: AlgIndexer<any>;
|
|
12
|
+
detailedTimelineInfo: DetailedTimelineInfo;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// TODO: Rename "current" (implies a single one) to "active"?
|
|
16
|
+
export class CurrentLeavesProp extends TwistyPropDerived<
|
|
17
|
+
PositionPropInputs,
|
|
18
|
+
CurrentMoveInfo
|
|
19
|
+
> {
|
|
20
|
+
derive(inputs: PositionPropInputs): CurrentMoveInfo {
|
|
21
|
+
// Copied from AlgCursor
|
|
22
|
+
if (inputs.indexer.currentMoveInfo) {
|
|
23
|
+
return inputs.indexer.currentMoveInfo(
|
|
24
|
+
inputs.detailedTimelineInfo.timestamp,
|
|
25
|
+
);
|
|
26
|
+
} else {
|
|
27
|
+
const idx = inputs.indexer.timestampToIndex(
|
|
28
|
+
inputs.detailedTimelineInfo.timestamp,
|
|
29
|
+
);
|
|
30
|
+
const currentMoveInfo: CurrentMoveInfo = {
|
|
31
|
+
stateIndex: idx,
|
|
32
|
+
currentMoves: [],
|
|
33
|
+
movesFinishing: [],
|
|
34
|
+
movesFinished: [],
|
|
35
|
+
movesStarting: [],
|
|
36
|
+
latestStart: -Infinity,
|
|
37
|
+
earliestEnd: Infinity,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
if (inputs.indexer.numAnimatedLeaves() > 0) {
|
|
41
|
+
const move = inputs.indexer.getAnimLeaf(idx)?.as(Move);
|
|
42
|
+
if (!move) {
|
|
43
|
+
return currentMoveInfo;
|
|
44
|
+
}
|
|
45
|
+
const start = inputs.indexer.indexToMoveStartTimestamp(idx);
|
|
46
|
+
const duration = inputs.indexer.moveDuration(idx);
|
|
47
|
+
const fraction =
|
|
48
|
+
(inputs.detailedTimelineInfo.timestamp - start) / duration;
|
|
49
|
+
const end = start + duration;
|
|
50
|
+
const currentMove = {
|
|
51
|
+
move,
|
|
52
|
+
direction: Direction.Forwards,
|
|
53
|
+
fraction,
|
|
54
|
+
startTimestamp: start,
|
|
55
|
+
endTimestamp: end,
|
|
56
|
+
};
|
|
57
|
+
if (fraction === 0) {
|
|
58
|
+
currentMoveInfo.movesStarting.push(currentMove);
|
|
59
|
+
// // TODO: push this into the indexer
|
|
60
|
+
// position.state = combineTransformations(
|
|
61
|
+
// inputs.def,
|
|
62
|
+
// state,
|
|
63
|
+
// transformationForMove(inputs.def, move),
|
|
64
|
+
// ) as Transformation;
|
|
65
|
+
} else if (fraction === 1) {
|
|
66
|
+
currentMoveInfo.movesFinishing.push(currentMove);
|
|
67
|
+
// // TODO: push this into the indexer
|
|
68
|
+
// position.state = combineTransformations(
|
|
69
|
+
// inputs.def,
|
|
70
|
+
// state,
|
|
71
|
+
// transformationForMove(inputs.def, move),
|
|
72
|
+
// ) as Transformation;
|
|
73
|
+
} else {
|
|
74
|
+
// TODO
|
|
75
|
+
currentMoveInfo.currentMoves.push(currentMove);
|
|
76
|
+
currentMoveInfo.latestStart = Math.max(
|
|
77
|
+
currentMoveInfo.latestStart,
|
|
78
|
+
start,
|
|
79
|
+
);
|
|
80
|
+
currentMoveInfo.earliestEnd = Math.min(
|
|
81
|
+
currentMoveInfo.earliestEnd,
|
|
82
|
+
end,
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
// }
|
|
86
|
+
// }
|
|
87
|
+
}
|
|
88
|
+
return currentMoveInfo;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
|
|
6
|
+
interface CurrentLeavesSimplifiedPropInputs {
|
|
7
|
+
currentMoveInfo: CurrentMoveInfo;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface CurrentLeavesSimplified {
|
|
11
|
+
stateIndex: number;
|
|
12
|
+
movesFinishing: Move[];
|
|
13
|
+
movesFinished: Move[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// This started as a version of `CurrentLeaves` without highly timestamp-sensitive info like fractions, to enable easier caching.
|
|
17
|
+
export class CurrentLeavesSimplifiedProp extends TwistyPropDerived<
|
|
18
|
+
CurrentLeavesSimplifiedPropInputs,
|
|
19
|
+
CurrentLeavesSimplified
|
|
20
|
+
> {
|
|
21
|
+
derive(inputs: CurrentLeavesSimplifiedPropInputs): CurrentLeavesSimplified {
|
|
22
|
+
return {
|
|
23
|
+
stateIndex: inputs.currentMoveInfo.stateIndex,
|
|
24
|
+
movesFinishing: inputs.currentMoveInfo.movesFinishing.map(
|
|
25
|
+
(currentMoveInfo) => currentMoveInfo.move,
|
|
26
|
+
),
|
|
27
|
+
movesFinished: inputs.currentMoveInfo.movesFinished.map(
|
|
28
|
+
(currentMoveInfo) => currentMoveInfo.move,
|
|
29
|
+
),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
canReuse(v1: CurrentLeavesSimplified, v2: CurrentLeavesSimplified): boolean {
|
|
34
|
+
return (
|
|
35
|
+
v1.stateIndex === v2.stateIndex &&
|
|
36
|
+
arrayEqualsCompare(
|
|
37
|
+
v1.movesFinishing,
|
|
38
|
+
v2.movesFinishing,
|
|
39
|
+
(m1: Move, m2: Move) => m1.isIdentical(m2),
|
|
40
|
+
) &&
|
|
41
|
+
arrayEqualsCompare(
|
|
42
|
+
v1.movesFinished,
|
|
43
|
+
v2.movesFinished,
|
|
44
|
+
(m1: Move, m2: Move) => m1.isIdentical(m2),
|
|
45
|
+
)
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { KSolvePuzzle } from "../../../..";
|
|
2
|
+
import {
|
|
3
|
+
combineTransformations,
|
|
4
|
+
KPuzzleDefinition,
|
|
5
|
+
Transformation,
|
|
6
|
+
} from "../../../../../kpuzzle";
|
|
7
|
+
import type { AlgIndexer } from "../../../../old/animation/indexer/AlgIndexer";
|
|
8
|
+
import type { CurrentLeavesSimplified } from "./CurrentLeavesSimplified";
|
|
9
|
+
import { TwistyPropDerived } from "../../TwistyProp";
|
|
10
|
+
|
|
11
|
+
interface CurrentTransformationPropInputs {
|
|
12
|
+
anchoredStart: Transformation;
|
|
13
|
+
currentLeavesSimplified: CurrentLeavesSimplified;
|
|
14
|
+
indexer: AlgIndexer<any>;
|
|
15
|
+
def: KPuzzleDefinition;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// TODO: Make this so we don't have to handle the finishing moves?
|
|
19
|
+
export class CurrentTransformationProp extends TwistyPropDerived<
|
|
20
|
+
CurrentTransformationPropInputs,
|
|
21
|
+
Transformation
|
|
22
|
+
> {
|
|
23
|
+
derive(inputs: CurrentTransformationPropInputs): Transformation {
|
|
24
|
+
let state: Transformation = inputs.indexer.transformAtIndex(
|
|
25
|
+
inputs.currentLeavesSimplified.stateIndex,
|
|
26
|
+
) as any;
|
|
27
|
+
state = combineTransformations(inputs.def, inputs.anchoredStart, state);
|
|
28
|
+
const ksolvePuzzle = new KSolvePuzzle(inputs.def); // TODO: put this elsewhere.
|
|
29
|
+
// TODO: handle non-commutative finished/finishing/current moves.
|
|
30
|
+
for (const finishingMove of inputs.currentLeavesSimplified.movesFinishing) {
|
|
31
|
+
state = combineTransformations(
|
|
32
|
+
inputs.def,
|
|
33
|
+
state,
|
|
34
|
+
ksolvePuzzle.stateFromMove(finishingMove),
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
for (const finishedMove of inputs.currentLeavesSimplified.movesFinished) {
|
|
38
|
+
state = combineTransformations(
|
|
39
|
+
inputs.def,
|
|
40
|
+
state,
|
|
41
|
+
ksolvePuzzle.stateFromMove(finishedMove),
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
return state;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
|
|
12
|
+
interface IndexerConstructorPropInputs {
|
|
13
|
+
puzzle: PuzzleID;
|
|
14
|
+
alg: AlgWithIssues;
|
|
15
|
+
visualizationStrategy: VisualizationStrategy;
|
|
16
|
+
indexerConstructorRequest: IndexerStrategyName;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// TODO: Also handle PG3D vs. 3D
|
|
20
|
+
export class IndexerConstructorProp extends TwistyPropDerived<
|
|
21
|
+
IndexerConstructorPropInputs,
|
|
22
|
+
IndexerConstructor
|
|
23
|
+
> {
|
|
24
|
+
derive(inputs: IndexerConstructorPropInputs): IndexerConstructor {
|
|
25
|
+
switch (inputs.indexerConstructorRequest) {
|
|
26
|
+
case "auto":
|
|
27
|
+
if (
|
|
28
|
+
countMoves(inputs.alg.alg) < 100 &&
|
|
29
|
+
inputs.puzzle === "3x3x3" &&
|
|
30
|
+
inputs.visualizationStrategy === "Cube3D"
|
|
31
|
+
) {
|
|
32
|
+
return SimultaneousMoveIndexerV2;
|
|
33
|
+
} else {
|
|
34
|
+
return TreeAlgIndexer;
|
|
35
|
+
}
|
|
36
|
+
case "tree":
|
|
37
|
+
return TreeAlgIndexer;
|
|
38
|
+
case "simple":
|
|
39
|
+
return SimpleAlgIndexer;
|
|
40
|
+
case "simultaneous":
|
|
41
|
+
return SimultaneousMoveIndexerV2;
|
|
42
|
+
default:
|
|
43
|
+
throw new Error("Invalid indexer request!");
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SimpleTwistyPropSource } from "../../TwistyProp";
|
|
2
|
+
|
|
3
|
+
export const indexerStrategyNames = {
|
|
4
|
+
auto: true,
|
|
5
|
+
simple: true,
|
|
6
|
+
tree: true,
|
|
7
|
+
simultaneous: true,
|
|
8
|
+
};
|
|
9
|
+
export type IndexerStrategyName = keyof typeof indexerStrategyNames;
|
|
10
|
+
|
|
11
|
+
export class IndexerConstructorRequestProp extends SimpleTwistyPropSource<IndexerStrategyName> {
|
|
12
|
+
getDefaultValue(): IndexerStrategyName {
|
|
13
|
+
return "auto";
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
|
|
8
|
+
type IndexerPropInputs = {
|
|
9
|
+
indexerConstructor: IndexerConstructor;
|
|
10
|
+
algWithIssues: AlgWithIssues;
|
|
11
|
+
def: KPuzzleDefinition;
|
|
12
|
+
};
|
|
13
|
+
export class IndexerProp extends TwistyPropDerived<
|
|
14
|
+
IndexerPropInputs,
|
|
15
|
+
AlgIndexer<any>
|
|
16
|
+
> {
|
|
17
|
+
derive(input: IndexerPropInputs): AlgIndexer<any> {
|
|
18
|
+
const kpuzzleWrapper = new KPuzzleWrapper(input.def); // TODO: Remove this layer.
|
|
19
|
+
return new input.indexerConstructor(
|
|
20
|
+
kpuzzleWrapper,
|
|
21
|
+
input.algWithIssues.alg,
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
|
|
6
|
+
export interface LegacyPositionPropInputs {
|
|
7
|
+
currentMoveInfo: CurrentMoveInfo;
|
|
8
|
+
transformation: Transformation;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// TODO: This exist as a convenience for old `Twisty3D` implementations. Get rid of this.
|
|
12
|
+
export class LegacyPositionProp extends TwistyPropDerived<
|
|
13
|
+
LegacyPositionPropInputs,
|
|
14
|
+
PuzzlePosition
|
|
15
|
+
> {
|
|
16
|
+
derive(inputs: LegacyPositionPropInputs): PuzzlePosition {
|
|
17
|
+
return {
|
|
18
|
+
state: inputs.transformation,
|
|
19
|
+
movesInProgress: inputs.currentMoveInfo.currentMoves,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Alg } from "../../../../../alg";
|
|
2
|
+
import { KPuzzle, KPuzzleDefinition } from "../../../../../kpuzzle";
|
|
3
|
+
import { AlgIssues, AlgWithIssues } from "./AlgProp";
|
|
4
|
+
import { TwistyPropDerived } from "../../TwistyProp";
|
|
5
|
+
|
|
6
|
+
export class PuzzleAlgProp extends TwistyPropDerived<
|
|
7
|
+
{ algWithIssues: AlgWithIssues; puzzleDef: KPuzzleDefinition },
|
|
8
|
+
AlgWithIssues
|
|
9
|
+
> {
|
|
10
|
+
async derive(inputs: {
|
|
11
|
+
algWithIssues: AlgWithIssues;
|
|
12
|
+
puzzleDef: KPuzzleDefinition;
|
|
13
|
+
}): Promise<AlgWithIssues> {
|
|
14
|
+
try {
|
|
15
|
+
const kpuzzle = new KPuzzle(inputs.puzzleDef);
|
|
16
|
+
kpuzzle.applyAlg(inputs.algWithIssues.alg);
|
|
17
|
+
// Looks like we could apply the alg!
|
|
18
|
+
return inputs.algWithIssues;
|
|
19
|
+
} catch (e) {
|
|
20
|
+
return {
|
|
21
|
+
alg: new Alg(),
|
|
22
|
+
issues: new AlgIssues({
|
|
23
|
+
errors: [`Invalid alg for puzzle: ${(e as Error).toString()}`],
|
|
24
|
+
}),
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SetupToLocation } from "../../../../old/dom/TwistyPlayerConfig";
|
|
2
|
+
import { SimpleTwistyPropSource } from "../../TwistyProp";
|
|
3
|
+
|
|
4
|
+
export class SetupAnchorProp extends SimpleTwistyPropSource<SetupToLocation> {
|
|
5
|
+
getDefaultValue(): SetupToLocation {
|
|
6
|
+
return "start";
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { KPuzzleDefinition } from "../../../../../kpuzzle";
|
|
2
|
+
import type { PuzzleLoader } from "../../../../../puzzles";
|
|
3
|
+
import { TwistyPropDerived } from "../../TwistyProp";
|
|
4
|
+
|
|
5
|
+
export class PuzzleDefProp extends TwistyPropDerived<
|
|
6
|
+
{ puzzleLoader: PuzzleLoader },
|
|
7
|
+
KPuzzleDefinition
|
|
8
|
+
> {
|
|
9
|
+
async derive(inputs: {
|
|
10
|
+
puzzleLoader: PuzzleLoader;
|
|
11
|
+
}): Promise<KPuzzleDefinition> {
|
|
12
|
+
return inputs.puzzleLoader.def();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PuzzleDescriptionString } from "../../../../../puzzle-geometry/PGPuzzles";
|
|
2
|
+
import {
|
|
3
|
+
NoValueType,
|
|
4
|
+
NO_VALUE,
|
|
5
|
+
SimpleTwistyPropSource,
|
|
6
|
+
} from "../../TwistyProp";
|
|
7
|
+
|
|
8
|
+
export class PGPuzzleDescriptionStringProp extends SimpleTwistyPropSource<
|
|
9
|
+
PuzzleDescriptionString | NoValueType
|
|
10
|
+
> {
|
|
11
|
+
getDefaultValue(): PuzzleDescriptionString | NoValueType {
|
|
12
|
+
return NO_VALUE;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PuzzleLoader } from "../../../../../puzzles";
|
|
2
|
+
import type { PuzzleID } from "../../../../old/dom/TwistyPlayerConfig";
|
|
3
|
+
import { TwistyPropDerived } from "../../TwistyProp";
|
|
4
|
+
|
|
5
|
+
export class PuzzleIDProp extends TwistyPropDerived<
|
|
6
|
+
{ puzzleLoader: PuzzleLoader },
|
|
7
|
+
PuzzleID
|
|
8
|
+
> {
|
|
9
|
+
async derive(inputs: { puzzleLoader: PuzzleLoader }): Promise<PuzzleID> {
|
|
10
|
+
return inputs.puzzleLoader.id as PuzzleID;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PuzzleID } from "../../../../old/dom/TwistyPlayerConfig";
|
|
2
|
+
import {
|
|
3
|
+
NoValueType,
|
|
4
|
+
NO_VALUE,
|
|
5
|
+
SimpleTwistyPropSource,
|
|
6
|
+
} from "../../TwistyProp";
|
|
7
|
+
|
|
8
|
+
// TODO: Ideally we'd use `null` to mean "no value", but `null` has a special meaning
|
|
9
|
+
// for `TwistyProp` and might mess with caching.
|
|
10
|
+
// https://github.com/cubing/cubing.js/blob/63b0a55b83963f68410bb117a2e481052a07e086/src/cubing/twisty/model/TwistyProp.ts#L189-L189
|
|
11
|
+
export class PuzzleIDRequestProp extends SimpleTwistyPropSource<
|
|
12
|
+
PuzzleID | NoValueType
|
|
13
|
+
> {
|
|
14
|
+
getDefaultValue(): PuzzleID | NoValueType {
|
|
15
|
+
return NO_VALUE;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { PuzzleDescriptionString } from "../../../../../puzzle-geometry/PGPuzzles";
|
|
2
|
+
import {
|
|
3
|
+
cube3x3x3,
|
|
4
|
+
experimentalCustomPGPuzzleLoader,
|
|
5
|
+
PuzzleLoader,
|
|
6
|
+
puzzles,
|
|
7
|
+
} from "../../../../../puzzles";
|
|
8
|
+
import type { PuzzleID } from "../../../../old/dom/TwistyPlayerConfig";
|
|
9
|
+
import { NoValueType, NO_VALUE, TwistyPropDerived } from "../../TwistyProp";
|
|
10
|
+
8;
|
|
11
|
+
interface PuzzleLoaderPropInputs {
|
|
12
|
+
puzzleIDRequest: PuzzleID | NoValueType;
|
|
13
|
+
puzzleDescriptionRequest: PuzzleDescriptionString | NoValueType;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export class PuzzleLoaderProp extends TwistyPropDerived<
|
|
17
|
+
PuzzleLoaderPropInputs,
|
|
18
|
+
PuzzleLoader
|
|
19
|
+
> {
|
|
20
|
+
derive(inputs: PuzzleLoaderPropInputs): PuzzleLoader {
|
|
21
|
+
if (inputs.puzzleIDRequest && inputs.puzzleIDRequest !== NO_VALUE) {
|
|
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;
|
|
29
|
+
}
|
|
30
|
+
if (
|
|
31
|
+
inputs.puzzleDescriptionRequest &&
|
|
32
|
+
inputs.puzzleDescriptionRequest !== NO_VALUE
|
|
33
|
+
) {
|
|
34
|
+
return experimentalCustomPGPuzzleLoader(inputs.puzzleDescriptionRequest);
|
|
35
|
+
}
|
|
36
|
+
return cube3x3x3;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ButtonCommand } from "../../../views/control-panel/TwistyButtonsV2";
|
|
2
|
+
import type { PlayingInfo } from "./PlayingInfoProp";
|
|
3
|
+
import type { DetailedTimelineInfo } from "./DetailedTimelineInfoProp";
|
|
4
|
+
import { TwistyPropDerived } from "../TwistyProp";
|
|
5
|
+
|
|
6
|
+
interface ButtonAppearance {
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
icon: string;
|
|
9
|
+
title: string;
|
|
10
|
+
}
|
|
11
|
+
export type ButtonAppearances = Record<ButtonCommand, ButtonAppearance>;
|
|
12
|
+
|
|
13
|
+
interface CoarseTimelineInfoInputs {
|
|
14
|
+
playingInfo: PlayingInfo;
|
|
15
|
+
detailedTimelineInfo: DetailedTimelineInfo;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface CoarseTimelineInfo {
|
|
19
|
+
playing: boolean;
|
|
20
|
+
atStart: boolean;
|
|
21
|
+
atEnd: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// This started as a version of `EffectiveTimestamp` without the actual
|
|
25
|
+
// timestamp, to enable easier caching.
|
|
26
|
+
export class CoarseTimelineInfoProp extends TwistyPropDerived<
|
|
27
|
+
CoarseTimelineInfoInputs,
|
|
28
|
+
CoarseTimelineInfo
|
|
29
|
+
> {
|
|
30
|
+
derive(inputs: CoarseTimelineInfoInputs): CoarseTimelineInfo {
|
|
31
|
+
return {
|
|
32
|
+
playing: inputs.playingInfo.playing,
|
|
33
|
+
atStart: inputs.detailedTimelineInfo.atStart,
|
|
34
|
+
atEnd: inputs.detailedTimelineInfo.atEnd,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
canReuseValue(v1: CoarseTimelineInfo, v2: CoarseTimelineInfo): boolean {
|
|
39
|
+
return (
|
|
40
|
+
v1.playing === v2.playing &&
|
|
41
|
+
v1.atStart === v2.atStart &&
|
|
42
|
+
v1.atEnd === v2.atEnd
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
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
|
+
import { TwistyPropDerived } from "../TwistyProp";
|
|
6
|
+
|
|
7
|
+
interface DetailedTimelineInfoInputs {
|
|
8
|
+
timestampRequest: TimestampRequest;
|
|
9
|
+
timeRange: TimeRange;
|
|
10
|
+
setupAnchor: SetupToLocation;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface DetailedTimelineInfo {
|
|
14
|
+
timestamp: MillisecondTimestamp;
|
|
15
|
+
timeRange: TimeRange; // TODO: Don't incluede this, and let fresh listeners listen to multiple inputs?
|
|
16
|
+
// Note: `atStart` and `atEnd` can both be true. This is the case with the
|
|
17
|
+
// default (empty) alg, which has a duration of 0 ms.
|
|
18
|
+
atStart: boolean;
|
|
19
|
+
atEnd: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export class DetailedTimelineInfoProp extends TwistyPropDerived<
|
|
23
|
+
DetailedTimelineInfoInputs,
|
|
24
|
+
DetailedTimelineInfo
|
|
25
|
+
> {
|
|
26
|
+
derive(inputs: DetailedTimelineInfoInputs): DetailedTimelineInfo {
|
|
27
|
+
let timestamp = this.#requestedTimestampToMilliseconds(inputs);
|
|
28
|
+
let atStart: boolean = false;
|
|
29
|
+
let atEnd: boolean = false;
|
|
30
|
+
if (timestamp >= inputs.timeRange.end) {
|
|
31
|
+
atEnd = true;
|
|
32
|
+
timestamp = Math.min(inputs.timeRange.end, timestamp);
|
|
33
|
+
}
|
|
34
|
+
if (timestamp <= inputs.timeRange.start) {
|
|
35
|
+
atStart = true;
|
|
36
|
+
timestamp = Math.max(inputs.timeRange.start, timestamp);
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
timestamp,
|
|
40
|
+
timeRange: inputs.timeRange,
|
|
41
|
+
atStart,
|
|
42
|
+
atEnd,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
#requestedTimestampToMilliseconds(
|
|
47
|
+
inputs: DetailedTimelineInfoInputs,
|
|
48
|
+
): MillisecondTimestamp {
|
|
49
|
+
switch (inputs.timestampRequest) {
|
|
50
|
+
case "start":
|
|
51
|
+
return inputs.timeRange.start;
|
|
52
|
+
case "end":
|
|
53
|
+
return inputs.timeRange.end;
|
|
54
|
+
case "anchor":
|
|
55
|
+
return inputs.setupAnchor === "start"
|
|
56
|
+
? inputs.timeRange.start
|
|
57
|
+
: inputs.timeRange.end;
|
|
58
|
+
case "opposite-anchor":
|
|
59
|
+
return inputs.setupAnchor === "start"
|
|
60
|
+
? inputs.timeRange.end
|
|
61
|
+
: inputs.timeRange.start;
|
|
62
|
+
default:
|
|
63
|
+
return inputs.timestampRequest;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
canReuse(v1: DetailedTimelineInfo, v2: DetailedTimelineInfo) {
|
|
68
|
+
return (
|
|
69
|
+
v1.timestamp === v2.timestamp &&
|
|
70
|
+
v1.timeRange.start === v2.timeRange.start &&
|
|
71
|
+
v1.timeRange.end === v2.timeRange.end &&
|
|
72
|
+
v1.atStart === v2.atStart &&
|
|
73
|
+
v1.atEnd === v2.atEnd
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BoundaryType,
|
|
3
|
+
Direction,
|
|
4
|
+
} from "../../../old/animation/cursor/CursorTypes";
|
|
5
|
+
import { TwistyPropSource } from "../TwistyProp";
|
|
6
|
+
|
|
7
|
+
export type SimpleDirection = Direction.Forwards | Direction.Backwards;
|
|
8
|
+
|
|
9
|
+
export interface PlayingInfo {
|
|
10
|
+
playing: boolean;
|
|
11
|
+
direction: SimpleDirection;
|
|
12
|
+
untilBoundary: BoundaryType; // TODO: allows this to be optional in the setter?
|
|
13
|
+
// TODO: Is `loop` responsible to add at this point? Maybe we should wait until we've figured out autoplay?
|
|
14
|
+
// TODO: Combine `loop` into something with BoundaryType?
|
|
15
|
+
loop: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// TODO: direction,
|
|
19
|
+
export class PlayingInfoProp extends TwistyPropSource<
|
|
20
|
+
PlayingInfo,
|
|
21
|
+
Partial<PlayingInfo>
|
|
22
|
+
> {
|
|
23
|
+
async getDefaultValue(): Promise<PlayingInfo> {
|
|
24
|
+
return {
|
|
25
|
+
direction: Direction.Forwards,
|
|
26
|
+
playing: false,
|
|
27
|
+
untilBoundary: BoundaryType.EntireTimeline,
|
|
28
|
+
loop: false,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
async derive(
|
|
33
|
+
newInfo: Partial<PlayingInfo>,
|
|
34
|
+
oldValuePromise: Promise<PlayingInfo>,
|
|
35
|
+
): Promise<PlayingInfo> {
|
|
36
|
+
const oldValue = await oldValuePromise;
|
|
37
|
+
|
|
38
|
+
const newValue: PlayingInfo = Object.assign({}, oldValue);
|
|
39
|
+
Object.assign(newValue, newInfo);
|
|
40
|
+
return newValue;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
canReuseValue(v1: PlayingInfo, v2: PlayingInfo) {
|
|
44
|
+
return (
|
|
45
|
+
v1.direction === v2.direction &&
|
|
46
|
+
v1.playing === v2.playing &&
|
|
47
|
+
v1.untilBoundary === v2.untilBoundary &&
|
|
48
|
+
v1.loop === v2.loop
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TwistyPropSource } from "../TwistyProp";
|
|
2
|
+
|
|
3
|
+
// TODO: Pick a better name. `speed` is probably good, although that could mean
|
|
4
|
+
// something else (e.g. shorter, faster moves but still with the same spacing).
|
|
5
|
+
export class TempoScaleProp extends TwistyPropSource<number, number> {
|
|
6
|
+
getDefaultValue(): number {
|
|
7
|
+
return 1;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
derive(v: number): number {
|
|
11
|
+
return v < 0 ? 1 : v;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { MillisecondTimestamp } from "../../../old/animation/cursor/CursorTypes";
|
|
2
|
+
import { SimpleTwistyPropSource } from "../TwistyProp";
|
|
3
|
+
|
|
4
|
+
const smartTimestamps = {
|
|
5
|
+
"start": true,
|
|
6
|
+
"end": true,
|
|
7
|
+
"anchor": true,
|
|
8
|
+
"opposite-anchor": true,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export type TimestampRequest =
|
|
12
|
+
| MillisecondTimestamp
|
|
13
|
+
| keyof typeof smartTimestamps;
|
|
14
|
+
|
|
15
|
+
export class TimestampRequestProp extends SimpleTwistyPropSource<TimestampRequest> {
|
|
16
|
+
getDefaultValue(): TimestampRequest {
|
|
17
|
+
return "opposite-anchor";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// TODO: Support `Promise`
|
|
21
|
+
set(v: TimestampRequest) {
|
|
22
|
+
if (!this.validInput(v)) {
|
|
23
|
+
// TODO: Generalize this to more props. How do we surface this? Throw an error and catch it from sync setters that call into this?
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
super.set(v);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
validInput(v: TimestampRequest): boolean {
|
|
30
|
+
if (typeof v === "number") {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
if (smartTimestamps[v]) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BackViewLayout } from "../../../old/dom/viewers/TwistyViewerWrapper";
|
|
2
|
+
import { SimpleTwistyPropSource } from "../TwistyProp";
|
|
3
|
+
|
|
4
|
+
export type BackViewLayoutWithAuto = BackViewLayout | "auto";
|
|
5
|
+
|
|
6
|
+
export class BackViewProp extends SimpleTwistyPropSource<BackViewLayoutWithAuto> {
|
|
7
|
+
getDefaultValue(): BackViewLayoutWithAuto {
|
|
8
|
+
return "auto";
|
|
9
|
+
}
|
|
10
|
+
}
|