cubing 0.21.0-pre8 → 0.21.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{src/cubing/search/inside/solve → dist}/.DS_Store +0 -0
- package/dist/bin/puzzle-geometry-bin.js +1 -1
- package/dist/bin/puzzle-geometry-bin.js.map +2 -2
- package/dist/bundle-global/cubing.bundle-global.js +876 -797
- package/dist/esm/{3d-TYWC5MQY.js → 3d-B25DP5PE.js} +3 -3
- package/dist/esm/{3d-TYWC5MQY.js.map → 3d-B25DP5PE.js.map} +0 -0
- package/dist/esm/bluetooth/index.js +1 -1
- package/dist/esm/bluetooth/index.js.map +1 -1
- package/dist/esm/{chunk-6BXLPCNQ.js → chunk-APIIMJG6.js} +98 -95
- package/dist/esm/chunk-APIIMJG6.js.map +7 -0
- package/dist/esm/{chunk-HUPF5GPN.js → chunk-CSVAFZSB.js} +3 -3
- package/dist/esm/{chunk-HUPF5GPN.js.map → chunk-CSVAFZSB.js.map} +0 -0
- package/dist/esm/{chunk-L6K5FKPV.js → chunk-MUQMBH2S.js} +48 -26
- package/dist/esm/{chunk-L6K5FKPV.js.map → chunk-MUQMBH2S.js.map} +2 -2
- package/dist/esm/puzzle-geometry/index.js +1 -1
- package/dist/esm/puzzle-geometry/index.js.map +2 -2
- package/dist/esm/puzzles/index.js +5 -5
- package/dist/esm/scramble/index.js +2 -2
- package/dist/esm/search/index.js +2 -2
- package/dist/esm/twisty/index.js +313 -78
- package/dist/esm/twisty/index.js.map +3 -3
- package/dist/esm/{worker-inside-generated-string-DOHINKQX.js → worker-inside-generated-string-KDZOUGJF.js} +20 -20
- package/dist/esm/worker-inside-generated-string-KDZOUGJF.js.map +7 -0
- package/{src/cubing/search/inside/solve/vendor/cstimer → dist/types}/.DS_Store +0 -0
- package/dist/types/bluetooth/smart-puzzle/bluetooth-puzzle.d.ts +1 -1
- package/dist/types/bluetooth/smart-puzzle/bluetooth-puzzle.d.ts.map +1 -1
- package/dist/types/cubing.bundle-global.d.ts +1 -24
- package/dist/types/cubing.bundle-global.d.ts.map +1 -1
- package/dist/types/puzzles/implementations/fto/index.d.ts +2 -2
- package/dist/types/puzzles/implementations/fto/index.d.ts.map +1 -1
- package/dist/types/puzzles/index.d.ts +5 -1
- package/dist/types/puzzles/index.d.ts.map +1 -1
- package/dist/types/puzzles/stickerings/fto-stickerings.d.ts.map +1 -1
- package/dist/types/search/inside/api.d.ts.map +1 -1
- package/dist/types/search/worker-inside-generated-string.d.ts +1 -1
- package/dist/types/search/worker-inside-generated-string.d.ts.map +1 -1
- package/dist/types/twisty/controllers/TwistyAnimationController.d.ts +4 -1
- package/dist/types/twisty/controllers/TwistyAnimationController.d.ts.map +1 -1
- package/dist/types/twisty/index.d.ts +3 -2
- package/dist/types/twisty/index.d.ts.map +1 -1
- package/dist/types/twisty/model/TwistyPlayerModel.d.ts +41 -37
- package/dist/types/twisty/model/TwistyPlayerModel.d.ts.map +1 -1
- package/dist/types/twisty/model/UserVisibleErrorTracker.d.ts +11 -0
- package/dist/types/twisty/model/UserVisibleErrorTracker.d.ts.map +1 -0
- package/dist/types/twisty/model/{TwistyProp.d.ts → props/TwistyProp.d.ts} +3 -1
- package/dist/types/twisty/model/props/TwistyProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{TwistyProp.spec.d.ts → props/TwistyProp.spec.d.ts} +0 -0
- package/dist/types/twisty/model/props/TwistyProp.spec.d.ts.map +1 -0
- package/dist/types/twisty/model/{TwistyPropDebugger.d.ts → props/TwistyPropDebugger.d.ts} +2 -2
- package/dist/types/twisty/model/props/TwistyPropDebugger.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/general}/URLProp.d.ts +0 -0
- package/dist/types/twisty/model/props/general/URLProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/puzzle/display}/HintFaceletProp.d.ts +2 -2
- package/dist/types/twisty/model/props/puzzle/display/HintFaceletProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-1 → props/puzzle/display}/SpriteProp.d.ts +1 -1
- package/dist/types/twisty/model/props/puzzle/display/SpriteProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/display/StickeringProp.d.ts +6 -0
- package/dist/types/twisty/model/props/puzzle/display/StickeringProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/puzzle/state}/AlgProp.d.ts +2 -2
- package/dist/types/twisty/model/props/puzzle/state/AlgProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-4 → props/puzzle/state}/AlgTransformationProp.d.ts +4 -4
- package/dist/types/twisty/model/props/puzzle/state/AlgTransformationProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-6 → props/puzzle/state}/AnchoredStartProp.d.ts +4 -4
- package/dist/types/twisty/model/props/puzzle/state/AnchoredStartProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/state/CatchUpMoveProp.d.ts +11 -0
- package/dist/types/twisty/model/props/puzzle/state/CatchUpMoveProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesProp.d.ts +14 -0
- package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-9 → props/puzzle/state}/CurrentLeavesSimplified.d.ts +3 -3
- package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesSimplified.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-10 → props/puzzle/state}/CurrentTransformationProp.d.ts +4 -4
- package/dist/types/twisty/model/props/puzzle/state/CurrentTransformationProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorProp.d.ts +17 -0
- package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/puzzle/state}/IndexerConstructorRequestProp.d.ts +1 -1
- package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorRequestProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/state/IndexerProp.d.ts +15 -0
- package/dist/types/twisty/model/props/puzzle/state/IndexerProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/state/LegacyPositionProp.d.ts +12 -0
- package/dist/types/twisty/model/props/puzzle/state/LegacyPositionProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-3 → props/puzzle/state}/PuzzleAlgProp.d.ts +3 -3
- package/dist/types/twisty/model/props/puzzle/state/PuzzleAlgProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/state/SetupAnchorProp.d.ts +6 -0
- package/dist/types/twisty/model/props/puzzle/state/SetupAnchorProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleDefProp.d.ts +11 -0
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleDefProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleDescriptionProp.d.ts +6 -0
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleDescriptionProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDProp.d.ts +11 -0
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.d.ts +6 -0
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.d.ts.map +1 -0
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleLoaderProp.d.ts +13 -0
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleLoaderProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-8 → props/timeline}/CoarseTimelineInfoProp.d.ts +3 -3
- package/dist/types/twisty/model/props/timeline/CoarseTimelineInfoProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-7 → props/timeline}/DetailedTimelineInfoProp.d.ts +4 -4
- package/dist/types/twisty/model/props/timeline/DetailedTimelineInfoProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/timeline}/PlayingInfoProp.d.ts +1 -1
- package/dist/types/twisty/model/props/timeline/PlayingInfoProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/timeline}/TempoScaleProp.d.ts +0 -0
- package/dist/types/twisty/model/props/timeline/TempoScaleProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/timeline}/TimestampRequestProp.d.ts +1 -1
- package/dist/types/twisty/model/props/timeline/TimestampRequestProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/viewer}/BackViewProp.d.ts +1 -1
- package/dist/types/twisty/model/props/viewer/BackViewProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/viewer}/BackgroundProp.d.ts +1 -1
- package/dist/types/twisty/model/props/viewer/BackgroundProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-9 → props/viewer}/ButtonAppearanceProp.d.ts +3 -3
- package/dist/types/twisty/model/props/viewer/ButtonAppearanceProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/viewer}/ControlPanelProp.d.ts +1 -1
- package/dist/types/twisty/model/props/viewer/ControlPanelProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/viewer}/LatitudeLimit.d.ts +0 -0
- package/dist/types/twisty/model/props/viewer/LatitudeLimit.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-4 → props/viewer}/OrbitCoordinatesProp.d.ts +3 -3
- package/dist/types/twisty/model/props/viewer/OrbitCoordinatesProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/viewer}/OrbitCoordinatesRequestProp.d.ts +0 -0
- package/dist/types/twisty/model/props/viewer/OrbitCoordinatesRequestProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-6 → props/viewer}/TimeRangeProp.d.ts +2 -2
- package/dist/types/twisty/model/props/viewer/TimeRangeProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/viewer}/ViewerLinkProp.d.ts +1 -1
- package/dist/types/twisty/model/props/viewer/ViewerLinkProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-0 → props/viewer}/VisualizationProp.d.ts +1 -1
- package/dist/types/twisty/model/props/viewer/VisualizationProp.d.ts.map +1 -0
- package/dist/types/twisty/model/{depth-3 → props/viewer}/VisualizationStrategyProp.d.ts +2 -2
- package/dist/types/twisty/model/props/viewer/VisualizationStrategyProp.d.ts.map +1 -0
- package/dist/types/twisty/old/animation/indexer/AlgIndexer.d.ts.map +1 -1
- package/dist/types/twisty/old/dom/TwistyPlayer.css.d.ts.map +1 -1
- package/dist/types/twisty/old/dom/TwistyPlayerConfig.d.ts +2 -1
- package/dist/types/twisty/old/dom/TwistyPlayerConfig.d.ts.map +1 -1
- package/dist/types/twisty/old/dom/viewers/Twisty3DCanvas.d.ts +0 -1
- package/dist/types/twisty/old/dom/viewers/Twisty3DCanvas.d.ts.map +1 -1
- package/dist/types/twisty/views/3D/RendererPool.d.ts +4 -0
- package/dist/types/twisty/views/3D/RendererPool.d.ts.map +1 -0
- package/dist/types/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts +1 -1
- package/dist/types/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts.map +1 -1
- package/dist/types/twisty/views/3D/Twisty3DSceneWrapper.d.ts +2 -1
- package/dist/types/twisty/views/3D/Twisty3DSceneWrapper.d.ts.map +1 -1
- package/dist/types/twisty/views/3D/Twisty3DVantage.d.ts +5 -3
- package/dist/types/twisty/views/3D/Twisty3DVantage.d.ts.map +1 -1
- package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.d.ts +1 -1
- package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.d.ts.map +1 -1
- package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.d.ts.map +1 -1
- package/dist/types/twisty/views/TwistyAlgEditor/model.d.ts +2 -2
- package/dist/types/twisty/views/TwistyAlgEditor/model.d.ts.map +1 -1
- package/dist/types/twisty/views/TwistyPlayer.d.ts +12 -7
- package/dist/types/twisty/views/TwistyPlayer.d.ts.map +1 -1
- package/dist/types/twisty/views/TwistyPlayerSettable.d.ts +8 -8
- package/dist/types/twisty/views/TwistyPlayerSettable.d.ts.map +1 -1
- package/dist/types/twisty/views/control-panel/TwistyButtonsV2.d.ts +1 -1
- package/dist/types/twisty/views/control-panel/TwistyButtonsV2.d.ts.map +1 -1
- package/dist/types/twisty/views/control-panel/TwistyScrubberV2.d.ts +1 -1
- package/dist/types/twisty/views/control-panel/TwistyScrubberV2.d.ts.map +1 -1
- package/dist/types/vendor/three/examples/jsm/libs/stats.modified.module.d.ts +33 -0
- package/dist/types/vendor/three/examples/jsm/libs/stats.modified.module.d.ts.map +1 -0
- package/docs/.DS_Store +0 -0
- package/docs/cubing/.DS_Store +0 -0
- package/docs/cubing/scramble/index.html +35 -19
- package/package.json +5 -5
- package/src/cubing/.DS_Store +0 -0
- package/src/cubing/bluetooth/connect/index.ts +1 -1
- package/src/cubing/bluetooth/smart-puzzle/bluetooth-puzzle.ts +1 -1
- package/src/cubing/cubing.bundle-global.ts +5 -1
- package/src/cubing/puzzle-geometry/PermOriSet.ts +1 -1
- package/src/cubing/puzzles/PuzzleLoader.ts +1 -1
- package/src/cubing/puzzles/implementations/fto/index.ts +19 -11
- package/src/cubing/puzzles/index.ts +25 -18
- package/src/cubing/puzzles/stickerings/fto-stickerings.ts +9 -0
- package/src/cubing/search/inside/api.spec.ts +1 -0
- package/src/cubing/search/inside/api.ts +1 -0
- package/src/cubing/search/worker-inside-generated-string.js +1 -1
- package/src/cubing/twisty/.DS_Store +0 -0
- package/src/cubing/twisty/controllers/TwistyAnimationController.ts +80 -3
- package/src/cubing/twisty/index.ts +2 -2
- package/src/cubing/twisty/model/TwistyPlayerModel.ts +52 -41
- package/src/cubing/twisty/model/UserVisibleErrorTracker.ts +22 -0
- package/src/cubing/twisty/model/{TwistyProp.spec.ts → props/TwistyProp.spec.ts} +0 -0
- package/src/cubing/twisty/model/{TwistyProp.ts → props/TwistyProp.ts} +17 -9
- package/src/cubing/twisty/model/{TwistyPropDebugger.ts → props/TwistyPropDebugger.ts} +7 -7
- package/src/cubing/twisty/model/{depth-0 → props/general}/URLProp.ts +0 -0
- package/src/cubing/twisty/model/{depth-0 → props/puzzle/display}/HintFaceletProp.ts +2 -2
- package/src/cubing/twisty/model/{depth-1 → props/puzzle/display}/SpriteProp.ts +2 -2
- package/src/cubing/twisty/model/{depth-0 → props/puzzle/display}/StickeringProp.ts +2 -2
- package/src/cubing/twisty/model/{depth-0 → props/puzzle/state}/AlgProp.ts +3 -3
- package/src/cubing/twisty/model/{depth-4 → props/puzzle/state}/AlgTransformationProp.ts +6 -6
- package/src/cubing/twisty/model/{depth-6 → props/puzzle/state}/AnchoredStartProp.ts +4 -4
- package/src/cubing/twisty/model/props/puzzle/state/CatchUpMoveProp.ts +17 -0
- package/src/cubing/twisty/model/{depth-8 → props/puzzle/state}/CurrentLeavesProp.ts +27 -9
- package/src/cubing/twisty/model/{depth-9 → props/puzzle/state}/CurrentLeavesSimplified.ts +4 -4
- package/src/cubing/twisty/model/{depth-10 → props/puzzle/state}/CurrentTransformationProp.ts +5 -5
- package/src/cubing/twisty/model/{depth-4 → props/puzzle/state}/IndexerConstructorProp.ts +10 -10
- package/src/cubing/twisty/model/{depth-0 → props/puzzle/state}/IndexerConstructorRequestProp.ts +1 -1
- package/src/cubing/twisty/model/{depth-5 → props/puzzle/state}/IndexerProp.ts +6 -6
- package/src/cubing/twisty/model/{depth-11 → props/puzzle/state}/LegacyPositionProp.ts +4 -4
- package/src/cubing/twisty/model/{depth-3 → props/puzzle/state}/PuzzleAlgProp.ts +4 -4
- package/src/cubing/twisty/model/{depth-0 → props/puzzle/state}/SetupAnchorProp.ts +2 -2
- package/src/cubing/twisty/model/{depth-2 → props/puzzle/structure}/PuzzleDefProp.ts +3 -3
- package/src/cubing/twisty/model/{depth-0 → props/puzzle/structure}/PuzzleDescriptionProp.ts +6 -2
- package/src/cubing/twisty/model/{depth-2 → props/puzzle/structure}/PuzzleIDProp.ts +3 -3
- package/src/cubing/twisty/model/{depth-0 → props/puzzle/structure}/PuzzleIDRequestProp.ts +6 -2
- package/src/cubing/twisty/model/{depth-1 → props/puzzle/structure}/PuzzleLoaderProp.ts +11 -5
- package/src/cubing/twisty/model/{depth-8 → props/timeline}/CoarseTimelineInfoProp.ts +3 -3
- package/src/cubing/twisty/model/{depth-7 → props/timeline}/DetailedTimelineInfoProp.ts +4 -4
- package/src/cubing/twisty/model/{depth-0 → props/timeline}/PlayingInfoProp.ts +1 -1
- package/src/cubing/twisty/model/{depth-0 → props/timeline}/TempoScaleProp.ts +0 -0
- package/src/cubing/twisty/model/{depth-0 → props/timeline}/TimestampRequestProp.ts +1 -1
- package/src/cubing/twisty/model/{depth-0 → props/viewer}/BackViewProp.ts +1 -1
- package/src/cubing/twisty/model/{depth-0 → props/viewer}/BackgroundProp.ts +1 -1
- package/src/cubing/twisty/model/{depth-9 → props/viewer}/ButtonAppearanceProp.ts +4 -4
- package/src/cubing/twisty/model/{depth-0 → props/viewer}/ControlPanelProp.ts +1 -1
- package/src/cubing/twisty/model/{depth-0 → props/viewer}/LatitudeLimit.ts +0 -0
- package/src/cubing/twisty/model/{depth-4 → props/viewer}/OrbitCoordinatesProp.ts +3 -3
- package/src/cubing/twisty/model/{depth-0 → props/viewer}/OrbitCoordinatesRequestProp.ts +1 -1
- package/src/cubing/twisty/model/{depth-6 → props/viewer}/TimeRangeProp.ts +2 -2
- package/src/cubing/twisty/model/{depth-0 → props/viewer}/ViewerLinkProp.ts +1 -1
- package/src/cubing/twisty/model/{depth-0 → props/viewer}/VisualizationProp.ts +1 -1
- package/src/cubing/twisty/model/{depth-3 → props/viewer}/VisualizationStrategyProp.ts +2 -2
- package/src/cubing/twisty/old/animation/indexer/AlgIndexer.ts +1 -0
- package/src/cubing/twisty/old/dom/TwistyPlayer.css.ts +20 -0
- package/src/cubing/twisty/old/dom/TwistyPlayerConfig.ts +2 -1
- package/src/cubing/twisty/old/dom/viewers/Twisty3DCanvas.ts +3 -10
- package/src/cubing/twisty/{old → views}/.DS_Store +0 -0
- package/src/cubing/twisty/views/2D/Twisty2DPuzzle.ts +2 -2
- package/src/cubing/twisty/views/2D/Twisty2DPuzzleWrapper.ts +1 -1
- package/src/cubing/twisty/views/2D/Twisty2DSceneWrapper.ts +1 -1
- package/src/cubing/{search/inside → twisty/views/3D}/.DS_Store +0 -0
- package/src/cubing/twisty/views/3D/RendererPool.ts +53 -0
- package/src/cubing/twisty/views/3D/Twisty3DPuzzleWrapper.ts +9 -8
- package/src/cubing/twisty/views/3D/Twisty3DSceneWrapper.ts +7 -3
- package/src/cubing/twisty/views/3D/Twisty3DVantage.ts +69 -33
- package/src/cubing/twisty/views/3D/TwistyOrbitControlsV2.spec.ts +7 -7
- package/src/cubing/twisty/views/3D/TwistyOrbitControlsV2.ts +1 -1
- package/src/cubing/twisty/views/TwistyAlgEditor/TwistyAlgEditor.ts +6 -2
- package/src/cubing/twisty/views/TwistyAlgEditor/model.ts +2 -2
- package/src/cubing/twisty/views/TwistyAlgViewer.ts +2 -2
- package/src/cubing/twisty/views/TwistyPlayer.ts +67 -11
- package/src/cubing/twisty/views/TwistyPlayerSettable.ts +8 -8
- package/src/cubing/twisty/views/control-panel/TwistyButtonsV2.ts +1 -1
- package/src/cubing/twisty/views/control-panel/TwistyScrubberV2.ts +1 -1
- package/src/cubing/vendor/three/examples/jsm/libs/stats.modified.module.ts +179 -0
- package/dist/esm/chunk-6BXLPCNQ.js.map +0 -7
- package/dist/esm/worker-inside-generated-string-DOHINKQX.js.map +0 -7
- package/dist/types/twisty/model/TwistyProp.d.ts.map +0 -1
- package/dist/types/twisty/model/TwistyProp.spec.d.ts.map +0 -1
- package/dist/types/twisty/model/TwistyPropDebugger.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/AlgProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/BackViewProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/BackgroundProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/ControlPanelProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/HintFaceletProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/IndexerConstructorRequestProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/LatitudeLimit.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/OrbitCoordinatesRequestProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/PlayingInfoProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/PuzzleDescriptionProp.d.ts +0 -6
- package/dist/types/twisty/model/depth-0/PuzzleDescriptionProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/PuzzleIDRequestProp.d.ts +0 -6
- package/dist/types/twisty/model/depth-0/PuzzleIDRequestProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/SetupAnchorProp.d.ts +0 -6
- package/dist/types/twisty/model/depth-0/SetupAnchorProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/StickeringProp.d.ts +0 -6
- package/dist/types/twisty/model/depth-0/StickeringProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/TempoScaleProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/TimestampRequestProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/URLProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/ViewerLinkProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-0/VisualizationProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-1/PuzzleLoaderProp.d.ts +0 -13
- package/dist/types/twisty/model/depth-1/PuzzleLoaderProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-1/SpriteProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-10/CurrentTransformationProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-11/LegacyPositionProp.d.ts +0 -12
- package/dist/types/twisty/model/depth-11/LegacyPositionProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-2/PuzzleDefProp.d.ts +0 -11
- package/dist/types/twisty/model/depth-2/PuzzleDefProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-2/PuzzleIDProp.d.ts +0 -11
- package/dist/types/twisty/model/depth-2/PuzzleIDProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-3/PuzzleAlgProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-3/VisualizationStrategyProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-4/AlgTransformationProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-4/IndexerConstructorProp.d.ts +0 -17
- package/dist/types/twisty/model/depth-4/IndexerConstructorProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-4/OrbitCoordinatesProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-5/IndexerProp.d.ts +0 -15
- package/dist/types/twisty/model/depth-5/IndexerProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-6/AnchoredStartProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-6/TimeRangeProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-7/DetailedTimelineInfoProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-8/CoarseTimelineInfoProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-8/CurrentLeavesProp.d.ts +0 -12
- package/dist/types/twisty/model/depth-8/CurrentLeavesProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-9/ButtonAppearanceProp.d.ts.map +0 -1
- package/dist/types/twisty/model/depth-9/CurrentLeavesSimplified.d.ts.map +0 -1
- package/dist/types/twisty/views/3D/puzzles/TwistyTestBox.d.ts +0 -9
- package/dist/types/twisty/views/3D/puzzles/TwistyTestBox.d.ts.map +0 -1
- package/dist/types/vendor/three/examples/jsm/libs/stats.module.d.ts +0 -21
- package/dist/types/vendor/three/examples/jsm/libs/stats.module.d.ts.map +0 -1
- package/src/cubing/alg/.DS_Store +0 -0
- package/src/cubing/bluetooth/.DS_Store +0 -0
- package/src/cubing/kpuzzle/.DS_Store +0 -0
- package/src/cubing/puzzles/.DS_Store +0 -0
- package/src/cubing/search/.DS_Store +0 -0
- package/src/cubing/search/inside/solve/vendor/.DS_Store +0 -0
- package/src/cubing/search/inside/solve/vendor/cstimer/src/.DS_Store +0 -0
- package/src/cubing/search/inside/solve/vendor/cstimer/src/js/.DS_Store +0 -0
- package/src/cubing/stream/.DS_Store +0 -0
- package/src/cubing/twisty/old/dom/.DS_Store +0 -0
- package/src/cubing/twisty/views/3D/puzzles/TwistyTestBox.ts +0 -22
- package/src/cubing/vendor/.DS_Store +0 -0
- package/src/cubing/vendor/three/examples/jsm/libs/stats.module.d.ts +0 -24
- package/src/cubing/vendor/three/examples/jsm/libs/stats.module.js +0 -179
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Alg } from "
|
|
2
|
-
import { KPuzzle, KPuzzleDefinition } from "
|
|
3
|
-
import { AlgIssues, AlgWithIssues } from "
|
|
4
|
-
import { TwistyPropDerived } from "
|
|
1
|
+
import { Alg } from "../../../../../alg";
|
|
2
|
+
import { KPuzzle, KPuzzleDefinition } from "../../../../../kpuzzle";
|
|
3
|
+
import { AlgIssues, AlgWithIssues } from "./AlgProp";
|
|
4
|
+
import { TwistyPropDerived } from "../../TwistyProp";
|
|
5
5
|
|
|
6
6
|
export class PuzzleAlgProp extends TwistyPropDerived<
|
|
7
7
|
{ algWithIssues: AlgWithIssues; puzzleDef: KPuzzleDefinition },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SetupToLocation } from "
|
|
2
|
-
import { SimpleTwistyPropSource } from "
|
|
1
|
+
import type { SetupToLocation } from "../../../../old/dom/TwistyPlayerConfig";
|
|
2
|
+
import { SimpleTwistyPropSource } from "../../TwistyProp";
|
|
3
3
|
|
|
4
4
|
export class SetupAnchorProp extends SimpleTwistyPropSource<SetupToLocation> {
|
|
5
5
|
getDefaultValue(): SetupToLocation {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { KPuzzleDefinition } from "
|
|
2
|
-
import type { PuzzleLoader } from "
|
|
3
|
-
import { TwistyPropDerived } from "
|
|
1
|
+
import type { KPuzzleDefinition } from "../../../../../kpuzzle";
|
|
2
|
+
import type { PuzzleLoader } from "../../../../../puzzles";
|
|
3
|
+
import { TwistyPropDerived } from "../../TwistyProp";
|
|
4
4
|
|
|
5
5
|
export class PuzzleDefProp extends TwistyPropDerived<
|
|
6
6
|
{ puzzleLoader: PuzzleLoader },
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import type { PuzzleDescriptionString } from "
|
|
2
|
-
import {
|
|
1
|
+
import type { PuzzleDescriptionString } from "../../../../../puzzle-geometry/PGPuzzles";
|
|
2
|
+
import {
|
|
3
|
+
NoValueType,
|
|
4
|
+
NO_VALUE,
|
|
5
|
+
SimpleTwistyPropSource,
|
|
6
|
+
} from "../../TwistyProp";
|
|
3
7
|
|
|
4
8
|
export class PGPuzzleDescriptionStringProp extends SimpleTwistyPropSource<
|
|
5
9
|
PuzzleDescriptionString | NoValueType
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { PuzzleLoader } from "
|
|
2
|
-
import type { PuzzleID } from "
|
|
3
|
-
import { TwistyPropDerived } from "
|
|
1
|
+
import type { PuzzleLoader } from "../../../../../puzzles";
|
|
2
|
+
import type { PuzzleID } from "../../../../old/dom/TwistyPlayerConfig";
|
|
3
|
+
import { TwistyPropDerived } from "../../TwistyProp";
|
|
4
4
|
|
|
5
5
|
export class PuzzleIDProp extends TwistyPropDerived<
|
|
6
6
|
{ puzzleLoader: PuzzleLoader },
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import type { PuzzleID } from "
|
|
2
|
-
import {
|
|
1
|
+
import type { PuzzleID } from "../../../../old/dom/TwistyPlayerConfig";
|
|
2
|
+
import {
|
|
3
|
+
NoValueType,
|
|
4
|
+
NO_VALUE,
|
|
5
|
+
SimpleTwistyPropSource,
|
|
6
|
+
} from "../../TwistyProp";
|
|
3
7
|
|
|
4
8
|
// TODO: Ideally we'd use `null` to mean "no value", but `null` has a special meaning
|
|
5
9
|
// for `TwistyProp` and might mess with caching.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { PuzzleDescriptionString } from "
|
|
1
|
+
import type { PuzzleDescriptionString } from "../../../../../puzzle-geometry/PGPuzzles";
|
|
2
2
|
import {
|
|
3
3
|
cube3x3x3,
|
|
4
4
|
experimentalCustomPGPuzzleLoader,
|
|
5
5
|
PuzzleLoader,
|
|
6
6
|
puzzles,
|
|
7
|
-
} from "
|
|
8
|
-
import type { PuzzleID } from "
|
|
9
|
-
import { NoValueType, NO_VALUE, TwistyPropDerived } from "
|
|
7
|
+
} from "../../../../../puzzles";
|
|
8
|
+
import type { PuzzleID } from "../../../../old/dom/TwistyPlayerConfig";
|
|
9
|
+
import { NoValueType, NO_VALUE, TwistyPropDerived } from "../../TwistyProp";
|
|
10
10
|
8;
|
|
11
11
|
interface PuzzleLoaderPropInputs {
|
|
12
12
|
puzzleIDRequest: PuzzleID | NoValueType;
|
|
@@ -19,7 +19,13 @@ export class PuzzleLoaderProp extends TwistyPropDerived<
|
|
|
19
19
|
> {
|
|
20
20
|
derive(inputs: PuzzleLoaderPropInputs): PuzzleLoader {
|
|
21
21
|
if (inputs.puzzleIDRequest && inputs.puzzleIDRequest !== NO_VALUE) {
|
|
22
|
-
|
|
22
|
+
const puzzleLoader = puzzles[inputs.puzzleIDRequest];
|
|
23
|
+
if (!puzzleLoader) {
|
|
24
|
+
this.userVisibleErrorTracker!.set({
|
|
25
|
+
errors: [`Invalid puzzle ID: ${inputs.puzzleIDRequest}`],
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return puzzleLoader;
|
|
23
29
|
}
|
|
24
30
|
if (
|
|
25
31
|
inputs.puzzleDescriptionRequest &&
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ButtonCommand } from "
|
|
2
|
-
import type { PlayingInfo } from "
|
|
3
|
-
import type { DetailedTimelineInfo } from "
|
|
1
|
+
import type { ButtonCommand } from "../../../views/control-panel/TwistyButtonsV2";
|
|
2
|
+
import type { PlayingInfo } from "./PlayingInfoProp";
|
|
3
|
+
import type { DetailedTimelineInfo } from "./DetailedTimelineInfoProp";
|
|
4
4
|
import { TwistyPropDerived } from "../TwistyProp";
|
|
5
5
|
|
|
6
6
|
interface ButtonAppearance {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { TimeRange } from "
|
|
2
|
-
import type { MillisecondTimestamp } from "
|
|
3
|
-
import type { SetupToLocation } from "
|
|
4
|
-
import type { TimestampRequest } from "
|
|
1
|
+
import type { TimeRange } from "../../../old/animation/cursor/AlgCursor";
|
|
2
|
+
import type { MillisecondTimestamp } from "../../../old/animation/cursor/CursorTypes";
|
|
3
|
+
import type { SetupToLocation } from "../../../old/dom/TwistyPlayerConfig";
|
|
4
|
+
import type { TimestampRequest } from "./TimestampRequestProp";
|
|
5
5
|
import { TwistyPropDerived } from "../TwistyProp";
|
|
6
6
|
|
|
7
7
|
interface DetailedTimelineInfoInputs {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BoundaryType,
|
|
3
3
|
Direction,
|
|
4
|
-
} from "
|
|
4
|
+
} from "../../../old/animation/cursor/CursorTypes";
|
|
5
5
|
import { TwistyPropSource } from "../TwistyProp";
|
|
6
6
|
|
|
7
7
|
export type SimpleDirection = Direction.Forwards | Direction.Backwards;
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BackViewLayout } from "
|
|
1
|
+
import type { BackViewLayout } from "../../../old/dom/viewers/TwistyViewerWrapper";
|
|
2
2
|
import { SimpleTwistyPropSource } from "../TwistyProp";
|
|
3
3
|
|
|
4
4
|
export type BackViewLayoutWithAuto = BackViewLayout | "auto";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BackgroundTheme } from "
|
|
1
|
+
import type { BackgroundTheme } from "../../../old/dom/TwistyPlayerConfig";
|
|
2
2
|
import { SimpleTwistyPropSource } from "../TwistyProp";
|
|
3
3
|
|
|
4
4
|
export type BackgroundThemeWithAuto = BackgroundTheme | "auto";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ButtonCommand } from "
|
|
2
|
-
import { fullscreenEnabled } from "
|
|
3
|
-
import type { ViewerLinkPageWithAuto } from "
|
|
4
|
-
import type { CoarseTimelineInfo as CoarseTimelineInfo } from "../
|
|
1
|
+
import type { ButtonCommand } from "../../../views/control-panel/TwistyButtonsV2";
|
|
2
|
+
import { fullscreenEnabled } from "../../../views/control-panel/webkit-fullscreen";
|
|
3
|
+
import type { ViewerLinkPageWithAuto } from "./ViewerLinkProp";
|
|
4
|
+
import type { CoarseTimelineInfo as CoarseTimelineInfo } from "../timeline/CoarseTimelineInfoProp";
|
|
5
5
|
import { TwistyPropDerived } from "../TwistyProp";
|
|
6
6
|
|
|
7
7
|
export const buttonIcons = [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ControlsLocation } from "
|
|
1
|
+
import type { ControlsLocation } from "../../../old/dom/TwistyPlayerConfig";
|
|
2
2
|
import { SimpleTwistyPropSource } from "../TwistyProp";
|
|
3
3
|
|
|
4
4
|
export type ControlPanelThemeWithAuto = ControlsLocation | "auto";
|
|
File without changes
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defaultCameraOrbitCoordinates,
|
|
3
3
|
PuzzleID,
|
|
4
|
-
} from "
|
|
4
|
+
} from "../../../old/dom/TwistyPlayerConfig";
|
|
5
5
|
import {
|
|
6
6
|
CoordinateDegrees,
|
|
7
7
|
orbitCoordinatesEqual,
|
|
8
8
|
OrbitCoordinatesRequest,
|
|
9
9
|
OrbitCoordinatesV2,
|
|
10
|
-
} from "
|
|
10
|
+
} from "./OrbitCoordinatesRequestProp";
|
|
11
11
|
import { TwistyPropDerived } from "../TwistyProp";
|
|
12
|
-
import type { VisualizationStrategy } from "
|
|
12
|
+
import type { VisualizationStrategy } from "./VisualizationStrategyProp";
|
|
13
13
|
|
|
14
14
|
interface OrbitCoordinatesPropInputs {
|
|
15
15
|
orbitCoordinatesRequest: OrbitCoordinatesRequest;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TimeRange } from "
|
|
2
|
-
import type { AlgIndexer } from "
|
|
1
|
+
import type { TimeRange } from "../../../old/animation/cursor/AlgCursor";
|
|
2
|
+
import type { AlgIndexer } from "../../../old/animation/indexer/AlgIndexer";
|
|
3
3
|
import { TwistyPropDerived } from "../TwistyProp";
|
|
4
4
|
|
|
5
5
|
export class TimeRangeProp extends TwistyPropDerived<
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ViewerLinkPage } from "
|
|
1
|
+
import type { ViewerLinkPage } from "../../../old/dom/TwistyPlayerConfig";
|
|
2
2
|
import { SimpleTwistyPropSource } from "../TwistyProp";
|
|
3
3
|
|
|
4
4
|
export type ViewerLinkPageWithAuto = ViewerLinkPage | "auto";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { VisualizationFormat } from "
|
|
1
|
+
import type { VisualizationFormat } from "../../../old/dom/TwistyPlayerConfig";
|
|
2
2
|
import { SimpleTwistyPropSource } from "../TwistyProp";
|
|
3
3
|
|
|
4
4
|
export type VisualizationFormatWithAuto = VisualizationFormat | "auto";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PuzzleID } from "
|
|
2
|
-
import type { VisualizationFormatWithAuto } from "
|
|
1
|
+
import type { PuzzleID } from "../../../old/dom/TwistyPlayerConfig";
|
|
2
|
+
import type { VisualizationFormatWithAuto } from "./VisualizationProp";
|
|
3
3
|
import { TwistyPropDerived } from "../TwistyProp";
|
|
4
4
|
|
|
5
5
|
type VisualizationStrategyPropInputs = {
|
|
@@ -41,6 +41,7 @@ export function currentMoveArrayEquals(
|
|
|
41
41
|
|
|
42
42
|
export interface CurrentMoveInfo {
|
|
43
43
|
stateIndex: number;
|
|
44
|
+
// Note: some moves may not be part of the alg!
|
|
44
45
|
currentMoves: CurrentMove[];
|
|
45
46
|
// Moves that are reaching a fraction of 1 at this exact timestamp.
|
|
46
47
|
movesFinishing: CurrentMove[];
|
|
@@ -47,4 +47,24 @@ twisty-scrubber {
|
|
|
47
47
|
width: 100%;
|
|
48
48
|
height: 100%;
|
|
49
49
|
}
|
|
50
|
+
|
|
51
|
+
.error-elem {
|
|
52
|
+
width: 100%;
|
|
53
|
+
height: 100%;
|
|
54
|
+
display: none;
|
|
55
|
+
place-content: center;
|
|
56
|
+
font-family: sans-serif;
|
|
57
|
+
box-shadow: inset 0 0 2em rgb(255, 0, 0);
|
|
58
|
+
color: red;
|
|
59
|
+
text-shadow: 0 0 0.2em white;
|
|
60
|
+
background: rgba(255, 255, 255, 0.25);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.wrapper.error .visualization-wrapper {
|
|
64
|
+
display: none;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.wrapper.error .error-elem {
|
|
68
|
+
display: grid;
|
|
69
|
+
}
|
|
50
70
|
`);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Vector3 } from "three";
|
|
2
2
|
import type { Alg } from "../../../alg";
|
|
3
|
-
import type { VisualizationStrategy } from "../../model/
|
|
3
|
+
import type { VisualizationStrategy } from "../../model/props/viewer/VisualizationStrategyProp";
|
|
4
4
|
import { DEGREES_PER_RADIAN } from "../../views/3D/TAU";
|
|
5
5
|
import {
|
|
6
6
|
AlgAttribute,
|
|
@@ -151,6 +151,7 @@ export const experimentalStickerings = {
|
|
|
151
151
|
"experimental-fto-sc": true,
|
|
152
152
|
"experimental-fto-l2c": true,
|
|
153
153
|
"experimental-fto-lbt": true,
|
|
154
|
+
"experimental-fto-l3t": true,
|
|
154
155
|
"experimental-global-custom-1": true,
|
|
155
156
|
"experimental-global-custom-2": true,
|
|
156
157
|
};
|
|
@@ -7,7 +7,7 @@ import { twisty3DCanvasCSS } from "./Twisty3DCanvas.css";
|
|
|
7
7
|
import { OrbitCoordinates, TwistyOrbitControls } from "./TwistyOrbitControls";
|
|
8
8
|
import type { TwistyViewerElement } from "./TwistyViewerElement";
|
|
9
9
|
import { customElementsShim } from "../element/node-custom-element-shims";
|
|
10
|
-
import { Stats } from "../../../../vendor/three/examples/jsm/libs/stats.module";
|
|
10
|
+
import { Stats } from "../../../../vendor/three/examples/jsm/libs/stats.modified.module";
|
|
11
11
|
import type { CameraLatitudeLimits } from "../TwistyPlayerConfig";
|
|
12
12
|
|
|
13
13
|
let SHOW_STATS = false;
|
|
@@ -15,14 +15,7 @@ let SHOW_STATS = false;
|
|
|
15
15
|
export function experimentalShowRenderStats(show: boolean): void {
|
|
16
16
|
SHOW_STATS = show;
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
// WARNING: The current shared renderer implementation is not every efficient.
|
|
21
|
-
// Avoid using for players that are likely to have dimensions approaching 1 megapixel or higher.
|
|
22
|
-
// TODO: use a dedicated renderer while fullscreen?
|
|
23
|
-
export function experimentalSetShareAllNewRenderers(share: boolean): void {
|
|
24
|
-
shareAllNewRenderers = share;
|
|
25
|
-
}
|
|
18
|
+
const shareAllNewRenderers: boolean = false;
|
|
26
19
|
|
|
27
20
|
let sharedRenderer: WebGLRenderer | null = null;
|
|
28
21
|
|
|
@@ -72,7 +65,7 @@ export class Twisty3DCanvas
|
|
|
72
65
|
this.scene = scene!;
|
|
73
66
|
this.scene?.addRenderTarget(this); // TODO
|
|
74
67
|
if (SHOW_STATS) {
|
|
75
|
-
this.stats = Stats();
|
|
68
|
+
this.stats = new Stats();
|
|
76
69
|
this.stats.dom.style.position = "absolute";
|
|
77
70
|
this.addElement(this.stats.dom);
|
|
78
71
|
}
|
|
Binary file
|
|
@@ -15,7 +15,7 @@ import { RenderScheduler } from "../../old/animation/RenderScheduler";
|
|
|
15
15
|
import { ManagedCustomElement } from "../../old/dom/element/ManagedCustomElement";
|
|
16
16
|
import { customElementsShim } from "../../old/dom/element/node-custom-element-shims";
|
|
17
17
|
import type { TwistyPlayerModel } from "../../model/TwistyPlayerModel";
|
|
18
|
-
import { FreshListenerManager } from "../../model/TwistyProp";
|
|
18
|
+
import { FreshListenerManager } from "../../model/props/TwistyProp";
|
|
19
19
|
import type {
|
|
20
20
|
ExperimentalStickering,
|
|
21
21
|
PuzzleID,
|
|
@@ -101,7 +101,7 @@ export class Twisty2DPuzzle
|
|
|
101
101
|
}
|
|
102
102
|
} catch (e) {
|
|
103
103
|
console.warn(
|
|
104
|
-
"Bad position. Pre-emptively disconnecting:",
|
|
104
|
+
"Bad position (this doesn't necessarily mean something is wrong). Pre-emptively disconnecting:",
|
|
105
105
|
this.puzzleLoader?.id,
|
|
106
106
|
e,
|
|
107
107
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { PuzzleLoader } from "../../../puzzles";
|
|
2
2
|
import type { ExperimentalStickering } from "../../../twisty";
|
|
3
3
|
import type { TwistyPlayerModel } from "../../model/TwistyPlayerModel";
|
|
4
|
-
import { FreshListenerManager } from "../../model/TwistyProp";
|
|
4
|
+
import { FreshListenerManager } from "../../model/props/TwistyProp";
|
|
5
5
|
import type { Schedulable } from "../../old/animation/RenderScheduler";
|
|
6
6
|
import { Twisty2DPuzzle } from "./Twisty2DPuzzle";
|
|
7
7
|
|
|
@@ -2,7 +2,7 @@ import type { Scene as ThreeScene } from "three";
|
|
|
2
2
|
import type { PuzzleLoader } from "../../../puzzles";
|
|
3
3
|
import { THREEJS } from "../../heavy-code-imports/3d";
|
|
4
4
|
import type { TwistyPlayerModel } from "../../model/TwistyPlayerModel";
|
|
5
|
-
import { FreshListenerManager } from "../../model/TwistyProp";
|
|
5
|
+
import { FreshListenerManager } from "../../model/props/TwistyProp";
|
|
6
6
|
import type { Schedulable } from "../../old/animation/RenderScheduler";
|
|
7
7
|
import { ManagedCustomElement } from "../../old/dom/element/ManagedCustomElement";
|
|
8
8
|
import { customElementsShim } from "../../old/dom/element/node-custom-element-shims";
|
|
Binary file
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// TODO: https://stackoverflow.com/a/40443642
|
|
2
|
+
|
|
3
|
+
// let shareAllNewRenderers: boolean = false;
|
|
4
|
+
|
|
5
|
+
// // WARNING: The current shared renderer implementation is not every efficient.
|
|
6
|
+
// // Avoid using for players that are likely to have dimensions approaching 1 megapixel or higher.
|
|
7
|
+
// // TODO: use a dedicated renderer while fullscreen?
|
|
8
|
+
// export function experimentalSetShareAllNewRenderers(share: boolean): void {
|
|
9
|
+
// shareAllNewRenderers = share;
|
|
10
|
+
// }
|
|
11
|
+
|
|
12
|
+
// const sharedRenderer: WebGLRenderer | null = null;
|
|
13
|
+
|
|
14
|
+
import { THREEJS } from "../../heavy-code-imports/3d";
|
|
15
|
+
import type { Camera, Scene, WebGLRenderer } from "three";
|
|
16
|
+
import { pixelRatio } from "../../old/dom/viewers/canvas";
|
|
17
|
+
|
|
18
|
+
const renderers: Promise<WebGLRenderer>[] = [];
|
|
19
|
+
|
|
20
|
+
// let haveSet = false;
|
|
21
|
+
export async function renderPooled(
|
|
22
|
+
width: number,
|
|
23
|
+
height: number,
|
|
24
|
+
canvas: HTMLCanvasElement,
|
|
25
|
+
scene: Scene,
|
|
26
|
+
camera: Camera,
|
|
27
|
+
): Promise<void> {
|
|
28
|
+
if (width === 0 || height === 0) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
// At most one in the pool for now.
|
|
32
|
+
if (renderers.length === 0) {
|
|
33
|
+
renderers.push(newRenderer());
|
|
34
|
+
}
|
|
35
|
+
const renderer = await renderers[0];
|
|
36
|
+
// TODO: scissoring
|
|
37
|
+
renderer.setSize(width, height); // TODO: is it faster if we cache values and only call this when necessary?
|
|
38
|
+
renderer.render(scene, camera);
|
|
39
|
+
|
|
40
|
+
const context = canvas.getContext("2d")!;
|
|
41
|
+
context.clearRect(0, 0, canvas.width, canvas.height);
|
|
42
|
+
context.drawImage(renderer.domElement, 0, 0);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export async function newRenderer(): Promise<WebGLRenderer> {
|
|
46
|
+
const rendererConstructor = (await THREEJS).WebGLRenderer;
|
|
47
|
+
const renderer = new rendererConstructor({
|
|
48
|
+
antialias: true,
|
|
49
|
+
alpha: true,
|
|
50
|
+
});
|
|
51
|
+
renderer.setPixelRatio(pixelRatio());
|
|
52
|
+
return renderer;
|
|
53
|
+
}
|
|
@@ -3,10 +3,10 @@ import { experimentalCubeAppearance, PuzzleLoader } from "../../../puzzles";
|
|
|
3
3
|
import type { ExperimentalStickering } from "../../../twisty";
|
|
4
4
|
import { proxy3D } from "../../heavy-code-imports/3d";
|
|
5
5
|
import type { Cube3D, PG3D } from "../../heavy-code-imports/dynamic-entries/3d";
|
|
6
|
-
import type { HintFaceletStyleWithAuto } from "../../model/
|
|
7
|
-
import type { VisualizationStrategy } from "../../model/
|
|
6
|
+
import type { HintFaceletStyleWithAuto } from "../../model/props/puzzle/display/HintFaceletProp";
|
|
7
|
+
import type { VisualizationStrategy } from "../../model/props/viewer/VisualizationStrategyProp";
|
|
8
8
|
import type { TwistyPlayerModel } from "../../model/TwistyPlayerModel";
|
|
9
|
-
import { FreshListenerManager } from "../../model/TwistyProp";
|
|
9
|
+
import { FreshListenerManager } from "../../model/props/TwistyProp";
|
|
10
10
|
import type { PuzzlePosition } from "../../old/animation/cursor/CursorTypes";
|
|
11
11
|
import type { Schedulable } from "../../old/animation/RenderScheduler";
|
|
12
12
|
import type { Twisty3DPuzzle } from "./puzzles/Twisty3DPuzzle";
|
|
@@ -38,11 +38,12 @@ export class Twisty3DPuzzleWrapper implements Schedulable {
|
|
|
38
38
|
(await this.twisty3DPuzzle()).onPositionChange(position);
|
|
39
39
|
this.scheduleRender();
|
|
40
40
|
} catch (e) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
// TODO
|
|
42
|
+
// console.warn(
|
|
43
|
+
// "Bad position (this doesn't necessarily mean something is wrong). Pre-emptively disconnecting:",
|
|
44
|
+
// this.puzzleLoader.id,
|
|
45
|
+
// e,
|
|
46
|
+
// );
|
|
46
47
|
this.disconnect();
|
|
47
48
|
}
|
|
48
49
|
},
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Scene as ThreeScene } from "three";
|
|
2
2
|
import type { PuzzleLoader } from "../../../puzzles";
|
|
3
3
|
import { THREEJS } from "../../heavy-code-imports/3d";
|
|
4
|
-
import type { BackViewLayoutWithAuto } from "../../model/
|
|
5
|
-
import type { VisualizationStrategy } from "../../model/
|
|
4
|
+
import type { BackViewLayoutWithAuto } from "../../model/props/viewer/BackViewProp";
|
|
5
|
+
import type { VisualizationStrategy } from "../../model/props/viewer/VisualizationStrategyProp";
|
|
6
6
|
import { StaleDropper } from "../../model/PromiseFreshener";
|
|
7
7
|
import type { TwistyPlayerModel } from "../../model/TwistyPlayerModel";
|
|
8
|
-
import { FreshListenerManager } from "../../model/TwistyProp";
|
|
8
|
+
import { FreshListenerManager } from "../../model/props/TwistyProp";
|
|
9
9
|
import type { Schedulable } from "../../old/animation/RenderScheduler";
|
|
10
10
|
import { ClassListManager } from "../../old/dom/element/ClassListManager";
|
|
11
11
|
import { ManagedCustomElement } from "../../old/dom/element/ManagedCustomElement";
|
|
@@ -97,6 +97,10 @@ export class Twisty3DSceneWrapper
|
|
|
97
97
|
this.#currentTwisty3DPuzzleWrapper?.disconnect();
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
experimentalVantages(): Iterable<Twisty3DVantage> {
|
|
101
|
+
return this.#vantages.values();
|
|
102
|
+
}
|
|
103
|
+
|
|
100
104
|
scheduleRender(): void {
|
|
101
105
|
for (const vantage of this.#vantages) {
|
|
102
106
|
vantage.scheduleRender();
|