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
|
@@ -1,130 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
import { isArray, DEBUG } from "../lgarron-additions-for-typescript/shim-lib";
|
|
6
|
-
// import { randomUIntBelow } from "random-uint-below";
|
|
7
|
-
|
|
8
|
-
var Cnk = [],
|
|
1
|
+
const Cnk: number[][] = [],
|
|
9
2
|
fact = [1];
|
|
10
|
-
for (
|
|
3
|
+
for (let i = 0; i < 32; ++i) {
|
|
11
4
|
Cnk[i] = [];
|
|
12
|
-
for (
|
|
5
|
+
for (let j = 0; j < 32; ++j) {
|
|
13
6
|
Cnk[i][j] = 0;
|
|
14
7
|
}
|
|
15
8
|
}
|
|
16
|
-
for (
|
|
9
|
+
for (let i = 0; i < 32; ++i) {
|
|
17
10
|
Cnk[i][0] = Cnk[i][i] = 1;
|
|
18
11
|
fact[i + 1] = fact[i] * (i + 1);
|
|
19
|
-
for (
|
|
12
|
+
for (let j = 1; j < i; ++j) {
|
|
20
13
|
Cnk[i][j] = Cnk[i - 1][j - 1] + Cnk[i - 1][j];
|
|
21
14
|
}
|
|
22
15
|
}
|
|
23
16
|
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
arr[b] = temp ^ ori;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function circle(arr, ...moreArgs: any) {
|
|
33
|
-
var length = arguments.length - 1,
|
|
34
|
-
temp = arr[arguments[length]];
|
|
35
|
-
for (var i = length; i > 1; i--) {
|
|
36
|
-
arr[arguments[i]] = arr[arguments[i - 1]];
|
|
17
|
+
function circle(arr: number[], ...moreArgs: number[]) {
|
|
18
|
+
const length = moreArgs.length,
|
|
19
|
+
temp = arr[moreArgs[length - 1]];
|
|
20
|
+
for (let i = length; i > 0; i--) {
|
|
21
|
+
arr[moreArgs[i]] = arr[moreArgs[i - 1]];
|
|
37
22
|
}
|
|
38
|
-
arr[
|
|
23
|
+
arr[moreArgs[0]] = temp;
|
|
39
24
|
return circle;
|
|
40
25
|
}
|
|
41
26
|
|
|
42
|
-
|
|
43
|
-
//pow: 1, 2, 3, ...
|
|
44
|
-
//ori: ori1, ori2, ..., orin, base
|
|
45
|
-
// arr[perm[idx2]] = arr[perm[idx1]] + ori[idx2] - ori[idx1] + base
|
|
46
|
-
function acycle(arr, perm, pow?: any, ori?: any) {
|
|
47
|
-
pow = pow || 1;
|
|
48
|
-
var plen = perm.length;
|
|
49
|
-
var tmp = [];
|
|
50
|
-
for (var i = 0; i < plen; i++) {
|
|
51
|
-
tmp[i] = arr[perm[i]];
|
|
52
|
-
}
|
|
53
|
-
for (var i = 0; i < plen; i++) {
|
|
54
|
-
var j = (i + pow) % plen;
|
|
55
|
-
arr[perm[j]] = tmp[i];
|
|
56
|
-
if (ori) {
|
|
57
|
-
arr[perm[j]] += ori[j] - ori[i] + ori[ori.length - 1];
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
return acycle;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function getPruning(table, index) {
|
|
64
|
-
return (table[index >> 3] >> ((index & 7) << 2)) & 15;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function setNPerm(arr, idx, n) {
|
|
68
|
-
var i, j;
|
|
69
|
-
arr[n - 1] = 0;
|
|
70
|
-
for (i = n - 2; i >= 0; --i) {
|
|
71
|
-
arr[i] = idx % (n - i);
|
|
72
|
-
idx = ~~(idx / (n - i));
|
|
73
|
-
for (j = i + 1; j < n; ++j) {
|
|
74
|
-
arr[j] >= arr[i] && ++arr[j];
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function getNPerm(arr, n) {
|
|
80
|
-
var i, idx, j;
|
|
81
|
-
idx = 0;
|
|
82
|
-
for (i = 0; i < n; ++i) {
|
|
83
|
-
idx *= n - i;
|
|
84
|
-
for (j = i + 1; j < n; ++j) {
|
|
85
|
-
arr[j] < arr[i] && ++idx;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return idx;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function getNParity(idx, n) {
|
|
92
|
-
var i, p;
|
|
93
|
-
p = 0;
|
|
94
|
-
for (i = n - 2; i >= 0; --i) {
|
|
95
|
-
p ^= idx % (n - i);
|
|
96
|
-
idx = ~~(idx / (n - i));
|
|
97
|
-
}
|
|
98
|
-
return p & 1;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
function get8Perm(arr, n?: number, even?: any) {
|
|
102
|
-
n = n || 8;
|
|
103
|
-
var idx = 0;
|
|
104
|
-
var val = 0x76543210;
|
|
105
|
-
for (var i = 0; i < n - 1; ++i) {
|
|
106
|
-
var v = arr[i] << 2;
|
|
107
|
-
idx = (n - i) * idx + ((val >> v) & 7);
|
|
108
|
-
val -= 0x11111110 << v;
|
|
109
|
-
}
|
|
110
|
-
return even < 0 ? idx >> 1 : idx;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function set8Perm(arr, idx, n?: number, even?: number) {
|
|
27
|
+
function set8Perm(arr: number[], idx: number, n?: number, even?: number) {
|
|
114
28
|
n = (n || 8) - 1;
|
|
115
|
-
|
|
116
|
-
|
|
29
|
+
let val = 0x76543210;
|
|
30
|
+
let prt = 0;
|
|
31
|
+
even ??= 0;
|
|
117
32
|
if (even < 0) {
|
|
118
33
|
idx <<= 1;
|
|
119
34
|
}
|
|
120
|
-
for (
|
|
121
|
-
|
|
122
|
-
|
|
35
|
+
for (let i = 0; i < n; ++i) {
|
|
36
|
+
const p = fact[n - i];
|
|
37
|
+
let v = ~~(idx / p);
|
|
123
38
|
prt ^= v;
|
|
124
39
|
idx %= p;
|
|
125
40
|
v <<= 2;
|
|
126
41
|
arr[i] = (val >> v) & 7;
|
|
127
|
-
|
|
42
|
+
const m = (1 << v) - 1;
|
|
128
43
|
val = (val & m) + ((val >> 4) & ~m);
|
|
129
44
|
}
|
|
130
45
|
if (even < 0 && (prt & 1) !== 0) {
|
|
@@ -136,721 +51,4 @@ function set8Perm(arr, idx, n?: number, even?: number) {
|
|
|
136
51
|
return arr;
|
|
137
52
|
}
|
|
138
53
|
|
|
139
|
-
|
|
140
|
-
var base = Math.abs(evenbase);
|
|
141
|
-
var idx = evenbase < 0 ? 0 : arr[0] % base;
|
|
142
|
-
for (var i = n - 1; i > 0; i--) {
|
|
143
|
-
idx = idx * base + (arr[i] % base);
|
|
144
|
-
}
|
|
145
|
-
return idx;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
function setNOri(arr, idx, n, evenbase) {
|
|
149
|
-
var base = Math.abs(evenbase);
|
|
150
|
-
var parity = base * n;
|
|
151
|
-
for (var i = 1; i < n; i++) {
|
|
152
|
-
arr[i] = idx % base;
|
|
153
|
-
parity -= arr[i];
|
|
154
|
-
idx = ~~(idx / base);
|
|
155
|
-
}
|
|
156
|
-
arr[0] = (evenbase < 0 ? parity : idx) % base;
|
|
157
|
-
return arr;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
// type: 'p', 'o'
|
|
161
|
-
// evenbase: base for ori, sign for even parity
|
|
162
|
-
function coord(type, length, evenbase) {
|
|
163
|
-
this.length = length;
|
|
164
|
-
this.evenbase = evenbase;
|
|
165
|
-
this.get =
|
|
166
|
-
type === "p"
|
|
167
|
-
? function (arr) {
|
|
168
|
-
return get8Perm(arr, this.length, this.evenbase);
|
|
169
|
-
}
|
|
170
|
-
: function (arr) {
|
|
171
|
-
return getNOri(arr, this.length, this.evenbase);
|
|
172
|
-
};
|
|
173
|
-
this.set =
|
|
174
|
-
type === "p"
|
|
175
|
-
? function (arr, idx) {
|
|
176
|
-
return set8Perm(arr, idx, this.length, this.evenbase);
|
|
177
|
-
}
|
|
178
|
-
: function (arr, idx) {
|
|
179
|
-
return setNOri(arr, idx, this.length, this.evenbase);
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
function fillFacelet(facelets, f, perm, ori, divcol) {
|
|
184
|
-
for (var i = 0; i < facelets.length; i++) {
|
|
185
|
-
for (var j = 0; j < facelets[i].length; j++) {
|
|
186
|
-
f[facelets[i][(j + ori[i]) % facelets[i].length]] = ~~(
|
|
187
|
-
facelets[perm[i]][j] / divcol
|
|
188
|
-
);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
function createMove(moveTable, size, doMove, N_MOVES) {
|
|
194
|
-
N_MOVES = N_MOVES || 6;
|
|
195
|
-
if (isArray(doMove)) {
|
|
196
|
-
var cord = new coord(doMove[1], doMove[2], doMove[3]);
|
|
197
|
-
doMove = doMove[0];
|
|
198
|
-
for (var j = 0; j < N_MOVES; j++) {
|
|
199
|
-
moveTable[j] = [];
|
|
200
|
-
for (var i = 0; i < size; i++) {
|
|
201
|
-
var arr = cord.set([], i);
|
|
202
|
-
doMove(arr, j);
|
|
203
|
-
moveTable[j][i] = cord.get(arr);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
} else {
|
|
207
|
-
for (var j = 0; j < N_MOVES; j++) {
|
|
208
|
-
moveTable[j] = [];
|
|
209
|
-
for (var i = 0; i < size; i++) {
|
|
210
|
-
moveTable[j][i] = doMove(i, j);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
function edgeMove(arr, m) {
|
|
217
|
-
if (m === 0) {
|
|
218
|
-
//F
|
|
219
|
-
circleOri(arr, 0, 7, 8, 4, 1);
|
|
220
|
-
} else if (m === 1) {
|
|
221
|
-
//R
|
|
222
|
-
circleOri(arr, 3, 6, 11, 7, 0);
|
|
223
|
-
} else if (m === 2) {
|
|
224
|
-
//U
|
|
225
|
-
circleOri(arr, 0, 1, 2, 3, 0);
|
|
226
|
-
} else if (m === 3) {
|
|
227
|
-
//B
|
|
228
|
-
circleOri(arr, 2, 5, 10, 6, 1);
|
|
229
|
-
} else if (m === 4) {
|
|
230
|
-
//L
|
|
231
|
-
circleOri(arr, 1, 4, 9, 5, 0);
|
|
232
|
-
} else if (m === 5) {
|
|
233
|
-
//D
|
|
234
|
-
circleOri(arr, 11, 10, 9, 8, 0);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
function CubieCube() {
|
|
239
|
-
this.ca = [0, 1, 2, 3, 4, 5, 6, 7];
|
|
240
|
-
this.ea = [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22];
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
CubieCube.EdgeMult = function (a, b, prod) {
|
|
244
|
-
for (var ed = 0; ed < 12; ed++) {
|
|
245
|
-
prod.ea[ed] = a.ea[b.ea[ed] >> 1] ^ (b.ea[ed] & 1);
|
|
246
|
-
}
|
|
247
|
-
};
|
|
248
|
-
|
|
249
|
-
CubieCube.CornMult = function (a, b, prod) {
|
|
250
|
-
for (var corn = 0; corn < 8; corn++) {
|
|
251
|
-
var ori = ((a.ca[b.ca[corn] & 7] >> 3) + (b.ca[corn] >> 3)) % 3;
|
|
252
|
-
prod.ca[corn] = (a.ca[b.ca[corn] & 7] & 7) | (ori << 3);
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
CubieCube.CubeMult = function (a, b, prod) {
|
|
257
|
-
CubieCube.CornMult(a, b, prod);
|
|
258
|
-
CubieCube.EdgeMult(a, b, prod);
|
|
259
|
-
};
|
|
260
|
-
|
|
261
|
-
CubieCube.prototype.init = function (ca, ea) {
|
|
262
|
-
this.ca = ca.slice();
|
|
263
|
-
this.ea = ea.slice();
|
|
264
|
-
return this;
|
|
265
|
-
};
|
|
266
|
-
|
|
267
|
-
CubieCube.prototype.isEqual = function (c) {
|
|
268
|
-
for (var i = 0; i < 8; i++) {
|
|
269
|
-
if (this.ca[i] !== c.ca[i]) {
|
|
270
|
-
return false;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
for (var i = 0; i < 12; i++) {
|
|
274
|
-
if (this.ea[i] !== c.ea[i]) {
|
|
275
|
-
return false;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
return true;
|
|
279
|
-
};
|
|
280
|
-
|
|
281
|
-
var cornerFacelet = [
|
|
282
|
-
[8, 9, 20],
|
|
283
|
-
[6, 18, 38],
|
|
284
|
-
[0, 36, 47],
|
|
285
|
-
[2, 45, 11],
|
|
286
|
-
[29, 26, 15],
|
|
287
|
-
[27, 44, 24],
|
|
288
|
-
[33, 53, 42],
|
|
289
|
-
[35, 17, 51],
|
|
290
|
-
];
|
|
291
|
-
var edgeFacelet = [
|
|
292
|
-
[5, 10],
|
|
293
|
-
[7, 19],
|
|
294
|
-
[3, 37],
|
|
295
|
-
[1, 46],
|
|
296
|
-
[32, 16],
|
|
297
|
-
[28, 25],
|
|
298
|
-
[30, 43],
|
|
299
|
-
[34, 52],
|
|
300
|
-
[23, 12],
|
|
301
|
-
[21, 41],
|
|
302
|
-
[50, 39],
|
|
303
|
-
[48, 14],
|
|
304
|
-
];
|
|
305
|
-
|
|
306
|
-
CubieCube.prototype.toFaceCube = function (cFacelet, eFacelet) {
|
|
307
|
-
cFacelet = cFacelet || cornerFacelet;
|
|
308
|
-
eFacelet = eFacelet || edgeFacelet;
|
|
309
|
-
var ts = "URFDLB";
|
|
310
|
-
var f = [];
|
|
311
|
-
for (var i = 0; i < 54; i++) {
|
|
312
|
-
f[i] = ts[~~(i / 9)];
|
|
313
|
-
}
|
|
314
|
-
for (var c = 0; c < 8; c++) {
|
|
315
|
-
var j = this.ca[c] & 0x7; // cornercubie with index j is at
|
|
316
|
-
var ori = this.ca[c] >> 3; // Orientation of this cubie
|
|
317
|
-
for (var n = 0; n < 3; n++)
|
|
318
|
-
f[cFacelet[c][(n + ori) % 3]] = ts[~~(cFacelet[j][n] / 9)];
|
|
319
|
-
}
|
|
320
|
-
for (var e = 0; e < 12; e++) {
|
|
321
|
-
var j = this.ea[e] >> 1; // edgecubie with index j is at edgeposition
|
|
322
|
-
var ori = this.ea[e] & 1; // Orientation of this cubie
|
|
323
|
-
for (var n = 0; n < 2; n++)
|
|
324
|
-
f[eFacelet[e][(n + ori) % 2]] = ts[~~(eFacelet[j][n] / 9)];
|
|
325
|
-
}
|
|
326
|
-
return f.join("");
|
|
327
|
-
};
|
|
328
|
-
|
|
329
|
-
CubieCube.prototype.invFrom = function (cc) {
|
|
330
|
-
for (var edge = 0; edge < 12; edge++) {
|
|
331
|
-
this.ea[cc.ea[edge] >> 1] = (edge << 1) | (cc.ea[edge] & 1);
|
|
332
|
-
}
|
|
333
|
-
for (var corn = 0; corn < 8; corn++) {
|
|
334
|
-
this.ca[cc.ca[corn] & 0x7] = corn | ((0x20 >> (cc.ca[corn] >> 3)) & 0x18);
|
|
335
|
-
}
|
|
336
|
-
return this;
|
|
337
|
-
};
|
|
338
|
-
|
|
339
|
-
CubieCube.prototype.fromFacelet = function (facelet, cFacelet, eFacelet) {
|
|
340
|
-
cFacelet = cFacelet || cornerFacelet;
|
|
341
|
-
eFacelet = eFacelet || edgeFacelet;
|
|
342
|
-
var count = 0;
|
|
343
|
-
var f = [];
|
|
344
|
-
var centers =
|
|
345
|
-
facelet[4] +
|
|
346
|
-
facelet[13] +
|
|
347
|
-
facelet[22] +
|
|
348
|
-
facelet[31] +
|
|
349
|
-
facelet[40] +
|
|
350
|
-
facelet[49];
|
|
351
|
-
for (let i = 0; i < 54; ++i) {
|
|
352
|
-
f[i] = centers.indexOf(facelet[i]);
|
|
353
|
-
if (f[i] === -1) {
|
|
354
|
-
return -1;
|
|
355
|
-
}
|
|
356
|
-
count += 1 << (f[i] << 2);
|
|
357
|
-
}
|
|
358
|
-
if (count !== 0x999999) {
|
|
359
|
-
return -1;
|
|
360
|
-
}
|
|
361
|
-
var col1, col2, i, j, ori;
|
|
362
|
-
for (i = 0; i < 8; ++i) {
|
|
363
|
-
for (ori = 0; ori < 3; ++ori)
|
|
364
|
-
if (f[cFacelet[i][ori]] === 0 || f[cFacelet[i][ori]] === 3) break;
|
|
365
|
-
col1 = f[cFacelet[i][(ori + 1) % 3]];
|
|
366
|
-
col2 = f[cFacelet[i][(ori + 2) % 3]];
|
|
367
|
-
for (j = 0; j < 8; ++j) {
|
|
368
|
-
if (col1 === ~~(cFacelet[j][1] / 9) && col2 === ~~(cFacelet[j][2] / 9)) {
|
|
369
|
-
this.ca[i] = j | (ori % 3 << 3);
|
|
370
|
-
break;
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
for (i = 0; i < 12; ++i) {
|
|
375
|
-
for (j = 0; j < 12; ++j) {
|
|
376
|
-
if (
|
|
377
|
-
f[eFacelet[i][0]] === ~~(eFacelet[j][0] / 9) &&
|
|
378
|
-
f[eFacelet[i][1]] === ~~(eFacelet[j][1] / 9)
|
|
379
|
-
) {
|
|
380
|
-
this.ea[i] = j << 1;
|
|
381
|
-
break;
|
|
382
|
-
}
|
|
383
|
-
if (
|
|
384
|
-
f[eFacelet[i][0]] === ~~(eFacelet[j][1] / 9) &&
|
|
385
|
-
f[eFacelet[i][1]] === ~~(eFacelet[j][0] / 9)
|
|
386
|
-
) {
|
|
387
|
-
this.ea[i] = (j << 1) | 1;
|
|
388
|
-
break;
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
return this;
|
|
393
|
-
};
|
|
394
|
-
|
|
395
|
-
var moveCube = [];
|
|
396
|
-
for (var i = 0; i < 18; i++) {
|
|
397
|
-
moveCube[i] = new CubieCube();
|
|
398
|
-
}
|
|
399
|
-
moveCube[0].init(
|
|
400
|
-
[3, 0, 1, 2, 4, 5, 6, 7],
|
|
401
|
-
[6, 0, 2, 4, 8, 10, 12, 14, 16, 18, 20, 22],
|
|
402
|
-
);
|
|
403
|
-
moveCube[3].init(
|
|
404
|
-
[20, 1, 2, 8, 15, 5, 6, 19],
|
|
405
|
-
[16, 2, 4, 6, 22, 10, 12, 14, 8, 18, 20, 0],
|
|
406
|
-
);
|
|
407
|
-
moveCube[6].init(
|
|
408
|
-
[9, 21, 2, 3, 16, 12, 6, 7],
|
|
409
|
-
[0, 19, 4, 6, 8, 17, 12, 14, 3, 11, 20, 22],
|
|
410
|
-
);
|
|
411
|
-
moveCube[9].init(
|
|
412
|
-
[0, 1, 2, 3, 5, 6, 7, 4],
|
|
413
|
-
[0, 2, 4, 6, 10, 12, 14, 8, 16, 18, 20, 22],
|
|
414
|
-
);
|
|
415
|
-
moveCube[12].init(
|
|
416
|
-
[0, 10, 22, 3, 4, 17, 13, 7],
|
|
417
|
-
[0, 2, 20, 6, 8, 10, 18, 14, 16, 4, 12, 22],
|
|
418
|
-
);
|
|
419
|
-
moveCube[15].init(
|
|
420
|
-
[0, 1, 11, 23, 4, 5, 18, 14],
|
|
421
|
-
[0, 2, 4, 23, 8, 10, 12, 21, 16, 18, 7, 15],
|
|
422
|
-
);
|
|
423
|
-
for (var a = 0; a < 18; a += 3) {
|
|
424
|
-
for (var p = 0; p < 2; p++) {
|
|
425
|
-
CubieCube.EdgeMult(moveCube[a + p], moveCube[a], moveCube[a + p + 1]);
|
|
426
|
-
CubieCube.CornMult(moveCube[a + p], moveCube[a], moveCube[a + p + 1]);
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
CubieCube.moveCube = moveCube;
|
|
431
|
-
|
|
432
|
-
CubieCube.prototype.edgeCycles = function () {
|
|
433
|
-
var visited = [];
|
|
434
|
-
var small_cycles = [0, 0, 0];
|
|
435
|
-
var cycles = 0;
|
|
436
|
-
var parity: number | boolean = false;
|
|
437
|
-
for (var x = 0; x < 12; ++x) {
|
|
438
|
-
if (visited[x]) {
|
|
439
|
-
continue;
|
|
440
|
-
}
|
|
441
|
-
var length = -1;
|
|
442
|
-
var flip: number | boolean = false;
|
|
443
|
-
var y = x;
|
|
444
|
-
do {
|
|
445
|
-
visited[y] = true;
|
|
446
|
-
++length;
|
|
447
|
-
(flip as unknown as number) ^= this.ea[y] & 1;
|
|
448
|
-
y = this.ea[y] >> 1;
|
|
449
|
-
} while (y !== x);
|
|
450
|
-
cycles += length >> 1;
|
|
451
|
-
if (length & 1) {
|
|
452
|
-
parity = !parity;
|
|
453
|
-
++cycles;
|
|
454
|
-
}
|
|
455
|
-
if (flip) {
|
|
456
|
-
if (length === 0) {
|
|
457
|
-
++small_cycles[0];
|
|
458
|
-
} else if (length & 1) {
|
|
459
|
-
small_cycles[2] ^= 1;
|
|
460
|
-
} else {
|
|
461
|
-
++small_cycles[1];
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
small_cycles[1] += small_cycles[2];
|
|
466
|
-
if (small_cycles[0] < small_cycles[1]) {
|
|
467
|
-
cycles += (small_cycles[0] + small_cycles[1]) >> 1;
|
|
468
|
-
} else {
|
|
469
|
-
var flip_cycles = [0, 2, 3, 5, 6, 8, 9];
|
|
470
|
-
cycles +=
|
|
471
|
-
small_cycles[1] + flip_cycles[(small_cycles[0] - small_cycles[1]) >> 1];
|
|
472
|
-
}
|
|
473
|
-
return cycles - (parity as unknown as number);
|
|
474
|
-
};
|
|
475
|
-
|
|
476
|
-
function createPrun(prun, init, size, maxd, doMove, N_MOVES, N_POWER, N_INV) {
|
|
477
|
-
var isMoveTable = isArray(doMove);
|
|
478
|
-
N_MOVES = N_MOVES || 6;
|
|
479
|
-
N_POWER = N_POWER || 3;
|
|
480
|
-
N_INV = N_INV || 256;
|
|
481
|
-
maxd = maxd || 256;
|
|
482
|
-
for (var i = 0, len = (size + 7) >>> 3; i < len; i++) {
|
|
483
|
-
prun[i] = -1;
|
|
484
|
-
}
|
|
485
|
-
prun[init >> 3] ^= 15 << ((init & 7) << 2);
|
|
486
|
-
var val = 0;
|
|
487
|
-
// var t = +new Date;
|
|
488
|
-
for (var l = 0; l <= maxd; l++) {
|
|
489
|
-
var done = 0;
|
|
490
|
-
var inv = l >= N_INV;
|
|
491
|
-
var fill = (l + 1) ^ 15;
|
|
492
|
-
var find = inv ? 0xf : l;
|
|
493
|
-
var check = inv ? l : 0xf;
|
|
494
|
-
|
|
495
|
-
out: for (var p = 0; p < size; p++, val >>= 4) {
|
|
496
|
-
if ((p & 7) === 0) {
|
|
497
|
-
val = prun[p >> 3];
|
|
498
|
-
if (!inv && val === -1) {
|
|
499
|
-
p += 7;
|
|
500
|
-
continue;
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
if ((val & 0xf) !== find) {
|
|
504
|
-
continue;
|
|
505
|
-
}
|
|
506
|
-
for (var m = 0; m < N_MOVES; m++) {
|
|
507
|
-
var q = p;
|
|
508
|
-
for (var c = 0; c < N_POWER; c++) {
|
|
509
|
-
q = isMoveTable ? doMove[m][q] : doMove(q, m);
|
|
510
|
-
if (getPruning(prun, q) !== check) {
|
|
511
|
-
continue;
|
|
512
|
-
}
|
|
513
|
-
++done;
|
|
514
|
-
if (inv) {
|
|
515
|
-
prun[p >> 3] ^= fill << ((p & 7) << 2);
|
|
516
|
-
continue out;
|
|
517
|
-
}
|
|
518
|
-
prun[q >> 3] ^= fill << ((q & 7) << 2);
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
if (done === 0) {
|
|
523
|
-
break;
|
|
524
|
-
}
|
|
525
|
-
DEBUG && console.log("[prun]", done);
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
//state_params: [[init, doMove, size, [maxd], [N_INV]], [...]...]
|
|
530
|
-
function Solver(N_MOVES, N_POWER, state_params) {
|
|
531
|
-
this.N_STATES = state_params.length;
|
|
532
|
-
this.N_MOVES = N_MOVES;
|
|
533
|
-
this.N_POWER = N_POWER;
|
|
534
|
-
this.state_params = state_params;
|
|
535
|
-
this.inited = false;
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
var _ = Solver.prototype;
|
|
539
|
-
|
|
540
|
-
_.search = function (state, minl, MAXL) {
|
|
541
|
-
MAXL = (MAXL || 99) + 1;
|
|
542
|
-
if (!this.inited) {
|
|
543
|
-
this.move = [];
|
|
544
|
-
this.prun = [];
|
|
545
|
-
for (var i = 0; i < this.N_STATES; i++) {
|
|
546
|
-
var state_param = this.state_params[i];
|
|
547
|
-
var init = state_param[0];
|
|
548
|
-
var doMove = state_param[1];
|
|
549
|
-
var size = state_param[2];
|
|
550
|
-
var maxd = state_param[3];
|
|
551
|
-
var N_INV = state_param[4];
|
|
552
|
-
this.move[i] = [];
|
|
553
|
-
this.prun[i] = [];
|
|
554
|
-
createMove(this.move[i], size, doMove, this.N_MOVES);
|
|
555
|
-
createPrun(
|
|
556
|
-
this.prun[i],
|
|
557
|
-
init,
|
|
558
|
-
size,
|
|
559
|
-
maxd,
|
|
560
|
-
this.move[i],
|
|
561
|
-
this.N_MOVES,
|
|
562
|
-
this.N_POWER,
|
|
563
|
-
N_INV,
|
|
564
|
-
);
|
|
565
|
-
}
|
|
566
|
-
this.inited = true;
|
|
567
|
-
}
|
|
568
|
-
this.sol = [];
|
|
569
|
-
for (var maxl = minl; maxl < MAXL; maxl++) {
|
|
570
|
-
if (this.idaSearch(state, maxl, -1)) {
|
|
571
|
-
break;
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
return maxl === MAXL ? null : this.sol.reverse();
|
|
575
|
-
};
|
|
576
|
-
|
|
577
|
-
_.toStr = function (sol, move_map, power_map) {
|
|
578
|
-
var ret = [];
|
|
579
|
-
for (var i = 0; i < sol.length; i++) {
|
|
580
|
-
ret.push(move_map[sol[i][0]] + power_map[sol[i][1]]);
|
|
581
|
-
}
|
|
582
|
-
return ret.join(" ").replace(/ +/g, " ");
|
|
583
|
-
};
|
|
584
|
-
|
|
585
|
-
_.idaSearch = function (state, maxl, lm) {
|
|
586
|
-
var N_STATES = this.N_STATES;
|
|
587
|
-
for (var i = 0; i < N_STATES; i++) {
|
|
588
|
-
if (getPruning(this.prun[i], state[i]) > maxl) {
|
|
589
|
-
return false;
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
if (maxl === 0) {
|
|
593
|
-
return true;
|
|
594
|
-
}
|
|
595
|
-
var offset = state[0] + maxl + lm + 1;
|
|
596
|
-
for (var move0 = 0; move0 < this.N_MOVES; move0++) {
|
|
597
|
-
var move = (move0 + offset) % this.N_MOVES;
|
|
598
|
-
if (move === lm) {
|
|
599
|
-
continue;
|
|
600
|
-
}
|
|
601
|
-
var cur_state = state.slice();
|
|
602
|
-
for (var power = 0; power < this.N_POWER; power++) {
|
|
603
|
-
for (var i = 0; i < N_STATES; i++) {
|
|
604
|
-
cur_state[i] = this.move[i][move][cur_state[i]];
|
|
605
|
-
}
|
|
606
|
-
if (this.idaSearch(cur_state, maxl - 1, move)) {
|
|
607
|
-
this.sol.push([move, power]);
|
|
608
|
-
return true;
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
return false;
|
|
613
|
-
};
|
|
614
|
-
|
|
615
|
-
// state: string not null
|
|
616
|
-
// solvedStates: [solvedstate, solvedstate, ...], string not null
|
|
617
|
-
// moveFunc: function(state, move);
|
|
618
|
-
// moves: {move: face0 | axis0}, face0 | axis0 = 4 + 4 bits
|
|
619
|
-
function gSolver(solvedStates, doMove, moves) {
|
|
620
|
-
this.solvedStates = solvedStates;
|
|
621
|
-
this.doMove = doMove;
|
|
622
|
-
this.moves = moves;
|
|
623
|
-
this.prunTable = {};
|
|
624
|
-
this.prunTableSize = 0;
|
|
625
|
-
this.prunDepth = -1;
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
_ = gSolver.prototype;
|
|
629
|
-
|
|
630
|
-
_.updatePrun = function (targetDepth) {
|
|
631
|
-
targetDepth = targetDepth === undefined ? this.prunDepth + 1 : targetDepth;
|
|
632
|
-
for (var depth = this.prunDepth + 1; depth <= targetDepth; depth++) {
|
|
633
|
-
var t = +new Date();
|
|
634
|
-
var prevSize = this.prunTableSize;
|
|
635
|
-
if (depth < 8) {
|
|
636
|
-
for (var i = 0; i < this.solvedStates.length; i++) {
|
|
637
|
-
this.updatePrunDFS(this.solvedStates[i], depth, 0, null);
|
|
638
|
-
}
|
|
639
|
-
} else {
|
|
640
|
-
this.updatePrunBFS(depth - 1);
|
|
641
|
-
}
|
|
642
|
-
this.prunDepth = depth;
|
|
643
|
-
DEBUG && console.log(depth, this.prunTableSize - prevSize, +new Date() - t);
|
|
644
|
-
}
|
|
645
|
-
};
|
|
646
|
-
|
|
647
|
-
_.updatePrunBFS = function (fromDepth) {
|
|
648
|
-
for (var state in this.prunTable) {
|
|
649
|
-
if (this.prunTable[state][0] !== fromDepth) {
|
|
650
|
-
continue;
|
|
651
|
-
}
|
|
652
|
-
for (var move in this.moves) {
|
|
653
|
-
var newState = this.doMove(state, move);
|
|
654
|
-
if (!newState || newState in this.prunTable) {
|
|
655
|
-
continue;
|
|
656
|
-
}
|
|
657
|
-
this.prunTable[newState] = [fromDepth + 1, move];
|
|
658
|
-
this.prunTableSize++;
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
};
|
|
662
|
-
|
|
663
|
-
_.updatePrunDFS = function (state, maxl, depth, lm) {
|
|
664
|
-
if (!(state in this.prunTable)) {
|
|
665
|
-
this.prunTable[state] = [depth, lm];
|
|
666
|
-
this.prunTableSize++;
|
|
667
|
-
}
|
|
668
|
-
if (maxl <= 0 || this.prunTable[state][1] !== lm) {
|
|
669
|
-
return;
|
|
670
|
-
}
|
|
671
|
-
var lastAxisFace = lm === null ? -1 : this.moves[lm];
|
|
672
|
-
for (var move in this.moves) {
|
|
673
|
-
var axisface = this.moves[move] ^ lastAxisFace;
|
|
674
|
-
if (axisface === 0 || ((axisface & 0xf) === 0 && move < lm)) {
|
|
675
|
-
continue;
|
|
676
|
-
}
|
|
677
|
-
var newState = this.doMove(state, move);
|
|
678
|
-
if (!newState || newState === state) {
|
|
679
|
-
continue;
|
|
680
|
-
}
|
|
681
|
-
this.updatePrunDFS(newState, maxl - 1, depth + 1, move);
|
|
682
|
-
}
|
|
683
|
-
};
|
|
684
|
-
|
|
685
|
-
_.search = function (state, minl, MAXL, nsol) {
|
|
686
|
-
MAXL = MAXL + 1 || 99;
|
|
687
|
-
this.sol = [];
|
|
688
|
-
this.sols = [];
|
|
689
|
-
this.nsol = nsol || 1;
|
|
690
|
-
this.minl = minl || 0;
|
|
691
|
-
for (var maxl = minl; maxl < MAXL; maxl++) {
|
|
692
|
-
this.updatePrun(Math.ceil(maxl / 2));
|
|
693
|
-
this.visited = {};
|
|
694
|
-
if (this.idaSearch(state, maxl, null)) {
|
|
695
|
-
break;
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
return this.sols.slice();
|
|
699
|
-
};
|
|
700
|
-
|
|
701
|
-
_.getPruning = function (state) {
|
|
702
|
-
var prun = this.prunTable[state];
|
|
703
|
-
return prun === undefined ? this.prunDepth + 1 : prun[0];
|
|
704
|
-
};
|
|
705
|
-
|
|
706
|
-
_.idaSearch = function (state, maxl, lm) {
|
|
707
|
-
if (this.getPruning(state) > maxl || state in this.visited) {
|
|
708
|
-
return false;
|
|
709
|
-
}
|
|
710
|
-
this.visited[state] = 0;
|
|
711
|
-
if (maxl === 0) {
|
|
712
|
-
this.sols.push(this.sol.slice());
|
|
713
|
-
return this.sols.length >= this.nsol;
|
|
714
|
-
}
|
|
715
|
-
var lastAxisFace = lm === null ? -1 : this.moves[lm];
|
|
716
|
-
for (var move in this.moves) {
|
|
717
|
-
var axisface = this.moves[move] ^ lastAxisFace;
|
|
718
|
-
if (axisface === 0 || ((axisface & 0xf) === 0 && move < lm)) {
|
|
719
|
-
continue;
|
|
720
|
-
}
|
|
721
|
-
var newState = this.doMove(state, move);
|
|
722
|
-
if (!newState || newState === state) {
|
|
723
|
-
continue;
|
|
724
|
-
}
|
|
725
|
-
this.sol.push(move);
|
|
726
|
-
if (this.idaSearch(newState, maxl - 1, move)) {
|
|
727
|
-
return true;
|
|
728
|
-
}
|
|
729
|
-
this.sol.pop();
|
|
730
|
-
}
|
|
731
|
-
return false;
|
|
732
|
-
};
|
|
733
|
-
|
|
734
|
-
// function rndEl(x) {
|
|
735
|
-
// return x[randomUIntBelow(x.length)];
|
|
736
|
-
// }
|
|
737
|
-
|
|
738
|
-
// function rn(n) {
|
|
739
|
-
// return randomUIntBelow(n)
|
|
740
|
-
// }
|
|
741
|
-
|
|
742
|
-
// function rndPerm(n) {
|
|
743
|
-
// var arr = [];
|
|
744
|
-
// for (var i = 0; i < n; i++) {
|
|
745
|
-
// arr[i] = i;
|
|
746
|
-
// }
|
|
747
|
-
// for (var i = 0; i < n - 1; i++) {
|
|
748
|
-
// circle(arr, i, i + rn(n - i)); // TODO
|
|
749
|
-
// }
|
|
750
|
-
// return arr;
|
|
751
|
-
// }
|
|
752
|
-
|
|
753
|
-
function rndProb(plist) {
|
|
754
|
-
var cum = 0;
|
|
755
|
-
var curIdx = 0;
|
|
756
|
-
for (var i = 0; i < plist.length; i++) {
|
|
757
|
-
if (plist[i] === 0) {
|
|
758
|
-
continue;
|
|
759
|
-
}
|
|
760
|
-
if (randomUIntBelow(cum + plist[i]) < plist[i]) {
|
|
761
|
-
curIdx = i;
|
|
762
|
-
}
|
|
763
|
-
cum += plist[i];
|
|
764
|
-
}
|
|
765
|
-
return curIdx;
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
function time2str(unix, format) {
|
|
769
|
-
if (!unix) {
|
|
770
|
-
return "N/A";
|
|
771
|
-
}
|
|
772
|
-
format = format || "%Y-%M-%D %h:%m:%s";
|
|
773
|
-
var date = new Date(unix * 1000);
|
|
774
|
-
return format
|
|
775
|
-
.replace("%Y", date.getFullYear())
|
|
776
|
-
.replace("%M", ("0" + (date.getMonth() + 1)).slice(-2))
|
|
777
|
-
.replace("%D", ("0" + date.getDate()).slice(-2))
|
|
778
|
-
.replace("%h", ("0" + date.getHours()).slice(-2))
|
|
779
|
-
.replace("%m", ("0" + date.getMinutes()).slice(-2))
|
|
780
|
-
.replace("%s", ("0" + date.getSeconds()).slice(-2));
|
|
781
|
-
}
|
|
782
|
-
|
|
783
|
-
var timeRe = /^\s*(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)\s*$/;
|
|
784
|
-
|
|
785
|
-
function str2time(val) {
|
|
786
|
-
var m = timeRe.exec(val);
|
|
787
|
-
if (!m) {
|
|
788
|
-
return null;
|
|
789
|
-
}
|
|
790
|
-
var date = new Date(0);
|
|
791
|
-
date.setFullYear(~~m[1]);
|
|
792
|
-
date.setMonth(~~m[2] - 1);
|
|
793
|
-
date.setDate(~~m[3]);
|
|
794
|
-
date.setHours(~~m[4]);
|
|
795
|
-
date.setMinutes(~~m[5]);
|
|
796
|
-
date.setSeconds(~~m[6]);
|
|
797
|
-
return ~~(date.getTime() / 1000);
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
function obj2str(val) {
|
|
801
|
-
if (typeof val === "string") {
|
|
802
|
-
return val;
|
|
803
|
-
}
|
|
804
|
-
return JSON.stringify(val);
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
function str2obj(val) {
|
|
808
|
-
if (typeof val !== "string") {
|
|
809
|
-
return val;
|
|
810
|
-
}
|
|
811
|
-
return JSON.parse(val);
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
function valuedArray(len, val) {
|
|
815
|
-
var ret = [];
|
|
816
|
-
for (var i = 0; i < len; i++) {
|
|
817
|
-
ret[i] = val;
|
|
818
|
-
}
|
|
819
|
-
return ret;
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
// const TAU = Math.PI * 2;
|
|
823
|
-
|
|
824
|
-
const SOLVED_FACELET = "UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLBBBBBBBBB";
|
|
825
|
-
|
|
826
|
-
export {
|
|
827
|
-
Cnk,
|
|
828
|
-
fact,
|
|
829
|
-
getPruning,
|
|
830
|
-
setNPerm,
|
|
831
|
-
getNPerm,
|
|
832
|
-
getNParity,
|
|
833
|
-
get8Perm,
|
|
834
|
-
set8Perm,
|
|
835
|
-
coord,
|
|
836
|
-
createMove,
|
|
837
|
-
edgeMove,
|
|
838
|
-
circle,
|
|
839
|
-
circleOri,
|
|
840
|
-
acycle,
|
|
841
|
-
createPrun,
|
|
842
|
-
CubieCube,
|
|
843
|
-
SOLVED_FACELET,
|
|
844
|
-
fillFacelet,
|
|
845
|
-
// rn,
|
|
846
|
-
// rndEl,
|
|
847
|
-
// rndProb,
|
|
848
|
-
time2str,
|
|
849
|
-
str2time,
|
|
850
|
-
obj2str,
|
|
851
|
-
str2obj,
|
|
852
|
-
valuedArray,
|
|
853
|
-
Solver,
|
|
854
|
-
// rndPerm,
|
|
855
|
-
gSolver,
|
|
856
|
-
};
|
|
54
|
+
export { Cnk, set8Perm, circle };
|