@gamepark/react-game 7.0.0-beta.0 → 7.0.0-beta.3
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/dist/components/Avatar/Avatar.js +37 -60
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/ChatSpeechBubble.js +25 -67
- package/dist/components/Avatar/ChatSpeechBubble.js.map +1 -1
- package/dist/components/Avatar/SpeechBubble.js +86 -49
- package/dist/components/Avatar/SpeechBubble.js.map +1 -1
- package/dist/components/Avatar/index.js +3 -19
- package/dist/components/Avatar/index.js.map +1 -1
- package/dist/components/GamePoints/GamePointIcon.js +7 -24
- package/dist/components/GamePoints/GamePointIcon.js.map +1 -1
- package/dist/components/GamePoints/GamePoints.js +20 -63
- package/dist/components/GamePoints/GamePoints.js.map +1 -1
- package/dist/components/GamePoints/index.js +2 -18
- package/dist/components/GamePoints/index.js.map +1 -1
- package/dist/components/GameProvider/GameContext.js +7 -14
- package/dist/components/GameProvider/GameContext.js.map +1 -1
- package/dist/components/GameProvider/GameProvider.js +91 -136
- package/dist/components/GameProvider/GameProvider.js.map +1 -1
- package/dist/components/GameProvider/index.js +2 -18
- package/dist/components/GameProvider/index.js.map +1 -1
- package/dist/components/Header/Header.js +34 -43
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/HeaderText.js +15 -31
- package/dist/components/Header/HeaderText.js.map +1 -1
- package/dist/components/Header/MaterialHeader.js +42 -90
- package/dist/components/Header/MaterialHeader.js.map +1 -1
- package/dist/components/Header/index.js +3 -19
- package/dist/components/Header/index.js.map +1 -1
- package/dist/components/ImagesLoader/ImagesLoader.js +9 -14
- package/dist/components/ImagesLoader/ImagesLoader.js.map +1 -1
- package/dist/components/ImagesLoader/index.js +1 -17
- package/dist/components/ImagesLoader/index.js.map +1 -1
- package/dist/components/JournalTabs/Chat/Chat.js +7 -33
- package/dist/components/JournalTabs/Chat/Chat.js.map +1 -1
- package/dist/components/JournalTabs/Chat/ChatMessage.js +12 -17
- package/dist/components/JournalTabs/Chat/ChatMessage.js.map +1 -1
- package/dist/components/JournalTabs/Chat/ChatMessageAuthor.js +19 -35
- package/dist/components/JournalTabs/Chat/ChatMessageAuthor.js.map +1 -1
- package/dist/components/JournalTabs/Chat/ChatTextInput.js +58 -60
- package/dist/components/JournalTabs/Chat/ChatTextInput.js.map +1 -1
- package/dist/components/JournalTabs/Chat/CommonChat.d.ts +1 -1
- package/dist/components/JournalTabs/Chat/CommonChat.js +43 -48
- package/dist/components/JournalTabs/Chat/CommonChat.js.map +1 -1
- package/dist/components/JournalTabs/Chat/LocalChat.js +10 -61
- package/dist/components/JournalTabs/Chat/LocalChat.js.map +1 -1
- package/dist/components/JournalTabs/Chat/RemoteChat.js +15 -43
- package/dist/components/JournalTabs/Chat/RemoteChat.js.map +1 -1
- package/dist/components/JournalTabs/Chat/SignInToChat.js +36 -22
- package/dist/components/JournalTabs/Chat/SignInToChat.js.map +1 -1
- package/dist/components/JournalTabs/Chat/index.js +5 -21
- package/dist/components/JournalTabs/Chat/index.js.map +1 -1
- package/dist/components/JournalTabs/History/GameOverHistory.js +14 -20
- package/dist/components/JournalTabs/History/GameOverHistory.js.map +1 -1
- package/dist/components/JournalTabs/History/History.d.ts +1 -1
- package/dist/components/JournalTabs/History/History.js +59 -54
- package/dist/components/JournalTabs/History/History.js.map +1 -1
- package/dist/components/JournalTabs/History/HistoryEntry.js +37 -43
- package/dist/components/JournalTabs/History/HistoryEntry.js.map +1 -1
- package/dist/components/JournalTabs/History/StartGameHistory.js +12 -17
- package/dist/components/JournalTabs/History/StartGameHistory.js.map +1 -1
- package/dist/components/JournalTabs/History/index.js +2 -18
- package/dist/components/JournalTabs/History/index.js.map +1 -1
- package/dist/components/JournalTabs/JournalTabs.js +122 -68
- package/dist/components/JournalTabs/JournalTabs.js.map +1 -1
- package/dist/components/JournalTabs/index.js +1 -17
- package/dist/components/JournalTabs/index.js.map +1 -1
- package/dist/components/Letterbox/Letterbox.js +29 -41
- package/dist/components/Letterbox/Letterbox.js.map +1 -1
- package/dist/components/Letterbox/index.js +1 -17
- package/dist/components/Letterbox/index.js.map +1 -1
- package/dist/components/LoadingScreen/LoadingScreen.js +83 -89
- package/dist/components/LoadingScreen/LoadingScreen.js.map +1 -1
- package/dist/components/LoadingScreen/index.js +1 -17
- package/dist/components/LoadingScreen/index.js.map +1 -1
- package/dist/components/Log/InternalLiveLogContainer.js +73 -83
- package/dist/components/Log/InternalLiveLogContainer.js.map +1 -1
- package/dist/components/Log/LiveLogButton.js +14 -19
- package/dist/components/Log/LiveLogButton.js.map +1 -1
- package/dist/components/Log/LiveLogContainer.js +6 -21
- package/dist/components/Log/LiveLogContainer.js.map +1 -1
- package/dist/components/Log/LogDescription.js +1 -2
- package/dist/components/Log/LogItem.js +42 -42
- package/dist/components/Log/LogItem.js.map +1 -1
- package/dist/components/Log/index.js +3 -19
- package/dist/components/Log/index.js.map +1 -1
- package/dist/components/Picture/Picture.js +6 -32
- package/dist/components/Picture/Picture.js.map +1 -1
- package/dist/components/Picture/index.js +1 -17
- package/dist/components/Picture/index.js.map +1 -1
- package/dist/components/PlayerPanel/Counters.d.ts +2 -1
- package/dist/components/PlayerPanel/Counters.js +82 -39
- package/dist/components/PlayerPanel/Counters.js.map +1 -1
- package/dist/components/PlayerPanel/PlayerPanel.js +83 -53
- package/dist/components/PlayerPanel/PlayerPanel.js.map +1 -1
- package/dist/components/PlayerPanel/StyledPlayerPanel.js +145 -80
- package/dist/components/PlayerPanel/StyledPlayerPanel.js.map +1 -1
- package/dist/components/PlayerPanel/index.js +3 -19
- package/dist/components/PlayerPanel/index.js.map +1 -1
- package/dist/components/PlayerTimer/PlayerTimer.d.ts +1 -1
- package/dist/components/PlayerTimer/PlayerTimer.js +32 -61
- package/dist/components/PlayerTimer/PlayerTimer.js.map +1 -1
- package/dist/components/PlayerTimer/index.js +1 -17
- package/dist/components/PlayerTimer/index.js.map +1 -1
- package/dist/components/Scoring/ScoringDescription.js +1 -2
- package/dist/components/Scoring/index.js +1 -17
- package/dist/components/Scoring/index.js.map +1 -1
- package/dist/components/buttons/PlayMoveButton/PlayMoveButton.js +82 -105
- package/dist/components/buttons/PlayMoveButton/PlayMoveButton.js.map +1 -1
- package/dist/components/buttons/PlayMoveButton/index.js +1 -17
- package/dist/components/buttons/PlayMoveButton/index.js.map +1 -1
- package/dist/components/buttons/ThemeButton/ThemeButton.js +5 -20
- package/dist/components/buttons/ThemeButton/ThemeButton.js.map +1 -1
- package/dist/components/buttons/ThemeButton/index.js +1 -17
- package/dist/components/buttons/ThemeButton/index.js.map +1 -1
- package/dist/components/buttons/UndoMovesButton/UndoMovesButton.js +17 -59
- package/dist/components/buttons/UndoMovesButton/UndoMovesButton.js.map +1 -1
- package/dist/components/buttons/UndoMovesButton/index.js +1 -17
- package/dist/components/buttons/UndoMovesButton/index.js.map +1 -1
- package/dist/components/buttons/index.js +3 -19
- package/dist/components/buttons/index.js.map +1 -1
- package/dist/components/dialogs/Dialog.js +57 -67
- package/dist/components/dialogs/Dialog.js.map +1 -1
- package/dist/components/dialogs/FailuresDialog.js +39 -73
- package/dist/components/dialogs/FailuresDialog.js.map +1 -1
- package/dist/components/dialogs/ResultDialog/RematchDisplay.js +55 -52
- package/dist/components/dialogs/ResultDialog/RematchDisplay.js.map +1 -1
- package/dist/components/dialogs/ResultDialog/RematchSection.js +17 -27
- package/dist/components/dialogs/ResultDialog/RematchSection.js.map +1 -1
- package/dist/components/dialogs/ResultDialog/ResultDialog.js +130 -99
- package/dist/components/dialogs/ResultDialog/ResultDialog.js.map +1 -1
- package/dist/components/dialogs/ResultDialog/index.js +2 -18
- package/dist/components/dialogs/ResultDialog/index.js.map +1 -1
- package/dist/components/dialogs/ResultDialog/useScoringTable.js +20 -27
- package/dist/components/dialogs/ResultDialog/useScoringTable.js.map +1 -1
- package/dist/components/dialogs/RulesDialog/LocationRulesDialogContent.js +32 -31
- package/dist/components/dialogs/RulesDialog/LocationRulesDialogContent.js.map +1 -1
- package/dist/components/dialogs/RulesDialog/MaterialRulesDialog.js +22 -36
- package/dist/components/dialogs/RulesDialog/MaterialRulesDialog.js.map +1 -1
- package/dist/components/dialogs/RulesDialog/MaterialRulesDialogContent.js +121 -117
- package/dist/components/dialogs/RulesDialog/MaterialRulesDialogContent.js.map +1 -1
- package/dist/components/dialogs/RulesDialog/RulesDialog.js +23 -42
- package/dist/components/dialogs/RulesDialog/RulesDialog.js.map +1 -1
- package/dist/components/dialogs/RulesDialog/RulesHelpDialogContent.d.ts +1 -1
- package/dist/components/dialogs/RulesDialog/RulesHelpDialogContent.js +36 -27
- package/dist/components/dialogs/RulesDialog/RulesHelpDialogContent.js.map +1 -1
- package/dist/components/dialogs/RulesDialog/index.js +2 -18
- package/dist/components/dialogs/RulesDialog/index.js.map +1 -1
- package/dist/components/dialogs/index.js +4 -20
- package/dist/components/dialogs/index.js.map +1 -1
- package/dist/components/index.js +17 -33
- package/dist/components/index.js.map +1 -1
- package/dist/components/material/ComponentDescription.js +32 -18
- package/dist/components/material/ComponentDescription.js.map +1 -1
- package/dist/components/material/Dices/CubicDiceDescription.js +58 -102
- package/dist/components/material/Dices/CubicDiceDescription.js.map +1 -1
- package/dist/components/material/Dices/index.js +1 -17
- package/dist/components/material/Dices/index.js.map +1 -1
- package/dist/components/material/DraggableMaterial.js +121 -198
- package/dist/components/material/DraggableMaterial.js.map +1 -1
- package/dist/components/material/FlatMaterial/BoardDescription.js +3 -27
- package/dist/components/material/FlatMaterial/BoardDescription.js.map +1 -1
- package/dist/components/material/FlatMaterial/CardDescription.js +6 -56
- package/dist/components/material/FlatMaterial/CardDescription.js.map +1 -1
- package/dist/components/material/FlatMaterial/FlatMaterial.js +88 -133
- package/dist/components/material/FlatMaterial/FlatMaterial.js.map +1 -1
- package/dist/components/material/FlatMaterial/MoneyDescription.js +10 -34
- package/dist/components/material/FlatMaterial/MoneyDescription.js.map +1 -1
- package/dist/components/material/FlatMaterial/PolyhexDescription.js +12 -63
- package/dist/components/material/FlatMaterial/PolyhexDescription.js.map +1 -1
- package/dist/components/material/FlatMaterial/TokenDescription.js +10 -66
- package/dist/components/material/FlatMaterial/TokenDescription.js.map +1 -1
- package/dist/components/material/FlatMaterial/index.js +6 -22
- package/dist/components/material/FlatMaterial/index.js.map +1 -1
- package/dist/components/material/GameTable/DropPreview.js +31 -66
- package/dist/components/material/GameTable/DropPreview.js.map +1 -1
- package/dist/components/material/GameTable/DynamicItemsDisplay.js +22 -81
- package/dist/components/material/GameTable/DynamicItemsDisplay.js.map +1 -1
- package/dist/components/material/GameTable/GameMaterialDisplay.js +25 -30
- package/dist/components/material/GameTable/GameMaterialDisplay.js.map +1 -1
- package/dist/components/material/GameTable/GameTable.js +78 -125
- package/dist/components/material/GameTable/GameTable.js.map +1 -1
- package/dist/components/material/GameTable/GameTableNavigation.js +58 -67
- package/dist/components/material/GameTable/GameTableNavigation.js.map +1 -1
- package/dist/components/material/GameTable/ItemDisplay.js +88 -153
- package/dist/components/material/GameTable/ItemDisplay.js.map +1 -1
- package/dist/components/material/GameTable/StaticItemsDisplay.js +23 -83
- package/dist/components/material/GameTable/StaticItemsDisplay.js.map +1 -1
- package/dist/components/material/GameTable/StaticLocationsDisplay.js +11 -28
- package/dist/components/material/GameTable/StaticLocationsDisplay.js.map +1 -1
- package/dist/components/material/GameTable/focus/FocusProvider.js +28 -53
- package/dist/components/material/GameTable/focus/FocusProvider.js.map +1 -1
- package/dist/components/material/GameTable/focus/MaterialFocus.js +1 -2
- package/dist/components/material/GameTable/focus/index.js +2 -18
- package/dist/components/material/GameTable/focus/index.js.map +1 -1
- package/dist/components/material/GameTable/index.js +3 -19
- package/dist/components/material/GameTable/index.js.map +1 -1
- package/dist/components/material/ImageLoader/MaterialImageLoader.js +17 -89
- package/dist/components/material/ImageLoader/MaterialImageLoader.js.map +1 -1
- package/dist/components/material/ImageLoader/index.js +1 -17
- package/dist/components/material/ImageLoader/index.js.map +1 -1
- package/dist/components/material/ItemMenuButton.js +41 -69
- package/dist/components/material/ItemMenuButton.js.map +1 -1
- package/dist/components/material/ItemMenuWrapper.js +16 -66
- package/dist/components/material/ItemMenuWrapper.js.map +1 -1
- package/dist/components/material/MaterialComponent.d.ts +2 -2
- package/dist/components/material/MaterialComponent.js +22 -44
- package/dist/components/material/MaterialComponent.js.map +1 -1
- package/dist/components/material/MaterialComponentType.js +2 -5
- package/dist/components/material/MaterialComponentType.js.map +1 -1
- package/dist/components/material/MaterialDescription.d.ts +2 -2
- package/dist/components/material/MaterialDescription.js +125 -164
- package/dist/components/material/MaterialDescription.js.map +1 -1
- package/dist/components/material/MobileMaterialDescription.js +21 -83
- package/dist/components/material/MobileMaterialDescription.js.map +1 -1
- package/dist/components/material/Wheel/WheelContent.js +26 -29
- package/dist/components/material/Wheel/WheelContent.js.map +1 -1
- package/dist/components/material/Wheel/WheelDescription.js +46 -105
- package/dist/components/material/Wheel/WheelDescription.js.map +1 -1
- package/dist/components/material/Wheel/WheelItem.js +43 -42
- package/dist/components/material/Wheel/WheelItem.js.map +1 -1
- package/dist/components/material/Wheel/index.js +1 -17
- package/dist/components/material/Wheel/index.js.map +1 -1
- package/dist/components/material/Writing/WritingDescription.js +44 -91
- package/dist/components/material/Writing/WritingDescription.js.map +1 -1
- package/dist/components/material/Writing/index.js +1 -17
- package/dist/components/material/Writing/index.js.map +1 -1
- package/dist/components/material/animations/CreateItemAnimations.d.ts +6 -1
- package/dist/components/material/animations/CreateItemAnimations.js +43 -67
- package/dist/components/material/animations/CreateItemAnimations.js.map +1 -1
- package/dist/components/material/animations/DeleteItemAnimations.d.ts +6 -1
- package/dist/components/material/animations/DeleteItemAnimations.js +44 -63
- package/dist/components/material/animations/DeleteItemAnimations.js.map +1 -1
- package/dist/components/material/animations/DeleteItemAtOnceAnimations.js +30 -53
- package/dist/components/material/animations/DeleteItemAtOnceAnimations.js.map +1 -1
- package/dist/components/material/animations/ItemAnimations.d.ts +6 -1
- package/dist/components/material/animations/ItemAnimations.js +21 -55
- package/dist/components/material/animations/ItemAnimations.js.map +1 -1
- package/dist/components/material/animations/MaterialAnimations.js +30 -56
- package/dist/components/material/animations/MaterialAnimations.js.map +1 -1
- package/dist/components/material/animations/MaterialGameAnimations.js +53 -131
- package/dist/components/material/animations/MaterialGameAnimations.js.map +1 -1
- package/dist/components/material/animations/MoveItemAnimations.js +62 -100
- package/dist/components/material/animations/MoveItemAnimations.js.map +1 -1
- package/dist/components/material/animations/MoveItemAtOnceAnimations.js +31 -66
- package/dist/components/material/animations/MoveItemAtOnceAnimations.js.map +1 -1
- package/dist/components/material/animations/RollItemAnimations.js +28 -76
- package/dist/components/material/animations/RollItemAnimations.js.map +1 -1
- package/dist/components/material/animations/ShuffleAnimations.js +9 -31
- package/dist/components/material/animations/ShuffleAnimations.js.map +1 -1
- package/dist/components/material/animations/getFirstStockItemTransforms.util.js +9 -24
- package/dist/components/material/animations/getFirstStockItemTransforms.util.js.map +1 -1
- package/dist/components/material/animations/index.js +8 -26
- package/dist/components/material/animations/index.js.map +1 -1
- package/dist/components/material/animations/rotations.utils.js +50 -83
- package/dist/components/material/animations/rotations.utils.js.map +1 -1
- package/dist/components/material/animations/transformItem.util.js +6 -35
- package/dist/components/material/animations/transformItem.util.js.map +1 -1
- package/dist/components/material/index.js +15 -31
- package/dist/components/material/index.js.map +1 -1
- package/dist/components/material/locations/DropAreaDescription.js +20 -80
- package/dist/components/material/locations/DropAreaDescription.js.map +1 -1
- package/dist/components/material/locations/HexGridDropAreaDescription.js +34 -101
- package/dist/components/material/locations/HexGridDropAreaDescription.js.map +1 -1
- package/dist/components/material/locations/LocationComponent.js +53 -88
- package/dist/components/material/locations/LocationComponent.js.map +1 -1
- package/dist/components/material/locations/LocationDescription.js +58 -113
- package/dist/components/material/locations/LocationDescription.js.map +1 -1
- package/dist/components/material/locations/LocationDisplay.js +25 -79
- package/dist/components/material/locations/LocationDisplay.js.map +1 -1
- package/dist/components/material/locations/LocationsMask.js +16 -23
- package/dist/components/material/locations/LocationsMask.js.map +1 -1
- package/dist/components/material/locations/SimpleDropArea.js +42 -90
- package/dist/components/material/locations/SimpleDropArea.js.map +1 -1
- package/dist/components/material/locations/index.js +5 -21
- package/dist/components/material/locations/index.js.map +1 -1
- package/dist/components/material/sound/AudioLoader.js +43 -92
- package/dist/components/material/sound/AudioLoader.js.map +1 -1
- package/dist/components/material/sound/MaterialGameSounds.js +42 -76
- package/dist/components/material/sound/MaterialGameSounds.js.map +1 -1
- package/dist/components/material/sound/MaterialSoundConfig.js +11 -8
- package/dist/components/material/sound/MaterialSoundConfig.js.map +1 -1
- package/dist/components/material/sound/MaterialSoundLoader.js +16 -69
- package/dist/components/material/sound/MaterialSoundLoader.js.map +1 -1
- package/dist/components/material/sound/index.js +2 -18
- package/dist/components/material/sound/index.js.map +1 -1
- package/dist/components/material/sound/sound.utils.js +1 -5
- package/dist/components/material/sound/sound.utils.js.map +1 -1
- package/dist/components/material/utils/IsLocationSubset.js +4 -8
- package/dist/components/material/utils/IsLocationSubset.js.map +1 -1
- package/dist/components/material/utils/getBestDropMove.d.ts +1 -1
- package/dist/components/material/utils/getBestDropMove.js +12 -26
- package/dist/components/material/utils/getBestDropMove.js.map +1 -1
- package/dist/components/material/utils/index.js +1 -17
- package/dist/components/material/utils/index.js.map +1 -1
- package/dist/components/material/utils/isDroppedItem.js +7 -24
- package/dist/components/material/utils/isDroppedItem.js.map +1 -1
- package/dist/components/material/utils/isPlacedOnItem.js +5 -9
- package/dist/components/material/utils/isPlacedOnItem.js.map +1 -1
- package/dist/components/material/utils/isRotationMove.js +5 -20
- package/dist/components/material/utils/isRotationMove.js.map +1 -1
- package/dist/components/material/utils/useIsAnimatingPlayerAction.js +4 -10
- package/dist/components/material/utils/useIsAnimatingPlayerAction.js.map +1 -1
- package/dist/components/menus/EjectPlayer/EjectPlayerButton.js +30 -32
- package/dist/components/menus/EjectPlayer/EjectPlayerButton.js.map +1 -1
- package/dist/components/menus/EjectPlayer/EjectPlayerDialog.js +47 -66
- package/dist/components/menus/EjectPlayer/EjectPlayerDialog.js.map +1 -1
- package/dist/components/menus/EjectPlayer/EjectPlayerPopButton.js +25 -50
- package/dist/components/menus/EjectPlayer/EjectPlayerPopButton.js.map +1 -1
- package/dist/components/menus/EjectPlayer/index.js +3 -19
- package/dist/components/menus/EjectPlayer/index.js.map +1 -1
- package/dist/components/menus/Fullscreen/FullscreenButton.js +11 -15
- package/dist/components/menus/Fullscreen/FullscreenButton.js.map +1 -1
- package/dist/components/menus/Fullscreen/FullscreenDialog.js +36 -60
- package/dist/components/menus/Fullscreen/FullscreenDialog.js.map +1 -1
- package/dist/components/menus/Fullscreen/FullscreenPopButton.js +28 -42
- package/dist/components/menus/Fullscreen/FullscreenPopButton.js.map +1 -1
- package/dist/components/menus/Fullscreen/index.js +3 -19
- package/dist/components/menus/Fullscreen/index.js.map +1 -1
- package/dist/components/menus/GiveUpButton/GiveUpButton.js +49 -60
- package/dist/components/menus/GiveUpButton/GiveUpButton.js.map +1 -1
- package/dist/components/menus/GiveUpButton/index.js +1 -17
- package/dist/components/menus/GiveUpButton/index.js.map +1 -1
- package/dist/components/menus/Menu/LogoIcon.js +2 -17
- package/dist/components/menus/Menu/LogoIcon.js.map +1 -1
- package/dist/components/menus/Menu/Menu.d.ts +2 -2
- package/dist/components/menus/Menu/Menu.js +117 -93
- package/dist/components/menus/Menu/Menu.js.map +1 -1
- package/dist/components/menus/Menu/MenuPopButton.js +21 -60
- package/dist/components/menus/Menu/MenuPopButton.js.map +1 -1
- package/dist/components/menus/Menu/NavButton.js +3 -32
- package/dist/components/menus/Menu/NavButton.js.map +1 -1
- package/dist/components/menus/Menu/index.js +1 -17
- package/dist/components/menus/Menu/index.js.map +1 -1
- package/dist/components/menus/PlayerQuit/TrackPlayersQuit.js +20 -42
- package/dist/components/menus/PlayerQuit/TrackPlayersQuit.js.map +1 -1
- package/dist/components/menus/PlayerQuit/index.js +1 -17
- package/dist/components/menus/PlayerQuit/index.js.map +1 -1
- package/dist/components/menus/RestartTutorialButton/RestartTutorialButton.js +12 -17
- package/dist/components/menus/RestartTutorialButton/RestartTutorialButton.js.map +1 -1
- package/dist/components/menus/RestartTutorialButton/index.js +1 -17
- package/dist/components/menus/RestartTutorialButton/index.js.map +1 -1
- package/dist/components/menus/Result/Medal.js +8 -35
- package/dist/components/menus/Result/Medal.js.map +1 -1
- package/dist/components/menus/Result/MedalBronze.js +2 -17
- package/dist/components/menus/Result/MedalBronze.js.map +1 -1
- package/dist/components/menus/Result/MedalGold.js +2 -17
- package/dist/components/menus/Result/MedalGold.js.map +1 -1
- package/dist/components/menus/Result/MedalSilver.js +2 -17
- package/dist/components/menus/Result/MedalSilver.js.map +1 -1
- package/dist/components/menus/Result/ResultButton.js +8 -23
- package/dist/components/menus/Result/ResultButton.js.map +1 -1
- package/dist/components/menus/Result/ResultPopButton.js +46 -35
- package/dist/components/menus/Result/ResultPopButton.js.map +1 -1
- package/dist/components/menus/Result/index.js +3 -19
- package/dist/components/menus/Result/index.js.map +1 -1
- package/dist/components/menus/SoundButton/SoundButton.js +11 -15
- package/dist/components/menus/SoundButton/SoundButton.js.map +1 -1
- package/dist/components/menus/SoundButton/index.js +1 -17
- package/dist/components/menus/SoundButton/index.js.map +1 -1
- package/dist/components/menus/TimeStatsButton/TimeStatsButton.js +68 -70
- package/dist/components/menus/TimeStatsButton/TimeStatsButton.js.map +1 -1
- package/dist/components/menus/TimeStatsButton/index.js +1 -17
- package/dist/components/menus/TimeStatsButton/index.js.map +1 -1
- package/dist/components/menus/UndoButton/UndoButton.js +11 -31
- package/dist/components/menus/UndoButton/UndoButton.js.map +1 -1
- package/dist/components/menus/UndoButton/UndoPopButton.js +24 -38
- package/dist/components/menus/UndoButton/UndoPopButton.js.map +1 -1
- package/dist/components/menus/UndoButton/index.js +2 -18
- package/dist/components/menus/UndoButton/index.js.map +1 -1
- package/dist/components/menus/index.js +6 -22
- package/dist/components/menus/index.js.map +1 -1
- package/dist/components/menus/menuCss.d.ts +9 -9
- package/dist/components/menus/menuCss.js +102 -19
- package/dist/components/menus/menuCss.js.map +1 -1
- package/dist/components/tutorial/MaterialTutorial.js +19 -27
- package/dist/components/tutorial/MaterialTutorial.js.map +1 -1
- package/dist/components/tutorial/MaterialTutorialDisplay.js +84 -95
- package/dist/components/tutorial/MaterialTutorialDisplay.js.map +1 -1
- package/dist/components/tutorial/TutorialRulesWrapper.js +54 -63
- package/dist/components/tutorial/TutorialRulesWrapper.js.map +1 -1
- package/dist/components/tutorial/index.js +1 -17
- package/dist/components/tutorial/index.js.map +1 -1
- package/dist/css/GameTheme.js +4 -7
- package/dist/css/GameTheme.js.map +1 -1
- package/dist/css/addStylesheetUrl.js +2 -6
- package/dist/css/addStylesheetUrl.js.map +1 -1
- package/dist/css/backgroundCss.d.ts +1 -1
- package/dist/css/backgroundCss.js +5 -11
- package/dist/css/backgroundCss.js.map +1 -1
- package/dist/css/buttonCss.d.ts +3 -3
- package/dist/css/buttonCss.js +45 -13
- package/dist/css/buttonCss.js.map +1 -1
- package/dist/css/componentSizeCss.d.ts +5 -5
- package/dist/css/componentSizeCss.js +17 -22
- package/dist/css/componentSizeCss.js.map +1 -1
- package/dist/css/cursorCss.d.ts +3 -3
- package/dist/css/cursorCss.js +10 -12
- package/dist/css/cursorCss.js.map +1 -1
- package/dist/css/fadeIn.d.ts +1 -1
- package/dist/css/fadeIn.js +9 -12
- package/dist/css/fadeIn.js.map +1 -1
- package/dist/css/index.js +10 -26
- package/dist/css/index.js.map +1 -1
- package/dist/css/shadowEffect.d.ts +1 -1
- package/dist/css/shadowEffect.js +15 -10
- package/dist/css/shadowEffect.js.map +1 -1
- package/dist/css/shineEffect.d.ts +1 -1
- package/dist/css/shineEffect.js +31 -11
- package/dist/css/shineEffect.js.map +1 -1
- package/dist/css/transformCss.d.ts +2 -2
- package/dist/css/transformCss.js +7 -18
- package/dist/css/transformCss.js.map +1 -1
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/index.js +26 -43
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/useActions.js +2 -8
- package/dist/hooks/useActions.js.map +1 -1
- package/dist/hooks/useAnimations.js +18 -52
- package/dist/hooks/useAnimations.js.map +1 -1
- package/dist/hooks/useDraggedItem.js +9 -28
- package/dist/hooks/useDraggedItem.js.map +1 -1
- package/dist/hooks/useFailures.d.ts +1 -1
- package/dist/hooks/useFailures.js +10 -10
- package/dist/hooks/useFailures.js.map +1 -1
- package/dist/hooks/useFlatHistory.js +60 -128
- package/dist/hooks/useFlatHistory.js.map +1 -1
- package/dist/hooks/useFullscreen.js +19 -42
- package/dist/hooks/useFullscreen.js.map +1 -1
- package/dist/hooks/useGame.js +3 -6
- package/dist/hooks/useGame.js.map +1 -1
- package/dist/hooks/useGiveUp.js +10 -15
- package/dist/hooks/useGiveUp.js.map +1 -1
- package/dist/hooks/useItemLocations.js +31 -102
- package/dist/hooks/useItemLocations.js.map +1 -1
- package/dist/hooks/useItemLocator.js +3 -7
- package/dist/hooks/useItemLocator.js.map +1 -1
- package/dist/hooks/useKeyDown.js +5 -9
- package/dist/hooks/useKeyDown.js.map +1 -1
- package/dist/hooks/useLegalMoves.js +8 -12
- package/dist/hooks/useLegalMoves.js.map +1 -1
- package/dist/hooks/useLocators.js +3 -7
- package/dist/hooks/useLocators.js.map +1 -1
- package/dist/hooks/useMaterialContext.js +11 -15
- package/dist/hooks/useMaterialContext.js.map +1 -1
- package/dist/hooks/useMaterialDescription.js +4 -8
- package/dist/hooks/useMaterialDescription.js.map +1 -1
- package/dist/hooks/useNow.js +9 -30
- package/dist/hooks/useNow.js.map +1 -1
- package/dist/hooks/useNumberOfPlayers.js +2 -6
- package/dist/hooks/useNumberOfPlayers.js.map +1 -1
- package/dist/hooks/useOpponentWithMaxTime.js +17 -39
- package/dist/hooks/useOpponentWithMaxTime.js.map +1 -1
- package/dist/hooks/usePlay.js +5 -21
- package/dist/hooks/usePlay.js.map +1 -1
- package/dist/hooks/usePlayerId.js +4 -10
- package/dist/hooks/usePlayerId.js.map +1 -1
- package/dist/hooks/usePlayerName.js +14 -19
- package/dist/hooks/usePlayerName.js.map +1 -1
- package/dist/hooks/usePlayerTime.js +16 -37
- package/dist/hooks/usePlayerTime.js.map +1 -1
- package/dist/hooks/usePlayers.js +35 -69
- package/dist/hooks/usePlayers.js.map +1 -1
- package/dist/hooks/useRankedPlayers.js +15 -20
- package/dist/hooks/useRankedPlayers.js.map +1 -1
- package/dist/hooks/useResultText.js +23 -27
- package/dist/hooks/useResultText.js.map +1 -1
- package/dist/hooks/useRules.js +10 -13
- package/dist/hooks/useRules.js.map +1 -1
- package/dist/hooks/useSound.js +8 -28
- package/dist/hooks/useSound.js.map +1 -1
- package/dist/hooks/useStaticLocations.js +21 -84
- package/dist/hooks/useStaticLocations.js.map +1 -1
- package/dist/hooks/useTutorialStep.js +7 -10
- package/dist/hooks/useTutorialStep.js.map +1 -1
- package/dist/hooks/useUndo.d.ts +1 -1
- package/dist/hooks/useUndo.js +29 -64
- package/dist/hooks/useUndo.js.map +1 -1
- package/dist/hooks/useWebP.js +10 -77
- package/dist/hooks/useWebP.js.map +1 -1
- package/dist/hooks/useZoomToElements.js +43 -75
- package/dist/hooks/useZoomToElements.js.map +1 -1
- package/dist/index.js +5 -23
- package/dist/index.js.map +1 -1
- package/dist/locators/DeckLocator.js +8 -30
- package/dist/locators/DeckLocator.js.map +1 -1
- package/dist/locators/FlexLocator.js +57 -70
- package/dist/locators/FlexLocator.js.map +1 -1
- package/dist/locators/HandLocator.js +74 -99
- package/dist/locators/HandLocator.js.map +1 -1
- package/dist/locators/HexagonalGridLocator.js +105 -158
- package/dist/locators/HexagonalGridLocator.js.map +1 -1
- package/dist/locators/ListLocator.js +59 -73
- package/dist/locators/ListLocator.js.map +1 -1
- package/dist/locators/Locator.js +149 -190
- package/dist/locators/Locator.js.map +1 -1
- package/dist/locators/PileLocator.js +65 -126
- package/dist/locators/PileLocator.js.map +1 -1
- package/dist/locators/index.js +8 -24
- package/dist/locators/index.js.map +1 -1
- package/dist/locators/utils/getRelativePlayerIndex.util.js +2 -7
- package/dist/locators/utils/getRelativePlayerIndex.util.js.map +1 -1
- package/dist/locators/utils/index.js +1 -17
- package/dist/locators/utils/index.js.map +1 -1
- package/dist/utilities/DeepPartial.js +1 -2
- package/dist/utilities/combineEventListeners.js +5 -38
- package/dist/utilities/combineEventListeners.js.map +1 -1
- package/dist/utilities/findIfUnique.util.js +4 -7
- package/dist/utilities/findIfUnique.util.js.map +1 -1
- package/dist/utilities/index.js +4 -20
- package/dist/utilities/index.js.map +1 -1
- package/dist/utilities/translation.util.js +21 -31
- package/dist/utilities/translation.util.js.map +1 -1
- package/dist/utilities/zoom-pan-pinch/animations.constants.js +29 -32
- package/dist/utilities/zoom-pan-pinch/animations.constants.js.map +1 -1
- package/dist/utilities/zoom-pan-pinch/animations.util.js +24 -30
- package/dist/utilities/zoom-pan-pinch/animations.util.js.map +1 -1
- package/dist/utilities/zoom-pan-pinch/bounds.util.js +43 -52
- package/dist/utilities/zoom-pan-pinch/bounds.util.js.map +1 -1
- package/dist/utilities/zoom-pan-pinch/calculation.util.js +2 -7
- package/dist/utilities/zoom-pan-pinch/calculation.util.js.map +1 -1
- package/dist/utilities/zoom-pan-pinch/index.js +5 -21
- package/dist/utilities/zoom-pan-pinch/index.js.map +1 -1
- package/dist/utilities/zoom-pan-pinch/zoom.util.js +3 -6
- package/dist/utilities/zoom-pan-pinch/zoom.util.js.map +1 -1
- package/package.json +83 -77
- package/dist/components/Chat/Chat.d.ts +0 -3
- package/dist/components/Chat/Chat.js +0 -80
- package/dist/components/Chat/Chat.js.map +0 -1
- package/dist/components/Chat/ChatMessage.d.ts +0 -7
- package/dist/components/Chat/ChatMessage.js +0 -29
- package/dist/components/Chat/ChatMessage.js.map +0 -1
- package/dist/components/Chat/ChatMessageAuthor.d.ts +0 -3
- package/dist/components/Chat/ChatMessageAuthor.js +0 -34
- package/dist/components/Chat/ChatMessageAuthor.js.map +0 -1
- package/dist/components/Chat/ChatTextInput.d.ts +0 -7
- package/dist/components/Chat/ChatTextInput.js +0 -44
- package/dist/components/Chat/ChatTextInput.js.map +0 -1
- package/dist/components/Chat/SignInToChat.d.ts +0 -1
- package/dist/components/Chat/SignInToChat.js +0 -35
- package/dist/components/Chat/SignInToChat.js.map +0 -1
- package/dist/components/Chat/index.d.ts +0 -5
- package/dist/components/Chat/index.js +0 -22
- package/dist/components/Chat/index.js.map +0 -1
- package/dist/components/Header/PlayerTurnHeader.d.ts +0 -11
- package/dist/components/Header/PlayerTurnHeader.js +0 -37
- package/dist/components/Header/PlayerTurnHeader.js.map +0 -1
- package/dist/components/Header/SimultaneousHeader.d.ts +0 -8
- package/dist/components/Header/SimultaneousHeader.js +0 -35
- package/dist/components/Header/SimultaneousHeader.js.map +0 -1
- package/dist/components/JournalTabs/History/ActionHistoryEntry.d.ts +0 -12
- package/dist/components/JournalTabs/History/ActionHistoryEntry.js +0 -62
- package/dist/components/JournalTabs/History/ActionHistoryEntry.js.map +0 -1
- package/dist/components/JournalTabs/History/MaterialHistory.d.ts +0 -10
- package/dist/components/JournalTabs/History/MaterialHistory.js +0 -3
- package/dist/components/JournalTabs/History/MaterialHistory.js.map +0 -1
- package/dist/components/JournalTabs/History/PlayerActionHistory.d.ts +0 -8
- package/dist/components/JournalTabs/History/PlayerActionHistory.js +0 -42
- package/dist/components/JournalTabs/History/PlayerActionHistory.js.map +0 -1
- package/dist/components/JournalTabs/History/PlayerHistoryEntry.d.ts +0 -8
- package/dist/components/JournalTabs/History/PlayerHistoryEntry.js +0 -44
- package/dist/components/JournalTabs/History/PlayerHistoryEntry.js.map +0 -1
- package/dist/components/JournalTabs/History/StartHistory.d.ts +0 -2
- package/dist/components/JournalTabs/History/StartHistory.js +0 -30
- package/dist/components/JournalTabs/History/StartHistory.js.map +0 -1
- package/dist/components/material/Dices/DiceDescription.d.ts +0 -10
- package/dist/components/material/Dices/DiceDescription.js +0 -56
- package/dist/components/material/Dices/DiceDescription.js.map +0 -1
- package/dist/components/material/GameTable/DraggableStockItem.d.ts +0 -4
- package/dist/components/material/GameTable/DraggableStockItem.js +0 -82
- package/dist/components/material/GameTable/DraggableStockItem.js.map +0 -1
- package/dist/components/material/GameTable/FocusableElement.d.ts +0 -13
- package/dist/components/material/GameTable/FocusableElement.js +0 -63
- package/dist/components/material/GameTable/FocusableElement.js.map +0 -1
- package/dist/components/material/GameTable/FocusableLocation.d.ts +0 -8
- package/dist/components/material/GameTable/FocusableLocation.js +0 -37
- package/dist/components/material/GameTable/FocusableLocation.js.map +0 -1
- package/dist/components/material/GameTable/FocusableLocations.d.ts +0 -0
- package/dist/components/material/GameTable/FocusableLocations.js +0 -2
- package/dist/components/material/GameTable/FocusableLocations.js.map +0 -1
- package/dist/components/material/GameTable/GameTableContent.d.ts +0 -18
- package/dist/components/material/GameTable/GameTableContent.js +0 -63
- package/dist/components/material/GameTable/GameTableContent.js.map +0 -1
- package/dist/components/material/GameTable/focus/FocusableElement.d.ts +0 -13
- package/dist/components/material/GameTable/focus/FocusableElement.js +0 -63
- package/dist/components/material/GameTable/focus/FocusableElement.js.map +0 -1
- package/dist/components/material/GameTable/focus/FocusableLocation.d.ts +0 -8
- package/dist/components/material/GameTable/focus/FocusableLocation.js +0 -38
- package/dist/components/material/GameTable/focus/FocusableLocation.js.map +0 -1
- package/dist/components/material/GameTable/focus/LocationsWithFocus.d.ts +0 -9
- package/dist/components/material/GameTable/focus/LocationsWithFocus.js +0 -45
- package/dist/components/material/GameTable/focus/LocationsWithFocus.js.map +0 -1
- package/dist/components/material/GameTable/locations.utils.d.ts +0 -0
- package/dist/components/material/GameTable/locations.utils.js +0 -2
- package/dist/components/material/GameTable/locations.utils.js.map +0 -1
- package/dist/components/material/ItemMenu.js.map +0 -1
- package/dist/components/material/MaterialAnimations.d.ts +0 -25
- package/dist/components/material/MaterialAnimations.js +0 -219
- package/dist/components/material/MaterialAnimations.js.map +0 -1
- package/dist/components/material/MaterialGameAnimations.d.ts +0 -10
- package/dist/components/material/MaterialGameAnimations.js +0 -47
- package/dist/components/material/MaterialGameAnimations.js.map +0 -1
- package/dist/components/material/animations/adjustRotation.d.ts +0 -1
- package/dist/components/material/animations/adjustRotation.js +0 -67
- package/dist/components/material/animations/adjustRotation.js.map +0 -1
- package/dist/components/material/animations/isMovedOrDeletedItem.util.d.ts +0 -3
- package/dist/components/material/animations/isMovedOrDeletedItem.util.js +0 -26
- package/dist/components/material/animations/isMovedOrDeletedItem.util.js.map +0 -1
- package/dist/components/material/animations/itemMovementCss.util.d.ts +0 -2
- package/dist/components/material/animations/itemMovementCss.util.js +0 -13
- package/dist/components/material/animations/itemMovementCss.util.js.map +0 -1
- package/dist/components/material/locations/HexGridDropArea.d.ts +0 -11
- package/dist/components/material/locations/HexGridDropArea.js +0 -74
- package/dist/components/material/locations/HexGridDropArea.js.map +0 -1
- package/dist/components/material/utils/IsMoveOnItem.d.ts +0 -2
- package/dist/components/material/utils/IsMoveOnItem.js +0 -12
- package/dist/components/material/utils/IsMoveOnItem.js.map +0 -1
- package/dist/components/material/utils/getItemFromContext.d.ts +0 -3
- package/dist/components/material/utils/getItemFromContext.js +0 -10
- package/dist/components/material/utils/getItemFromContext.js.map +0 -1
- package/dist/components/menus/ContrastThemeButton/ContrastThemeButton.d.ts +0 -4
- package/dist/components/menus/ContrastThemeButton/ContrastThemeButton.js +0 -27
- package/dist/components/menus/ContrastThemeButton/ContrastThemeButton.js.map +0 -1
- package/dist/components/menus/ContrastThemeButton/index.d.ts +0 -1
- package/dist/components/menus/ContrastThemeButton/index.js +0 -18
- package/dist/components/menus/ContrastThemeButton/index.js.map +0 -1
- package/dist/components/tutorial/FocusableElement.d.ts +0 -0
- package/dist/components/tutorial/FocusableElement.js +0 -2
- package/dist/components/tutorial/FocusableElement.js.map +0 -1
- package/dist/hooks/useCloseHelpDialog.d.ts +0 -1
- package/dist/hooks/useCloseHelpDialog.js +0 -14
- package/dist/hooks/useCloseHelpDialog.js.map +0 -1
- package/dist/hooks/useContrastTheme.d.ts +0 -7
- package/dist/hooks/useContrastTheme.js +0 -27
- package/dist/hooks/useContrastTheme.js.map +0 -1
- package/dist/hooks/useGameHistory.d.ts +0 -1
- package/dist/hooks/useGameHistory.js +0 -13
- package/dist/hooks/useGameHistory.js.map +0 -1
- package/dist/hooks/useHistory.d.ts +0 -6
- package/dist/hooks/useHistory.js +0 -85
- package/dist/hooks/useHistory.js.map +0 -1
- package/dist/hooks/useMaterialAnimations.d.ts +0 -2
- package/dist/hooks/useMaterialAnimations.js +0 -17
- package/dist/hooks/useMaterialAnimations.js.map +0 -1
- package/dist/hooks/useMaterials.d.ts +0 -2
- package/dist/hooks/useMaterials.js +0 -10
- package/dist/hooks/useMaterials.js.map +0 -1
- package/dist/hooks/useRulesStep.d.ts +0 -2
- package/dist/hooks/useRulesStep.js +0 -10
- package/dist/hooks/useRulesStep.js.map +0 -1
- package/dist/hooks/useScale.d.ts +0 -1
- package/dist/hooks/useScale.js +0 -16
- package/dist/hooks/useScale.js.map +0 -1
- package/dist/locators/GridLocator.d.ts +0 -13
- package/dist/locators/GridLocator.js +0 -59
- package/dist/locators/GridLocator.js.map +0 -1
- package/dist/locators/ItemLocator.d.ts +0 -49
- package/dist/locators/ItemLocator.js +0 -144
- package/dist/locators/ItemLocator.js.map +0 -1
- package/dist/locators/LineLocator.d.ts +0 -12
- package/dist/locators/LineLocator.js +0 -77
- package/dist/locators/LineLocator.js.map +0 -1
- package/dist/translation/index.d.ts +0 -1
- package/dist/translation/index.js +0 -18
- package/dist/translation/index.js.map +0 -1
- package/dist/translation/setupTranslation.d.ts +0 -5
- package/dist/translation/setupTranslation.js +0 -33
- package/dist/translation/setupTranslation.js.map +0 -1
- package/dist/utilities/animations.constants.d.ts +0 -16
- package/dist/utilities/animations.constants.js +0 -62
- package/dist/utilities/animations.constants.js.map +0 -1
- package/dist/utilities/animations.util.d.ts +0 -4
- package/dist/utilities/animations.util.js +0 -71
- package/dist/utilities/animations.util.js.map +0 -1
- package/dist/utilities/bounds.util.d.ts +0 -7
- package/dist/utilities/bounds.util.js +0 -77
- package/dist/utilities/bounds.util.js.map +0 -1
- package/dist/utilities/calculation.util.d.ts +0 -2
- package/dist/utilities/calculation.util.js +0 -12
- package/dist/utilities/calculation.util.js.map +0 -1
- package/dist/utilities/pusher.d.ts +0 -2
- package/dist/utilities/pusher.js +0 -16
- package/dist/utilities/pusher.js.map +0 -1
- package/dist/utilities/zoom.util.d.ts +0 -1
- package/dist/utilities/zoom.util.js +0 -14
- package/dist/utilities/zoom.util.js.map +0 -1
|
@@ -1,134 +1,84 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
18
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
19
|
-
if (!m) return o;
|
|
20
|
-
var i = m.call(o), r, ar = [], e;
|
|
21
|
-
try {
|
|
22
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
23
|
-
}
|
|
24
|
-
catch (error) { e = { error: error }; }
|
|
25
|
-
finally {
|
|
26
|
-
try {
|
|
27
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
28
|
-
}
|
|
29
|
-
finally { if (e) throw e.error; }
|
|
30
|
-
}
|
|
31
|
-
return ar;
|
|
32
|
-
};
|
|
33
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
34
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
35
|
-
if (ar || !(i in from)) {
|
|
36
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
37
|
-
ar[i] = from[i];
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
41
|
-
};
|
|
42
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
-
exports.HexagonalGridLocator = exports.HexOrientation = void 0;
|
|
44
|
-
var rules_api_1 = require("@gamepark/rules-api");
|
|
45
|
-
var es_toolkit_1 = require("es-toolkit");
|
|
46
|
-
var compat_1 = require("es-toolkit/compat");
|
|
47
|
-
var components_1 = require("../components");
|
|
48
|
-
var Locator_1 = require("./Locator");
|
|
49
|
-
var HexOrientation;
|
|
1
|
+
import { HexGridSystem } from '@gamepark/rules-api';
|
|
2
|
+
import { isEqual, omit, uniqWith } from 'es-toolkit';
|
|
3
|
+
import { findLastIndex } from 'es-toolkit/compat';
|
|
4
|
+
import { HexGridDropAreaDescription, isPolyhexDescription } from '../components';
|
|
5
|
+
import { Locator } from './Locator';
|
|
6
|
+
export var HexOrientation;
|
|
50
7
|
(function (HexOrientation) {
|
|
51
8
|
HexOrientation[HexOrientation["Flat"] = 1] = "Flat";
|
|
52
9
|
HexOrientation[HexOrientation["Pointy"] = 2] = "Pointy";
|
|
53
|
-
})(HexOrientation || (
|
|
10
|
+
})(HexOrientation || (HexOrientation = {}));
|
|
54
11
|
/**
|
|
55
12
|
* This locator is responsible for placing locations and items on a hexagonal grid.
|
|
56
13
|
*/
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
14
|
+
export class HexagonalGridLocator extends Locator {
|
|
15
|
+
/**
|
|
16
|
+
* When using Axial coordinates system, you must specify the hexagons orientation
|
|
17
|
+
*/
|
|
18
|
+
orientation;
|
|
19
|
+
/**
|
|
20
|
+
* Horizontal size of a hexagon
|
|
21
|
+
*/
|
|
22
|
+
get sizeX() {
|
|
23
|
+
return typeof this.size === 'number' ? this.size : this.size.x;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Vertical size of a hexagon
|
|
27
|
+
*/
|
|
28
|
+
get sizeY() {
|
|
29
|
+
return typeof this.size === 'number' ? this.size : this.size.y;
|
|
63
30
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
get: function () {
|
|
69
|
-
return typeof this.size === 'number' ? this.size : this.size.x;
|
|
70
|
-
},
|
|
71
|
-
enumerable: false,
|
|
72
|
-
configurable: true
|
|
73
|
-
});
|
|
74
|
-
Object.defineProperty(HexagonalGridLocator.prototype, "sizeY", {
|
|
75
|
-
/**
|
|
76
|
-
* Vertical size of a hexagon
|
|
77
|
-
*/
|
|
78
|
-
get: function () {
|
|
79
|
-
return typeof this.size === 'number' ? this.size : this.size.y;
|
|
80
|
-
},
|
|
81
|
-
enumerable: false,
|
|
82
|
-
configurable: true
|
|
83
|
-
});
|
|
31
|
+
/**
|
|
32
|
+
* Polyhex of the drop area
|
|
33
|
+
*/
|
|
34
|
+
dropArea;
|
|
84
35
|
/**
|
|
85
36
|
* Override if you need a dynamic drop area
|
|
86
37
|
* @param _location The location to consider
|
|
87
38
|
* @param _context Context of the game
|
|
88
39
|
* @return the current drop area
|
|
89
40
|
*/
|
|
90
|
-
|
|
41
|
+
getDropArea(_location, _context) {
|
|
91
42
|
return this.dropArea;
|
|
92
|
-
}
|
|
43
|
+
}
|
|
93
44
|
/**
|
|
94
45
|
* Get the coordinates for the full grid area
|
|
95
46
|
* @param location Location to place
|
|
96
47
|
* @param context Context of the game
|
|
97
48
|
* @returns The coordinates of the area
|
|
98
49
|
*/
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
50
|
+
getAreaCoordinates(location, context) {
|
|
51
|
+
const { x = 0, y = 0, z } = this.getCoordinates(location, context);
|
|
52
|
+
const dropArea = this.getDropArea(location, context);
|
|
102
53
|
if (!dropArea)
|
|
103
|
-
return { x
|
|
104
|
-
|
|
105
|
-
return { x: (xMin + xMax) / 2, y: (yMin + yMax) / 2, z
|
|
106
|
-
}
|
|
54
|
+
return { x, y, z };
|
|
55
|
+
const { xMin, xMax, yMin, yMax } = this.getBoundaries(dropArea);
|
|
56
|
+
return { x: (xMin + xMax) / 2, y: (yMin + yMax) / 2, z };
|
|
57
|
+
}
|
|
107
58
|
/**
|
|
108
59
|
* Get the coordinates of a location on the grid
|
|
109
60
|
* @param location Location to place
|
|
110
61
|
* @param context Context of the game
|
|
111
62
|
* @return the coordinates
|
|
112
63
|
*/
|
|
113
|
-
|
|
64
|
+
getLocationCoordinates(location, context) {
|
|
114
65
|
if (location.x === undefined && location.y === undefined) {
|
|
115
66
|
return this.getAreaCoordinates(location, context);
|
|
116
67
|
}
|
|
117
|
-
|
|
118
|
-
|
|
68
|
+
const { x: baseX = 0, y: baseY = 0, z: baseZ } = this.getCoordinates(location, context);
|
|
69
|
+
const { x = 0, y = 0 } = this.getHexagonPosition(location);
|
|
119
70
|
return { x: baseX + x, y: baseY + y, z: baseZ };
|
|
120
|
-
}
|
|
71
|
+
}
|
|
121
72
|
/**
|
|
122
73
|
* Get the position of a hexagon
|
|
123
74
|
* @param coordinates Coordinates of the hexagon
|
|
124
75
|
* @param coordinatesSystem System of coordinates to consider
|
|
125
76
|
* @return coordinates to place the hexagon on the location
|
|
126
77
|
*/
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
var _a = coordinates.x, x = _a === void 0 ? 0 : _a, _b = coordinates.y, y = _b === void 0 ? 0 : _b;
|
|
78
|
+
getHexagonPosition(coordinates, coordinatesSystem = this.coordinatesSystem) {
|
|
79
|
+
let { x = 0, y = 0 } = coordinates;
|
|
130
80
|
switch (coordinatesSystem) {
|
|
131
|
-
case
|
|
81
|
+
case HexGridSystem.Axial: {
|
|
132
82
|
if (!this.orientation) {
|
|
133
83
|
throw new Error('You must specify the orientation (flat or pointy) when using the Axial HexGridSystem');
|
|
134
84
|
}
|
|
@@ -145,28 +95,28 @@ var HexagonalGridLocator = /** @class */ (function (_super) {
|
|
|
145
95
|
};
|
|
146
96
|
}
|
|
147
97
|
}
|
|
148
|
-
case
|
|
98
|
+
case HexGridSystem.OddQ: {
|
|
149
99
|
y += ((x % 2 + 2) % 2) / 2;
|
|
150
100
|
return {
|
|
151
101
|
x: x * 3 / 2 * this.sizeX,
|
|
152
102
|
y: y * Math.sqrt(3) * this.sizeY
|
|
153
103
|
};
|
|
154
104
|
}
|
|
155
|
-
case
|
|
105
|
+
case HexGridSystem.EvenQ: {
|
|
156
106
|
y -= ((x % 2 + 2) % 2) / 2;
|
|
157
107
|
return {
|
|
158
108
|
x: x * 3 / 2 * this.sizeX,
|
|
159
109
|
y: y * Math.sqrt(3) * this.sizeY
|
|
160
110
|
};
|
|
161
111
|
}
|
|
162
|
-
case
|
|
112
|
+
case HexGridSystem.OddR: {
|
|
163
113
|
throw new Error('OddR HexGridSystem is not yet implemented');
|
|
164
114
|
}
|
|
165
|
-
case
|
|
115
|
+
case HexGridSystem.EvenR: {
|
|
166
116
|
throw new Error('EvenR HexGridSystem is not yet implemented');
|
|
167
117
|
}
|
|
168
118
|
}
|
|
169
|
-
}
|
|
119
|
+
}
|
|
170
120
|
/**
|
|
171
121
|
* Get the coordinates of an item on the grid. If the item is a Polyhex, the shape will be used to center the origin coordinates of the item on the
|
|
172
122
|
* correct grid location.
|
|
@@ -174,128 +124,125 @@ var HexagonalGridLocator = /** @class */ (function (_super) {
|
|
|
174
124
|
* @param context Context of the game
|
|
175
125
|
* @return the coordinates of the item
|
|
176
126
|
*/
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
if (!description || !
|
|
181
|
-
return { x
|
|
127
|
+
getItemCoordinates(item, context) {
|
|
128
|
+
const { x = 0, y = 0, z } = super.getItemCoordinates(item, context);
|
|
129
|
+
const description = context.material[context.type];
|
|
130
|
+
if (!description || !isPolyhexDescription(description)) {
|
|
131
|
+
return { x, y, z };
|
|
182
132
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
return { x: x + deltaX, y: y + deltaY, z
|
|
187
|
-
}
|
|
133
|
+
const polyhex = description.getPolyhex(item, context);
|
|
134
|
+
const { xMax, xMin, yMin, yMax } = this.getBoundaries(polyhex);
|
|
135
|
+
const { x: deltaX, y: deltaY } = rotateVector({ x: (xMin + xMax) / 2, y: (yMin + yMax) / 2 }, this.getItemRotateZ(item, context));
|
|
136
|
+
return { x: x + deltaX, y: y + deltaY, z };
|
|
137
|
+
}
|
|
188
138
|
/**
|
|
189
139
|
* Rotate the location. On a hexagonal grid, by default the rotation is expected to be [0, 5] and it is multiplied by 60 degrees.
|
|
190
140
|
* @param location Location to rotate
|
|
191
141
|
* @param _context Context of the item
|
|
192
142
|
* @return the location's rotation in degrees
|
|
193
143
|
*/
|
|
194
|
-
|
|
195
|
-
var _a;
|
|
144
|
+
getRotateZ(location, _context) {
|
|
196
145
|
// TODO: the real rotation depends on the sizeX / sizeY ratio for 1, 2, 4 & 5 rotations (custom override applied for King of Tokyo Duel)
|
|
197
|
-
return (
|
|
198
|
-
}
|
|
146
|
+
return (location.rotation ?? 0) * 60;
|
|
147
|
+
}
|
|
199
148
|
/**
|
|
200
149
|
* Returns the drop locations for current dragged item. The hexagonal grid must be one simple drop location.
|
|
201
150
|
*/
|
|
202
|
-
|
|
151
|
+
getDropLocations(moves, context) {
|
|
203
152
|
if (!this.locationDescription || this.locationDescription.ignoreCoordinates) {
|
|
204
|
-
return
|
|
153
|
+
return uniqWith(moves.map(move => omit(move.location, ['x', 'y', 'z', 'rotation'])), isEqual);
|
|
205
154
|
}
|
|
206
155
|
else {
|
|
207
|
-
return
|
|
156
|
+
return super.getDropLocations(moves, context);
|
|
208
157
|
}
|
|
209
|
-
}
|
|
158
|
+
}
|
|
159
|
+
dropPreview = true;
|
|
210
160
|
/**
|
|
211
161
|
* Generate automatically a {@link HexGridDropAreaDescription} based on the grid boundaries
|
|
212
162
|
*/
|
|
213
|
-
|
|
163
|
+
getLocationDescription(location, context) {
|
|
214
164
|
if (this.locationDescription)
|
|
215
165
|
return this.locationDescription;
|
|
216
166
|
if (location.x !== undefined || location.y !== undefined)
|
|
217
|
-
return
|
|
218
|
-
|
|
167
|
+
return super.getLocationDescription(location, context);
|
|
168
|
+
const dropArea = this.getDropArea(location, context);
|
|
219
169
|
if (!dropArea)
|
|
220
|
-
return
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
return new
|
|
170
|
+
return super.getLocationDescription(location, context);
|
|
171
|
+
const { xMin, xMax, yMin, yMax } = this.getBoundaries(dropArea);
|
|
172
|
+
const borderRadius = this.sizeX / 3;
|
|
173
|
+
return new HexGridDropAreaDescription({
|
|
224
174
|
width: xMax - xMin,
|
|
225
175
|
height: yMax - yMin,
|
|
226
|
-
borderRadius
|
|
176
|
+
borderRadius
|
|
227
177
|
});
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
var boundaries = { xMin: 0, xMax: 0, yMin: 0, yMax: 0 };
|
|
178
|
+
}
|
|
179
|
+
getBoundaries(polyhex) {
|
|
180
|
+
const boundaries = { xMin: 0, xMax: 0, yMin: 0, yMax: 0 };
|
|
232
181
|
if (!polyhex) {
|
|
233
182
|
return boundaries;
|
|
234
183
|
}
|
|
235
184
|
switch (polyhex.system) {
|
|
236
|
-
case
|
|
185
|
+
case HexGridSystem.Axial: {
|
|
237
186
|
if (!this.orientation) {
|
|
238
187
|
throw new Error('You must specify the orientation (flat or pointy) when using the Axial HexGridSystem');
|
|
239
188
|
}
|
|
240
189
|
else if (this.orientation === HexOrientation.Flat) {
|
|
241
190
|
boundaries.xMin = polyhex.xMin * 3 / 2 * this.sizeX - this.sizeX;
|
|
242
191
|
boundaries.xMax = polyhex.xMax * 3 / 2 * this.sizeX + this.sizeX;
|
|
243
|
-
boundaries.yMin = Math.min
|
|
244
|
-
|
|
245
|
-
return (polyhex.yMin + index + xMin / 2 - 0.5) * Math.sqrt(3) *
|
|
246
|
-
}))
|
|
247
|
-
boundaries.yMax = Math.max
|
|
248
|
-
|
|
249
|
-
return (polyhex.yMin + index + xMax / 2 + 0.5) * Math.sqrt(3) *
|
|
250
|
-
}))
|
|
192
|
+
boundaries.yMin = Math.min(...polyhex.grid.map((line, index) => {
|
|
193
|
+
const xMin = polyhex.xMin + line.findIndex((value) => !polyhex.isEmpty(value));
|
|
194
|
+
return (polyhex.yMin + index + xMin / 2 - 0.5) * Math.sqrt(3) * this.sizeY;
|
|
195
|
+
}));
|
|
196
|
+
boundaries.yMax = Math.max(...polyhex.grid.map((line, index) => {
|
|
197
|
+
const xMax = polyhex.xMin + findLastIndex(line, (value) => !polyhex.isEmpty(value));
|
|
198
|
+
return (polyhex.yMin + index + xMax / 2 + 0.5) * Math.sqrt(3) * this.sizeY;
|
|
199
|
+
}));
|
|
251
200
|
}
|
|
252
201
|
else {
|
|
253
202
|
throw new Error('Axial HexGridSystem for pointy top orientation is not yet implemented');
|
|
254
203
|
}
|
|
255
204
|
break;
|
|
256
205
|
}
|
|
257
|
-
case
|
|
258
|
-
case
|
|
206
|
+
case HexGridSystem.OddQ:
|
|
207
|
+
case HexGridSystem.EvenQ: {
|
|
259
208
|
boundaries.xMin = polyhex.xMin * 3 / 2 * this.sizeX - this.sizeX;
|
|
260
|
-
|
|
209
|
+
const xMax = Math.max(...polyhex.grid.map((line) => line.length)) - 1;
|
|
261
210
|
boundaries.xMax = (xMax + polyhex.xMin) * 3 / 2 * this.sizeX + this.sizeX;
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
if (polyhex.system ===
|
|
211
|
+
const swapSystem = polyhex.xMin % 2 !== 0;
|
|
212
|
+
let yMin = polyhex.yMin - 0.5;
|
|
213
|
+
const firstLine = polyhex.grid[0];
|
|
214
|
+
if (polyhex.system === HexGridSystem.OddQ && firstLine.every((value, y) => polyhex.isEmpty(value) || (swapSystem ? !(y % 2) : y % 2))) {
|
|
266
215
|
yMin += 0.5;
|
|
267
216
|
}
|
|
268
|
-
else if (polyhex.system ===
|
|
217
|
+
else if (polyhex.system === HexGridSystem.EvenQ && firstLine.some((value, y) => !polyhex.isEmpty(value) && (swapSystem ? !(y % 2) : y % 2))) {
|
|
269
218
|
yMin -= 0.5;
|
|
270
219
|
}
|
|
271
220
|
boundaries.yMin = yMin * Math.sqrt(3) * this.sizeY;
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
if (polyhex.system ===
|
|
221
|
+
let yMax = polyhex.grid.length + polyhex.yMin - 0.5;
|
|
222
|
+
const lastLine = polyhex.grid[polyhex.grid.length - 1];
|
|
223
|
+
if (polyhex.system === HexGridSystem.OddQ && lastLine.some((value, y) => !polyhex.isEmpty(value) && (swapSystem ? !(y % 2) : y % 2))) {
|
|
275
224
|
yMax += 0.5;
|
|
276
225
|
}
|
|
277
|
-
else if (polyhex.system ===
|
|
226
|
+
else if (polyhex.system === HexGridSystem.EvenQ && lastLine.every((value, y) => polyhex.isEmpty(value) || (swapSystem ? !(y % 2) : y % 2))) {
|
|
278
227
|
yMax -= 0.5;
|
|
279
228
|
}
|
|
280
229
|
boundaries.yMax = yMax * Math.sqrt(3) * this.sizeY;
|
|
281
230
|
break;
|
|
282
231
|
}
|
|
283
|
-
case
|
|
232
|
+
case HexGridSystem.OddR: {
|
|
284
233
|
throw new Error('OddR HexGridSystem is not yet implemented');
|
|
285
234
|
}
|
|
286
|
-
case
|
|
235
|
+
case HexGridSystem.EvenR: {
|
|
287
236
|
throw new Error('EvenR HexGridSystem is not yet implemented');
|
|
288
237
|
}
|
|
289
238
|
}
|
|
290
239
|
return boundaries;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
}(Locator_1.Locator));
|
|
294
|
-
exports.HexagonalGridLocator = HexagonalGridLocator;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
295
242
|
function rotateVector(vector, degrees) {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
243
|
+
const rad = degrees * (Math.PI / 180);
|
|
244
|
+
const cos = Math.cos(rad);
|
|
245
|
+
const sin = Math.sin(rad);
|
|
299
246
|
return {
|
|
300
247
|
x: Math.round(10000 * (vector.x * cos - vector.y * sin)) / 10000,
|
|
301
248
|
y: Math.round(10000 * (vector.x * sin + vector.y * cos)) / 10000
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HexagonalGridLocator.js","sourceRoot":"","sources":["../../src/locators/HexagonalGridLocator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA0H;AAC1H,yCAAoD;AACpD,4CAAiD;AACjD,4CAAqG;AACrG,qCAAiE;AAEjE,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,mDAAQ,CAAA;IACR,uDAAU,CAAA;AACZ,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAED;;GAEG;AACH;IAA6I,wCAAgB;IAA7J;;QAmKE,iBAAW,GAAG,IAAI,CAAA;;IA6EpB,CAAC;IA5NC,sBAAc,uCAAK;QAHnB;;WAEG;aACH;YACE,OAAO,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;QAChE,CAAC;;;OAAA;IAKD,sBAAc,uCAAK;QAHnB;;WAEG;aACH;YACE,OAAO,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;QAChE,CAAC;;;OAAA;IAOD;;;;;OAKG;IACH,0CAAW,GAAX,UAAY,SAAyB,EAAE,QAAkC;QACvE,OAAO,IAAI,CAAC,QAAQ,CAAA;IACtB,CAAC;IAED;;;;;OAKG;IACH,iDAAkB,GAAlB,UAAmB,QAAwB,EAAE,OAAiC;QACtE,IAAA,KAAsB,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE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AC,GAAG,GAAG,CAAC,CAAC,GAAG,KAAK;KACjE,CAAA;AACH,CAAC"}
|
|
@@ -1,124 +1,110 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.ListLocator = void 0;
|
|
19
|
-
var components_1 = require("../components");
|
|
20
|
-
var Locator_1 = require("./Locator");
|
|
1
|
+
import { DropAreaDescription } from '../components';
|
|
2
|
+
import { getItemFromContext, Locator } from './Locator';
|
|
21
3
|
/**
|
|
22
4
|
* This Locator places items at regular intervals.
|
|
23
5
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
Object.assign(_this, clone);
|
|
29
|
-
return _this;
|
|
6
|
+
export class ListLocator extends Locator {
|
|
7
|
+
constructor(clone) {
|
|
8
|
+
super();
|
|
9
|
+
Object.assign(this, clone);
|
|
30
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* The default gap between 2 consecutive items
|
|
13
|
+
*/
|
|
14
|
+
gap;
|
|
31
15
|
/**
|
|
32
16
|
* Function to override to provide a {@link gap} that depends on the context
|
|
33
17
|
* @param _location Location to position
|
|
34
18
|
* @param _context Context of the game
|
|
35
19
|
* @returns The default gap between 2 consecutive items
|
|
36
20
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
21
|
+
getGap(_location, _context) {
|
|
22
|
+
return this.gap ?? {};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The maximum number of items that can be displayed in the list before the gap between items is reduced to fill in the same space.
|
|
26
|
+
*/
|
|
27
|
+
maxCount;
|
|
41
28
|
/**
|
|
42
29
|
* Function to override to provide a {@link maxCount that depends on the context
|
|
43
30
|
* @param _location Location to position
|
|
44
31
|
* @param _context Context of the game
|
|
45
32
|
* @returns The maximum number of items that can be displayed in the list before the gap between items is reduced to fill in the same space.
|
|
46
33
|
*/
|
|
47
|
-
|
|
34
|
+
getMaxCount(_location, _context) {
|
|
48
35
|
return this.maxCount;
|
|
49
|
-
}
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The maximum gap between the first and the last items. See {@link maxCount} to get a maxGap based on a max number of items.
|
|
39
|
+
*/
|
|
40
|
+
maxGap;
|
|
50
41
|
/**
|
|
51
42
|
* Function to override to provide a {@link maxGap} that depends on the context
|
|
52
43
|
* @param location Location to position
|
|
53
44
|
* @param context Context of the game
|
|
54
45
|
* @returns The maximum gap between the first and the last items
|
|
55
46
|
*/
|
|
56
|
-
|
|
47
|
+
getMaxGap(location, context) {
|
|
57
48
|
if (this.maxGap)
|
|
58
49
|
return this.maxGap;
|
|
59
|
-
|
|
50
|
+
const maxCount = this.getMaxCount(location, context);
|
|
60
51
|
if (maxCount === undefined)
|
|
61
52
|
return {};
|
|
62
|
-
|
|
53
|
+
const { x, y, z } = this.getGap(location, context);
|
|
63
54
|
return {
|
|
64
55
|
x: x ? x * (maxCount - 1) : x,
|
|
65
56
|
y: y ? y * (maxCount - 1) : y,
|
|
66
57
|
z: z ? z * (maxCount - 1) : z
|
|
67
58
|
};
|
|
68
|
-
}
|
|
59
|
+
}
|
|
69
60
|
/**
|
|
70
61
|
* The number of items displayed in the list
|
|
71
62
|
* @param location Location area of the items
|
|
72
63
|
* @param context Context of the game
|
|
73
64
|
* @returns number of items in the location area
|
|
74
65
|
*/
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
ListLocator.prototype.getLocationCoordinates = function (location, context, index) {
|
|
91
|
-
if (index === void 0) { index = this.getLocationIndex(location, context); }
|
|
66
|
+
countListItems(location, context) {
|
|
67
|
+
return Math.min(this.limit ?? Infinity, this.countItems(location, context));
|
|
68
|
+
}
|
|
69
|
+
getAreaCoordinates(location, context) {
|
|
70
|
+
const { x = 0, y = 0, z = 0 } = this.getCoordinates(location, context);
|
|
71
|
+
const { x: mx, y: my } = this.getCurrentMaxGap(location, context);
|
|
72
|
+
return { x: x + mx / 2, y: y + my / 2, z };
|
|
73
|
+
}
|
|
74
|
+
getCurrentMaxGap(location, context) {
|
|
75
|
+
const { x: gx = 0, y: gy = 0 } = this.getGap(location, context);
|
|
76
|
+
const { x: mgx, y: mgy } = this.getMaxGap(location, context);
|
|
77
|
+
const gapCount = Math.max(0, this.countListItems(location, context) - 1);
|
|
78
|
+
return { x: (mgx ?? gx * gapCount), y: (mgy ?? gy * gapCount) };
|
|
79
|
+
}
|
|
80
|
+
getLocationCoordinates(location, context, index = this.getLocationIndex(location, context)) {
|
|
92
81
|
if (index === undefined)
|
|
93
82
|
return this.getAreaCoordinates(location, context);
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
83
|
+
const { x = 0, y = 0, z = 0 } = this.getCoordinates(location, context);
|
|
84
|
+
const { x: gx = 0, y: gy = 0, z: gz = 0.05 } = this.getGap(location, context);
|
|
85
|
+
const { x: mgx, y: mgy, z: mgz } = this.getMaxGap(location, context);
|
|
86
|
+
const count = this.countListItems(location, context);
|
|
98
87
|
return {
|
|
99
88
|
x: x + index * (mgx && count > 1 ? mgx * Math.min(gx / mgx, 1 / (count - 1)) : gx),
|
|
100
89
|
y: y + index * (mgy && count > 1 ? mgy * Math.min(gy / mgy, 1 / (count - 1)) : gy),
|
|
101
90
|
z: z + index * (mgz && count > 1 ? mgz * Math.min(gz / mgz, 1 / (count - 1)) : gz)
|
|
102
91
|
};
|
|
103
|
-
}
|
|
104
|
-
|
|
92
|
+
}
|
|
93
|
+
getItemCoordinates(item, context) {
|
|
105
94
|
return this.getLocationCoordinates(item.location, context, this.getItemIndex(item, context));
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
var borderRadius = (_d = (_c = context.material[context.type]) === null || _c === void 0 ? void 0 : _c.getBorderRadius(item.id)) !== null && _d !== void 0 ? _d : 0;
|
|
95
|
+
}
|
|
96
|
+
generateLocationDescriptionFromDraggedItem(location, context) {
|
|
97
|
+
const item = getItemFromContext(context);
|
|
98
|
+
const { width = 0, height = 0 } = context.material[context.type]?.getSize(item.id) ?? {};
|
|
99
|
+
const borderRadius = context.material[context.type]?.getBorderRadius(item.id) ?? 0;
|
|
112
100
|
if (this.getLocationIndex(location, context) !== undefined)
|
|
113
|
-
return new
|
|
114
|
-
|
|
115
|
-
return new
|
|
101
|
+
return new DropAreaDescription({ width, height, borderRadius });
|
|
102
|
+
const { x, y } = this.getCurrentMaxGap(location, context);
|
|
103
|
+
return new DropAreaDescription({
|
|
116
104
|
width: width + Math.abs(x),
|
|
117
105
|
height: height + Math.abs(y),
|
|
118
|
-
borderRadius
|
|
106
|
+
borderRadius
|
|
119
107
|
});
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
}(Locator_1.Locator));
|
|
123
|
-
exports.ListLocator = ListLocator;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
124
110
|
//# sourceMappingURL=ListLocator.js.map
|