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,600 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BufferAttribute,
|
|
3
|
-
BufferGeometry,
|
|
4
|
-
Color,
|
|
5
|
-
DoubleSide,
|
|
6
|
-
Euler,
|
|
7
|
-
Group,
|
|
8
|
-
Mesh,
|
|
9
|
-
MeshBasicMaterial,
|
|
10
|
-
Object3D,
|
|
11
|
-
Triangle,
|
|
12
|
-
Vector3,
|
|
13
|
-
} from "three";
|
|
14
|
-
import {
|
|
15
|
-
areTransformationsEquivalent,
|
|
16
|
-
KPuzzleDefinition,
|
|
17
|
-
Transformation,
|
|
18
|
-
} from "../../../kpuzzle";
|
|
19
|
-
import { experimentalTransformationForQuantumMove } from "../../../kpuzzle";
|
|
20
|
-
import type { StickerDat, StickerDatSticker } from "../../../puzzle-geometry";
|
|
21
|
-
import {
|
|
22
|
-
ExperimentalFaceletMeshAppearance,
|
|
23
|
-
experimentalGetFaceletAppearance,
|
|
24
|
-
ExperimentalPuzzleAppearance,
|
|
25
|
-
} from "../../../puzzles";
|
|
26
|
-
import type { AlgCursor } from "../../animation/cursor/AlgCursor";
|
|
27
|
-
import type { PuzzlePosition } from "../../animation/cursor/CursorTypes";
|
|
28
|
-
import { smootherStep } from "../../animation/easing";
|
|
29
|
-
import { TAU } from "../TAU";
|
|
30
|
-
|
|
31
|
-
import type { Twisty3DPuzzle } from "./Twisty3DPuzzle";
|
|
32
|
-
|
|
33
|
-
const foundationMaterial = new MeshBasicMaterial({
|
|
34
|
-
side: DoubleSide,
|
|
35
|
-
color: 0x000000,
|
|
36
|
-
// transparency doesn't work very well here
|
|
37
|
-
// with duplicated center stickers
|
|
38
|
-
// transparent: true,
|
|
39
|
-
// opacity: 0.75,
|
|
40
|
-
});
|
|
41
|
-
const stickerMaterial = new MeshBasicMaterial({
|
|
42
|
-
vertexColors: true,
|
|
43
|
-
// side: DoubleSide,
|
|
44
|
-
});
|
|
45
|
-
const polyMaterial = new MeshBasicMaterial({
|
|
46
|
-
visible: false,
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
class Filler {
|
|
50
|
-
pos: number;
|
|
51
|
-
ipos: number;
|
|
52
|
-
vertices: Float32Array;
|
|
53
|
-
colors: Uint8Array;
|
|
54
|
-
ind: Uint8Array;
|
|
55
|
-
constructor(public sz: number, public colored: boolean = true) {
|
|
56
|
-
this.vertices = new Float32Array(9 * sz);
|
|
57
|
-
if (colored) {
|
|
58
|
-
this.colors = new Uint8Array(9 * sz);
|
|
59
|
-
this.ind = new Uint8Array(sz);
|
|
60
|
-
}
|
|
61
|
-
this.pos = 0;
|
|
62
|
-
this.ipos = 0;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
add(pt: number[], c: number) {
|
|
66
|
-
this.vertices[this.pos] = pt[0];
|
|
67
|
-
this.vertices[this.pos + 1] = pt[1];
|
|
68
|
-
this.vertices[this.pos + 2] = pt[2];
|
|
69
|
-
this.colors[this.pos] = c >> 16;
|
|
70
|
-
this.colors[this.pos + 1] = (c >> 8) & 255;
|
|
71
|
-
this.colors[this.pos + 2] = c & 255;
|
|
72
|
-
this.pos += 3;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
addUncolored(pt: number[]) {
|
|
76
|
-
this.vertices[this.pos] = pt[0];
|
|
77
|
-
this.vertices[this.pos + 1] = pt[1];
|
|
78
|
-
this.vertices[this.pos + 2] = pt[2];
|
|
79
|
-
this.pos += 3;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
setind(i: number) {
|
|
83
|
-
this.ind[this.ipos++] = i;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
setAttributes(geo: BufferGeometry) {
|
|
87
|
-
geo.setAttribute("position", new BufferAttribute(this.vertices, 3));
|
|
88
|
-
if (this.colored) {
|
|
89
|
-
geo.setAttribute("color", new BufferAttribute(this.colors, 3, true));
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
makeGroups(geo: BufferGeometry) {
|
|
94
|
-
geo.clearGroups();
|
|
95
|
-
for (let i = 0; i < this.ipos; ) {
|
|
96
|
-
const si = i++;
|
|
97
|
-
const iv = this.ind[si];
|
|
98
|
-
while (this.ind[i] === iv) {
|
|
99
|
-
i++;
|
|
100
|
-
}
|
|
101
|
-
geo.addGroup(3 * si, 3 * (i - si), iv);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function makePoly(
|
|
107
|
-
filler: Filler,
|
|
108
|
-
coords: number[][],
|
|
109
|
-
color: number,
|
|
110
|
-
scale: number,
|
|
111
|
-
ind: number,
|
|
112
|
-
faceArray: number[],
|
|
113
|
-
): void {
|
|
114
|
-
let ncoords: number[][] = coords;
|
|
115
|
-
if (scale !== 1) {
|
|
116
|
-
ncoords = [];
|
|
117
|
-
for (const v of coords) {
|
|
118
|
-
const v2 = [v[0] * scale, v[1] * scale, v[2] * scale];
|
|
119
|
-
ncoords.push(v2);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
for (let g = 1; g + 1 < ncoords.length; g++) {
|
|
123
|
-
faceArray.push(filler.ipos);
|
|
124
|
-
filler.add(ncoords[0], color);
|
|
125
|
-
filler.add(ncoords[g], color);
|
|
126
|
-
filler.add(ncoords[g + 1], color);
|
|
127
|
-
filler.setind(ind);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
class StickerDef {
|
|
132
|
-
public origColor: number;
|
|
133
|
-
public origColorAppearance: number;
|
|
134
|
-
public faceColor: number;
|
|
135
|
-
public faceArray: number[] = [];
|
|
136
|
-
public twistVal: number = -1;
|
|
137
|
-
constructor(
|
|
138
|
-
public filler: Filler,
|
|
139
|
-
stickerDat: StickerDatSticker,
|
|
140
|
-
hintStickers: boolean,
|
|
141
|
-
hintStickerHeightScale: number,
|
|
142
|
-
options?: {
|
|
143
|
-
appearance?: ExperimentalFaceletMeshAppearance;
|
|
144
|
-
},
|
|
145
|
-
) {
|
|
146
|
-
const sdColor = new Color(stickerDat.color).getHex();
|
|
147
|
-
this.origColor = sdColor;
|
|
148
|
-
this.origColorAppearance = sdColor;
|
|
149
|
-
if (options?.appearance) {
|
|
150
|
-
this.setAppearance(options.appearance);
|
|
151
|
-
}
|
|
152
|
-
this.faceColor = sdColor;
|
|
153
|
-
const coords = stickerDat.coords as number[][];
|
|
154
|
-
makePoly(filler, coords, this.faceColor, 1, 0, this.faceArray);
|
|
155
|
-
if (hintStickers) {
|
|
156
|
-
let highArea = 0;
|
|
157
|
-
let goodFace = null;
|
|
158
|
-
for (const f of this.faceArray) {
|
|
159
|
-
const t = new Triangle(
|
|
160
|
-
new Vector3(
|
|
161
|
-
filler.vertices[9 * f],
|
|
162
|
-
filler.vertices[9 * f + 1],
|
|
163
|
-
filler.vertices[9 * f + 2],
|
|
164
|
-
),
|
|
165
|
-
new Vector3(
|
|
166
|
-
filler.vertices[9 * f + 3],
|
|
167
|
-
filler.vertices[9 * f + 4],
|
|
168
|
-
filler.vertices[9 * f + 5],
|
|
169
|
-
),
|
|
170
|
-
new Vector3(
|
|
171
|
-
filler.vertices[9 * f + 6],
|
|
172
|
-
filler.vertices[9 * f + 7],
|
|
173
|
-
filler.vertices[9 * f + 8],
|
|
174
|
-
),
|
|
175
|
-
);
|
|
176
|
-
const a = t.getArea();
|
|
177
|
-
if (a > highArea) {
|
|
178
|
-
highArea = a;
|
|
179
|
-
goodFace = t;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
const norm = new Vector3();
|
|
183
|
-
goodFace!.getNormal(norm);
|
|
184
|
-
norm.multiplyScalar(0.5 * hintStickerHeightScale);
|
|
185
|
-
const hintCoords = [];
|
|
186
|
-
for (let i = 0; i < coords.length; i++) {
|
|
187
|
-
const j = coords.length - 1 - i;
|
|
188
|
-
hintCoords.push([
|
|
189
|
-
coords[j][0] + norm.x,
|
|
190
|
-
coords[j][1] + norm.y,
|
|
191
|
-
coords[j][2] + norm.z,
|
|
192
|
-
]);
|
|
193
|
-
}
|
|
194
|
-
makePoly(filler, hintCoords, this.faceColor, 1, 0, this.faceArray);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
public addFoundation(
|
|
199
|
-
filler: Filler,
|
|
200
|
-
foundationDat: StickerDatSticker,
|
|
201
|
-
black: number,
|
|
202
|
-
) {
|
|
203
|
-
makePoly(
|
|
204
|
-
filler,
|
|
205
|
-
foundationDat.coords as number[][],
|
|
206
|
-
black,
|
|
207
|
-
0.999,
|
|
208
|
-
2,
|
|
209
|
-
this.faceArray,
|
|
210
|
-
);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
public setAppearance(
|
|
214
|
-
faceletMeshAppearance: ExperimentalFaceletMeshAppearance,
|
|
215
|
-
): void {
|
|
216
|
-
switch (faceletMeshAppearance) {
|
|
217
|
-
case "regular":
|
|
218
|
-
this.origColorAppearance = this.origColor;
|
|
219
|
-
break;
|
|
220
|
-
case "dim":
|
|
221
|
-
if (this.origColor === 0xffffff) {
|
|
222
|
-
this.origColorAppearance = 0xdddddd;
|
|
223
|
-
} else {
|
|
224
|
-
this.origColorAppearance = new Color(this.origColor)
|
|
225
|
-
.multiplyScalar(0.5)
|
|
226
|
-
.getHex();
|
|
227
|
-
}
|
|
228
|
-
break;
|
|
229
|
-
case "oriented":
|
|
230
|
-
this.origColorAppearance = 0xff88ff;
|
|
231
|
-
break;
|
|
232
|
-
case "ignored":
|
|
233
|
-
this.origColorAppearance = 0x444444;
|
|
234
|
-
break;
|
|
235
|
-
case "invisible":
|
|
236
|
-
throw new Error("unimplemented");
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
public setColor(c: number): number {
|
|
241
|
-
if (this.faceColor !== c) {
|
|
242
|
-
this.faceColor = c;
|
|
243
|
-
const r = c >> 16;
|
|
244
|
-
const g = (c >> 8) & 255;
|
|
245
|
-
const b = c & 255;
|
|
246
|
-
for (const f of this.faceArray) {
|
|
247
|
-
for (let i = 0; i < 9; i += 3) {
|
|
248
|
-
this.filler.colors[9 * f + i] = r;
|
|
249
|
-
this.filler.colors[9 * f + i + 1] = g;
|
|
250
|
-
this.filler.colors[9 * f + i + 2] = b;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
return 1;
|
|
254
|
-
} else {
|
|
255
|
-
return 0;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
class HitPlaneDef {
|
|
261
|
-
public cubie: Group;
|
|
262
|
-
protected geo: BufferGeometry;
|
|
263
|
-
constructor(hitface: any) {
|
|
264
|
-
this.cubie = new Group();
|
|
265
|
-
const coords = hitface.coords as number[][];
|
|
266
|
-
const filler = new Filler(coords.length - 2, true);
|
|
267
|
-
for (let g = 1; g + 1 < coords.length; g++) {
|
|
268
|
-
filler.addUncolored(coords[0]);
|
|
269
|
-
filler.addUncolored(coords[g]);
|
|
270
|
-
filler.addUncolored(coords[g + 1]);
|
|
271
|
-
}
|
|
272
|
-
this.geo = new BufferGeometry();
|
|
273
|
-
filler.setAttributes(this.geo);
|
|
274
|
-
const obj = new Mesh(this.geo, polyMaterial);
|
|
275
|
-
obj.userData.name = hitface.name;
|
|
276
|
-
this.cubie.scale.setScalar(0.99);
|
|
277
|
-
this.cubie.add(obj);
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
class AxisInfo {
|
|
282
|
-
public axis: Vector3;
|
|
283
|
-
public order: number;
|
|
284
|
-
constructor(axisDat: any) {
|
|
285
|
-
const vec = axisDat[0] as number[];
|
|
286
|
-
this.axis = new Vector3(vec[0], vec[1], vec[2]);
|
|
287
|
-
this.order = axisDat[2];
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
export interface PG3DOptions {
|
|
292
|
-
appearance?: ExperimentalPuzzleAppearance;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
const PG_SCALE = 0.5;
|
|
296
|
-
|
|
297
|
-
// TODO: Split into "scene model" and "view".
|
|
298
|
-
/*
|
|
299
|
-
* PG3D uses a single geometry for the puzzle, with all the faces for
|
|
300
|
-
* each sticker (including the foundation stickers) in a single
|
|
301
|
-
* geometry. We use the materialIndex in the face to point to a
|
|
302
|
-
* specific entry, which is either a colored sticker, invisible, or
|
|
303
|
-
* black (foundation).
|
|
304
|
-
*
|
|
305
|
-
* To support general twisting of a subset of the puzzle, we then
|
|
306
|
-
* instantiate this same geometry in two different meshes with two
|
|
307
|
-
* distinct material arrays. One, the fixed mesh, has the material
|
|
308
|
-
* array set up like: [colored, invisible, black, invisible].
|
|
309
|
-
* The twisting mesh has the material array set up as
|
|
310
|
-
* [invisible, colored, invislble, black]. When not twisted, the
|
|
311
|
-
* two meshes are directly coincident, and the (shared) materialIndex
|
|
312
|
-
* in each face points to a non-invisible material in exactly one of
|
|
313
|
-
* the two meshes. When we decide to twist some cubies, we make
|
|
314
|
-
* the cubies that move point to visible materials in the moving
|
|
315
|
-
* mesh (which makes them point to invisible materials in the static
|
|
316
|
-
* mesh). This way, we only need to rotate the moving mesh as a
|
|
317
|
-
* single object---this should be very fast, and occur entirely in
|
|
318
|
-
* the GPU. Unfortunately this doesn't quite work as fast as we'd
|
|
319
|
-
* like because three.js makes a draw call every time we have a change
|
|
320
|
-
* in the material index. By moving the foundation triangles separate
|
|
321
|
-
* from the sticker triangles, we enhance the probability that many
|
|
322
|
-
* triangles can be rendered in one call speeding up the render.
|
|
323
|
-
*
|
|
324
|
-
* When we decide to support multiple subsets moving at distinct
|
|
325
|
-
* angular velocities, we will use more than two meshes, with
|
|
326
|
-
* larger material arrays, maintaining the invariant that each cubie
|
|
327
|
-
* is visible in only a single mesh.
|
|
328
|
-
*/
|
|
329
|
-
export class PG3D extends Object3D implements Twisty3DPuzzle {
|
|
330
|
-
private stickers: { [key: string]: StickerDef[][] };
|
|
331
|
-
private axesInfo: { [key: string]: AxisInfo };
|
|
332
|
-
|
|
333
|
-
private stickerTargets: Object3D[] = [];
|
|
334
|
-
private controlTargets: Object3D[] = [];
|
|
335
|
-
|
|
336
|
-
protected movingObj: Object3D;
|
|
337
|
-
protected filler: Filler;
|
|
338
|
-
protected foundationBound: number; // before this: colored; after: black
|
|
339
|
-
protected fixedGeo: BufferGeometry;
|
|
340
|
-
protected lastPos: PuzzlePosition;
|
|
341
|
-
protected lastMove: Transformation;
|
|
342
|
-
|
|
343
|
-
#pendingStickeringUpdate: boolean = false;
|
|
344
|
-
|
|
345
|
-
constructor(
|
|
346
|
-
cursor: AlgCursor,
|
|
347
|
-
private scheduleRenderCallback: () => void,
|
|
348
|
-
private definition: KPuzzleDefinition,
|
|
349
|
-
private pgdat: StickerDat,
|
|
350
|
-
showFoundation: boolean = false,
|
|
351
|
-
hintStickers: boolean = false,
|
|
352
|
-
hintStickerHeightScale: number = 1,
|
|
353
|
-
private params: PG3DOptions = {},
|
|
354
|
-
) {
|
|
355
|
-
super();
|
|
356
|
-
|
|
357
|
-
this.axesInfo = {};
|
|
358
|
-
const axesDef = this.pgdat.axis as any[];
|
|
359
|
-
for (const axis of axesDef) {
|
|
360
|
-
this.axesInfo[axis[1]] = new AxisInfo(axis);
|
|
361
|
-
}
|
|
362
|
-
const stickers = this.pgdat.stickers as any[];
|
|
363
|
-
this.stickers = {};
|
|
364
|
-
const materialArray1 = [
|
|
365
|
-
stickerMaterial,
|
|
366
|
-
polyMaterial,
|
|
367
|
-
foundationMaterial,
|
|
368
|
-
polyMaterial,
|
|
369
|
-
];
|
|
370
|
-
const materialArray2 = [
|
|
371
|
-
polyMaterial,
|
|
372
|
-
stickerMaterial,
|
|
373
|
-
polyMaterial,
|
|
374
|
-
foundationMaterial,
|
|
375
|
-
];
|
|
376
|
-
let triangleCount = 0;
|
|
377
|
-
let multiplier = 1;
|
|
378
|
-
if (hintStickers) {
|
|
379
|
-
multiplier++;
|
|
380
|
-
}
|
|
381
|
-
if (showFoundation) {
|
|
382
|
-
multiplier++;
|
|
383
|
-
}
|
|
384
|
-
for (let si = 0; si < stickers.length; si++) {
|
|
385
|
-
const sides = stickers[si].coords.length;
|
|
386
|
-
triangleCount += multiplier * (sides - 2);
|
|
387
|
-
}
|
|
388
|
-
const filler = new Filler(triangleCount);
|
|
389
|
-
const black = 0;
|
|
390
|
-
for (let si = 0; si < stickers.length; si++) {
|
|
391
|
-
const sticker = stickers[si];
|
|
392
|
-
const orbit = sticker.orbit as string;
|
|
393
|
-
const ord = sticker.ord as number;
|
|
394
|
-
const ori = sticker.ori as number;
|
|
395
|
-
if (!this.stickers[orbit]) {
|
|
396
|
-
this.stickers[orbit] = [];
|
|
397
|
-
}
|
|
398
|
-
if (!this.stickers[orbit][ori]) {
|
|
399
|
-
this.stickers[orbit][ori] = [];
|
|
400
|
-
}
|
|
401
|
-
const options: { appearance?: ExperimentalFaceletMeshAppearance } = {};
|
|
402
|
-
if (params.appearance) {
|
|
403
|
-
options.appearance = experimentalGetFaceletAppearance(
|
|
404
|
-
params.appearance,
|
|
405
|
-
orbit,
|
|
406
|
-
ord,
|
|
407
|
-
ori,
|
|
408
|
-
false,
|
|
409
|
-
);
|
|
410
|
-
}
|
|
411
|
-
const stickerdef = new StickerDef(
|
|
412
|
-
filler,
|
|
413
|
-
sticker,
|
|
414
|
-
hintStickers,
|
|
415
|
-
hintStickerHeightScale,
|
|
416
|
-
options,
|
|
417
|
-
);
|
|
418
|
-
this.stickers[orbit][ori][ord] = stickerdef;
|
|
419
|
-
}
|
|
420
|
-
this.foundationBound = filler.ipos;
|
|
421
|
-
if (showFoundation) {
|
|
422
|
-
for (let si = 0; si < stickers.length; si++) {
|
|
423
|
-
const sticker = stickers[si];
|
|
424
|
-
const foundation = this.pgdat.foundations[si];
|
|
425
|
-
const orbit = sticker.orbit as number;
|
|
426
|
-
const ord = sticker.ord as number;
|
|
427
|
-
const ori = sticker.ori as number;
|
|
428
|
-
this.stickers[orbit][ori][ord].addFoundation(filler, foundation, black);
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
const fixedGeo = new BufferGeometry();
|
|
432
|
-
filler.setAttributes(fixedGeo);
|
|
433
|
-
filler.makeGroups(fixedGeo);
|
|
434
|
-
const obj = new Mesh(fixedGeo, materialArray1);
|
|
435
|
-
obj.scale.set(PG_SCALE, PG_SCALE, PG_SCALE);
|
|
436
|
-
this.add(obj);
|
|
437
|
-
const obj2 = new Mesh(fixedGeo, materialArray2);
|
|
438
|
-
obj2.scale.set(PG_SCALE, PG_SCALE, PG_SCALE);
|
|
439
|
-
this.add(obj2);
|
|
440
|
-
const hitfaces = this.pgdat.faces as any[];
|
|
441
|
-
this.movingObj = obj2;
|
|
442
|
-
this.fixedGeo = fixedGeo;
|
|
443
|
-
this.filler = filler;
|
|
444
|
-
for (const hitface of hitfaces) {
|
|
445
|
-
const facedef = new HitPlaneDef(hitface);
|
|
446
|
-
facedef.cubie.scale.set(PG_SCALE, PG_SCALE, PG_SCALE);
|
|
447
|
-
this.add(facedef.cubie);
|
|
448
|
-
this.controlTargets.push(facedef.cubie.children[0]);
|
|
449
|
-
}
|
|
450
|
-
cursor!.addPositionListener(this);
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
public dispose(): void {
|
|
454
|
-
if (this.fixedGeo) {
|
|
455
|
-
this.fixedGeo.dispose();
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
public experimentalGetStickerTargets(): Object3D[] {
|
|
460
|
-
return this.stickerTargets;
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
public experimentalGetControlTargets(): Object3D[] {
|
|
464
|
-
return this.controlTargets;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
experimentalSetAppearance(appearance: ExperimentalPuzzleAppearance): void {
|
|
468
|
-
this.params.appearance = appearance;
|
|
469
|
-
for (const orbitName in this.definition.orbits) {
|
|
470
|
-
const { numPieces, orientations } = this.definition.orbits[orbitName];
|
|
471
|
-
for (let pieceIdx = 0; pieceIdx < numPieces; pieceIdx++) {
|
|
472
|
-
for (let faceletIdx = 0; faceletIdx < orientations; faceletIdx++) {
|
|
473
|
-
const faceletAppearance = experimentalGetFaceletAppearance(
|
|
474
|
-
appearance,
|
|
475
|
-
orbitName,
|
|
476
|
-
pieceIdx,
|
|
477
|
-
faceletIdx,
|
|
478
|
-
false,
|
|
479
|
-
);
|
|
480
|
-
const stickerDef = this.stickers[orbitName][faceletIdx][pieceIdx];
|
|
481
|
-
stickerDef.setAppearance(faceletAppearance);
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
if (this.scheduleRenderCallback) {
|
|
486
|
-
this.#pendingStickeringUpdate = true;
|
|
487
|
-
this.onPositionChange(this.lastPos);
|
|
488
|
-
this.scheduleRenderCallback();
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
public onPositionChange(p: PuzzlePosition): void {
|
|
493
|
-
const state = p.state as Transformation;
|
|
494
|
-
const noRotation = new Euler();
|
|
495
|
-
this.movingObj.rotation.copy(noRotation);
|
|
496
|
-
let colormods = 0;
|
|
497
|
-
if (
|
|
498
|
-
!this.lastPos ||
|
|
499
|
-
this.#pendingStickeringUpdate ||
|
|
500
|
-
!areTransformationsEquivalent(this.definition, this.lastPos.state, state)
|
|
501
|
-
) {
|
|
502
|
-
for (const orbit in this.stickers) {
|
|
503
|
-
const pieces = this.stickers[orbit];
|
|
504
|
-
const pos2 = state[orbit];
|
|
505
|
-
const orin = pieces.length;
|
|
506
|
-
if (orin === 1) {
|
|
507
|
-
const pieces2 = pieces[0];
|
|
508
|
-
for (let i = 0; i < pieces2.length; i++) {
|
|
509
|
-
const ni = pos2.permutation[i];
|
|
510
|
-
colormods += pieces2[i].setColor(pieces2[ni].origColorAppearance);
|
|
511
|
-
}
|
|
512
|
-
} else {
|
|
513
|
-
for (let ori = 0; ori < orin; ori++) {
|
|
514
|
-
const pieces2 = pieces[ori];
|
|
515
|
-
for (let i = 0; i < pieces2.length; i++) {
|
|
516
|
-
const nori = (ori + orin - pos2.orientation[i]) % orin;
|
|
517
|
-
const ni = pos2.permutation[i];
|
|
518
|
-
colormods += pieces2[i].setColor(
|
|
519
|
-
pieces[nori][ni].origColorAppearance,
|
|
520
|
-
);
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
this.lastPos = p;
|
|
526
|
-
this.#pendingStickeringUpdate = false;
|
|
527
|
-
}
|
|
528
|
-
let vismods = 0;
|
|
529
|
-
for (const moveProgress of p.movesInProgress) {
|
|
530
|
-
const externalMove = moveProgress.move;
|
|
531
|
-
// TODO: unswizzle goes external to internal, and so does the call after that
|
|
532
|
-
// and so does the stateForBlockMove call
|
|
533
|
-
const unswizzled = this.pgdat.unswizzle(externalMove);
|
|
534
|
-
const move = this.pgdat.notationMapper.notationToInternal(externalMove);
|
|
535
|
-
if (move === null) {
|
|
536
|
-
throw Error("Bad blockmove " + externalMove.family);
|
|
537
|
-
}
|
|
538
|
-
const quantumTransformation = experimentalTransformationForQuantumMove(
|
|
539
|
-
this.definition,
|
|
540
|
-
externalMove.quantum,
|
|
541
|
-
);
|
|
542
|
-
const ax = this.axesInfo[unswizzled];
|
|
543
|
-
const turnNormal = ax.axis;
|
|
544
|
-
const angle =
|
|
545
|
-
(-this.ease(moveProgress.fraction) *
|
|
546
|
-
moveProgress.direction *
|
|
547
|
-
move.amount *
|
|
548
|
-
TAU) /
|
|
549
|
-
ax.order;
|
|
550
|
-
this.movingObj.rotateOnAxis(turnNormal, angle);
|
|
551
|
-
if (this.lastMove !== quantumTransformation) {
|
|
552
|
-
for (const orbit in this.stickers) {
|
|
553
|
-
const pieces = this.stickers[orbit];
|
|
554
|
-
const orin = pieces.length;
|
|
555
|
-
const bmv = quantumTransformation[orbit];
|
|
556
|
-
for (let ori = 0; ori < orin; ori++) {
|
|
557
|
-
const pieces2 = pieces[ori];
|
|
558
|
-
for (let i = 0; i < pieces2.length; i++) {
|
|
559
|
-
const ni = bmv.permutation[i];
|
|
560
|
-
let tv = 0;
|
|
561
|
-
if (ni !== i || bmv.orientation[i] !== 0) {
|
|
562
|
-
tv = 1;
|
|
563
|
-
}
|
|
564
|
-
if (tv !== pieces2[i].twistVal) {
|
|
565
|
-
if (tv) {
|
|
566
|
-
for (const f of pieces2[i].faceArray) {
|
|
567
|
-
this.filler.ind[f] |= 1;
|
|
568
|
-
}
|
|
569
|
-
} else {
|
|
570
|
-
for (const f of pieces2[i].faceArray) {
|
|
571
|
-
this.filler.ind[f] &= ~1;
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
pieces2[i].twistVal = tv;
|
|
575
|
-
vismods++;
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
this.lastMove = quantumTransformation;
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
if (vismods) {
|
|
584
|
-
this.filler.makeGroups(this.fixedGeo);
|
|
585
|
-
}
|
|
586
|
-
if (colormods) {
|
|
587
|
-
(this.fixedGeo.getAttribute("color") as BufferAttribute).updateRange = {
|
|
588
|
-
offset: 0,
|
|
589
|
-
count: 9 * this.foundationBound,
|
|
590
|
-
};
|
|
591
|
-
(this.fixedGeo.getAttribute("color") as BufferAttribute).needsUpdate =
|
|
592
|
-
true;
|
|
593
|
-
}
|
|
594
|
-
this.scheduleRenderCallback!();
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
private ease(fraction: number): number {
|
|
598
|
-
return smootherStep(fraction);
|
|
599
|
-
}
|
|
600
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Object3D } from "three";
|
|
2
|
-
import type { PuzzlePosition } from "../../animation/cursor/CursorTypes";
|
|
3
|
-
|
|
4
|
-
export interface Twisty3DPuzzle extends Object3D {
|
|
5
|
-
onPositionChange(position: PuzzlePosition): void;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
// @ts-ignore https://github.com/snowpackjs/snowpack/discussions/1589#discussioncomment-130176
|
|
9
|
-
const _SNOWPACK_HACK = true;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 194.21 178.21">
|
|
3
|
-
<path
|
|
4
|
-
d="M156.39,159.67s8.88,4.87,8.88-2.89V21.46c0-7.79-8.88-2.92-8.88-2.92L97.1,52.77,37.82,18.54s-8.88-4.87-8.88,2.88V156.78c0,7.76,8.88,2.89,8.88,2.89L97.1,125.44Zm-5.52-19.82-39.36-22.73L150.87,94.4v45.45ZM43.34,38.35,82.7,61.08,43.34,83.81V38.35Z"
|
|
5
|
-
style="fill-rule:evenodd" /></svg>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { Move } from "../../../alg";
|
|
2
|
-
import type { PuzzleWrapper, State } from "../../3D/puzzles/KPuzzleWrapper";
|
|
3
|
-
import type {
|
|
4
|
-
Duration,
|
|
5
|
-
PuzzlePosition,
|
|
6
|
-
Timestamp,
|
|
7
|
-
} from "../cursor/CursorTypes";
|
|
8
|
-
|
|
9
|
-
export interface AlgIndexer<P extends PuzzleWrapper> {
|
|
10
|
-
getMove(index: number): Move | null;
|
|
11
|
-
indexToMoveStartTimestamp(index: number): Timestamp;
|
|
12
|
-
stateAtIndex(index: number, startTransformation?: State<P>): State<P>;
|
|
13
|
-
transformAtIndex(index: number): State<P>;
|
|
14
|
-
numAnimatedLeaves(): number;
|
|
15
|
-
timestampToIndex(timestamp: Timestamp): number;
|
|
16
|
-
algDuration(): Duration;
|
|
17
|
-
moveDuration(index: number): number;
|
|
18
|
-
timestampToPosition?: (
|
|
19
|
-
timestamp: Timestamp,
|
|
20
|
-
startTransformation?: State<P>,
|
|
21
|
-
) => PuzzlePosition;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// @ts-ignore https://github.com/snowpackjs/snowpack/discussions/1589#discussioncomment-130176
|
|
25
|
-
const _SNOWPACK_HACK = true;
|