cubing 0.21.1 → 0.22.1
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 +4 -7
- package/{src/cubing/kpuzzle → dist}/.DS_Store +0 -0
- package/dist/bin/order.js +16675 -0
- package/dist/bin/order.js.map +7 -0
- package/dist/bin/puzzle-geometry-bin.js +13 -9
- package/dist/bin/puzzle-geometry-bin.js.map +2 -2
- package/dist/bundle-global/cubing.bundle-global.js +555 -298
- package/dist/esm/3d-M7GBIT3X.js +21 -0
- package/dist/esm/3d-M7GBIT3X.js.map +7 -0
- package/dist/esm/alg/index.js +1 -1
- package/dist/esm/bluetooth/index.js +10 -8
- package/dist/esm/bluetooth/index.js.map +3 -3
- package/dist/esm/{chunk-RE7MIN5R.js → chunk-4IUYLRHT.js} +2 -2
- package/dist/esm/{chunk-RE7MIN5R.js.map → chunk-4IUYLRHT.js.map} +0 -0
- package/dist/esm/{chunk-CSVAFZSB.js → chunk-6BZSKSG7.js} +724 -735
- package/dist/esm/chunk-6BZSKSG7.js.map +7 -0
- package/dist/esm/{chunk-BU5PUJK3.js → chunk-EWRBHQFX.js} +1 -1
- package/dist/esm/{chunk-BU5PUJK3.js.map → chunk-EWRBHQFX.js.map} +1 -1
- package/dist/esm/{chunk-APIIMJG6.js → chunk-GF76PWEV.js} +450 -1052
- package/dist/esm/chunk-GF76PWEV.js.map +7 -0
- package/dist/esm/{chunk-MUQMBH2S.js → chunk-R3HRHYIW.js} +16 -4
- package/dist/esm/chunk-R3HRHYIW.js.map +7 -0
- package/dist/esm/{chunk-YV3RT5PX.js → chunk-X6JHXPDX.js} +2 -2
- package/dist/esm/{chunk-YV3RT5PX.js.map → chunk-X6JHXPDX.js.map} +0 -0
- package/dist/esm/esm-test-worker.js +2 -2
- package/dist/esm/esm-test-worker.js.map +2 -2
- package/dist/esm/kpuzzle/index.js +2 -2
- package/dist/esm/{node-WEHVBEKP.js → node-HFBX5WHK.js} +2 -2
- package/dist/esm/{node-WEHVBEKP.js.map → node-HFBX5WHK.js.map} +1 -1
- package/dist/esm/{node-BSAQKO3G.js → node-SP4L2AKI.js} +2 -2
- package/dist/esm/{node-BSAQKO3G.js.map → node-SP4L2AKI.js.map} +1 -1
- package/dist/esm/notation/index.js +2 -2
- package/dist/esm/protocol/index.js +2 -2
- package/dist/esm/puzzle-geometry/index.js +14 -10
- package/dist/esm/puzzle-geometry/index.js.map +2 -2
- package/dist/esm/puzzles/index.js +3 -3
- package/dist/esm/scramble/index.js +4 -4
- package/dist/esm/search/index.js +4 -4
- package/dist/esm/stream/index.js +1 -1
- package/dist/esm/twisty/index.js +729 -2346
- package/dist/esm/twisty/index.js.map +3 -3
- package/dist/esm/worker-inside-generated-string-RQYYANYQ.js +3107 -0
- package/dist/esm/worker-inside-generated-string-RQYYANYQ.js.map +7 -0
- package/dist/types/alg/index.d.ts +1 -0
- package/dist/types/alg/index.d.ts.map +1 -1
- package/dist/types/alg/units/leaves/Move.d.ts +1 -1
- package/dist/types/alg/units/leaves/Move.d.ts.map +1 -1
- package/dist/types/bluetooth/smart-puzzle/gan.d.ts.map +1 -1
- package/dist/types/cubing.bundle-global.d.ts +1 -24
- package/dist/types/cubing.bundle-global.d.ts.map +1 -1
- package/dist/types/cubing.bundle-global.exports.d.ts +25 -0
- package/dist/types/cubing.bundle-global.exports.d.ts.map +1 -0
- package/dist/types/puzzle-geometry/PGPuzzles.spec.d.ts +3 -0
- package/dist/types/puzzle-geometry/PGPuzzles.spec.d.ts.map +1 -1
- package/dist/types/puzzle-geometry/PuzzleGeometry.d.ts +7 -3
- package/dist/types/puzzle-geometry/PuzzleGeometry.d.ts.map +1 -1
- package/dist/types/puzzle-geometry/index.d.ts +1 -1
- package/dist/types/puzzle-geometry/index.d.ts.map +1 -1
- package/dist/types/puzzles/index.d.ts +1 -1
- package/dist/types/puzzles/index.d.ts.map +1 -1
- package/dist/types/puzzles/stickerings/cube-stickerings.d.ts.map +1 -1
- package/dist/types/search/inside/api.d.ts.map +1 -1
- package/dist/types/search/inside/solve/puzzles/4x4x4.d.ts +1 -1
- package/dist/types/search/inside/solve/puzzles/4x4x4.d.ts.map +1 -1
- package/dist/types/search/inside/solve/puzzles/fto.d.ts +6 -0
- package/dist/types/search/inside/solve/puzzles/fto.d.ts.map +1 -0
- package/dist/types/search/inside/solve/puzzles/fto.sgs.json.d.ts +5 -0
- package/dist/types/search/inside/solve/puzzles/fto.sgs.json.d.ts.map +1 -0
- package/dist/types/search/inside/solve/tremble.d.ts.map +1 -1
- package/dist/types/search/worker-inside-generated-string.d.ts +1 -1
- package/dist/types/search/worker-inside-generated-string.d.ts.map +1 -1
- package/dist/types/twisty/{old/animation/cursor/CursorTypes.d.ts → controllers/AnimationTypes.d.ts} +10 -3
- package/dist/types/twisty/controllers/AnimationTypes.d.ts.map +1 -0
- package/dist/types/twisty/{old/animation → controllers}/RenderScheduler.d.ts +0 -0
- package/dist/types/twisty/controllers/RenderScheduler.d.ts.map +1 -0
- package/dist/types/twisty/controllers/TwistyAnimationController.d.ts +1 -1
- package/dist/types/twisty/controllers/TwistyAnimationController.d.ts.map +1 -1
- package/dist/types/twisty/{old/animation → controllers}/easing.d.ts +0 -0
- package/dist/types/twisty/controllers/easing.d.ts.map +1 -0
- package/dist/types/twisty/{old/animation → controllers}/indexer/AlgDuration.d.ts +2 -2
- package/dist/types/twisty/controllers/indexer/AlgDuration.d.ts.map +1 -0
- package/dist/types/twisty/{old/animation → controllers}/indexer/AlgIndexer.d.ts +3 -3
- package/dist/types/twisty/controllers/indexer/AlgIndexer.d.ts.map +1 -0
- package/dist/types/twisty/{old/animation → controllers}/indexer/SimpleAlgIndexer.d.ts +3 -3
- package/dist/types/twisty/controllers/indexer/SimpleAlgIndexer.d.ts.map +1 -0
- package/dist/types/twisty/{old/animation → controllers}/indexer/simultaneous-moves/SimultaneousMoveIndexer.d.ts +3 -3
- package/dist/types/twisty/controllers/indexer/simultaneous-moves/SimultaneousMoveIndexer.d.ts.map +1 -0
- package/dist/types/twisty/{old/animation → controllers}/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.d.ts +3 -3
- package/dist/types/twisty/controllers/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.d.ts.map +1 -0
- package/dist/types/twisty/{old/animation → controllers}/indexer/simultaneous-moves/simul-moves.d.ts +2 -2
- package/dist/types/twisty/controllers/indexer/simultaneous-moves/simul-moves.d.ts.map +1 -0
- package/dist/types/twisty/{old/animation → controllers}/indexer/tree/AlgWalker.d.ts +2 -2
- package/dist/types/twisty/controllers/indexer/tree/AlgWalker.d.ts.map +1 -0
- package/dist/types/twisty/{old/animation → controllers}/indexer/tree/TreeAlgIndexer.d.ts +3 -3
- package/dist/types/twisty/controllers/indexer/tree/TreeAlgIndexer.d.ts.map +1 -0
- package/dist/types/twisty/controllers/indexer/tree/chunkAlgs.d.ts +3 -0
- package/dist/types/twisty/controllers/indexer/tree/chunkAlgs.d.ts.map +1 -0
- package/dist/types/twisty/{old/animation → controllers}/stream/timeline-move-calculation-draft.d.ts +2 -2
- package/dist/types/twisty/controllers/stream/timeline-move-calculation-draft.d.ts.map +1 -0
- package/dist/types/twisty/heavy-code-imports/dynamic-entries/3d.d.ts +1 -2
- package/dist/types/twisty/heavy-code-imports/dynamic-entries/3d.d.ts.map +1 -1
- package/dist/types/twisty/index.d.ts +9 -12
- package/dist/types/twisty/index.d.ts.map +1 -1
- package/dist/types/twisty/model/TwistyPlayerModel.d.ts +11 -0
- package/dist/types/twisty/model/TwistyPlayerModel.d.ts.map +1 -1
- package/dist/types/twisty/model/props/TwistyPropDebugger.d.ts +1 -1
- package/dist/types/twisty/model/props/TwistyPropDebugger.d.ts.map +1 -1
- package/dist/types/twisty/model/props/puzzle/display/FoundationDisplayProp.d.ts +6 -0
- package/dist/types/twisty/model/props/puzzle/display/FoundationDisplayProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/display/HintFaceletProp.d.ts +5 -1
- package/dist/types/twisty/model/props/puzzle/display/HintFaceletProp.d.ts.map +1 -1
- package/dist/types/twisty/model/props/puzzle/display/StickeringProp.d.ts +46 -1
- package/dist/types/twisty/model/props/puzzle/display/StickeringProp.d.ts.map +1 -1
- package/dist/types/twisty/model/props/puzzle/state/AnchoredStartProp.d.ts +2 -2
- package/dist/types/twisty/model/props/puzzle/state/AnchoredStartProp.d.ts.map +1 -1
- package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesProp.d.ts +1 -1
- package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesProp.d.ts.map +1 -1
- package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesSimplified.d.ts +1 -1
- package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesSimplified.d.ts.map +1 -1
- package/dist/types/twisty/model/props/puzzle/state/CurrentTransformationProp.d.ts +1 -1
- package/dist/types/twisty/model/props/puzzle/state/CurrentTransformationProp.d.ts.map +1 -1
- package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorProp.d.ts +5 -2
- package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorProp.d.ts.map +1 -1
- package/dist/types/twisty/model/props/puzzle/state/IndexerProp.d.ts +2 -2
- package/dist/types/twisty/model/props/puzzle/state/IndexerProp.d.ts.map +1 -1
- package/dist/types/twisty/model/props/puzzle/state/LegacyPositionProp.d.ts +2 -2
- package/dist/types/twisty/model/props/puzzle/state/LegacyPositionProp.d.ts.map +1 -1
- package/dist/types/twisty/model/props/puzzle/state/MovePressInputProp.d.ts +11 -0
- package/dist/types/twisty/model/props/puzzle/state/MovePressInputProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/state/NaiveMoveCountProp.d.ts +10 -0
- package/dist/types/twisty/model/props/puzzle/state/NaiveMoveCountProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/state/SetupAnchorProp.d.ts +5 -1
- package/dist/types/twisty/model/props/puzzle/state/SetupAnchorProp.d.ts.map +1 -1
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDProp.d.ts +1 -1
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDProp.d.ts.map +1 -1
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.d.ts +19 -1
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.d.ts.map +1 -1
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleLoaderProp.d.ts +1 -1
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleLoaderProp.d.ts.map +1 -1
- package/dist/types/twisty/model/props/timeline/DetailedTimelineInfoProp.d.ts +2 -3
- package/dist/types/twisty/model/props/timeline/DetailedTimelineInfoProp.d.ts.map +1 -1
- package/dist/types/twisty/model/props/timeline/PlayingInfoProp.d.ts +1 -1
- package/dist/types/twisty/model/props/timeline/PlayingInfoProp.d.ts.map +1 -1
- package/dist/types/twisty/model/props/timeline/TimestampRequestProp.d.ts +1 -1
- package/dist/types/twisty/model/props/timeline/TimestampRequestProp.d.ts.map +1 -1
- package/dist/types/twisty/model/props/viewer/BackViewProp.d.ts +6 -1
- package/dist/types/twisty/model/props/viewer/BackViewProp.d.ts.map +1 -1
- package/dist/types/twisty/model/props/viewer/BackgroundProp.d.ts +5 -1
- package/dist/types/twisty/model/props/viewer/BackgroundProp.d.ts.map +1 -1
- package/dist/types/twisty/model/props/viewer/ControlPanelProp.d.ts +5 -1
- package/dist/types/twisty/model/props/viewer/ControlPanelProp.d.ts.map +1 -1
- package/dist/types/twisty/model/props/viewer/OrbitCoordinatesProp.d.ts +18 -5
- package/dist/types/twisty/model/props/viewer/OrbitCoordinatesProp.d.ts.map +1 -1
- package/dist/types/twisty/model/props/viewer/OrbitCoordinatesRequestProp.d.ts +6 -6
- package/dist/types/twisty/model/props/viewer/OrbitCoordinatesRequestProp.d.ts.map +1 -1
- package/dist/types/twisty/model/props/viewer/TimeRangeProp.d.ts +2 -2
- package/dist/types/twisty/model/props/viewer/TimeRangeProp.d.ts.map +1 -1
- package/dist/types/twisty/model/props/viewer/ViewerLinkProp.d.ts +5 -1
- package/dist/types/twisty/model/props/viewer/ViewerLinkProp.d.ts.map +1 -1
- package/dist/types/twisty/model/props/viewer/VisualizationProp.d.ts +7 -1
- package/dist/types/twisty/model/props/viewer/VisualizationProp.d.ts.map +1 -1
- package/dist/types/twisty/model/props/viewer/VisualizationStrategyProp.d.ts +1 -1
- package/dist/types/twisty/model/props/viewer/VisualizationStrategyProp.d.ts.map +1 -1
- package/dist/types/twisty/views/2D/Twisty2DPuzzle.css.d.ts +3 -0
- package/dist/types/twisty/views/2D/Twisty2DPuzzle.css.d.ts.map +1 -0
- package/dist/types/twisty/views/2D/Twisty2DPuzzle.d.ts +4 -6
- package/dist/types/twisty/views/2D/Twisty2DPuzzle.d.ts.map +1 -1
- package/dist/types/twisty/views/2D/Twisty2DPuzzleWrapper.d.ts +1 -1
- package/dist/types/twisty/views/2D/Twisty2DPuzzleWrapper.d.ts.map +1 -1
- package/dist/types/twisty/views/2D/Twisty2DSceneWrapper.d.ts +2 -2
- package/dist/types/twisty/views/2D/Twisty2DSceneWrapper.d.ts.map +1 -1
- package/dist/types/twisty/views/3D/DragTracker.d.ts +28 -0
- package/dist/types/twisty/views/3D/DragTracker.d.ts.map +1 -0
- package/dist/types/twisty/views/3D/RendererPool.d.ts.map +1 -1
- package/dist/types/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts +6 -1
- package/dist/types/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts.map +1 -1
- package/dist/types/twisty/views/3D/Twisty3DSceneWrapper.d.ts +9 -4
- package/dist/types/twisty/views/3D/Twisty3DSceneWrapper.d.ts.map +1 -1
- package/dist/types/twisty/views/3D/Twisty3DVantage.css.d.ts +3 -0
- package/dist/types/twisty/views/3D/Twisty3DVantage.css.d.ts.map +1 -0
- package/dist/types/twisty/views/3D/Twisty3DVantage.d.ts +12 -8
- package/dist/types/twisty/views/3D/Twisty3DVantage.d.ts.map +1 -1
- package/dist/types/twisty/views/3D/TwistyOrbitControls.d.ts +24 -0
- package/dist/types/twisty/views/3D/TwistyOrbitControls.d.ts.map +1 -0
- package/dist/types/twisty/views/3D/TwistyOrbitControls.spec.d.ts +5 -0
- package/dist/types/twisty/views/3D/TwistyOrbitControls.spec.d.ts.map +1 -0
- package/dist/types/twisty/views/3D/puzzles/Cube3D.d.ts +4 -4
- package/dist/types/twisty/views/3D/puzzles/Cube3D.d.ts.map +1 -1
- package/dist/types/twisty/views/3D/puzzles/PG3D.d.ts +17 -10
- package/dist/types/twisty/views/3D/puzzles/PG3D.d.ts.map +1 -1
- package/dist/types/twisty/views/3D/puzzles/Twisty3DPuzzle.d.ts +1 -1
- package/dist/types/twisty/views/3D/puzzles/Twisty3DPuzzle.d.ts.map +1 -1
- package/dist/types/twisty/{old/dom/element → views}/ClassListManager.d.ts +0 -0
- package/dist/types/twisty/views/ClassListManager.d.ts.map +1 -0
- package/dist/types/twisty/{old/dom/element → views}/ManagedCustomElement.d.ts +0 -0
- package/dist/types/twisty/views/ManagedCustomElement.d.ts.map +1 -0
- package/dist/types/twisty/views/TwistyAlgEditor/LeafTokens.d.ts +1 -1
- package/dist/types/twisty/views/TwistyAlgEditor/LeafTokens.d.ts.map +1 -1
- package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.css.d.ts +1 -1
- package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.css.d.ts.map +1 -1
- package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.d.ts +2 -1
- package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.d.ts.map +1 -1
- package/dist/types/twisty/views/TwistyAlgViewer.css.d.ts +1 -1
- package/dist/types/twisty/views/TwistyAlgViewer.css.d.ts.map +1 -1
- package/dist/types/twisty/views/TwistyAlgViewer.d.ts +2 -2
- package/dist/types/twisty/views/TwistyAlgViewer.d.ts.map +1 -1
- package/dist/types/twisty/views/TwistyPlayer.css.d.ts +3 -0
- package/dist/types/twisty/views/TwistyPlayer.css.d.ts.map +1 -0
- package/dist/types/twisty/views/TwistyPlayer.d.ts +7 -3
- package/dist/types/twisty/views/TwistyPlayer.d.ts.map +1 -1
- package/dist/types/twisty/views/TwistyPlayerSettable.d.ts +7 -4
- package/dist/types/twisty/views/TwistyPlayerSettable.d.ts.map +1 -1
- package/dist/types/twisty/views/TwistyViewerWrapper.css.d.ts +3 -0
- package/dist/types/twisty/views/TwistyViewerWrapper.css.d.ts.map +1 -0
- package/dist/types/twisty/{old/dom/viewers → views}/canvas.d.ts +0 -0
- package/dist/types/twisty/views/canvas.d.ts.map +1 -0
- package/dist/types/twisty/views/control-panel/TwistyButtonsV2.css.d.ts +4 -0
- package/dist/types/twisty/views/control-panel/TwistyButtonsV2.css.d.ts.map +1 -0
- package/dist/types/twisty/views/control-panel/TwistyButtonsV2.d.ts +1 -1
- package/dist/types/twisty/views/control-panel/TwistyButtonsV2.d.ts.map +1 -1
- package/dist/types/twisty/views/control-panel/TwistyScrubber.css.d.ts +3 -0
- package/dist/types/twisty/{old/dom/controls → views/control-panel}/TwistyScrubber.css.d.ts.map +1 -1
- package/dist/types/twisty/views/control-panel/TwistyScrubberV2.d.ts +1 -1
- package/dist/types/twisty/views/control-panel/TwistyScrubberV2.d.ts.map +1 -1
- package/dist/types/twisty/{old/dom/element → views}/node-custom-element-shims.d.ts +0 -0
- package/dist/types/twisty/views/node-custom-element-shims.d.ts.map +1 -0
- package/dist/types/twisty/views/stream/TwistyStreamSource.css.d.ts +3 -0
- package/dist/types/twisty/views/stream/TwistyStreamSource.css.d.ts.map +1 -0
- package/dist/types/twisty/{old/dom → views}/stream/TwistyStreamSource.d.ts +1 -1
- package/dist/types/twisty/views/stream/TwistyStreamSource.d.ts.map +1 -0
- package/dist/types/{search/vendor → vendor}/comlink-everywhere/inside/index.d.ts +0 -0
- package/dist/types/vendor/comlink-everywhere/inside/index.d.ts.map +1 -0
- package/dist/types/{search/vendor → vendor}/comlink-everywhere/inside/node.d.ts +0 -0
- package/dist/types/vendor/comlink-everywhere/inside/node.d.ts.map +1 -0
- package/dist/types/{search/vendor → vendor}/comlink-everywhere/outside/index.d.ts +0 -0
- package/dist/types/vendor/comlink-everywhere/outside/index.d.ts.map +1 -0
- package/dist/types/{search/vendor → vendor}/comlink-everywhere/outside/node.d.ts +0 -0
- package/dist/types/vendor/comlink-everywhere/outside/node.d.ts.map +1 -0
- package/dist/types/{search/inside/solve/vendor → vendor}/cstimer/src/js/lib/mathlib.d.ts +0 -0
- package/dist/types/vendor/cstimer/src/js/lib/mathlib.d.ts.map +1 -0
- package/dist/types/{search/inside/solve/vendor → vendor}/cstimer/src/js/scramble/scramble_444.d.ts +1 -1
- package/dist/types/vendor/cstimer/src/js/scramble/scramble_444.d.ts.map +1 -0
- package/dist/types/{search/inside/solve/vendor → vendor}/min2phase/gwt.d.ts +0 -0
- package/dist/types/vendor/min2phase/gwt.d.ts.map +1 -0
- package/dist/types/{search/inside/solve/vendor → vendor}/random-uint-below/get-random-values.d.ts +0 -0
- package/dist/types/vendor/random-uint-below/get-random-values.d.ts.map +1 -0
- package/dist/types/{search/inside/solve/vendor → vendor}/random-uint-below/index.d.ts +1 -1
- package/dist/types/vendor/random-uint-below/index.d.ts.map +1 -0
- package/dist/types/{search/inside/solve/vendor → vendor}/random-uint-below/random-choice.d.ts +0 -0
- package/dist/types/vendor/random-uint-below/random-choice.d.ts.map +1 -0
- package/dist/types/{search/inside/solve/vendor/random-uint-below/random-int.d.ts → vendor/random-uint-below/random53BitValue.d.ts} +1 -1
- package/dist/types/vendor/random-uint-below/random53BitValue.d.ts.map +1 -0
- package/dist/types/{search/inside/solve/vendor → vendor}/sq12phase/scramble_sq1.d.ts +0 -0
- package/dist/types/vendor/sq12phase/scramble_sq1.d.ts.map +1 -0
- package/dist/types/{bluetooth/smart-puzzle → vendor/unsafe-raw-aes}/unsafe-raw-aes.d.ts +0 -0
- package/dist/types/vendor/unsafe-raw-aes/unsafe-raw-aes.d.ts.map +1 -0
- package/docs/.DS_Store +0 -0
- package/docs/cubing/.DS_Store +0 -0
- package/docs/cubing/api/index.html +11 -52
- package/docs/cubing/index.html +67 -27
- package/docs/main.css +7 -6
- package/package.json +8 -9
- package/src/cubing/.DS_Store +0 -0
- package/src/cubing/alg/index.ts +1 -0
- package/src/cubing/alg/units/leaves/Move.ts +1 -1
- package/src/cubing/bluetooth/smart-puzzle/gan.ts +4 -1
- package/src/cubing/bluetooth/smart-timer/GanTimer.ts +1 -1
- package/src/cubing/cubing.bundle-global.exports.ts +25 -0
- package/src/cubing/cubing.bundle-global.ts +3 -27
- package/src/cubing/puzzle-geometry/PGPuzzles.spec.ts +4 -0
- package/src/cubing/puzzle-geometry/PuzzleGeometry.ts +20 -8
- package/src/cubing/puzzle-geometry/index.ts +2 -2
- package/src/cubing/puzzles/.DS_Store +0 -0
- package/src/cubing/puzzles/implementations/.DS_Store +0 -0
- package/src/cubing/puzzles/index.ts +1 -1
- package/src/cubing/puzzles/stickerings/cube-stickerings.ts +18 -0
- package/src/cubing/puzzles/stickerings/global-custom-stickering-hack.ts +1 -1
- package/src/cubing/search/.DS_Store +0 -0
- package/src/cubing/search/esm-test-worker.js +1 -1
- package/src/cubing/search/inside/.DS_Store +0 -0
- package/src/cubing/search/inside/api.ts +3 -0
- package/src/cubing/search/inside/entry.js +1 -1
- package/src/cubing/search/inside/inside-worker.ts +1 -1
- package/src/cubing/search/inside/solve/.DS_Store +0 -0
- package/src/cubing/search/inside/solve/addOrientationSuffix.ts +1 -1
- package/src/cubing/{alg → search/inside/solve/puzzles}/.DS_Store +0 -0
- package/src/cubing/search/inside/solve/puzzles/2x2x2.ts +1 -1
- package/src/cubing/search/inside/solve/puzzles/3x3x3/index.ts +2 -2
- package/src/cubing/search/inside/solve/puzzles/4x4x4.ts +2 -2
- package/src/cubing/search/inside/solve/puzzles/big-cubes.ts +1 -1
- package/src/cubing/search/inside/solve/puzzles/clock.ts +1 -1
- package/src/cubing/search/inside/solve/puzzles/{FTO.sgs → fto.sgs.json.ts} +116 -80
- package/src/cubing/search/inside/solve/puzzles/fto.ts +58 -0
- package/src/cubing/search/inside/solve/puzzles/sq1.ts +1 -1
- package/src/cubing/search/inside/solve/puzzles/wca-minx.ts +1 -1
- package/src/cubing/search/inside/solve/tremble.ts +2 -1
- package/src/cubing/search/inside/solve/vendor/.DS_Store +0 -0
- package/src/cubing/search/instantiator.ts +1 -1
- package/src/cubing/search/worker-inside-generated-string.js +1 -1
- package/src/cubing/twisty/.DS_Store +0 -0
- package/src/cubing/{alg/units → twisty/controllers}/.DS_Store +0 -0
- package/src/cubing/twisty/{old/animation/cursor/CursorTypes.ts → controllers/AnimationTypes.ts} +11 -2
- package/src/cubing/twisty/{old/animation → controllers}/RenderScheduler.ts +0 -0
- package/src/cubing/twisty/controllers/TwistyAnimationController.ts +4 -4
- package/src/cubing/twisty/controllers/animation/.DS_Store +0 -0
- package/src/cubing/twisty/{old/animation → controllers}/easing.ts +0 -0
- package/src/cubing/{stream → twisty/controllers/indexer}/.DS_Store +0 -0
- package/src/cubing/twisty/{old/animation → controllers}/indexer/AlgDuration.ts +2 -2
- package/src/cubing/twisty/{old/animation → controllers}/indexer/AlgIndexer.ts +4 -4
- package/src/cubing/twisty/{old/animation → controllers}/indexer/SimpleAlgIndexer.ts +4 -4
- package/src/cubing/twisty/{old/animation → controllers}/indexer/simultaneous-moves/SimultaneousMoveIndexer.ts +3 -3
- package/src/cubing/twisty/{old/animation → controllers}/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.ts +3 -3
- package/src/cubing/twisty/{old/animation → controllers}/indexer/simultaneous-moves/simul-moves.ts +2 -2
- package/src/cubing/twisty/{old/animation → controllers}/indexer/tree/AlgWalker.ts +4 -4
- package/src/cubing/twisty/{old/animation → controllers}/indexer/tree/TreeAlgIndexer.ts +3 -3
- package/src/cubing/twisty/{old/animation → controllers}/indexer/tree/chunkAlgs.ts +2 -2
- package/src/cubing/twisty/{old/animation → controllers}/stream/timeline-move-calculation-draft.spec.ts.TODO +0 -0
- package/src/cubing/twisty/{old/animation → controllers}/stream/timeline-move-calculation-draft.ts +2 -2
- package/src/cubing/twisty/heavy-code-imports/.DS_Store +0 -0
- package/src/cubing/twisty/heavy-code-imports/dynamic-entries/3d.ts +2 -12
- package/src/cubing/twisty/index.ts +12 -19
- package/src/cubing/twisty/model/.DS_Store +0 -0
- package/src/cubing/twisty/model/TwistyPlayerModel.ts +38 -7
- package/src/cubing/twisty/model/props/.DS_Store +0 -0
- package/src/cubing/twisty/model/props/TwistyPropDebugger.ts +3 -3
- package/src/cubing/twisty/model/props/puzzle/.DS_Store +0 -0
- package/src/cubing/twisty/model/props/puzzle/display/FoundationDisplayProp.ts +9 -0
- package/src/cubing/twisty/model/props/puzzle/display/HintFaceletProp.ts +6 -1
- package/src/cubing/twisty/model/props/puzzle/display/StickeringProp.ts +49 -1
- package/src/cubing/twisty/model/props/puzzle/state/AlgTransformationProp.ts +1 -1
- package/src/cubing/twisty/model/props/puzzle/state/AnchoredStartProp.ts +2 -2
- package/src/cubing/twisty/model/props/puzzle/state/CurrentLeavesProp.ts +2 -2
- package/src/cubing/twisty/model/props/puzzle/state/CurrentLeavesSimplified.ts +1 -1
- package/src/cubing/twisty/model/props/puzzle/state/CurrentTransformationProp.ts +1 -1
- package/src/cubing/twisty/model/props/puzzle/state/IndexerConstructorProp.ts +12 -5
- package/src/cubing/twisty/model/props/puzzle/state/IndexerProp.ts +2 -2
- package/src/cubing/twisty/model/props/puzzle/state/LegacyPositionProp.ts +2 -2
- package/src/cubing/twisty/model/props/puzzle/state/MovePressInputProp.ts +14 -0
- package/src/cubing/twisty/model/props/puzzle/state/NaiveMoveCountProp.ts +20 -0
- package/src/cubing/twisty/model/props/puzzle/state/SetupAnchorProp.ts +7 -1
- package/src/cubing/twisty/model/props/puzzle/structure/PuzzleIDProp.ts +1 -1
- package/src/cubing/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.ts +20 -1
- package/src/cubing/twisty/model/props/puzzle/structure/PuzzleLoaderProp.ts +1 -1
- package/src/cubing/twisty/model/props/timeline/DetailedTimelineInfoProp.ts +5 -3
- package/src/cubing/twisty/model/props/timeline/PlayingInfoProp.ts +1 -4
- package/src/cubing/twisty/model/props/timeline/TimestampRequestProp.ts +1 -1
- package/src/cubing/twisty/model/props/viewer/BackViewProp.ts +7 -1
- package/src/cubing/twisty/model/props/viewer/BackgroundProp.ts +6 -1
- package/src/cubing/twisty/model/props/viewer/ControlPanelProp.ts +5 -1
- package/src/cubing/twisty/model/props/viewer/OrbitCoordinatesProp.ts +83 -12
- package/src/cubing/twisty/model/props/viewer/OrbitCoordinatesRequestProp.ts +8 -8
- package/src/cubing/twisty/model/props/viewer/TimeRangeProp.ts +2 -2
- package/src/cubing/twisty/model/props/viewer/ViewerLinkProp.ts +5 -1
- package/src/cubing/twisty/model/props/viewer/VisualizationProp.ts +8 -1
- package/src/cubing/twisty/model/props/viewer/VisualizationStrategyProp.ts +1 -1
- package/src/cubing/twisty/old/.DS_Store +0 -0
- package/src/cubing/twisty/old/animation/.DS_Store +0 -0
- package/src/cubing/twisty/old/dom/.DS_Store +0 -0
- package/src/cubing/twisty/views/.DS_Store +0 -0
- package/src/cubing/twisty/{old/dom/viewers/Twisty2DSVGView.css.ts → views/2D/Twisty2DPuzzle.css.ts} +1 -1
- package/src/cubing/twisty/views/2D/Twisty2DPuzzle.ts +8 -12
- package/src/cubing/twisty/views/2D/Twisty2DPuzzleWrapper.ts +1 -1
- package/src/cubing/twisty/views/2D/Twisty2DSceneWrapper.ts +4 -4
- package/src/cubing/{bluetooth → twisty/views/3D}/.DS_Store +0 -0
- package/src/cubing/twisty/views/3D/DragTracker.ts +184 -0
- package/src/cubing/twisty/views/3D/RendererPool.ts +2 -1
- package/src/cubing/twisty/views/3D/Twisty3DPuzzleWrapper.ts +51 -5
- package/src/cubing/twisty/views/3D/Twisty3DSceneWrapper.ts +51 -10
- package/src/cubing/twisty/{old/dom/viewers/Twisty3DCanvas.css.ts → views/3D/Twisty3DVantage.css.ts} +2 -2
- package/src/cubing/twisty/views/3D/Twisty3DVantage.ts +103 -35
- package/src/cubing/twisty/views/3D/TwistyOrbitControls.spec.ts +213 -0
- package/src/cubing/twisty/views/3D/TwistyOrbitControls.ts +176 -0
- package/src/cubing/twisty/views/3D/puzzles/Cube3D.ts +5 -9
- package/src/cubing/twisty/views/3D/puzzles/PG3D.ts +127 -37
- package/src/cubing/twisty/views/3D/puzzles/Twisty3DPuzzle.ts +1 -1
- package/src/cubing/twisty/{old/dom/element → views}/ClassListManager.ts +0 -0
- package/src/cubing/twisty/{old/dom/element → views}/ManagedCustomElement.ts +0 -0
- package/src/cubing/twisty/views/TwistyAlgEditor/LeafTokens.ts +1 -1
- package/src/cubing/twisty/views/TwistyAlgEditor/TwistyAlgEditor.css.ts +1 -1
- package/src/cubing/twisty/views/TwistyAlgEditor/TwistyAlgEditor.ts +11 -4
- package/src/cubing/twisty/views/TwistyAlgViewer.css.ts +1 -1
- package/src/cubing/twisty/views/TwistyAlgViewer.ts +4 -4
- package/src/cubing/twisty/{old/dom → views}/TwistyPlayer.css.ts +4 -1
- package/src/cubing/twisty/views/TwistyPlayer.ts +16 -25
- package/src/cubing/twisty/views/TwistyPlayerSettable.ts +14 -10
- package/src/cubing/twisty/{old/dom/viewers → views}/TwistyViewerWrapper.css.ts +1 -1
- package/src/cubing/twisty/{old/dom/viewers → views}/canvas.ts +0 -0
- package/src/cubing/twisty/{old/dom/controls/buttons.css.ts → views/control-panel/TwistyButtonsV2.css.ts} +1 -1
- package/src/cubing/twisty/views/control-panel/TwistyButtonsV2.ts +5 -8
- package/src/cubing/twisty/{old/dom/controls → views/control-panel}/TwistyScrubber.css.ts +1 -1
- package/src/cubing/twisty/views/control-panel/TwistyScrubberV2.ts +3 -3
- package/src/cubing/twisty/{old/dom/element → views}/node-custom-element-shims.ts +2 -2
- package/src/cubing/twisty/{old/dom → views}/stream/TwistyStreamSource.css.ts +1 -1
- package/src/cubing/twisty/{old/dom → views}/stream/TwistyStreamSource.ts +9 -9
- package/src/cubing/vendor/.DS_Store +0 -0
- package/src/cubing/{twisty/old/animation/indexer → vendor/comlink-everywhere}/.DS_Store +0 -0
- package/src/cubing/{search/vendor → vendor}/comlink-everywhere/comlink-everywhere.webloc +0 -0
- package/src/cubing/{search/vendor → vendor}/comlink-everywhere/inside/index.d.ts +0 -0
- package/src/cubing/{search/vendor → vendor}/comlink-everywhere/inside/index.js +0 -0
- package/src/cubing/{search/vendor → vendor}/comlink-everywhere/inside/node.js +0 -0
- package/src/cubing/{search/vendor → vendor}/comlink-everywhere/outside/index.d.ts +0 -0
- package/src/cubing/{search/vendor → vendor}/comlink-everywhere/outside/index.js +0 -0
- package/src/cubing/{search/vendor → vendor}/comlink-everywhere/outside/node.js +0 -0
- package/src/cubing/vendor/cstimer/.DS_Store +0 -0
- package/src/cubing/{search/inside/solve/vendor → vendor}/cstimer/LICENSE +0 -0
- package/src/cubing/{search/inside/solve/vendor → vendor}/cstimer/src/js/lib/mathlib.ts +0 -0
- package/src/cubing/{search/inside/solve/vendor → vendor}/cstimer/src/js/scramble/scramble_444.ts +3 -3
- package/src/cubing/{search/inside/solve/vendor → vendor}/min2phase/gwt.d.ts +0 -0
- package/src/cubing/{search/inside/solve/vendor → vendor}/min2phase/gwt.js +0 -0
- package/src/cubing/vendor/random-uint-below/get-random-values.ts +23 -0
- package/src/cubing/{search/inside/solve/vendor → vendor}/random-uint-below/index.ts +2 -2
- package/src/cubing/{search/inside/solve/vendor → vendor}/random-uint-below/random-choice.ts +1 -1
- package/src/cubing/{search/inside/solve/vendor/random-uint-below/random-int.ts → vendor/random-uint-below/random53BitValue.ts} +0 -0
- package/src/cubing/{search/inside/solve/vendor → vendor}/sq12phase/scramble_sq1.js +0 -0
- package/src/cubing/{bluetooth/smart-puzzle → vendor/unsafe-raw-aes}/unsafe-raw-aes.ts +18 -20
- package/dist/esm/3d-B25DP5PE.js +0 -39
- package/dist/esm/3d-B25DP5PE.js.map +0 -7
- package/dist/esm/chunk-APIIMJG6.js.map +0 -7
- package/dist/esm/chunk-CSVAFZSB.js.map +0 -7
- package/dist/esm/chunk-MUQMBH2S.js.map +0 -7
- package/dist/esm/worker-inside-generated-string-KDZOUGJF.js +0 -2831
- package/dist/esm/worker-inside-generated-string-KDZOUGJF.js.map +0 -7
- package/dist/types/bluetooth/smart-puzzle/unsafe-raw-aes.d.ts.map +0 -1
- package/dist/types/search/inside/solve/vendor/cstimer/src/js/lib/mathlib.d.ts.map +0 -1
- package/dist/types/search/inside/solve/vendor/cstimer/src/js/scramble/scramble_444.d.ts.map +0 -1
- package/dist/types/search/inside/solve/vendor/min2phase/gwt.d.ts.map +0 -1
- package/dist/types/search/inside/solve/vendor/random-uint-below/get-random-values.d.ts.map +0 -1
- package/dist/types/search/inside/solve/vendor/random-uint-below/index.d.ts.map +0 -1
- package/dist/types/search/inside/solve/vendor/random-uint-below/random-choice.d.ts.map +0 -1
- package/dist/types/search/inside/solve/vendor/random-uint-below/random-int.d.ts.map +0 -1
- package/dist/types/search/inside/solve/vendor/sq12phase/scramble_sq1.d.ts.map +0 -1
- package/dist/types/search/vendor/comlink-everywhere/inside/index.d.ts.map +0 -1
- package/dist/types/search/vendor/comlink-everywhere/inside/node.d.ts.map +0 -1
- package/dist/types/search/vendor/comlink-everywhere/outside/index.d.ts.map +0 -1
- package/dist/types/search/vendor/comlink-everywhere/outside/node.d.ts.map +0 -1
- package/dist/types/twisty/old/animation/RenderScheduler.d.ts.map +0 -1
- package/dist/types/twisty/old/animation/Timeline.d.ts +0 -72
- package/dist/types/twisty/old/animation/Timeline.d.ts.map +0 -1
- package/dist/types/twisty/old/animation/cursor/AlgCursor.d.ts +0 -53
- package/dist/types/twisty/old/animation/cursor/AlgCursor.d.ts.map +0 -1
- package/dist/types/twisty/old/animation/cursor/CursorTypes.d.ts.map +0 -1
- package/dist/types/twisty/old/animation/easing.d.ts.map +0 -1
- package/dist/types/twisty/old/animation/indexer/AlgDuration.d.ts.map +0 -1
- package/dist/types/twisty/old/animation/indexer/AlgIndexer.d.ts.map +0 -1
- package/dist/types/twisty/old/animation/indexer/SimpleAlgIndexer.d.ts.map +0 -1
- package/dist/types/twisty/old/animation/indexer/simultaneous-moves/SimultaneousMoveIndexer.d.ts.map +0 -1
- package/dist/types/twisty/old/animation/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.d.ts.map +0 -1
- package/dist/types/twisty/old/animation/indexer/simultaneous-moves/simul-moves.d.ts.map +0 -1
- package/dist/types/twisty/old/animation/indexer/tree/AlgWalker.d.ts.map +0 -1
- package/dist/types/twisty/old/animation/indexer/tree/TreeAlgIndexer.d.ts.map +0 -1
- package/dist/types/twisty/old/animation/indexer/tree/chunkAlgs.d.ts +0 -3
- package/dist/types/twisty/old/animation/indexer/tree/chunkAlgs.d.ts.map +0 -1
- package/dist/types/twisty/old/animation/stream/timeline-move-calculation-draft.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/TwistyAlgViewerV1.css.d.ts +0 -3
- package/dist/types/twisty/old/dom/TwistyAlgViewerV1.css.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/TwistyAlgViewerV1.d.ts +0 -52
- package/dist/types/twisty/old/dom/TwistyAlgViewerV1.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/TwistyPlayer.css.d.ts +0 -3
- package/dist/types/twisty/old/dom/TwistyPlayer.css.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/TwistyPlayer.d.ts +0 -92
- package/dist/types/twisty/old/dom/TwistyPlayer.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/TwistyPlayer.spec.d.ts +0 -5
- package/dist/types/twisty/old/dom/TwistyPlayer.spec.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/TwistyPlayerConfig.d.ts +0 -165
- package/dist/types/twisty/old/dom/TwistyPlayerConfig.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/controls/TwistyControlElement.d.ts +0 -2
- package/dist/types/twisty/old/dom/controls/TwistyControlElement.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/controls/TwistyScrubber.css.d.ts +0 -3
- package/dist/types/twisty/old/dom/controls/TwistyScrubber.d.ts +0 -14
- package/dist/types/twisty/old/dom/controls/TwistyScrubber.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/controls/buttons.css.d.ts +0 -4
- package/dist/types/twisty/old/dom/controls/buttons.css.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/controls/buttons.d.ts +0 -40
- package/dist/types/twisty/old/dom/controls/buttons.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/controls/buttons.spec.d.ts +0 -5
- package/dist/types/twisty/old/dom/controls/buttons.spec.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/element/ClassListManager.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/element/ElementConfig.d.ts +0 -49
- package/dist/types/twisty/old/dom/element/ElementConfig.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/element/ManagedCustomElement.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/element/node-custom-element-shims.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/stream/TwistyStreamSource.css.d.ts +0 -3
- package/dist/types/twisty/old/dom/stream/TwistyStreamSource.css.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/stream/TwistyStreamSource.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/viewers/Twisty2DSVG.d.ts +0 -26
- package/dist/types/twisty/old/dom/viewers/Twisty2DSVG.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/viewers/Twisty2DSVGView.css.d.ts +0 -3
- package/dist/types/twisty/old/dom/viewers/Twisty2DSVGView.css.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/viewers/Twisty3DCanvas.css.d.ts +0 -3
- package/dist/types/twisty/old/dom/viewers/Twisty3DCanvas.css.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/viewers/Twisty3DCanvas.d.ts +0 -41
- package/dist/types/twisty/old/dom/viewers/Twisty3DCanvas.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/viewers/TwistyOrbitControls.d.ts +0 -59
- package/dist/types/twisty/old/dom/viewers/TwistyOrbitControls.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/viewers/TwistyViewerElement.d.ts +0 -4
- package/dist/types/twisty/old/dom/viewers/TwistyViewerElement.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/viewers/TwistyViewerWrapper.css.d.ts +0 -3
- package/dist/types/twisty/old/dom/viewers/TwistyViewerWrapper.css.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/viewers/TwistyViewerWrapper.d.ts +0 -18
- package/dist/types/twisty/old/dom/viewers/TwistyViewerWrapper.d.ts.map +0 -1
- package/dist/types/twisty/old/dom/viewers/canvas.d.ts.map +0 -1
- package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.d.ts +0 -41
- package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.d.ts.map +0 -1
- package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.spec.d.ts +0 -5
- package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.spec.d.ts.map +0 -1
- package/dist/types/twisty/views/3D/puzzles/TwistyTestBox.d.ts +0 -9
- package/dist/types/twisty/views/3D/puzzles/TwistyTestBox.d.ts.map +0 -1
- package/src/cubing/search/inside/solve/vendor/random-uint-below/get-random-values.ts +0 -38
- package/src/cubing/twisty/old/animation/Timeline.ts +0 -378
- package/src/cubing/twisty/old/animation/cursor/AlgCursor.ts +0 -252
- package/src/cubing/twisty/old/dom/TwistyAlgViewerV1.css.ts +0 -25
- package/src/cubing/twisty/old/dom/TwistyAlgViewerV1.ts +0 -516
- package/src/cubing/twisty/old/dom/TwistyPlayer.spec.ts +0 -25
- package/src/cubing/twisty/old/dom/TwistyPlayer.ts +0 -927
- package/src/cubing/twisty/old/dom/TwistyPlayerConfig.ts +0 -378
- package/src/cubing/twisty/old/dom/controls/TwistyControlElement.ts +0 -1
- package/src/cubing/twisty/old/dom/controls/TwistyScrubber.ts +0 -53
- package/src/cubing/twisty/old/dom/controls/buttons.spec.ts +0 -37
- package/src/cubing/twisty/old/dom/controls/buttons.ts +0 -326
- package/src/cubing/twisty/old/dom/element/ElementConfig.ts +0 -180
- package/src/cubing/twisty/old/dom/viewers/Twisty2DSVG.ts +0 -118
- package/src/cubing/twisty/old/dom/viewers/Twisty3DCanvas.ts +0 -256
- package/src/cubing/twisty/old/dom/viewers/TwistyOrbitControls.ts +0 -420
- package/src/cubing/twisty/old/dom/viewers/TwistyViewerElement.ts +0 -5
- package/src/cubing/twisty/old/dom/viewers/TwistyViewerWrapper.ts +0 -45
- package/src/cubing/twisty/views/3D/TwistyOrbitControlsV2.spec.ts +0 -209
- package/src/cubing/twisty/views/3D/TwistyOrbitControlsV2.ts +0 -270
- package/src/cubing/twisty/views/3D/puzzles/TwistyTestBox.ts +0 -22
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
|
+
cube3x3x3,
|
|
2
3
|
getFaceletAppearance,
|
|
3
4
|
puzzles
|
|
4
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-R3HRHYIW.js";
|
|
5
6
|
import {
|
|
7
|
+
KPuzzle,
|
|
6
8
|
areTransformationsEquivalent,
|
|
7
|
-
transformationForQuantumMove
|
|
8
|
-
|
|
9
|
+
transformationForQuantumMove,
|
|
10
|
+
transformationOrder
|
|
11
|
+
} from "./chunk-X6JHXPDX.js";
|
|
9
12
|
import {
|
|
10
|
-
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
Move
|
|
14
|
+
} from "./chunk-EWRBHQFX.js";
|
|
12
15
|
import {
|
|
13
16
|
__privateAdd,
|
|
14
17
|
__privateGet,
|
|
15
18
|
__privateMethod,
|
|
16
|
-
__privateSet
|
|
19
|
+
__privateSet,
|
|
20
|
+
__privateWrapper
|
|
17
21
|
} from "./chunk-WO2AXYFE.js";
|
|
18
22
|
|
|
19
23
|
// src/cubing/twisty/views/3D/puzzles/Cube3D.ts
|
|
@@ -32,363 +36,345 @@ import {
|
|
|
32
36
|
Quaternion,
|
|
33
37
|
TextureLoader,
|
|
34
38
|
Vector2,
|
|
35
|
-
Vector3
|
|
39
|
+
Vector3
|
|
36
40
|
} from "three";
|
|
37
41
|
|
|
38
|
-
// src/cubing/
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
// src/cubing/twisty/views/3D/TAU.ts
|
|
47
|
-
var TAU = Math.PI * 2;
|
|
48
|
-
var DEGREES_PER_RADIAN = 360 / TAU;
|
|
49
|
-
|
|
50
|
-
// src/cubing/twisty/old/dom/element/ElementConfig.ts
|
|
51
|
-
var AlgAttribute = class {
|
|
52
|
-
constructor(initialValue) {
|
|
53
|
-
if (initialValue) {
|
|
54
|
-
if (typeof initialValue === "string") {
|
|
55
|
-
this.setString(initialValue);
|
|
56
|
-
} else {
|
|
57
|
-
this.setValue(initialValue);
|
|
58
|
-
}
|
|
59
|
-
} else {
|
|
60
|
-
this.setValue(this.defaultValue());
|
|
61
|
-
}
|
|
42
|
+
// src/cubing/vendor/p-lazy/p-lazy.ts
|
|
43
|
+
var PLazy = class extends Promise {
|
|
44
|
+
constructor(executor) {
|
|
45
|
+
super((resolve) => {
|
|
46
|
+
resolve();
|
|
47
|
+
});
|
|
48
|
+
this._executor = executor;
|
|
62
49
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
this.string = str;
|
|
68
|
-
this.value = this.toValue(str);
|
|
69
|
-
return true;
|
|
50
|
+
static from(function_) {
|
|
51
|
+
return new PLazy((resolve) => {
|
|
52
|
+
resolve(function_());
|
|
53
|
+
});
|
|
70
54
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
this.string = str;
|
|
77
|
-
this.value = val;
|
|
78
|
-
return true;
|
|
55
|
+
static resolve(value) {
|
|
56
|
+
return new PLazy((resolve) => {
|
|
57
|
+
resolve(value);
|
|
58
|
+
});
|
|
79
59
|
}
|
|
80
|
-
|
|
81
|
-
return new
|
|
60
|
+
static reject(error) {
|
|
61
|
+
return new PLazy((_resolve, reject) => {
|
|
62
|
+
reject(error);
|
|
63
|
+
});
|
|
82
64
|
}
|
|
83
|
-
|
|
84
|
-
|
|
65
|
+
then(onFulfilled, onRejected) {
|
|
66
|
+
this._promise = this._promise || new Promise(this._executor);
|
|
67
|
+
return this._promise.then(onFulfilled, onRejected);
|
|
85
68
|
}
|
|
86
|
-
|
|
87
|
-
|
|
69
|
+
catch(onRejected) {
|
|
70
|
+
this._promise = this._promise || new Promise(this._executor);
|
|
71
|
+
return this._promise.catch(onRejected);
|
|
88
72
|
}
|
|
89
73
|
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
74
|
+
function from(function_) {
|
|
75
|
+
return new PLazy((resolve) => {
|
|
76
|
+
resolve(function_());
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// src/cubing/twisty/model/PromiseFreshener.ts
|
|
81
|
+
var _latestAssignedIdx, _latestResolvedIdx;
|
|
82
|
+
var PromiseFreshener = class {
|
|
83
|
+
constructor() {
|
|
84
|
+
__privateAdd(this, _latestAssignedIdx, 0);
|
|
85
|
+
__privateAdd(this, _latestResolvedIdx, 0);
|
|
86
|
+
}
|
|
87
|
+
async queue(p) {
|
|
88
|
+
const idx = ++__privateWrapper(this, _latestAssignedIdx)._;
|
|
89
|
+
const result = await p;
|
|
90
|
+
if (idx > __privateGet(this, _latestResolvedIdx)) {
|
|
91
|
+
__privateSet(this, _latestResolvedIdx, idx);
|
|
92
|
+
return {
|
|
93
|
+
fresh: true,
|
|
94
|
+
result
|
|
95
|
+
};
|
|
96
|
+
} else {
|
|
97
|
+
return { fresh: false };
|
|
101
98
|
}
|
|
102
|
-
this.string = str;
|
|
103
|
-
this.value = this.toValue(str);
|
|
104
|
-
return true;
|
|
105
|
-
}
|
|
106
|
-
setValue(val) {
|
|
107
|
-
return this.setString(val);
|
|
108
|
-
}
|
|
109
|
-
defaultValue() {
|
|
110
|
-
return Object.keys(this.enumVal)[0];
|
|
111
|
-
}
|
|
112
|
-
toValue(s) {
|
|
113
|
-
return s;
|
|
114
99
|
}
|
|
115
100
|
};
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
__privateAdd(this,
|
|
122
|
-
__privateAdd(this,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
defaultValue() {
|
|
139
|
-
return __privateGet(this, _defaultValue);
|
|
140
|
-
}
|
|
141
|
-
toValue(s) {
|
|
142
|
-
return parseFloat(s);
|
|
143
|
-
}
|
|
144
|
-
toString(v) {
|
|
145
|
-
return v === null ? "" : v.toString();
|
|
101
|
+
_latestAssignedIdx = new WeakMap();
|
|
102
|
+
_latestResolvedIdx = new WeakMap();
|
|
103
|
+
var _latestAssignedIdx2, _latestResolvedIdx2;
|
|
104
|
+
var StaleDropper = class {
|
|
105
|
+
constructor() {
|
|
106
|
+
__privateAdd(this, _latestAssignedIdx2, 0);
|
|
107
|
+
__privateAdd(this, _latestResolvedIdx2, 0);
|
|
108
|
+
}
|
|
109
|
+
queue(p) {
|
|
110
|
+
return new Promise(async (resolve, reject) => {
|
|
111
|
+
try {
|
|
112
|
+
const idx = ++__privateWrapper(this, _latestAssignedIdx2)._;
|
|
113
|
+
const result = await p;
|
|
114
|
+
if (idx > __privateGet(this, _latestResolvedIdx2)) {
|
|
115
|
+
__privateSet(this, _latestResolvedIdx2, idx);
|
|
116
|
+
resolve(result);
|
|
117
|
+
}
|
|
118
|
+
} catch (e) {
|
|
119
|
+
reject(e);
|
|
120
|
+
}
|
|
121
|
+
});
|
|
146
122
|
}
|
|
147
123
|
};
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
clampValue_fn = function(val) {
|
|
151
|
-
return Math.max(Math.min(val, this.maxValue), this.minValue);
|
|
152
|
-
};
|
|
124
|
+
_latestAssignedIdx2 = new WeakMap();
|
|
125
|
+
_latestResolvedIdx2 = new WeakMap();
|
|
153
126
|
|
|
154
|
-
// src/cubing/twisty/
|
|
155
|
-
var
|
|
156
|
-
var
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
this
|
|
160
|
-
this
|
|
161
|
-
__privateAdd(this,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
167
|
-
__privateSet(this, _currentClassName, null);
|
|
168
|
-
}
|
|
169
|
-
setValue(suffix) {
|
|
170
|
-
if (!this.validSuffixes.includes(suffix)) {
|
|
171
|
-
throw new Error(`Invalid suffix: ${suffix}`);
|
|
172
|
-
}
|
|
173
|
-
const newClassName = `${this.prefix}${suffix}`;
|
|
174
|
-
const changed = __privateGet(this, _currentClassName) !== newClassName;
|
|
175
|
-
if (changed) {
|
|
176
|
-
this.clearValue();
|
|
177
|
-
this.elem.contentWrapper.classList.add(newClassName);
|
|
178
|
-
__privateSet(this, _currentClassName, newClassName);
|
|
179
|
-
}
|
|
180
|
-
return changed;
|
|
127
|
+
// src/cubing/twisty/model/props/TwistyProp.ts
|
|
128
|
+
var globalSourceGeneration = 0;
|
|
129
|
+
var _children, _rawListeners, _scheduleRawDispatch, scheduleRawDispatch_fn, _rawDispatchPending, _dispatchRawListeners, dispatchRawListeners_fn, _freshListeners;
|
|
130
|
+
var TwistyPropParent = class {
|
|
131
|
+
constructor() {
|
|
132
|
+
__privateAdd(this, _scheduleRawDispatch);
|
|
133
|
+
__privateAdd(this, _dispatchRawListeners);
|
|
134
|
+
__privateAdd(this, _children, new Set());
|
|
135
|
+
this.lastSourceGeneration = 0;
|
|
136
|
+
__privateAdd(this, _rawListeners, new Set());
|
|
137
|
+
__privateAdd(this, _rawDispatchPending, false);
|
|
138
|
+
__privateAdd(this, _freshListeners, new Map());
|
|
181
139
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
// src/cubing/twisty/old/dom/element/node-custom-element-shims.ts
|
|
186
|
-
var HTMLElementStub = class {
|
|
187
|
-
};
|
|
188
|
-
var HTMLElementShim;
|
|
189
|
-
if (typeof HTMLElement !== "undefined") {
|
|
190
|
-
HTMLElementShim = HTMLElement;
|
|
191
|
-
} else {
|
|
192
|
-
HTMLElementShim = HTMLElementStub;
|
|
193
|
-
}
|
|
194
|
-
var CustomElementsStub = class {
|
|
195
|
-
define() {
|
|
140
|
+
canReuse(v1, v2) {
|
|
141
|
+
return v1 === v2 || this.canReuseValue(v1, v2);
|
|
196
142
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
if (typeof customElements !== "undefined") {
|
|
200
|
-
customElementsShim = customElements;
|
|
201
|
-
} else {
|
|
202
|
-
customElementsShim = new CustomElementsStub();
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
// src/cubing/twisty/old/dom/element/ManagedCustomElement.ts
|
|
206
|
-
var CSSSource = class {
|
|
207
|
-
constructor(sourceText) {
|
|
208
|
-
this.sourceText = sourceText;
|
|
143
|
+
canReuseValue(_v1, _v2) {
|
|
144
|
+
return false;
|
|
209
145
|
}
|
|
210
|
-
|
|
211
|
-
return this.
|
|
146
|
+
debugGetChildren() {
|
|
147
|
+
return Array.from(__privateGet(this, _children).values());
|
|
212
148
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
addCSS(cssSource) {
|
|
225
|
-
if (__privateGet(this, _cssSourceMap).get(cssSource)) {
|
|
149
|
+
addChild(child) {
|
|
150
|
+
__privateGet(this, _children).add(child);
|
|
151
|
+
}
|
|
152
|
+
removeChild(child) {
|
|
153
|
+
__privateGet(this, _children).delete(child);
|
|
154
|
+
}
|
|
155
|
+
markStale(sourceEvent) {
|
|
156
|
+
if (sourceEvent.detail.generation !== globalSourceGeneration) {
|
|
157
|
+
throw new Error("A TwistyProp was marked stale too late!");
|
|
158
|
+
}
|
|
159
|
+
if (this.lastSourceGeneration === sourceEvent.detail.generation) {
|
|
226
160
|
return;
|
|
227
161
|
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
162
|
+
this.lastSourceGeneration = sourceEvent.detail.generation;
|
|
163
|
+
for (const child of __privateGet(this, _children)) {
|
|
164
|
+
child.markStale(sourceEvent);
|
|
165
|
+
}
|
|
166
|
+
__privateMethod(this, _scheduleRawDispatch, scheduleRawDispatch_fn).call(this);
|
|
232
167
|
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
if (
|
|
236
|
-
|
|
168
|
+
addRawListener(listener, options) {
|
|
169
|
+
__privateGet(this, _rawListeners).add(listener);
|
|
170
|
+
if (options?.initial) {
|
|
171
|
+
listener();
|
|
237
172
|
}
|
|
238
|
-
this.shadow.removeChild(cssElem);
|
|
239
|
-
__privateGet(this, _cssSourceMap).delete(cssSource);
|
|
240
173
|
}
|
|
241
|
-
|
|
242
|
-
|
|
174
|
+
removeRawListener(listener) {
|
|
175
|
+
__privateGet(this, _rawListeners).delete(listener);
|
|
243
176
|
}
|
|
244
|
-
|
|
245
|
-
|
|
177
|
+
addFreshListener(listener) {
|
|
178
|
+
const staleDropper = new StaleDropper();
|
|
179
|
+
let lastResult = null;
|
|
180
|
+
const callback = async () => {
|
|
181
|
+
const result = await staleDropper.queue(this.get());
|
|
182
|
+
if (lastResult !== null && this.canReuse(lastResult, result)) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
lastResult = result;
|
|
186
|
+
listener(result);
|
|
187
|
+
};
|
|
188
|
+
__privateGet(this, _freshListeners).set(listener, callback);
|
|
189
|
+
this.addRawListener(callback, { initial: true });
|
|
246
190
|
}
|
|
247
|
-
|
|
248
|
-
|
|
191
|
+
removeFreshListener(listener) {
|
|
192
|
+
this.removeRawListener(__privateGet(this, _freshListeners).get(listener));
|
|
193
|
+
__privateGet(this, _freshListeners).delete(listener);
|
|
249
194
|
}
|
|
250
195
|
};
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
display: grid;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.wrapper {
|
|
263
|
-
width: 100%;
|
|
264
|
-
height: 100%;
|
|
265
|
-
display: grid;
|
|
266
|
-
overflow: hidden;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
.wrapper > * {
|
|
270
|
-
width: 100%;
|
|
271
|
-
height: 100%;
|
|
272
|
-
overflow: hidden;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
.wrapper.back-view-side-by-side {
|
|
276
|
-
grid-template-columns: 1fr 1fr;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
.wrapper.back-view-top-right {
|
|
280
|
-
grid-template-columns: 3fr 1fr;
|
|
281
|
-
grid-template-rows: 1fr 3fr;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
.wrapper.back-view-top-right > :nth-child(1) {
|
|
285
|
-
grid-row: 1 / 3;
|
|
286
|
-
grid-column: 1 / 3;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
.wrapper.back-view-top-right > :nth-child(2) {
|
|
290
|
-
grid-row: 1 / 2;
|
|
291
|
-
grid-column: 2 / 3;
|
|
292
|
-
}
|
|
293
|
-
`);
|
|
294
|
-
|
|
295
|
-
// src/cubing/twisty/old/dom/viewers/TwistyViewerWrapper.ts
|
|
296
|
-
var backViewLayouts = {
|
|
297
|
-
"none": true,
|
|
298
|
-
"side-by-side": true,
|
|
299
|
-
"top-right": true
|
|
196
|
+
_children = new WeakMap();
|
|
197
|
+
_rawListeners = new WeakMap();
|
|
198
|
+
_scheduleRawDispatch = new WeakSet();
|
|
199
|
+
scheduleRawDispatch_fn = function() {
|
|
200
|
+
if (!__privateGet(this, _rawDispatchPending)) {
|
|
201
|
+
__privateSet(this, _rawDispatchPending, true);
|
|
202
|
+
setTimeout(() => __privateMethod(this, _dispatchRawListeners, dispatchRawListeners_fn).call(this), 0);
|
|
203
|
+
}
|
|
300
204
|
};
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
205
|
+
_rawDispatchPending = new WeakMap();
|
|
206
|
+
_dispatchRawListeners = new WeakSet();
|
|
207
|
+
dispatchRawListeners_fn = function() {
|
|
208
|
+
if (!__privateGet(this, _rawDispatchPending)) {
|
|
209
|
+
throw new Error("Invalid dispatch state!");
|
|
210
|
+
}
|
|
211
|
+
for (const listener of __privateGet(this, _rawListeners)) {
|
|
212
|
+
listener();
|
|
213
|
+
}
|
|
214
|
+
__privateSet(this, _rawDispatchPending, false);
|
|
215
|
+
};
|
|
216
|
+
_freshListeners = new WeakMap();
|
|
217
|
+
var _value;
|
|
218
|
+
var TwistyPropSource = class extends TwistyPropParent {
|
|
219
|
+
constructor(initialValue) {
|
|
304
220
|
super();
|
|
305
|
-
__privateAdd(this,
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
]));
|
|
310
|
-
this.addCSS(twistyViewerWrapperCSS);
|
|
311
|
-
if (config.backView && config.backView in backViewLayouts) {
|
|
312
|
-
__privateGet(this, _backViewClassListManager).setValue(config.backView);
|
|
221
|
+
__privateAdd(this, _value, void 0);
|
|
222
|
+
__privateSet(this, _value, from(() => this.getDefaultValue()));
|
|
223
|
+
if (initialValue) {
|
|
224
|
+
__privateSet(this, _value, this.deriveFromPromiseOrValue(initialValue, __privateGet(this, _value)));
|
|
313
225
|
}
|
|
314
226
|
}
|
|
315
|
-
|
|
316
|
-
|
|
227
|
+
set(input) {
|
|
228
|
+
__privateSet(this, _value, this.deriveFromPromiseOrValue(input, __privateGet(this, _value)));
|
|
229
|
+
const sourceEventDetail = {
|
|
230
|
+
sourceProp: this,
|
|
231
|
+
value: __privateGet(this, _value),
|
|
232
|
+
generation: ++globalSourceGeneration
|
|
233
|
+
};
|
|
234
|
+
this.markStale(new CustomEvent("stale", {
|
|
235
|
+
detail: sourceEventDetail
|
|
236
|
+
}));
|
|
317
237
|
}
|
|
318
|
-
|
|
319
|
-
this
|
|
238
|
+
async get() {
|
|
239
|
+
return __privateGet(this, _value);
|
|
240
|
+
}
|
|
241
|
+
async deriveFromPromiseOrValue(input, oldValuePromise) {
|
|
242
|
+
return this.derive(await input, oldValuePromise);
|
|
320
243
|
}
|
|
321
244
|
};
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
latitude: 31.717474411461005,
|
|
328
|
-
longitude: 0,
|
|
329
|
-
distance: 5.877852522924731
|
|
330
|
-
};
|
|
331
|
-
var cubeCube3DCameraOrbitCoordinates = {
|
|
332
|
-
latitude: 35,
|
|
333
|
-
longitude: 30,
|
|
334
|
-
distance: 6
|
|
335
|
-
};
|
|
336
|
-
var cubePG3DCameraOrbitCoordinates = {
|
|
337
|
-
latitude: 35,
|
|
338
|
-
longitude: 30,
|
|
339
|
-
distance: 6.25
|
|
245
|
+
_value = new WeakMap();
|
|
246
|
+
var SimpleTwistyPropSource = class extends TwistyPropSource {
|
|
247
|
+
derive(input) {
|
|
248
|
+
return input;
|
|
249
|
+
}
|
|
340
250
|
};
|
|
341
|
-
var
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
251
|
+
var NO_VALUE = Symbol("no value");
|
|
252
|
+
var _parents, _cachedLastSuccessfulCalculation, _cachedLatestGenerationCalculation, _getParents, getParents_fn, _cacheDerive, cacheDerive_fn;
|
|
253
|
+
var TwistyPropDerived = class extends TwistyPropParent {
|
|
254
|
+
constructor(parents, userVisibleErrorTracker) {
|
|
255
|
+
super();
|
|
256
|
+
this.userVisibleErrorTracker = userVisibleErrorTracker;
|
|
257
|
+
__privateAdd(this, _getParents);
|
|
258
|
+
__privateAdd(this, _cacheDerive);
|
|
259
|
+
__privateAdd(this, _parents, void 0);
|
|
260
|
+
__privateAdd(this, _cachedLastSuccessfulCalculation, null);
|
|
261
|
+
__privateAdd(this, _cachedLatestGenerationCalculation, null);
|
|
262
|
+
__privateSet(this, _parents, parents);
|
|
263
|
+
for (const parent of Object.values(parents)) {
|
|
264
|
+
parent.addChild(this);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
async get() {
|
|
268
|
+
const generation = this.lastSourceGeneration;
|
|
269
|
+
if (__privateGet(this, _cachedLatestGenerationCalculation)?.generation === generation) {
|
|
270
|
+
return __privateGet(this, _cachedLatestGenerationCalculation).output;
|
|
271
|
+
}
|
|
272
|
+
const latestGenerationCalculation = {
|
|
273
|
+
generation,
|
|
274
|
+
output: __privateMethod(this, _cacheDerive, cacheDerive_fn).call(this, __privateMethod(this, _getParents, getParents_fn).call(this), generation, __privateGet(this, _cachedLastSuccessfulCalculation))
|
|
275
|
+
};
|
|
276
|
+
__privateSet(this, _cachedLatestGenerationCalculation, latestGenerationCalculation);
|
|
277
|
+
this.userVisibleErrorTracker?.reset();
|
|
278
|
+
return latestGenerationCalculation.output;
|
|
279
|
+
}
|
|
345
280
|
};
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
281
|
+
_parents = new WeakMap();
|
|
282
|
+
_cachedLastSuccessfulCalculation = new WeakMap();
|
|
283
|
+
_cachedLatestGenerationCalculation = new WeakMap();
|
|
284
|
+
_getParents = new WeakSet();
|
|
285
|
+
getParents_fn = async function() {
|
|
286
|
+
const inputValuePromises = {};
|
|
287
|
+
for (const [key, parent] of Object.entries(__privateGet(this, _parents))) {
|
|
288
|
+
inputValuePromises[key] = parent.get();
|
|
289
|
+
}
|
|
290
|
+
const inputs = {};
|
|
291
|
+
for (const key in __privateGet(this, _parents)) {
|
|
292
|
+
inputs[key] = await inputValuePromises[key];
|
|
293
|
+
}
|
|
294
|
+
return inputs;
|
|
350
295
|
};
|
|
351
|
-
|
|
352
|
-
function
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
return centeredCameraOrbitCoordinates;
|
|
296
|
+
_cacheDerive = new WeakSet();
|
|
297
|
+
cacheDerive_fn = async function(inputsPromise, generation, cachedLatestGenerationCalculation = null) {
|
|
298
|
+
const inputs = await inputsPromise;
|
|
299
|
+
const cache = (output) => {
|
|
300
|
+
__privateSet(this, _cachedLastSuccessfulCalculation, {
|
|
301
|
+
inputs,
|
|
302
|
+
output: Promise.resolve(output),
|
|
303
|
+
generation
|
|
304
|
+
});
|
|
305
|
+
return output;
|
|
306
|
+
};
|
|
307
|
+
if (!cachedLatestGenerationCalculation) {
|
|
308
|
+
return cache(await this.derive(inputs));
|
|
309
|
+
}
|
|
310
|
+
const cachedInputs = cachedLatestGenerationCalculation.inputs;
|
|
311
|
+
for (const key in __privateGet(this, _parents)) {
|
|
312
|
+
const parent = __privateGet(this, _parents)[key];
|
|
313
|
+
if (!parent.canReuse(inputs[key], cachedInputs[key])) {
|
|
314
|
+
return cache(await this.derive(inputs));
|
|
371
315
|
}
|
|
372
316
|
}
|
|
373
|
-
|
|
374
|
-
var setupToLocations = {
|
|
375
|
-
start: true,
|
|
376
|
-
end: true
|
|
317
|
+
return cachedLatestGenerationCalculation.output;
|
|
377
318
|
};
|
|
378
|
-
var
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
319
|
+
var _disconnectionFunctions;
|
|
320
|
+
var FreshListenerManager = class {
|
|
321
|
+
constructor() {
|
|
322
|
+
__privateAdd(this, _disconnectionFunctions, []);
|
|
323
|
+
}
|
|
324
|
+
addListener(prop, listener) {
|
|
325
|
+
let disconnected = false;
|
|
326
|
+
const wrappedListener = (value) => {
|
|
327
|
+
if (disconnected) {
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
listener(value);
|
|
331
|
+
};
|
|
332
|
+
prop.addFreshListener(wrappedListener);
|
|
333
|
+
__privateGet(this, _disconnectionFunctions).push(() => {
|
|
334
|
+
prop.removeFreshListener(wrappedListener);
|
|
335
|
+
disconnected = true;
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
addMultiListener(props, listener) {
|
|
339
|
+
let disconnected = false;
|
|
340
|
+
const wrappedListener = async (_) => {
|
|
341
|
+
if (disconnected) {
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
const promises = props.map((prop) => prop.get());
|
|
345
|
+
const values = await Promise.all(promises);
|
|
346
|
+
listener(values);
|
|
347
|
+
};
|
|
348
|
+
for (const prop of props) {
|
|
349
|
+
prop.addFreshListener(wrappedListener);
|
|
350
|
+
}
|
|
351
|
+
__privateGet(this, _disconnectionFunctions).push(() => {
|
|
352
|
+
for (const prop of props) {
|
|
353
|
+
prop.removeFreshListener(wrappedListener);
|
|
354
|
+
}
|
|
355
|
+
disconnected = true;
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
disconnect() {
|
|
359
|
+
for (const disconnectionFunction of __privateGet(this, _disconnectionFunctions)) {
|
|
360
|
+
disconnectionFunction();
|
|
361
|
+
}
|
|
362
|
+
}
|
|
387
363
|
};
|
|
364
|
+
_disconnectionFunctions = new WeakMap();
|
|
365
|
+
|
|
366
|
+
// src/cubing/twisty/model/props/puzzle/display/HintFaceletProp.ts
|
|
388
367
|
var hintFaceletStyles = {
|
|
389
368
|
floating: true,
|
|
390
369
|
none: true
|
|
391
370
|
};
|
|
371
|
+
var HintFaceletProp = class extends SimpleTwistyPropSource {
|
|
372
|
+
getDefaultValue() {
|
|
373
|
+
return "auto";
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
// src/cubing/twisty/model/props/puzzle/display/StickeringProp.ts
|
|
392
378
|
var experimentalStickerings = {
|
|
393
379
|
"full": true,
|
|
394
380
|
"centers-only": true,
|
|
@@ -408,6 +394,8 @@ var experimentalStickerings = {
|
|
|
408
394
|
"VLS": true,
|
|
409
395
|
"LS": true,
|
|
410
396
|
"EO": true,
|
|
397
|
+
"EOline": true,
|
|
398
|
+
"EOcross": true,
|
|
411
399
|
"CMLL": true,
|
|
412
400
|
"L6E": true,
|
|
413
401
|
"L6EO": true,
|
|
@@ -432,88 +420,21 @@ var experimentalStickerings = {
|
|
|
432
420
|
"experimental-global-custom-1": true,
|
|
433
421
|
"experimental-global-custom-2": true
|
|
434
422
|
};
|
|
435
|
-
var
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
};
|
|
439
|
-
var puzzleIDs = {
|
|
440
|
-
"3x3x3": true,
|
|
441
|
-
"custom": true,
|
|
442
|
-
"2x2x2": true,
|
|
443
|
-
"4x4x4": true,
|
|
444
|
-
"5x5x5": true,
|
|
445
|
-
"6x6x6": true,
|
|
446
|
-
"7x7x7": true,
|
|
447
|
-
"40x40x40": true,
|
|
448
|
-
"megaminx": true,
|
|
449
|
-
"pyraminx": true,
|
|
450
|
-
"square1": true,
|
|
451
|
-
"clock": true,
|
|
452
|
-
"skewb": true,
|
|
453
|
-
"fto": true,
|
|
454
|
-
"gigaminx": true,
|
|
455
|
-
"master_tetraminx": true
|
|
456
|
-
};
|
|
457
|
-
var viewerLinkPages = {
|
|
458
|
-
twizzle: true,
|
|
459
|
-
none: true
|
|
460
|
-
};
|
|
461
|
-
var cameraLatitudeLimits = {
|
|
462
|
-
auto: true,
|
|
463
|
-
none: true
|
|
464
|
-
};
|
|
465
|
-
var twistyPlayerAttributeMap = {
|
|
466
|
-
"alg": "alg",
|
|
467
|
-
"experimental-setup-alg": "experimentalSetupAlg",
|
|
468
|
-
"experimental-setup-anchor": "experimentalSetupAnchor",
|
|
469
|
-
"puzzle": "puzzle",
|
|
470
|
-
"visualization": "visualization",
|
|
471
|
-
"hint-facelets": "hintFacelets",
|
|
472
|
-
"experimental-stickering": "experimentalStickering",
|
|
473
|
-
"background": "background",
|
|
474
|
-
"control-panel": "controlPanel",
|
|
475
|
-
"back-view": "backView",
|
|
476
|
-
"experimental-camera-latitude": "experimentalCameraLatitude",
|
|
477
|
-
"experimental-camera-longitude": "experimentalCameraLongitude",
|
|
478
|
-
"experimental-camera-latitude-limits": "experimentalCameraLatitudeLimits",
|
|
479
|
-
"viewer-link": "viewerLink"
|
|
480
|
-
};
|
|
481
|
-
var TwistyPlayerConfig = class {
|
|
482
|
-
constructor(twistyPlayer, initialValues) {
|
|
483
|
-
this.twistyPlayer = twistyPlayer;
|
|
484
|
-
this.attributes = {
|
|
485
|
-
"alg": new AlgAttribute(initialValues.alg),
|
|
486
|
-
"experimental-setup-alg": new AlgAttribute(initialValues.experimentalSetupAlg),
|
|
487
|
-
"experimental-setup-anchor": new StringEnumAttribute(setupToLocations, initialValues.experimentalSetupAnchor),
|
|
488
|
-
"puzzle": new StringEnumAttribute(puzzleIDs, initialValues.puzzle),
|
|
489
|
-
"visualization": new StringEnumAttribute(visualizationFormats, initialValues.visualization),
|
|
490
|
-
"hint-facelets": new StringEnumAttribute(hintFaceletStyles, initialValues.hintFacelets),
|
|
491
|
-
"experimental-stickering": new StringEnumAttribute(experimentalStickerings, initialValues.experimentalStickering),
|
|
492
|
-
"background": new StringEnumAttribute(backgroundThemes, initialValues.background),
|
|
493
|
-
"control-panel": new StringEnumAttribute(controlsLocations, initialValues.controlPanel),
|
|
494
|
-
"back-view": new StringEnumAttribute(backViewLayouts, initialValues["backView"]),
|
|
495
|
-
"experimental-camera-latitude": new RangedFloatAttribute(null, -90, 90, initialValues["experimentalCameraLatitude"]),
|
|
496
|
-
"experimental-camera-longitude": new RangedFloatAttribute(null, -180, 180, initialValues["experimentalCameraLongitude"]),
|
|
497
|
-
"experimental-camera-latitude-limits": new StringEnumAttribute(cameraLatitudeLimits, initialValues["experimentalCameraLatitudeLimits"]),
|
|
498
|
-
"viewer-link": new StringEnumAttribute(viewerLinkPages, initialValues.viewerLink)
|
|
499
|
-
};
|
|
500
|
-
}
|
|
501
|
-
static get observedAttributes() {
|
|
502
|
-
return Object.keys(twistyPlayerAttributeMap);
|
|
503
|
-
}
|
|
504
|
-
attributeChangedCallback(attributeName, oldValue, newValue) {
|
|
505
|
-
const managedAttribute = this.attributes[attributeName];
|
|
506
|
-
if (managedAttribute) {
|
|
507
|
-
if (oldValue !== null && managedAttribute.string !== oldValue) {
|
|
508
|
-
console.warn("Attribute out of sync!", attributeName, managedAttribute.string, oldValue);
|
|
509
|
-
}
|
|
510
|
-
managedAttribute.setString(newValue);
|
|
511
|
-
const propertyName = twistyPlayerAttributeMap[attributeName];
|
|
512
|
-
this.twistyPlayer[propertyName] = managedAttribute.value;
|
|
513
|
-
}
|
|
423
|
+
var StickeringProp = class extends SimpleTwistyPropSource {
|
|
424
|
+
getDefaultValue() {
|
|
425
|
+
return "full";
|
|
514
426
|
}
|
|
515
427
|
};
|
|
516
428
|
|
|
429
|
+
// src/cubing/twisty/controllers/easing.ts
|
|
430
|
+
function smootherStep(x) {
|
|
431
|
+
return x * x * x * (10 - x * (15 - 6 * x));
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
// src/cubing/twisty/views/3D/TAU.ts
|
|
435
|
+
var TAU = Math.PI * 2;
|
|
436
|
+
var DEGREES_PER_RADIAN = 360 / TAU;
|
|
437
|
+
|
|
517
438
|
// src/cubing/twisty/views/3D/puzzles/Cube3D.ts
|
|
518
439
|
var svgLoader = new TextureLoader();
|
|
519
440
|
var ignoredMaterial = new MeshBasicMaterial({
|
|
@@ -578,12 +499,12 @@ var AxisInfo = class {
|
|
|
578
499
|
}
|
|
579
500
|
};
|
|
580
501
|
var axesInfo = [
|
|
581
|
-
new AxisInfo(new
|
|
582
|
-
new AxisInfo(new
|
|
583
|
-
new AxisInfo(new
|
|
584
|
-
new AxisInfo(new
|
|
585
|
-
new AxisInfo(new
|
|
586
|
-
new AxisInfo(new
|
|
502
|
+
new AxisInfo(new Vector3(0, 1, 0), new Euler(-TAU / 4, 0, 0), 16777215, 14540253, 1.25),
|
|
503
|
+
new AxisInfo(new Vector3(-1, 0, 0), new Euler(0, -TAU / 4, 0), 16746496, 8930304, 1),
|
|
504
|
+
new AxisInfo(new Vector3(0, 0, 1), new Euler(0, 0, 0), 65280, 34816, 1),
|
|
505
|
+
new AxisInfo(new Vector3(1, 0, 0), new Euler(0, TAU / 4, 0), 16711680, 6684672, 1),
|
|
506
|
+
new AxisInfo(new Vector3(0, 0, -1), new Euler(0, TAU / 2, 0), 255, 136, 0.75, { hintColor: 17663, hintDimColor: 8840 }),
|
|
507
|
+
new AxisInfo(new Vector3(0, -1, 0), new Euler(TAU / 4, 0, 0), 16776960, 8947712, 1.25)
|
|
587
508
|
];
|
|
588
509
|
var face = {
|
|
589
510
|
U: 0,
|
|
@@ -664,18 +585,18 @@ function t(v, t4) {
|
|
|
664
585
|
return new Quaternion().setFromAxisAngle(v, TAU * t4 / 4);
|
|
665
586
|
}
|
|
666
587
|
var r = {
|
|
667
|
-
O: new
|
|
668
|
-
U: new
|
|
669
|
-
L: new
|
|
670
|
-
F: new
|
|
671
|
-
R: new
|
|
672
|
-
B: new
|
|
673
|
-
D: new
|
|
588
|
+
O: new Vector3(0, 0, 0),
|
|
589
|
+
U: new Vector3(0, -1, 0),
|
|
590
|
+
L: new Vector3(1, 0, 0),
|
|
591
|
+
F: new Vector3(0, 0, -1),
|
|
592
|
+
R: new Vector3(-1, 0, 0),
|
|
593
|
+
B: new Vector3(0, 0, 1),
|
|
594
|
+
D: new Vector3(0, 1, 0)
|
|
674
595
|
};
|
|
675
596
|
var firstPiecePosition = {
|
|
676
|
-
EDGES: new
|
|
677
|
-
CORNERS: new
|
|
678
|
-
CENTERS: new
|
|
597
|
+
EDGES: new Vector3(0, 1, 1),
|
|
598
|
+
CORNERS: new Vector3(1, 1, 1),
|
|
599
|
+
CENTERS: new Vector3(0, 1, 0)
|
|
679
600
|
};
|
|
680
601
|
var orientationRotation = {
|
|
681
602
|
EDGES: [0, 1].map((i) => new Matrix4().makeRotationAxis(firstPiecePosition.EDGES.clone().normalize(), -i * TAU / 2)),
|
|
@@ -880,7 +801,7 @@ function sharedStickerGeometry() {
|
|
|
880
801
|
return sharedStickerGeometryCache ?? (sharedStickerGeometryCache = newStickerGeometry());
|
|
881
802
|
}
|
|
882
803
|
var Cube3D = class extends Object3D {
|
|
883
|
-
constructor(def,
|
|
804
|
+
constructor(def, scheduleRenderCallback, options = {}) {
|
|
884
805
|
super();
|
|
885
806
|
this.def = def;
|
|
886
807
|
this.scheduleRenderCallback = scheduleRenderCallback;
|
|
@@ -918,7 +839,6 @@ var Cube3D = class extends Object3D {
|
|
|
918
839
|
if (this.options.experimentalStickering) {
|
|
919
840
|
this.setStickering(this.options.experimentalStickering);
|
|
920
841
|
}
|
|
921
|
-
cursor?.addPositionListener(this);
|
|
922
842
|
}
|
|
923
843
|
setSprite(texture) {
|
|
924
844
|
this.sprite = texture;
|
|
@@ -1142,7 +1062,7 @@ import {
|
|
|
1142
1062
|
Mesh as Mesh2,
|
|
1143
1063
|
MeshBasicMaterial as MeshBasicMaterial2,
|
|
1144
1064
|
Object3D as Object3D2,
|
|
1145
|
-
Vector3 as
|
|
1065
|
+
Vector3 as Vector32
|
|
1146
1066
|
} from "three";
|
|
1147
1067
|
var foundationMaterial = new MeshBasicMaterial2({
|
|
1148
1068
|
side: DoubleSide2,
|
|
@@ -1434,7 +1354,7 @@ var StickerDef = class {
|
|
|
1434
1354
|
}
|
|
1435
1355
|
};
|
|
1436
1356
|
var HitPlaneDef = class {
|
|
1437
|
-
constructor(hitface, tm) {
|
|
1357
|
+
constructor(hitface, tm, stickerDat) {
|
|
1438
1358
|
this.cubie = new Group2();
|
|
1439
1359
|
const coords = hitface.coords;
|
|
1440
1360
|
const filler = new Filler(coords.length / 3 - 2, tm);
|
|
@@ -1446,35 +1366,38 @@ var HitPlaneDef = class {
|
|
|
1446
1366
|
this.geo = new BufferGeometry2();
|
|
1447
1367
|
filler.setAttributes(this.geo);
|
|
1448
1368
|
const obj = new Mesh2(this.geo, invisMaterial);
|
|
1449
|
-
obj.userData.
|
|
1369
|
+
obj.userData.quantumMove = stickerDat.notationMapper.notationToExternal(new Move(hitface.name));
|
|
1450
1370
|
this.cubie.scale.setScalar(0.99);
|
|
1451
1371
|
this.cubie.add(obj);
|
|
1452
1372
|
}
|
|
1453
1373
|
};
|
|
1454
1374
|
var AxisInfo2 = class {
|
|
1455
1375
|
constructor(axisDat) {
|
|
1456
|
-
const vec = axisDat
|
|
1457
|
-
this.axis = new
|
|
1458
|
-
this.order = axisDat
|
|
1376
|
+
const vec = axisDat.coordinates;
|
|
1377
|
+
this.axis = new Vector32(vec[0], vec[1], vec[2]);
|
|
1378
|
+
this.order = axisDat.order;
|
|
1459
1379
|
}
|
|
1460
1380
|
};
|
|
1461
1381
|
var DEFAULT_COLOR_FRACTION = 0.71;
|
|
1462
1382
|
var PG_SCALE = 0.5;
|
|
1463
|
-
var _pendingStickeringUpdate;
|
|
1383
|
+
var _pendingStickeringUpdate, _cachedKPuzzle, _kpuzzle, kpuzzle_get, _isValidMove, isValidMove_fn;
|
|
1464
1384
|
var PG3D = class extends Object3D2 {
|
|
1465
|
-
constructor(
|
|
1385
|
+
constructor(scheduleRenderCallback, definition, stickerDat, enableFoundationOpt = false, enableHintStickersOpt = false, hintStickerHeightScale = 1, params = {}) {
|
|
1466
1386
|
super();
|
|
1467
1387
|
this.scheduleRenderCallback = scheduleRenderCallback;
|
|
1468
1388
|
this.definition = definition;
|
|
1469
|
-
this.
|
|
1470
|
-
this.showFoundation = showFoundation;
|
|
1471
|
-
this.showHintStickers = showHintStickers;
|
|
1389
|
+
this.stickerDat = stickerDat;
|
|
1472
1390
|
this.params = params;
|
|
1391
|
+
__privateAdd(this, _kpuzzle);
|
|
1392
|
+
__privateAdd(this, _isValidMove);
|
|
1473
1393
|
this.stickerTargets = [];
|
|
1474
1394
|
this.controlTargets = [];
|
|
1475
1395
|
this.textured = false;
|
|
1396
|
+
this.showHintStickers = false;
|
|
1397
|
+
this.showFoundations = false;
|
|
1476
1398
|
__privateAdd(this, _pendingStickeringUpdate, false);
|
|
1477
|
-
|
|
1399
|
+
__privateAdd(this, _cachedKPuzzle, void 0);
|
|
1400
|
+
if (stickerDat.stickers.length === 0) {
|
|
1478
1401
|
throw Error("Reuse of stickerdat from pg; please don't do that.");
|
|
1479
1402
|
}
|
|
1480
1403
|
this.hintMaterial = new MeshBasicMaterial2({
|
|
@@ -1486,27 +1409,27 @@ var PG3D = class extends Object3D2 {
|
|
|
1486
1409
|
this.stickerMaterial = basicStickerMaterial;
|
|
1487
1410
|
this.stickerMaterialDisposable = false;
|
|
1488
1411
|
this.axesInfo = {};
|
|
1489
|
-
const axesDef = this.
|
|
1412
|
+
const axesDef = this.stickerDat.axis;
|
|
1490
1413
|
for (const axis of axesDef) {
|
|
1491
|
-
this.axesInfo[axis
|
|
1414
|
+
this.axesInfo[axis.quantumMove.family] = new AxisInfo2(axis);
|
|
1492
1415
|
}
|
|
1493
|
-
const stickers = this.
|
|
1416
|
+
const stickers = this.stickerDat.stickers;
|
|
1494
1417
|
this.stickers = {};
|
|
1495
1418
|
this.materialArray1 = new Array(8);
|
|
1496
1419
|
this.materialArray2 = new Array(8);
|
|
1497
|
-
this.
|
|
1498
|
-
|
|
1420
|
+
this.showFoundation(enableFoundationOpt);
|
|
1421
|
+
enableFoundationOpt = true;
|
|
1499
1422
|
let triangleCount = 0;
|
|
1500
1423
|
const multiplier = 3;
|
|
1501
1424
|
for (const sticker of stickers) {
|
|
1502
1425
|
const sides = sticker.coords.length / 3;
|
|
1503
1426
|
triangleCount += multiplier * (sides - 2);
|
|
1504
1427
|
}
|
|
1505
|
-
const filler = new Filler(triangleCount,
|
|
1428
|
+
const filler = new Filler(triangleCount, stickerDat.textureMapper);
|
|
1506
1429
|
const black = 0;
|
|
1507
1430
|
const normals = [];
|
|
1508
1431
|
let totArea = 0;
|
|
1509
|
-
for (const f of
|
|
1432
|
+
for (const f of stickerDat.faces) {
|
|
1510
1433
|
normals.push(normal(f.coords));
|
|
1511
1434
|
totArea += polyarea(f.coords);
|
|
1512
1435
|
}
|
|
@@ -1535,18 +1458,22 @@ var PG3D = class extends Object3D2 {
|
|
|
1535
1458
|
const stickerdef = new StickerDef(filler, sticker, trim, options);
|
|
1536
1459
|
this.stickers[orbit][ori][ord] = stickerdef;
|
|
1537
1460
|
}
|
|
1461
|
+
this.showHintStickers = enableHintStickersOpt;
|
|
1462
|
+
enableHintStickersOpt = true;
|
|
1538
1463
|
for (const sticker of stickers) {
|
|
1539
1464
|
const orbit = sticker.orbit;
|
|
1540
1465
|
const ord = sticker.ord;
|
|
1541
1466
|
const ori = sticker.ori;
|
|
1542
|
-
this.stickers[orbit][ori][ord].addHint(filler, sticker,
|
|
1467
|
+
this.stickers[orbit][ori][ord].addHint(filler, sticker, enableHintStickersOpt, hintStickerHeightScale, trim, normals[sticker.face]);
|
|
1543
1468
|
}
|
|
1544
1469
|
this.foundationBound = filler.ipos;
|
|
1545
1470
|
for (const sticker of stickers) {
|
|
1546
1471
|
const orbit = sticker.orbit;
|
|
1547
1472
|
const ord = sticker.ord;
|
|
1548
1473
|
const ori = sticker.ori;
|
|
1549
|
-
|
|
1474
|
+
if (enableFoundationOpt) {
|
|
1475
|
+
this.stickers[orbit][ori][ord].addFoundation(filler, sticker, black);
|
|
1476
|
+
}
|
|
1550
1477
|
}
|
|
1551
1478
|
const fixedGeo = new BufferGeometry2();
|
|
1552
1479
|
filler.setAttributes(fixedGeo);
|
|
@@ -1557,19 +1484,19 @@ var PG3D = class extends Object3D2 {
|
|
|
1557
1484
|
const obj2 = new Mesh2(fixedGeo, this.materialArray2);
|
|
1558
1485
|
obj2.scale.set(PG_SCALE, PG_SCALE, PG_SCALE);
|
|
1559
1486
|
this.add(obj2);
|
|
1560
|
-
const hitfaces = this.
|
|
1487
|
+
const hitfaces = this.stickerDat.faces;
|
|
1561
1488
|
this.movingObj = obj2;
|
|
1562
1489
|
this.fixedGeo = fixedGeo;
|
|
1563
1490
|
this.filler = filler;
|
|
1564
1491
|
for (const hitface of hitfaces) {
|
|
1565
|
-
const facedef = new HitPlaneDef(hitface,
|
|
1492
|
+
const facedef = new HitPlaneDef(hitface, stickerDat.textureMapper, this.stickerDat);
|
|
1566
1493
|
facedef.cubie.scale.set(PG_SCALE, PG_SCALE, PG_SCALE);
|
|
1567
1494
|
this.add(facedef.cubie);
|
|
1568
1495
|
this.controlTargets.push(facedef.cubie.children[0]);
|
|
1569
1496
|
}
|
|
1570
1497
|
filler.saveOriginalColors();
|
|
1571
|
-
|
|
1572
|
-
|
|
1498
|
+
stickerDat.stickers = [];
|
|
1499
|
+
this.updateMaterialArrays();
|
|
1573
1500
|
}
|
|
1574
1501
|
dispose() {
|
|
1575
1502
|
if (this.fixedGeo) {
|
|
@@ -1592,6 +1519,42 @@ var PG3D = class extends Object3D2 {
|
|
|
1592
1519
|
experimentalGetControlTargets() {
|
|
1593
1520
|
return this.controlTargets;
|
|
1594
1521
|
}
|
|
1522
|
+
getClosestMoveToAxis(point, transformations) {
|
|
1523
|
+
let closestMove = null;
|
|
1524
|
+
let closestMoveDotProduct = 0;
|
|
1525
|
+
let modify = (m) => m;
|
|
1526
|
+
switch (transformations.depth) {
|
|
1527
|
+
case "secondSlice":
|
|
1528
|
+
modify = (m) => m.modified({ innerLayer: 2 });
|
|
1529
|
+
break;
|
|
1530
|
+
case "rotation":
|
|
1531
|
+
modify = (m) => m.modified({ family: m.family + "v" });
|
|
1532
|
+
break;
|
|
1533
|
+
}
|
|
1534
|
+
for (const axis of this.stickerDat.axis) {
|
|
1535
|
+
const product = point.dot(new Vector32(...axis.coordinates));
|
|
1536
|
+
if (product > closestMoveDotProduct) {
|
|
1537
|
+
const modified = this.stickerDat.notationMapper.notationToExternal(modify(axis.quantumMove));
|
|
1538
|
+
if (!modified) {
|
|
1539
|
+
continue;
|
|
1540
|
+
}
|
|
1541
|
+
if (__privateMethod(this, _isValidMove, isValidMove_fn).call(this, modified)) {
|
|
1542
|
+
closestMoveDotProduct = product;
|
|
1543
|
+
closestMove = modified;
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
if (!closestMove) {
|
|
1548
|
+
return null;
|
|
1549
|
+
}
|
|
1550
|
+
if (transformations.invert) {
|
|
1551
|
+
closestMove = closestMove.invert();
|
|
1552
|
+
}
|
|
1553
|
+
__privateGet(this, _kpuzzle, kpuzzle_get).reset();
|
|
1554
|
+
__privateGet(this, _kpuzzle, kpuzzle_get).applyMove(closestMove);
|
|
1555
|
+
const order = transformationOrder(this.definition, __privateGet(this, _kpuzzle, kpuzzle_get).state);
|
|
1556
|
+
return { move: closestMove, order };
|
|
1557
|
+
}
|
|
1595
1558
|
experimentalSetAppearance(appearance) {
|
|
1596
1559
|
this.params.appearance = appearance;
|
|
1597
1560
|
for (const orbitName in this.definition.orbits) {
|
|
@@ -1655,8 +1618,8 @@ var PG3D = class extends Object3D2 {
|
|
|
1655
1618
|
let vismods = 0;
|
|
1656
1619
|
for (const moveProgress of p.movesInProgress) {
|
|
1657
1620
|
const externalMove = moveProgress.move;
|
|
1658
|
-
const unswizzled = this.
|
|
1659
|
-
const move = this.
|
|
1621
|
+
const unswizzled = this.stickerDat.unswizzle(externalMove);
|
|
1622
|
+
const move = this.stickerDat.notationMapper.notationToInternal(externalMove);
|
|
1660
1623
|
if (move === null) {
|
|
1661
1624
|
throw Error("Bad blockmove " + externalMove.family);
|
|
1662
1625
|
}
|
|
@@ -1733,9 +1696,8 @@ var PG3D = class extends Object3D2 {
|
|
|
1733
1696
|
ease(fraction) {
|
|
1734
1697
|
return smootherStep(fraction);
|
|
1735
1698
|
}
|
|
1736
|
-
|
|
1699
|
+
showHintFacelets(v) {
|
|
1737
1700
|
this.showHintStickers = v;
|
|
1738
|
-
this.updateMaterialArrays();
|
|
1739
1701
|
}
|
|
1740
1702
|
updateMaterialArrays() {
|
|
1741
1703
|
for (let i = 0; i < 8; i++) {
|
|
@@ -1751,7 +1713,7 @@ var PG3D = class extends Object3D2 {
|
|
|
1751
1713
|
this.materialArray1[2] = invisMaterial;
|
|
1752
1714
|
this.materialArray2[3] = invisMaterial;
|
|
1753
1715
|
}
|
|
1754
|
-
if (this.
|
|
1716
|
+
if (this.showFoundations) {
|
|
1755
1717
|
this.materialArray1[6] = foundationMaterial;
|
|
1756
1718
|
this.materialArray2[7] = foundationMaterial;
|
|
1757
1719
|
} else {
|
|
@@ -1759,15 +1721,15 @@ var PG3D = class extends Object3D2 {
|
|
|
1759
1721
|
this.materialArray2[7] = invisMaterial;
|
|
1760
1722
|
}
|
|
1761
1723
|
}
|
|
1762
|
-
|
|
1763
|
-
this.
|
|
1764
|
-
this.updateMaterialArrays();
|
|
1724
|
+
showFoundation(v) {
|
|
1725
|
+
this.showFoundations = v;
|
|
1765
1726
|
}
|
|
1766
1727
|
setHintStickerOpacity(v) {
|
|
1767
1728
|
if (this.hintMaterialDisposable) {
|
|
1768
1729
|
this.hintMaterial.dispose();
|
|
1769
1730
|
this.hintMaterialDisposable = false;
|
|
1770
1731
|
}
|
|
1732
|
+
console.log("hint sticker opacity " + v);
|
|
1771
1733
|
if (v === 0) {
|
|
1772
1734
|
this.hintMaterial = invisMaterial;
|
|
1773
1735
|
} else if (v === 1) {
|
|
@@ -1783,10 +1745,10 @@ var PG3D = class extends Object3D2 {
|
|
|
1783
1745
|
}
|
|
1784
1746
|
experimentalUpdateOptions(options) {
|
|
1785
1747
|
if (options.hintFacelets !== void 0) {
|
|
1786
|
-
this.
|
|
1748
|
+
this.showHintFacelets(options.hintFacelets !== "none");
|
|
1787
1749
|
}
|
|
1788
1750
|
if (options.showFoundation !== void 0) {
|
|
1789
|
-
this.
|
|
1751
|
+
this.showFoundation(options.showFoundation);
|
|
1790
1752
|
}
|
|
1791
1753
|
if (options.hintStickerOpacity !== void 0) {
|
|
1792
1754
|
this.setHintStickerOpacity(options.hintStickerOpacity);
|
|
@@ -1795,6 +1757,7 @@ var PG3D = class extends Object3D2 {
|
|
|
1795
1757
|
if (this.lastPos) {
|
|
1796
1758
|
this.onPositionChange(this.lastPos);
|
|
1797
1759
|
}
|
|
1760
|
+
this.updateMaterialArrays();
|
|
1798
1761
|
this.scheduleRenderCallback();
|
|
1799
1762
|
}
|
|
1800
1763
|
adduvs() {
|
|
@@ -1864,595 +1827,23 @@ var PG3D = class extends Object3D2 {
|
|
|
1864
1827
|
}
|
|
1865
1828
|
};
|
|
1866
1829
|
_pendingStickeringUpdate = new WeakMap();
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
// src/cubing/twisty/old/animation/RenderScheduler.ts
|
|
1872
|
-
var RenderScheduler = class {
|
|
1873
|
-
constructor(callback) {
|
|
1874
|
-
this.callback = callback;
|
|
1875
|
-
this.animFrameID = null;
|
|
1876
|
-
this.animFrame = this.animFrameWrapper.bind(this);
|
|
1877
|
-
}
|
|
1878
|
-
requestAnimFrame() {
|
|
1879
|
-
if (!this.animFrameID) {
|
|
1880
|
-
this.animFrameID = requestAnimationFrame(this.animFrame);
|
|
1881
|
-
}
|
|
1882
|
-
}
|
|
1883
|
-
cancelAnimFrame() {
|
|
1884
|
-
if (this.animFrameID) {
|
|
1885
|
-
cancelAnimationFrame(this.animFrameID);
|
|
1886
|
-
this.animFrameID = 0;
|
|
1887
|
-
}
|
|
1888
|
-
}
|
|
1889
|
-
animFrameWrapper(timestamp) {
|
|
1890
|
-
this.animFrameID = 0;
|
|
1891
|
-
this.callback(timestamp);
|
|
1892
|
-
}
|
|
1830
|
+
_cachedKPuzzle = new WeakMap();
|
|
1831
|
+
_kpuzzle = new WeakSet();
|
|
1832
|
+
kpuzzle_get = function() {
|
|
1833
|
+
return __privateGet(this, _cachedKPuzzle) ?? __privateSet(this, _cachedKPuzzle, new KPuzzle(this.definition));
|
|
1893
1834
|
};
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
var globalPixelRatioOverride = null;
|
|
1897
|
-
function pixelRatio() {
|
|
1898
|
-
return globalPixelRatioOverride ?? (devicePixelRatio || 1);
|
|
1899
|
-
}
|
|
1900
|
-
|
|
1901
|
-
// src/cubing/twisty/old/dom/viewers/Twisty3DCanvas.css.ts
|
|
1902
|
-
var twisty3DCanvasCSS = new CSSSource(`
|
|
1903
|
-
:host {
|
|
1904
|
-
width: 384px;
|
|
1905
|
-
height: 256px;
|
|
1906
|
-
display: grid;
|
|
1907
|
-
}
|
|
1908
|
-
|
|
1909
|
-
.wrapper {
|
|
1910
|
-
width: 100%;
|
|
1911
|
-
height: 100%;
|
|
1912
|
-
display: grid;
|
|
1913
|
-
overflow: hidden;
|
|
1914
|
-
}
|
|
1915
|
-
|
|
1916
|
-
/* TODO: This is due to stats hack. Replace with \`canvas\`. */
|
|
1917
|
-
.wrapper > canvas {
|
|
1918
|
-
max-width: 100%;
|
|
1919
|
-
max-height: 100%;
|
|
1920
|
-
}
|
|
1921
|
-
|
|
1922
|
-
.wrapper.invisible {
|
|
1923
|
-
opacity: 0;
|
|
1924
|
-
}
|
|
1925
|
-
`);
|
|
1926
|
-
|
|
1927
|
-
// src/cubing/twisty/old/dom/viewers/TwistyOrbitControls.ts
|
|
1928
|
-
import { Spherical, Vector3 as Vector34 } from "three";
|
|
1929
|
-
var EPSILON = 1e-8;
|
|
1930
|
-
var INERTIA_DEFAULT = true;
|
|
1931
|
-
var LATITUDE_LIMITS_DEFAULT = "auto";
|
|
1932
|
-
var INERTIA_DURATION_MS = 500;
|
|
1933
|
-
var INERTIA_TIMEOUT_MS = 50;
|
|
1934
|
-
var VERTICAL_MOVEMENT_BASE_SCALE = 0.75;
|
|
1935
|
-
function momentumScale(progress) {
|
|
1936
|
-
return (Math.exp(1 - progress) - (1 - progress)) / (1 - Math.E) + 1;
|
|
1937
|
-
}
|
|
1938
|
-
var Inertia = class {
|
|
1939
|
-
constructor(startTimestamp, momentumX, momentumY, callback) {
|
|
1940
|
-
this.startTimestamp = startTimestamp;
|
|
1941
|
-
this.momentumX = momentumX;
|
|
1942
|
-
this.momentumY = momentumY;
|
|
1943
|
-
this.callback = callback;
|
|
1944
|
-
this.scheduler = new RenderScheduler(this.render.bind(this));
|
|
1945
|
-
this.scheduler.requestAnimFrame();
|
|
1946
|
-
this.lastTimestamp = startTimestamp;
|
|
1947
|
-
}
|
|
1948
|
-
render(now) {
|
|
1949
|
-
const progressBefore = (this.lastTimestamp - this.startTimestamp) / INERTIA_DURATION_MS;
|
|
1950
|
-
const progressAfter = Math.min(1, (now - this.startTimestamp) / INERTIA_DURATION_MS);
|
|
1951
|
-
if (progressBefore === 0 && progressAfter > INERTIA_TIMEOUT_MS / INERTIA_DURATION_MS) {
|
|
1952
|
-
return;
|
|
1953
|
-
}
|
|
1954
|
-
const delta = momentumScale(progressAfter) - momentumScale(progressBefore);
|
|
1955
|
-
this.callback(this.momentumX * delta * 1e3, this.momentumY * delta * 1e3);
|
|
1956
|
-
if (progressAfter < 1) {
|
|
1957
|
-
this.scheduler.requestAnimFrame();
|
|
1958
|
-
}
|
|
1959
|
-
this.lastTimestamp = now;
|
|
1960
|
-
}
|
|
1961
|
-
};
|
|
1962
|
-
var _spherical, _lookAt, _adjust, adjust_fn, _acceptPropagation, _propagateSpherical, propagateSpherical_fn;
|
|
1963
|
-
var TwistyOrbitControls = class {
|
|
1964
|
-
constructor(camera, canvas, scheduleRender) {
|
|
1965
|
-
this.camera = camera;
|
|
1966
|
-
this.canvas = canvas;
|
|
1967
|
-
this.scheduleRender = scheduleRender;
|
|
1968
|
-
__privateAdd(this, _adjust);
|
|
1969
|
-
__privateAdd(this, _propagateSpherical);
|
|
1970
|
-
__privateAdd(this, _spherical, new Spherical());
|
|
1971
|
-
__privateAdd(this, _lookAt, new Vector34(0, 0, 0));
|
|
1972
|
-
this.experimentalInertia = INERTIA_DEFAULT;
|
|
1973
|
-
this.experimentalLatitudeLimits = LATITUDE_LIMITS_DEFAULT;
|
|
1974
|
-
this.lastTouchClientX = 0;
|
|
1975
|
-
this.lastTouchClientY = 0;
|
|
1976
|
-
this.currentTouchID = null;
|
|
1977
|
-
this.onMoveBound = this.onMove.bind(this);
|
|
1978
|
-
this.onMouseMoveBound = this.onMouseMove.bind(this);
|
|
1979
|
-
this.onMouseEndBound = this.onMouseEnd.bind(this);
|
|
1980
|
-
this.onTouchMoveBound = this.onTouchMove.bind(this);
|
|
1981
|
-
this.onTouchEndBound = this.onTouchEnd.bind(this);
|
|
1982
|
-
this.lastTouchTimestamp = 0;
|
|
1983
|
-
this.lastTouchMoveMomentumX = 0;
|
|
1984
|
-
this.lastTouchMoveMomentumY = 0;
|
|
1985
|
-
this.lastMouseTimestamp = 0;
|
|
1986
|
-
this.lastMouseMoveMomentumX = 0;
|
|
1987
|
-
this.lastMouseMoveMomentumY = 0;
|
|
1988
|
-
this.experimentalHasBeenMoved = false;
|
|
1989
|
-
__privateAdd(this, _acceptPropagation, true);
|
|
1990
|
-
__privateGet(this, _spherical).setFromVector3(camera.position);
|
|
1991
|
-
__privateMethod(this, _propagateSpherical, propagateSpherical_fn).call(this);
|
|
1992
|
-
canvas.addEventListener("mousedown", this.onMouseStart.bind(this));
|
|
1993
|
-
canvas.addEventListener("touchstart", this.onTouchStart.bind(this));
|
|
1994
|
-
}
|
|
1995
|
-
lookAt(v) {
|
|
1996
|
-
if (!__privateGet(this, _acceptPropagation)) {
|
|
1997
|
-
return;
|
|
1998
|
-
}
|
|
1999
|
-
__privateSet(this, _lookAt, v);
|
|
2000
|
-
__privateSet(this, _acceptPropagation, false);
|
|
2001
|
-
__privateMethod(this, _adjust, adjust_fn).call(this);
|
|
2002
|
-
this.scheduleRender();
|
|
2003
|
-
try {
|
|
2004
|
-
if (this.mirrorControls) {
|
|
2005
|
-
this.mirrorControls.lookAt(v);
|
|
2006
|
-
}
|
|
2007
|
-
} finally {
|
|
2008
|
-
__privateSet(this, _acceptPropagation, true);
|
|
2009
|
-
}
|
|
2010
|
-
}
|
|
2011
|
-
set latitude(newLatitude) {
|
|
2012
|
-
__privateGet(this, _spherical).phi = (90 - newLatitude) / DEGREES_PER_RADIAN;
|
|
2013
|
-
__privateMethod(this, _propagateSpherical, propagateSpherical_fn).call(this);
|
|
2014
|
-
}
|
|
2015
|
-
get latitude() {
|
|
2016
|
-
return 90 - __privateGet(this, _spherical).phi * DEGREES_PER_RADIAN;
|
|
2017
|
-
}
|
|
2018
|
-
set longitude(newLongitude) {
|
|
2019
|
-
__privateGet(this, _spherical).theta = newLongitude / DEGREES_PER_RADIAN;
|
|
2020
|
-
__privateMethod(this, _propagateSpherical, propagateSpherical_fn).call(this);
|
|
2021
|
-
}
|
|
2022
|
-
get longitude() {
|
|
2023
|
-
return __privateGet(this, _spherical).theta * DEGREES_PER_RADIAN;
|
|
2024
|
-
}
|
|
2025
|
-
set distance(newDistance) {
|
|
2026
|
-
__privateGet(this, _spherical).radius = newDistance;
|
|
2027
|
-
__privateMethod(this, _propagateSpherical, propagateSpherical_fn).call(this);
|
|
2028
|
-
}
|
|
2029
|
-
get distance() {
|
|
2030
|
-
return __privateGet(this, _spherical).radius;
|
|
2031
|
-
}
|
|
2032
|
-
get orbitCoordinates() {
|
|
2033
|
-
return {
|
|
2034
|
-
latitude: this.latitude,
|
|
2035
|
-
longitude: this.longitude,
|
|
2036
|
-
distance: this.distance
|
|
2037
|
-
};
|
|
2038
|
-
}
|
|
2039
|
-
set orbitCoordinates(orbitCoordinates) {
|
|
2040
|
-
this.latitude = orbitCoordinates.latitude;
|
|
2041
|
-
this.longitude = orbitCoordinates.longitude;
|
|
2042
|
-
this.distance = orbitCoordinates.distance;
|
|
2043
|
-
}
|
|
2044
|
-
temperMovement(f) {
|
|
2045
|
-
return Math.sign(f) * Math.log(Math.abs(f * 10) + 1) / 6;
|
|
2046
|
-
}
|
|
2047
|
-
onMouseStart(e) {
|
|
2048
|
-
this.experimentalHasBeenMoved = true;
|
|
2049
|
-
window.addEventListener("mousemove", this.onMouseMoveBound);
|
|
2050
|
-
window.addEventListener("mouseup", this.onMouseEndBound);
|
|
2051
|
-
this.onStart(e);
|
|
2052
|
-
this.lastMouseTimestamp = e.timeStamp;
|
|
2053
|
-
}
|
|
2054
|
-
onMouseMove(e) {
|
|
2055
|
-
if (e.buttons === 0) {
|
|
2056
|
-
this.onMouseEnd(e);
|
|
2057
|
-
return;
|
|
2058
|
-
}
|
|
2059
|
-
if (e.movementX === 0 && e.movementY === 0) {
|
|
2060
|
-
console.log("short-circuit mouse!");
|
|
2061
|
-
return;
|
|
2062
|
-
}
|
|
2063
|
-
const minDim = Math.min(this.canvas.offsetWidth, this.canvas.offsetHeight);
|
|
2064
|
-
const movementX = this.temperMovement(e.movementX / minDim);
|
|
2065
|
-
const movementY = this.temperMovement(e.movementY / minDim * VERTICAL_MOVEMENT_BASE_SCALE);
|
|
2066
|
-
this.onMove(movementX, movementY);
|
|
2067
|
-
const deltaMs = e.timeStamp - this.lastMouseTimestamp;
|
|
2068
|
-
if (deltaMs > 0) {
|
|
2069
|
-
this.lastMouseMoveMomentumX = movementX / deltaMs;
|
|
2070
|
-
this.lastMouseMoveMomentumY = movementY / deltaMs;
|
|
2071
|
-
this.lastMouseTimestamp = e.timeStamp;
|
|
2072
|
-
}
|
|
2073
|
-
}
|
|
2074
|
-
onMouseEnd(e) {
|
|
2075
|
-
window.removeEventListener("mousemove", this.onMouseMoveBound);
|
|
2076
|
-
window.removeEventListener("mouseup", this.onMouseEndBound);
|
|
2077
|
-
this.onEnd(e);
|
|
2078
|
-
if (this.experimentalInertia) {
|
|
2079
|
-
new Inertia(this.lastMouseTimestamp, this.lastMouseMoveMomentumX, this.lastMouseMoveMomentumY, this.onMoveBound);
|
|
2080
|
-
}
|
|
2081
|
-
}
|
|
2082
|
-
onTouchStart(e) {
|
|
2083
|
-
this.experimentalHasBeenMoved = true;
|
|
2084
|
-
if (this.currentTouchID === null) {
|
|
2085
|
-
if (e.touches[0].clientX === 0 && e.touches[0].clientY === 0) {
|
|
2086
|
-
console.log("short-circuit touch!");
|
|
2087
|
-
return;
|
|
2088
|
-
}
|
|
2089
|
-
this.currentTouchID = e.changedTouches[0].identifier;
|
|
2090
|
-
this.lastTouchClientX = e.touches[0].clientX;
|
|
2091
|
-
this.lastTouchClientY = e.touches[0].clientY;
|
|
2092
|
-
window.addEventListener("touchmove", this.onTouchMoveBound);
|
|
2093
|
-
window.addEventListener("touchend", this.onTouchEndBound);
|
|
2094
|
-
window.addEventListener("touchcancel", this.onTouchEndBound);
|
|
2095
|
-
this.onStart(e);
|
|
2096
|
-
this.lastTouchTimestamp = e.timeStamp;
|
|
2097
|
-
}
|
|
2098
|
-
}
|
|
2099
|
-
onTouchMove(e) {
|
|
2100
|
-
for (let i = 0; i < e.changedTouches.length; i++) {
|
|
2101
|
-
const touch = e.changedTouches[i];
|
|
2102
|
-
if (touch.identifier === this.currentTouchID) {
|
|
2103
|
-
const minDim = Math.min(this.canvas.offsetWidth, this.canvas.offsetHeight);
|
|
2104
|
-
const movementX = this.temperMovement((touch.clientX - this.lastTouchClientX) / minDim);
|
|
2105
|
-
const movementY = this.temperMovement((touch.clientY - this.lastTouchClientY) / minDim * VERTICAL_MOVEMENT_BASE_SCALE);
|
|
2106
|
-
this.onMove(movementX, movementY);
|
|
2107
|
-
this.lastTouchClientX = touch.clientX;
|
|
2108
|
-
this.lastTouchClientY = touch.clientY;
|
|
2109
|
-
const deltaMs = e.timeStamp - this.lastTouchTimestamp;
|
|
2110
|
-
if (deltaMs > 0) {
|
|
2111
|
-
this.lastTouchMoveMomentumX = movementX / deltaMs;
|
|
2112
|
-
this.lastTouchMoveMomentumY = movementY / deltaMs;
|
|
2113
|
-
this.lastTouchTimestamp = e.timeStamp;
|
|
2114
|
-
}
|
|
2115
|
-
}
|
|
2116
|
-
}
|
|
2117
|
-
}
|
|
2118
|
-
onTouchEnd(e) {
|
|
2119
|
-
for (let i = 0; i < e.changedTouches.length; i++) {
|
|
2120
|
-
const touch = e.changedTouches[i];
|
|
2121
|
-
if (touch.identifier === this.currentTouchID) {
|
|
2122
|
-
this.currentTouchID = null;
|
|
2123
|
-
window.removeEventListener("touchmove", this.onTouchMoveBound);
|
|
2124
|
-
window.removeEventListener("touchend", this.onTouchEndBound);
|
|
2125
|
-
window.removeEventListener("touchcancel", this.onTouchEndBound);
|
|
2126
|
-
this.onEnd(e);
|
|
2127
|
-
}
|
|
2128
|
-
}
|
|
2129
|
-
if (this.experimentalInertia) {
|
|
2130
|
-
new Inertia(this.lastTouchTimestamp, this.lastTouchMoveMomentumX, this.lastTouchMoveMomentumY, this.onMoveBound);
|
|
2131
|
-
}
|
|
2132
|
-
}
|
|
2133
|
-
onStart(e) {
|
|
2134
|
-
e.preventDefault();
|
|
2135
|
-
}
|
|
2136
|
-
onMove(movementX, movementY) {
|
|
2137
|
-
const newSpherical = new Spherical();
|
|
2138
|
-
newSpherical.copy(__privateGet(this, _spherical));
|
|
2139
|
-
newSpherical.theta += -2 * movementX;
|
|
2140
|
-
newSpherical.phi += -2 * movementY;
|
|
2141
|
-
if (this.experimentalLatitudeLimits !== "none") {
|
|
2142
|
-
newSpherical.phi = Math.max(newSpherical.phi, Math.PI * 0.3);
|
|
2143
|
-
newSpherical.phi = Math.min(newSpherical.phi, Math.PI * 0.7);
|
|
2144
|
-
} else {
|
|
2145
|
-
newSpherical.phi = Math.max(newSpherical.phi, EPSILON);
|
|
2146
|
-
newSpherical.phi = Math.min(newSpherical.phi, Math.PI - EPSILON);
|
|
2147
|
-
}
|
|
2148
|
-
if (isNaN(newSpherical.theta) || newSpherical.theta === Infinity || newSpherical.theta === -Infinity) {
|
|
2149
|
-
return;
|
|
2150
|
-
}
|
|
2151
|
-
if (isNaN(newSpherical.phi) || newSpherical.phi === Infinity || newSpherical.phi === -Infinity) {
|
|
2152
|
-
return;
|
|
2153
|
-
}
|
|
2154
|
-
__privateSet(this, _spherical, newSpherical);
|
|
2155
|
-
__privateMethod(this, _propagateSpherical, propagateSpherical_fn).call(this);
|
|
2156
|
-
}
|
|
2157
|
-
onEnd(e) {
|
|
2158
|
-
e.preventDefault();
|
|
2159
|
-
}
|
|
2160
|
-
setMirror(m) {
|
|
2161
|
-
this.mirrorControls = m;
|
|
2162
|
-
}
|
|
2163
|
-
updateMirroredCamera(orbitCoordinates) {
|
|
2164
|
-
if (__privateGet(this, _acceptPropagation)) {
|
|
2165
|
-
this.latitude = -orbitCoordinates.latitude;
|
|
2166
|
-
this.longitude = orbitCoordinates.longitude + 180;
|
|
2167
|
-
this.distance = orbitCoordinates.distance;
|
|
2168
|
-
__privateMethod(this, _adjust, adjust_fn).call(this);
|
|
2169
|
-
this.scheduleRender();
|
|
2170
|
-
}
|
|
2171
|
-
}
|
|
2172
|
-
};
|
|
2173
|
-
_spherical = new WeakMap();
|
|
2174
|
-
_lookAt = new WeakMap();
|
|
2175
|
-
_adjust = new WeakSet();
|
|
2176
|
-
adjust_fn = function() {
|
|
2177
|
-
__privateGet(this, _spherical).makeSafe();
|
|
2178
|
-
this.camera.position.setFromSpherical(__privateGet(this, _spherical));
|
|
2179
|
-
this.camera.lookAt(__privateGet(this, _lookAt));
|
|
2180
|
-
};
|
|
2181
|
-
_acceptPropagation = new WeakMap();
|
|
2182
|
-
_propagateSpherical = new WeakSet();
|
|
2183
|
-
propagateSpherical_fn = function() {
|
|
2184
|
-
__privateSet(this, _acceptPropagation, false);
|
|
1835
|
+
_isValidMove = new WeakSet();
|
|
1836
|
+
isValidMove_fn = function(move) {
|
|
2185
1837
|
try {
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
longitude: this.longitude,
|
|
2191
|
-
distance: this.distance
|
|
2192
|
-
});
|
|
2193
|
-
} finally {
|
|
2194
|
-
__privateSet(this, _acceptPropagation, true);
|
|
2195
|
-
}
|
|
2196
|
-
};
|
|
2197
|
-
|
|
2198
|
-
// src/cubing/vendor/three/examples/jsm/libs/stats.modified.module.ts
|
|
2199
|
-
var performance = globalThis.performance;
|
|
2200
|
-
var Stats = class {
|
|
2201
|
-
constructor() {
|
|
2202
|
-
this.mode = 0;
|
|
2203
|
-
this.dom = document.createElement("div");
|
|
2204
|
-
this.beginTime = (performance || Date).now();
|
|
2205
|
-
this.prevTime = this.beginTime;
|
|
2206
|
-
this.frames = 0;
|
|
2207
|
-
this.fpsPanel = this.addPanel(new StatsPanel("FPS", "#0ff", "#002"));
|
|
2208
|
-
this.msPanel = this.addPanel(new StatsPanel("MS", "#0f0", "#020"));
|
|
2209
|
-
this.memPanel = performance?.memory ? this.addPanel(new StatsPanel("MB", "#f08", "#201")) : null;
|
|
2210
|
-
this.REVISION = 16;
|
|
2211
|
-
this.dom.style.cssText = "position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000";
|
|
2212
|
-
this.dom.addEventListener("click", (event) => {
|
|
2213
|
-
event.preventDefault();
|
|
2214
|
-
this.showPanel(++this.mode % this.dom.children.length);
|
|
2215
|
-
}, false);
|
|
2216
|
-
this.showPanel(0);
|
|
2217
|
-
}
|
|
2218
|
-
addPanel(panel) {
|
|
2219
|
-
this.dom.appendChild(panel.dom);
|
|
2220
|
-
return panel;
|
|
2221
|
-
}
|
|
2222
|
-
showPanel(id) {
|
|
2223
|
-
for (let i = 0; i < this.dom.children.length; i++) {
|
|
2224
|
-
this.dom.children[i].style.display = i === id ? "block" : "none";
|
|
2225
|
-
}
|
|
2226
|
-
this.mode = id;
|
|
2227
|
-
}
|
|
2228
|
-
begin() {
|
|
2229
|
-
this.beginTime = (performance || Date).now();
|
|
2230
|
-
}
|
|
2231
|
-
end() {
|
|
2232
|
-
this.frames++;
|
|
2233
|
-
const time = (performance || Date).now();
|
|
2234
|
-
this.msPanel.update(time - this.beginTime, 200);
|
|
2235
|
-
if (time >= this.prevTime + 1e3) {
|
|
2236
|
-
this.fpsPanel.update(this.frames * 1e3 / (time - this.prevTime), 100);
|
|
2237
|
-
this.prevTime = time;
|
|
2238
|
-
this.frames = 0;
|
|
2239
|
-
if (this.memPanel) {
|
|
2240
|
-
const memory = performance.memory;
|
|
2241
|
-
this.memPanel.update(memory.usedJSHeapSize / 1048576, memory.jsHeapSizeLimit / 1048576);
|
|
2242
|
-
}
|
|
2243
|
-
}
|
|
2244
|
-
return time;
|
|
2245
|
-
}
|
|
2246
|
-
update() {
|
|
2247
|
-
this.beginTime = this.end();
|
|
2248
|
-
}
|
|
2249
|
-
};
|
|
2250
|
-
var PR = Math.round(globalThis?.window?.devicePixelRatio ?? 1);
|
|
2251
|
-
var WIDTH = 80 * PR;
|
|
2252
|
-
var HEIGHT = 48 * PR;
|
|
2253
|
-
var TEXT_X = 3 * PR;
|
|
2254
|
-
var TEXT_Y = 2 * PR;
|
|
2255
|
-
var GRAPH_X = 3 * PR;
|
|
2256
|
-
var GRAPH_Y = 15 * PR;
|
|
2257
|
-
var GRAPH_WIDTH = 74 * PR;
|
|
2258
|
-
var GRAPH_HEIGHT = 30 * PR;
|
|
2259
|
-
var StatsPanel = class {
|
|
2260
|
-
constructor(name, fg, bg) {
|
|
2261
|
-
this.name = name;
|
|
2262
|
-
this.fg = fg;
|
|
2263
|
-
this.bg = bg;
|
|
2264
|
-
this.min = Infinity;
|
|
2265
|
-
this.max = 0;
|
|
2266
|
-
this.dom = document.createElement("canvas");
|
|
2267
|
-
this.context = this.dom.getContext("2d");
|
|
2268
|
-
this.dom.width = WIDTH;
|
|
2269
|
-
this.dom.height = HEIGHT;
|
|
2270
|
-
this.dom.style.cssText = "width:80px;height:48px";
|
|
2271
|
-
this.context.font = `bold ${9 * PR}px Helvetica,Arial,sans-serif`;
|
|
2272
|
-
this.context.textBaseline = "top";
|
|
2273
|
-
this.context.fillStyle = bg;
|
|
2274
|
-
this.context.fillRect(0, 0, WIDTH, HEIGHT);
|
|
2275
|
-
this.context.fillStyle = fg;
|
|
2276
|
-
this.context.fillText(name, TEXT_X, TEXT_Y);
|
|
2277
|
-
this.context.fillRect(GRAPH_X, GRAPH_Y, GRAPH_WIDTH, GRAPH_HEIGHT);
|
|
2278
|
-
this.context.fillStyle = bg;
|
|
2279
|
-
this.context.globalAlpha = 0.9;
|
|
2280
|
-
this.context.fillRect(GRAPH_X, GRAPH_Y, GRAPH_WIDTH, GRAPH_HEIGHT);
|
|
2281
|
-
}
|
|
2282
|
-
update(value, maxValue) {
|
|
2283
|
-
this.min = Math.min(this.min, value);
|
|
2284
|
-
this.max = Math.max(this.max, value);
|
|
2285
|
-
this.context.fillStyle = this.bg;
|
|
2286
|
-
this.context.globalAlpha = 1;
|
|
2287
|
-
this.context.fillRect(0, 0, WIDTH, GRAPH_Y);
|
|
2288
|
-
this.context.fillStyle = this.fg;
|
|
2289
|
-
this.context.fillText(Math.round(value) + " " + this.name + " (" + Math.round(this.min) + "-" + Math.round(this.max) + ")", TEXT_X, TEXT_Y);
|
|
2290
|
-
this.context.drawImage(this.dom, GRAPH_X + PR, GRAPH_Y, GRAPH_WIDTH - PR, GRAPH_HEIGHT, GRAPH_X, GRAPH_Y, GRAPH_WIDTH - PR, GRAPH_HEIGHT);
|
|
2291
|
-
this.context.fillRect(GRAPH_X + GRAPH_WIDTH - PR, GRAPH_Y, PR, GRAPH_HEIGHT);
|
|
2292
|
-
this.context.fillStyle = this.bg;
|
|
2293
|
-
this.context.globalAlpha = 0.9;
|
|
2294
|
-
this.context.fillRect(GRAPH_X + GRAPH_WIDTH - PR, GRAPH_Y, PR, Math.round((1 - value / maxValue) * GRAPH_HEIGHT));
|
|
1838
|
+
__privateGet(this, _kpuzzle, kpuzzle_get).applyMove(move);
|
|
1839
|
+
return true;
|
|
1840
|
+
} catch (_) {
|
|
1841
|
+
return false;
|
|
2295
1842
|
}
|
|
2296
1843
|
};
|
|
2297
1844
|
|
|
2298
|
-
// src/cubing/twisty/
|
|
2299
|
-
|
|
2300
|
-
function experimentalShowRenderStats(show) {
|
|
2301
|
-
SHOW_STATS = show;
|
|
2302
|
-
}
|
|
2303
|
-
var shareAllNewRenderers = false;
|
|
2304
|
-
var sharedRenderer = null;
|
|
2305
|
-
function newRenderer() {
|
|
2306
|
-
return new WebGLRenderer({
|
|
2307
|
-
antialias: true,
|
|
2308
|
-
alpha: true
|
|
2309
|
-
});
|
|
2310
|
-
}
|
|
2311
|
-
function newSharedRenderer() {
|
|
2312
|
-
return sharedRenderer ?? (sharedRenderer = newRenderer());
|
|
2313
|
-
}
|
|
2314
|
-
var _invisible, _onRenderFinish, _resize, resize_fn;
|
|
2315
|
-
var Twisty3DCanvas = class extends ManagedCustomElement {
|
|
2316
|
-
constructor(scene, options = {}) {
|
|
2317
|
-
super();
|
|
2318
|
-
__privateAdd(this, _resize);
|
|
2319
|
-
this.legacyExperimentalShift = 0;
|
|
2320
|
-
this.scheduler = new RenderScheduler(this.render.bind(this));
|
|
2321
|
-
this.resizePending = false;
|
|
2322
|
-
this.stats = null;
|
|
2323
|
-
__privateAdd(this, _invisible, false);
|
|
2324
|
-
__privateAdd(this, _onRenderFinish, null);
|
|
2325
|
-
this.addCSS(twisty3DCanvasCSS);
|
|
2326
|
-
this.scene = scene;
|
|
2327
|
-
this.scene?.addRenderTarget(this);
|
|
2328
|
-
if (SHOW_STATS) {
|
|
2329
|
-
this.stats = new Stats();
|
|
2330
|
-
this.stats.dom.style.position = "absolute";
|
|
2331
|
-
this.addElement(this.stats.dom);
|
|
2332
|
-
}
|
|
2333
|
-
this.rendererIsShared = shareAllNewRenderers;
|
|
2334
|
-
this.renderer = this.rendererIsShared ? newSharedRenderer() : newRenderer();
|
|
2335
|
-
this.canvas = this.rendererIsShared ? document.createElement("canvas") : this.renderer.domElement;
|
|
2336
|
-
this.canvas2DContext = this.canvas.getContext("2d");
|
|
2337
|
-
this.addElement(this.canvas);
|
|
2338
|
-
this.camera = new PerspectiveCamera(20, 1, 0.1, 20);
|
|
2339
|
-
this.camera.position.copy(new Vector35(2, 4, 4));
|
|
2340
|
-
this.orbitControls = new TwistyOrbitControls(this.camera, this.canvas, this.scheduleRender.bind(this));
|
|
2341
|
-
if (options.orbitCoordinates) {
|
|
2342
|
-
this.orbitControls.latitude = options.orbitCoordinates.latitude * (options.negateCameraPosition ? -1 : 1);
|
|
2343
|
-
}
|
|
2344
|
-
if (options.orbitCoordinates) {
|
|
2345
|
-
this.orbitControls.longitude = options.orbitCoordinates.longitude + (options.negateCameraPosition ? 180 : 0);
|
|
2346
|
-
}
|
|
2347
|
-
if (options.orbitCoordinates) {
|
|
2348
|
-
this.orbitControls.distance = options.orbitCoordinates.distance;
|
|
2349
|
-
}
|
|
2350
|
-
this.camera.lookAt(new Vector35(0, 0, 0));
|
|
2351
|
-
const observer = new ResizeObserver(this.onResize.bind(this));
|
|
2352
|
-
observer.observe(this.contentWrapper);
|
|
2353
|
-
}
|
|
2354
|
-
setMirror(partner) {
|
|
2355
|
-
this.orbitControls.setMirror(partner.orbitControls);
|
|
2356
|
-
partner.orbitControls.setMirror(this.orbitControls);
|
|
2357
|
-
}
|
|
2358
|
-
experimentalSetLatitudeLimits(limits) {
|
|
2359
|
-
this.orbitControls.experimentalLatitudeLimits = limits;
|
|
2360
|
-
}
|
|
2361
|
-
connectedCallback() {
|
|
2362
|
-
__privateMethod(this, _resize, resize_fn).call(this);
|
|
2363
|
-
this.render();
|
|
2364
|
-
}
|
|
2365
|
-
scheduleRender() {
|
|
2366
|
-
this.scheduler.requestAnimFrame();
|
|
2367
|
-
}
|
|
2368
|
-
makeInvisibleUntilRender() {
|
|
2369
|
-
this.contentWrapper.classList.add("invisible");
|
|
2370
|
-
__privateSet(this, _invisible, true);
|
|
2371
|
-
}
|
|
2372
|
-
experimentalSetOnRenderFinish(f) {
|
|
2373
|
-
__privateSet(this, _onRenderFinish, f);
|
|
2374
|
-
}
|
|
2375
|
-
render() {
|
|
2376
|
-
this.stats?.begin();
|
|
2377
|
-
this.scheduler.cancelAnimFrame();
|
|
2378
|
-
if (this.resizePending) {
|
|
2379
|
-
__privateMethod(this, _resize, resize_fn).call(this);
|
|
2380
|
-
}
|
|
2381
|
-
if (this.rendererIsShared) {
|
|
2382
|
-
this.renderer.setSize(this.canvas.width, this.canvas.height, false);
|
|
2383
|
-
this.canvas2DContext.clearRect(0, 0, this.canvas.width, this.canvas.height);
|
|
2384
|
-
}
|
|
2385
|
-
if (this.scene) {
|
|
2386
|
-
this.renderer.render(this.scene, this.camera);
|
|
2387
|
-
}
|
|
2388
|
-
if (this.rendererIsShared) {
|
|
2389
|
-
this.canvas2DContext.drawImage(this.renderer.domElement, 0, 0);
|
|
2390
|
-
}
|
|
2391
|
-
if (__privateGet(this, _invisible)) {
|
|
2392
|
-
this.contentWrapper.classList.remove("invisible");
|
|
2393
|
-
}
|
|
2394
|
-
this.stats?.end();
|
|
2395
|
-
if (__privateGet(this, _onRenderFinish)) {
|
|
2396
|
-
__privateGet(this, _onRenderFinish).call(this);
|
|
2397
|
-
}
|
|
2398
|
-
}
|
|
2399
|
-
onResize() {
|
|
2400
|
-
this.resizePending = true;
|
|
2401
|
-
this.scheduleRender();
|
|
2402
|
-
}
|
|
2403
|
-
renderToDataURL(options = {}) {
|
|
2404
|
-
__privateMethod(this, _resize, resize_fn).call(this, options.minWidth, options.minHeight);
|
|
2405
|
-
this.render();
|
|
2406
|
-
let url;
|
|
2407
|
-
if (!options.squareCrop || this.canvas.width === this.canvas.height) {
|
|
2408
|
-
url = this.canvas.toDataURL();
|
|
2409
|
-
} else {
|
|
2410
|
-
const tempCanvas = document.createElement("canvas");
|
|
2411
|
-
const squareSize = Math.min(this.canvas.width, this.canvas.height);
|
|
2412
|
-
tempCanvas.width = squareSize;
|
|
2413
|
-
tempCanvas.height = squareSize;
|
|
2414
|
-
const tempCtx = tempCanvas.getContext("2d");
|
|
2415
|
-
tempCtx.drawImage(this.canvas, -(this.canvas.width - squareSize) / 2, -(this.canvas.height - squareSize) / 2);
|
|
2416
|
-
url = tempCanvas.toDataURL();
|
|
2417
|
-
}
|
|
2418
|
-
__privateMethod(this, _resize, resize_fn).call(this);
|
|
2419
|
-
return url;
|
|
2420
|
-
}
|
|
2421
|
-
};
|
|
2422
|
-
_invisible = new WeakMap();
|
|
2423
|
-
_onRenderFinish = new WeakMap();
|
|
2424
|
-
_resize = new WeakSet();
|
|
2425
|
-
resize_fn = function(minWidth = 0, minHeight = 0) {
|
|
2426
|
-
this.resizePending = false;
|
|
2427
|
-
const w = Math.max(this.contentWrapper.clientWidth, minWidth);
|
|
2428
|
-
const h = Math.max(this.contentWrapper.clientHeight, minHeight);
|
|
2429
|
-
let off = 0;
|
|
2430
|
-
if (this.legacyExperimentalShift > 0) {
|
|
2431
|
-
off = Math.max(0, Math.floor((w - h) * 0.5));
|
|
2432
|
-
} else if (this.legacyExperimentalShift < 0) {
|
|
2433
|
-
off = -Math.max(0, Math.floor((w - h) * 0.5));
|
|
2434
|
-
}
|
|
2435
|
-
let yoff = 0;
|
|
2436
|
-
let excess = 0;
|
|
2437
|
-
if (h > w) {
|
|
2438
|
-
excess = h - w;
|
|
2439
|
-
yoff = -Math.floor(0.5 * excess);
|
|
2440
|
-
}
|
|
2441
|
-
this.camera.aspect = w / h;
|
|
2442
|
-
this.camera.setViewOffset(w, h - excess, off, yoff, w, h);
|
|
2443
|
-
this.camera.updateProjectionMatrix();
|
|
2444
|
-
if (this.rendererIsShared) {
|
|
2445
|
-
this.canvas.width = w * pixelRatio();
|
|
2446
|
-
this.canvas.height = h * pixelRatio();
|
|
2447
|
-
this.canvas.style.width = w.toString();
|
|
2448
|
-
this.canvas.style.height = w.toString();
|
|
2449
|
-
} else {
|
|
2450
|
-
this.renderer.setPixelRatio(pixelRatio());
|
|
2451
|
-
this.renderer.setSize(w, h, true);
|
|
2452
|
-
}
|
|
2453
|
-
this.scheduleRender();
|
|
2454
|
-
};
|
|
2455
|
-
customElementsShim.define("twisty-3d-canvas", Twisty3DCanvas);
|
|
1845
|
+
// src/cubing/twisty/heavy-code-imports/dynamic-entries/3d.ts
|
|
1846
|
+
import * as T3I from "three";
|
|
2456
1847
|
|
|
2457
1848
|
// src/cubing/twisty/views/3D/Twisty3DScene.ts
|
|
2458
1849
|
import { Scene as ThreeScene } from "three";
|
|
@@ -2486,27 +1877,34 @@ var Twisty3DScene = class extends ThreeScene {
|
|
|
2486
1877
|
}
|
|
2487
1878
|
};
|
|
2488
1879
|
|
|
1880
|
+
// src/cubing/twisty/heavy-code-imports/dynamic-entries/3d.ts
|
|
1881
|
+
async function cube3DShim(options) {
|
|
1882
|
+
const renderCallbackShim = () => {
|
|
1883
|
+
};
|
|
1884
|
+
return new Cube3D(await cube3x3x3.def(), renderCallbackShim, options);
|
|
1885
|
+
}
|
|
1886
|
+
async function pg3dShim(puzzleLoader, hintFacelets) {
|
|
1887
|
+
const renderCallbackShim = () => {
|
|
1888
|
+
};
|
|
1889
|
+
return new PG3D(renderCallbackShim, await puzzleLoader.def(), (await puzzleLoader.pg()).get3d(), true, hintFacelets === "floating");
|
|
1890
|
+
}
|
|
1891
|
+
|
|
2489
1892
|
export {
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
1893
|
+
StaleDropper,
|
|
1894
|
+
from,
|
|
1895
|
+
TwistyPropSource,
|
|
1896
|
+
SimpleTwistyPropSource,
|
|
1897
|
+
NO_VALUE,
|
|
1898
|
+
TwistyPropDerived,
|
|
1899
|
+
FreshListenerManager,
|
|
1900
|
+
HintFaceletProp,
|
|
1901
|
+
StickeringProp,
|
|
2496
1902
|
DEGREES_PER_RADIAN,
|
|
2497
|
-
twistyViewerWrapperCSS,
|
|
2498
|
-
TwistyViewerWrapper,
|
|
2499
|
-
pyraminxLookAt,
|
|
2500
|
-
defaultCameraOrbitCoordinates,
|
|
2501
|
-
controlsLocations,
|
|
2502
|
-
TwistyPlayerConfig,
|
|
2503
1903
|
Cube3D,
|
|
2504
1904
|
PG3D,
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
Twisty3DCanvas,
|
|
2510
|
-
Twisty3DScene
|
|
1905
|
+
Twisty3DScene,
|
|
1906
|
+
cube3DShim,
|
|
1907
|
+
pg3dShim,
|
|
1908
|
+
T3I
|
|
2511
1909
|
};
|
|
2512
|
-
//# sourceMappingURL=chunk-
|
|
1910
|
+
//# sourceMappingURL=chunk-GF76PWEV.js.map
|