ttpg-darrell 1.0.40 → 1.0.41
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/build/cjs/lib/bug-workarounds/bug-force-transform-updates/bug-force-transform-updates.d.ts +14 -0
- package/build/cjs/lib/bug-workarounds/bug-force-transform-updates/bug-force-transform-updates.js +58 -0
- package/build/cjs/lib/bug-workarounds/bug-force-transform-updates/bug-force-transform-updates.js.map +1 -0
- package/build/cjs/lib/event/throttle-click-handler.d.ts +1 -1
- package/build/cjs/lib/event/throttle-click-handler.js +1 -1
- package/build/cjs/lib/game-object/dice-snap-rotation/dice-snap-rotation-obj.js +6 -0
- package/build/cjs/lib/game-object/dice-snap-rotation/dice-snap-rotation-obj.js.map +1 -0
- package/build/cjs/lib/game-object/dice-snap-rotation/dice-snap-rotation.d.ts +7 -0
- package/build/cjs/lib/game-object/dice-snap-rotation/dice-snap-rotation.js +27 -0
- package/build/cjs/lib/game-object/dice-snap-rotation/dice-snap-rotation.js.map +1 -0
- package/build/cjs/lib/widget/turn-order-widget/turn-entry-wart.d.ts +3 -1
- package/build/cjs/lib/widget/turn-order-widget/turn-entry-wart.js.map +1 -1
- package/build/esm/lib/bug-workarounds/bug-force-transform-updates/bug-force-transform-updates.d.ts +14 -0
- package/build/esm/lib/bug-workarounds/bug-force-transform-updates/bug-force-transform-updates.js +54 -0
- package/build/esm/lib/bug-workarounds/bug-force-transform-updates/bug-force-transform-updates.js.map +1 -0
- package/build/esm/lib/game-object/dice-snap-rotation/dice-snap-rotation-obj.d.ts +1 -0
- package/build/esm/lib/game-object/dice-snap-rotation/dice-snap-rotation-obj.js +4 -0
- package/build/esm/lib/game-object/dice-snap-rotation/dice-snap-rotation-obj.js.map +1 -0
- package/build/esm/lib/game-object/dice-snap-rotation/dice-snap-rotation.d.ts +4 -0
- package/build/esm/lib/game-object/dice-snap-rotation/dice-snap-rotation.js +20 -0
- package/build/esm/lib/game-object/dice-snap-rotation/dice-snap-rotation.js.map +1 -0
- package/build/esm/lib/widget/turn-order-widget/turn-entry-wart.d.ts +3 -1
- package/build/esm/lib/widget/turn-order-widget/turn-entry-wart.js.map +1 -1
- package/build/module_type_should_override_this/index.d.ts +54 -0
- package/build/module_type_should_override_this/index.js +55 -0
- package/build/module_type_should_override_this/index.js.map +1 -0
- package/build/module_type_should_override_this/lib/adjacency/adjacency.d.ts +61 -0
- package/build/module_type_should_override_this/lib/adjacency/adjacency.js +212 -0
- package/build/module_type_should_override_this/lib/adjacency/adjacency.js.map +1 -0
- package/build/module_type_should_override_this/lib/broadcast/broadcast.d.ts +9 -0
- package/build/module_type_should_override_this/lib/broadcast/broadcast.js +42 -0
- package/build/module_type_should_override_this/lib/broadcast/broadcast.js.map +1 -0
- package/build/module_type_should_override_this/lib/bug-workarounds/bug-card-holder-assignment.d.ts +8 -0
- package/build/module_type_should_override_this/lib/bug-workarounds/bug-card-holder-assignment.js +10 -0
- package/build/module_type_should_override_this/lib/bug-workarounds/bug-card-holder-assignment.js.map +1 -0
- package/build/module_type_should_override_this/lib/bug-workarounds/bug-unique-cards.d.ts +8 -0
- package/build/module_type_should_override_this/lib/bug-workarounds/bug-unique-cards.js +10 -0
- package/build/module_type_should_override_this/lib/bug-workarounds/bug-unique-cards.js.map +1 -0
- package/build/module_type_should_override_this/lib/card-util/card-util.d.ts +45 -0
- package/build/module_type_should_override_this/lib/card-util/card-util.js +173 -0
- package/build/module_type_should_override_this/lib/card-util/card-util.js.map +1 -0
- package/build/module_type_should_override_this/lib/context-menu/abstract-right-click-card.d.ts +17 -0
- package/build/module_type_should_override_this/lib/context-menu/abstract-right-click-card.js +36 -0
- package/build/module_type_should_override_this/lib/context-menu/abstract-right-click-card.js.map +1 -0
- package/build/module_type_should_override_this/lib/context-menu/abstract-right-click-deck.d.ts +19 -0
- package/build/module_type_should_override_this/lib/context-menu/abstract-right-click-deck.js +42 -0
- package/build/module_type_should_override_this/lib/context-menu/abstract-right-click-deck.js.map +1 -0
- package/build/module_type_should_override_this/lib/context-menu/leave-seat.d.ts +19 -0
- package/build/module_type_should_override_this/lib/context-menu/leave-seat.js +47 -0
- package/build/module_type_should_override_this/lib/context-menu/leave-seat.js.map +1 -0
- package/build/module_type_should_override_this/lib/data-store/data-store.d.ts +104 -0
- package/build/module_type_should_override_this/lib/data-store/data-store.js +392 -0
- package/build/module_type_should_override_this/lib/data-store/data-store.js.map +1 -0
- package/build/module_type_should_override_this/lib/dice-group/dice-group-testp.d.ts +1 -0
- package/build/module_type_should_override_this/lib/dice-group/dice-group-testp.js +37 -0
- package/build/module_type_should_override_this/lib/dice-group/dice-group-testp.js.map +1 -0
- package/build/module_type_should_override_this/lib/dice-group/dice-group.d.ts +83 -0
- package/build/module_type_should_override_this/lib/dice-group/dice-group.js +247 -0
- package/build/module_type_should_override_this/lib/dice-group/dice-group.js.map +1 -0
- package/build/module_type_should_override_this/lib/error-handler/bugsplat-remote-reporter.d.ts +21 -0
- package/build/module_type_should_override_this/lib/error-handler/bugsplat-remote-reporter.js +54 -0
- package/build/module_type_should_override_this/lib/error-handler/bugsplat-remote-reporter.js.map +1 -0
- package/build/module_type_should_override_this/lib/error-handler/error-batcher.d.ts +11 -0
- package/build/module_type_should_override_this/lib/error-handler/error-batcher.js +50 -0
- package/build/module_type_should_override_this/lib/error-handler/error-batcher.js.map +1 -0
- package/build/module_type_should_override_this/lib/error-handler/error-handler.d.ts +43 -0
- package/build/module_type_should_override_this/lib/error-handler/error-handler.js +234 -0
- package/build/module_type_should_override_this/lib/error-handler/error-handler.js.map +1 -0
- package/build/module_type_should_override_this/lib/error-handler/error-handler.testp.d.ts +4 -0
- package/build/module_type_should_override_this/lib/error-handler/error-handler.testp.js +13 -0
- package/build/module_type_should_override_this/lib/error-handler/error-handler.testp.js.map +1 -0
- package/build/module_type_should_override_this/lib/event/on-card-became-singleton-or-deck.d.ts +30 -0
- package/build/module_type_should_override_this/lib/event/on-card-became-singleton-or-deck.js +99 -0
- package/build/module_type_should_override_this/lib/event/on-card-became-singleton-or-deck.js.map +1 -0
- package/build/module_type_should_override_this/lib/event/on-card-became-singleton-or-deck.testp.d.ts +1 -0
- package/build/module_type_should_override_this/lib/event/on-card-became-singleton-or-deck.testp.js +13 -0
- package/build/module_type_should_override_this/lib/event/on-card-became-singleton-or-deck.testp.js.map +1 -0
- package/build/module_type_should_override_this/lib/event/throttle-click-handler.d.ts +9 -0
- package/build/module_type_should_override_this/lib/event/throttle-click-handler.js +24 -0
- package/build/module_type_should_override_this/lib/event/throttle-click-handler.js.map +1 -0
- package/build/module_type_should_override_this/lib/event/triggerable-multicast-delegate.d.ts +30 -0
- package/build/module_type_should_override_this/lib/event/triggerable-multicast-delegate.js +53 -0
- package/build/module_type_should_override_this/lib/event/triggerable-multicast-delegate.js.map +1 -0
- package/build/module_type_should_override_this/lib/facing/facing.d.ts +4 -0
- package/build/module_type_should_override_this/lib/facing/facing.js +15 -0
- package/build/module_type_should_override_this/lib/facing/facing.js.map +1 -0
- package/build/module_type_should_override_this/lib/find/find.d.ts +19 -0
- package/build/module_type_should_override_this/lib/find/find.js +152 -0
- package/build/module_type_should_override_this/lib/find/find.js.map +1 -0
- package/build/module_type_should_override_this/lib/game-object/cardholder-player-name/cardholder-player-name-obj.d.ts +1 -0
- package/build/module_type_should_override_this/lib/game-object/cardholder-player-name/cardholder-player-name-obj.js +10 -0
- package/build/module_type_should_override_this/lib/game-object/cardholder-player-name/cardholder-player-name-obj.js.map +1 -0
- package/build/module_type_should_override_this/lib/game-object/cardholder-player-name/cardholder-player-name.d.ts +19 -0
- package/build/module_type_should_override_this/lib/game-object/cardholder-player-name/cardholder-player-name.js +101 -0
- package/build/module_type_should_override_this/lib/game-object/cardholder-player-name/cardholder-player-name.js.map +1 -0
- package/build/module_type_should_override_this/lib/game-object/deleted-items-container/deleted-items-container-obj.d.ts +1 -0
- package/build/module_type_should_override_this/lib/game-object/deleted-items-container/deleted-items-container-obj.js +5 -0
- package/build/module_type_should_override_this/lib/game-object/deleted-items-container/deleted-items-container-obj.js.map +1 -0
- package/build/module_type_should_override_this/lib/game-object/deleted-items-container/deleted-items-container.d.ts +24 -0
- package/build/module_type_should_override_this/lib/game-object/deleted-items-container/deleted-items-container.js +91 -0
- package/build/module_type_should_override_this/lib/game-object/deleted-items-container/deleted-items-container.js.map +1 -0
- package/build/module_type_should_override_this/lib/game-object/garbage/garbage-container-obj.d.ts +1 -0
- package/build/module_type_should_override_this/lib/game-object/garbage/garbage-container-obj.js +4 -0
- package/build/module_type_should_override_this/lib/game-object/garbage/garbage-container-obj.js.map +1 -0
- package/build/module_type_should_override_this/lib/game-object/garbage/garbage-container.d.ts +43 -0
- package/build/module_type_should_override_this/lib/game-object/garbage/garbage-container.js +116 -0
- package/build/module_type_should_override_this/lib/game-object/garbage/garbage-container.js.map +1 -0
- package/build/module_type_should_override_this/lib/game-object/garbage/simple-card-garbage-handler.d.ts +20 -0
- package/build/module_type_should_override_this/lib/game-object/garbage/simple-card-garbage-handler.js +100 -0
- package/build/module_type_should_override_this/lib/game-object/garbage/simple-card-garbage-handler.js.map +1 -0
- package/build/module_type_should_override_this/lib/game-object/garbage/simple-to-container-handler.d.ts +16 -0
- package/build/module_type_should_override_this/lib/game-object/garbage/simple-to-container-handler.js +44 -0
- package/build/module_type_should_override_this/lib/game-object/garbage/simple-to-container-handler.js.map +1 -0
- package/build/module_type_should_override_this/lib/game-object/garbage/simple-to-snap-point-handler.d.ts +19 -0
- package/build/module_type_should_override_this/lib/game-object/garbage/simple-to-snap-point-handler.js +50 -0
- package/build/module_type_should_override_this/lib/game-object/garbage/simple-to-snap-point-handler.js.map +1 -0
- package/build/module_type_should_override_this/lib/global/global-init.d.ts +10 -0
- package/build/module_type_should_override_this/lib/global/global-init.js +20 -0
- package/build/module_type_should_override_this/lib/global/global-init.js.map +1 -0
- package/build/module_type_should_override_this/lib/global/i-global.d.ts +3 -0
- package/build/module_type_should_override_this/lib/global/i-global.js +2 -0
- package/build/module_type_should_override_this/lib/global/i-global.js.map +1 -0
- package/build/module_type_should_override_this/lib/heap/heap.d.ts +8 -0
- package/build/module_type_should_override_this/lib/heap/heap.js +109 -0
- package/build/module_type_should_override_this/lib/heap/heap.js.map +1 -0
- package/build/module_type_should_override_this/lib/layout-objects/layout-objects.d.ts +49 -0
- package/build/module_type_should_override_this/lib/layout-objects/layout-objects.js +257 -0
- package/build/module_type_should_override_this/lib/layout-objects/layout-objects.js.map +1 -0
- package/build/module_type_should_override_this/lib/locale/locale.d.ts +8 -0
- package/build/module_type_should_override_this/lib/locale/locale.js +48 -0
- package/build/module_type_should_override_this/lib/locale/locale.js.map +1 -0
- package/build/module_type_should_override_this/lib/namespace-id/namespace-id.d.ts +1 -0
- package/build/module_type_should_override_this/lib/namespace-id/namespace-id.js +2 -0
- package/build/module_type_should_override_this/lib/namespace-id/namespace-id.js.map +1 -0
- package/build/module_type_should_override_this/lib/nsid/nsid.d.ts +54 -0
- package/build/module_type_should_override_this/lib/nsid/nsid.js +86 -0
- package/build/module_type_should_override_this/lib/nsid/nsid.js.map +1 -0
- package/build/module_type_should_override_this/lib/parse/parse-color.d.ts +7 -0
- package/build/module_type_should_override_this/lib/parse/parse-color.js +43 -0
- package/build/module_type_should_override_this/lib/parse/parse-color.js.map +1 -0
- package/build/module_type_should_override_this/lib/perf/perf.d.ts +29 -0
- package/build/module_type_should_override_this/lib/perf/perf.js +93 -0
- package/build/module_type_should_override_this/lib/perf/perf.js.map +1 -0
- package/build/module_type_should_override_this/lib/setup/abstract-setup.d.ts +18 -0
- package/build/module_type_should_override_this/lib/setup/abstract-setup.js +22 -0
- package/build/module_type_should_override_this/lib/setup/abstract-setup.js.map +1 -0
- package/build/module_type_should_override_this/lib/shuffle/shuffle.d.ts +7 -0
- package/build/module_type_should_override_this/lib/shuffle/shuffle.js +26 -0
- package/build/module_type_should_override_this/lib/shuffle/shuffle.js.map +1 -0
- package/build/module_type_should_override_this/lib/spawn/spawn.d.ts +21 -0
- package/build/module_type_should_override_this/lib/spawn/spawn.js +116 -0
- package/build/module_type_should_override_this/lib/spawn/spawn.js.map +1 -0
- package/build/module_type_should_override_this/lib/svg/svg-sparkline.d.ts +12 -0
- package/build/module_type_should_override_this/lib/svg/svg-sparkline.js +40 -0
- package/build/module_type_should_override_this/lib/svg/svg-sparkline.js.map +1 -0
- package/build/module_type_should_override_this/lib/turn-order/turn-order.d.ts +51 -0
- package/build/module_type_should_override_this/lib/turn-order/turn-order.js +200 -0
- package/build/module_type_should_override_this/lib/turn-order/turn-order.js.map +1 -0
- package/build/module_type_should_override_this/lib/ui/screen-test.d.ts +1 -0
- package/build/module_type_should_override_this/lib/ui/screen-test.js +20 -0
- package/build/module_type_should_override_this/lib/ui/screen-test.js.map +1 -0
- package/build/module_type_should_override_this/lib/ui-visibility/ui-visibility.d.ts +17 -0
- package/build/module_type_should_override_this/lib/ui-visibility/ui-visibility.js +65 -0
- package/build/module_type_should_override_this/lib/ui-visibility/ui-visibility.js.map +1 -0
- package/build/module_type_should_override_this/lib/whisper-reporter/whisper-reporter-locale.data.d.ts +3 -0
- package/build/module_type_should_override_this/lib/whisper-reporter/whisper-reporter-locale.data.js +4 -0
- package/build/module_type_should_override_this/lib/whisper-reporter/whisper-reporter-locale.data.js.map +1 -0
- package/build/module_type_should_override_this/lib/whisper-reporter/whisper-reporter.d.ts +5 -0
- package/build/module_type_should_override_this/lib/whisper-reporter/whisper-reporter.js +25 -0
- package/build/module_type_should_override_this/lib/whisper-reporter/whisper-reporter.js.map +1 -0
- package/build/module_type_should_override_this/lib/widget/confirm-button/confirm-button.d.ts +2 -0
- package/build/module_type_should_override_this/lib/widget/confirm-button/confirm-button.js +3 -0
- package/build/module_type_should_override_this/lib/widget/confirm-button/confirm-button.js.map +1 -0
- package/build/module_type_should_override_this/lib/widget/d6widget/d6widget.d.ts +48 -0
- package/build/module_type_should_override_this/lib/widget/d6widget/d6widget.js +84 -0
- package/build/module_type_should_override_this/lib/widget/d6widget/d6widget.js.map +1 -0
- package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-button.d.ts +35 -0
- package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-button.js +109 -0
- package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-button.js.map +1 -0
- package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-button.testp.d.ts +1 -0
- package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-button.testp.js +10 -0
- package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-button.testp.js.map +1 -0
- package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-locale.data.d.ts +3 -0
- package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-locale.data.js +4 -0
- package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-locale.data.js.map +1 -0
- package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-button.d.ts +28 -0
- package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-button.js +99 -0
- package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-button.js.map +1 -0
- package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-button.testp.d.ts +1 -0
- package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-button.testp.js +10 -0
- package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-button.testp.js.map +1 -0
- package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-locale.data.d.ts +3 -0
- package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-locale.data.js +5 -0
- package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-locale.data.js.map +1 -0
- package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget-locale.data.d.ts +3 -0
- package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget-locale.data.js +4 -0
- package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget-locale.data.js.map +1 -0
- package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget.d.ts +19 -0
- package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget.js +74 -0
- package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget.js.map +1 -0
- package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget.testp.d.ts +1 -0
- package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget.testp.js +5 -0
- package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget.testp.js.map +1 -0
- package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-clicked-widget.d.ts +22 -0
- package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-clicked-widget.js +136 -0
- package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-clicked-widget.js.map +1 -0
- package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-entry-wart.d.ts +16 -0
- package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-entry-wart.js +7 -0
- package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-entry-wart.js.map +1 -0
- package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-entry-widget.d.ts +29 -0
- package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-entry-widget.js +131 -0
- package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-entry-widget.js.map +1 -0
- package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-locale.data.d.ts +3 -0
- package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-locale.data.js +13 -0
- package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-locale.data.js.map +1 -0
- package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget-params.d.ts +33 -0
- package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget-params.js +6 -0
- package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget-params.js.map +1 -0
- package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget.d.ts +25 -0
- package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget.js +99 -0
- package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget.js.map +1 -0
- package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget.testp.d.ts +1 -0
- package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget.testp.js +58 -0
- package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget.testp.js.map +1 -0
- package/build/module_type_should_override_this/lib-ext/image-table.d.ts +1 -0
- package/build/module_type_should_override_this/lib-ext/image-table.js +9 -0
- package/build/module_type_should_override_this/lib-ext/image-table.js.map +1 -0
- package/build/module_type_should_override_this/locale.data.d.ts +4 -0
- package/build/module_type_should_override_this/locale.data.js +5 -0
- package/build/module_type_should_override_this/locale.data.js.map +1 -0
- package/package.json +1 -1
- package/build/cjs/test.js +0 -12
- package/build/cjs/test.js.map +0 -1
- /package/build/cjs/{test.d.ts → lib/game-object/dice-snap-rotation/dice-snap-rotation-obj.d.ts} +0 -0
package/build/cjs/lib/bug-workarounds/bug-force-transform-updates/bug-force-transform-updates.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GameObject } from "@tabletop-playground/api";
|
|
2
|
+
import { IGlobal } from "../../global/i-global";
|
|
3
|
+
export declare const DELTA: number;
|
|
4
|
+
/**
|
|
5
|
+
* Object transforms aren't getting replicated reliably.
|
|
6
|
+
* When an object stops moving, force a few trnaform updates.
|
|
7
|
+
*/
|
|
8
|
+
export declare class BugForceTransformUpdates implements IGlobal {
|
|
9
|
+
private readonly _idToRemainingPokeCount;
|
|
10
|
+
readonly _maybeStartPoking: (obj: GameObject) => void;
|
|
11
|
+
init(): void;
|
|
12
|
+
pokeAll(): void;
|
|
13
|
+
poke(obj: GameObject, dir: number): void;
|
|
14
|
+
}
|
package/build/cjs/lib/bug-workarounds/bug-force-transform-updates/bug-force-transform-updates.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BugForceTransformUpdates = exports.DELTA = void 0;
|
|
4
|
+
const api_1 = require("@tabletop-playground/api");
|
|
5
|
+
exports.DELTA = 0.021;
|
|
6
|
+
/**
|
|
7
|
+
* Object transforms aren't getting replicated reliably.
|
|
8
|
+
* When an object stops moving, force a few trnaform updates.
|
|
9
|
+
*/
|
|
10
|
+
class BugForceTransformUpdates {
|
|
11
|
+
constructor() {
|
|
12
|
+
this._idToRemainingPokeCount = new Map();
|
|
13
|
+
// Only add if not already processing
|
|
14
|
+
this._maybeStartPoking = (obj) => {
|
|
15
|
+
const id = obj.getId();
|
|
16
|
+
const count = this._idToRemainingPokeCount.get(id);
|
|
17
|
+
if (count === undefined) {
|
|
18
|
+
this._idToRemainingPokeCount.set(id, 3);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
init() {
|
|
23
|
+
const linkObj = (obj) => {
|
|
24
|
+
obj.onMovementStopped.add(this._maybeStartPoking);
|
|
25
|
+
obj.onSnapped.add(this._maybeStartPoking);
|
|
26
|
+
};
|
|
27
|
+
for (const obj of api_1.world.getAllObjects()) {
|
|
28
|
+
linkObj(obj);
|
|
29
|
+
}
|
|
30
|
+
api_1.globalEvents.onObjectCreated.add(linkObj);
|
|
31
|
+
setInterval(() => {
|
|
32
|
+
this.pokeAll();
|
|
33
|
+
}, 100);
|
|
34
|
+
}
|
|
35
|
+
pokeAll() {
|
|
36
|
+
for (const [id, count] of this._idToRemainingPokeCount) {
|
|
37
|
+
const obj = api_1.world.getObjectById(id);
|
|
38
|
+
if (!obj || !obj.isValid() || count < -1 || obj.isHeld()) {
|
|
39
|
+
this._idToRemainingPokeCount.delete(id);
|
|
40
|
+
}
|
|
41
|
+
else if (count >= 0) {
|
|
42
|
+
this._idToRemainingPokeCount.set(id, count - 1);
|
|
43
|
+
const dir = count % 2 === 1 ? 1 : -1;
|
|
44
|
+
this.poke(obj, dir);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
poke(obj, dir) {
|
|
49
|
+
const pos = obj.getPosition();
|
|
50
|
+
const rot = obj.getRotation();
|
|
51
|
+
pos.x += dir * exports.DELTA;
|
|
52
|
+
rot.yaw += dir * exports.DELTA;
|
|
53
|
+
obj.setPosition(pos);
|
|
54
|
+
obj.setRotation(rot);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.BugForceTransformUpdates = BugForceTransformUpdates;
|
|
58
|
+
//# sourceMappingURL=bug-force-transform-updates.js.map
|
package/build/cjs/lib/bug-workarounds/bug-force-transform-updates/bug-force-transform-updates.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bug-force-transform-updates.js","sourceRoot":"","sources":["../../../../../src/lib/bug-workarounds/bug-force-transform-updates/bug-force-transform-updates.ts"],"names":[],"mappings":";;;AAAA,kDAA2E;AAG9D,QAAA,KAAK,GAAW,KAAK,CAAC;AAEnC;;;GAGG;AACH,MAAa,wBAAwB;IAArC;QACqB,4BAAuB,GAAwB,IAAI,GAAG,EAAE,CAAC;QAE1E,qCAAqC;QAC5B,sBAAiB,GAAG,CAAC,GAAe,EAAQ,EAAE;YACnD,MAAM,EAAE,GAAW,GAAG,CAAC,KAAK,EAAE,CAAC;YAC/B,MAAM,KAAK,GAAuB,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACvE,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBACtB,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;YAC5C,CAAC;QACL,CAAC,CAAC;IAsCN,CAAC;IApCG,IAAI;QACA,MAAM,OAAO,GAAG,CAAC,GAAe,EAAQ,EAAE;YACtC,GAAG,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;YAClD,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAC9C,CAAC,CAAC;QACF,KAAK,MAA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aAAK,CAAC;QACvB,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACrB,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;CACJ;AAhDD,4DAgDC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Player } from "@tabletop-playground/api";
|
|
2
2
|
export declare class ThrottleClickHandler<T> {
|
|
3
|
-
static readonly THROTTLE_MSECS =
|
|
3
|
+
static readonly THROTTLE_MSECS = 500;
|
|
4
4
|
private readonly _playerSlotToLastClickMsecs;
|
|
5
5
|
private readonly _clickHandler;
|
|
6
6
|
private readonly _throttledHandler;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const api_1 = require("@tabletop-playground/api");
|
|
4
|
+
const dice_snap_rotation_1 = require("./dice-snap-rotation");
|
|
5
|
+
new dice_snap_rotation_1.DiceSnapRotation(api_1.refDice);
|
|
6
|
+
//# sourceMappingURL=dice-snap-rotation-obj.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dice-snap-rotation-obj.js","sourceRoot":"","sources":["../../../../../src/lib/game-object/dice-snap-rotation/dice-snap-rotation-obj.ts"],"names":[],"mappings":";;AAAA,kDAAmD;AACnD,6DAAwD;AAExD,IAAI,qCAAgB,CAAC,aAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DiceSnapRotation = void 0;
|
|
4
|
+
const api_1 = require("@tabletop-playground/api");
|
|
5
|
+
const snappedHandler = (dice, player, snapPoint, grabPosition, grabRotation) => {
|
|
6
|
+
// Snap point flipped to first face, get yaw.
|
|
7
|
+
const yaw = dice.getRotation().yaw;
|
|
8
|
+
// Read face value from what it was when grabbed.
|
|
9
|
+
dice.setRotation(grabRotation);
|
|
10
|
+
const faceIndex = dice.getCurrentFaceIndex();
|
|
11
|
+
// Set face (resets rotation to native), rotate yaw in that face axis.
|
|
12
|
+
dice.setCurrentFace(faceIndex);
|
|
13
|
+
dice.setRotation(dice.getRotation().compose([0, yaw, 0]));
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Preserve current face while applying snap point rotation.
|
|
17
|
+
*/
|
|
18
|
+
class DiceSnapRotation {
|
|
19
|
+
constructor(dice) {
|
|
20
|
+
if (!dice || !(dice instanceof api_1.Dice)) {
|
|
21
|
+
throw new Error("not Dice");
|
|
22
|
+
}
|
|
23
|
+
dice.onSnapped.add(snappedHandler);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.DiceSnapRotation = DiceSnapRotation;
|
|
27
|
+
//# sourceMappingURL=dice-snap-rotation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dice-snap-rotation.js","sourceRoot":"","sources":["../../../../../src/lib/game-object/dice-snap-rotation/dice-snap-rotation.ts"],"names":[],"mappings":";;;AAAA,kDAMkC;AAElC,MAAM,cAAc,GAAG,CACnB,IAAU,EACV,MAAc,EACd,SAAoB,EACpB,YAAwD,EACxD,YAAkE,EAC9D,EAAE;IACN,6CAA6C;IAC7C,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC;IAEnC,iDAAiD;IACjD,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAC/B,MAAM,SAAS,GAAG,IAAI,CAAC,mBAAmB,EAAE,CAAC;IAE7C,sEAAsE;IACtE,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;IAC/B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9D,CAAC,CAAC;AAEF;;GAEG;AACH,MAAa,gBAAgB;IACzB,YAAY,IAAU;QAClB,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,YAAY,UAAI,CAAC,EAAE,CAAC;YACnC,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;QAChC,CAAC;QACD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACvC,CAAC;CACJ;AAPD,4CAOC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Color } from "@tabletop-playground/api";
|
|
2
|
-
|
|
2
|
+
import { TurnOrderWidgetParams } from "./turn-order-widget-params";
|
|
3
|
+
import { TurnEntryWidget } from "./turn-entry-widget";
|
|
4
|
+
export type TurnEntryWartGenerator = (widget: TurnEntryWidget, params: TurnOrderWidgetParams) => TurnEntryWart;
|
|
3
5
|
/**
|
|
4
6
|
* Augment a TurnEntryWidget. May update its own widgets independently of
|
|
5
7
|
* changes to turn order (e.g. change score value when score changes).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turn-entry-wart.js","sourceRoot":"","sources":["../../../../../src/lib/widget/turn-order-widget/turn-entry-wart.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"turn-entry-wart.js","sourceRoot":"","sources":["../../../../../src/lib/widget/turn-order-widget/turn-entry-wart.ts"],"names":[],"mappings":";;;AASA;;;GAGG;AACH,MAAsB,aAAa;CAUlC;AAVD,sCAUC"}
|
package/build/esm/lib/bug-workarounds/bug-force-transform-updates/bug-force-transform-updates.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GameObject } from "@tabletop-playground/api";
|
|
2
|
+
import { IGlobal } from "../../global/i-global";
|
|
3
|
+
export declare const DELTA: number;
|
|
4
|
+
/**
|
|
5
|
+
* Object transforms aren't getting replicated reliably.
|
|
6
|
+
* When an object stops moving, force a few trnaform updates.
|
|
7
|
+
*/
|
|
8
|
+
export declare class BugForceTransformUpdates implements IGlobal {
|
|
9
|
+
private readonly _idToRemainingPokeCount;
|
|
10
|
+
readonly _maybeStartPoking: (obj: GameObject) => void;
|
|
11
|
+
init(): void;
|
|
12
|
+
pokeAll(): void;
|
|
13
|
+
poke(obj: GameObject, dir: number): void;
|
|
14
|
+
}
|
package/build/esm/lib/bug-workarounds/bug-force-transform-updates/bug-force-transform-updates.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { globalEvents, world } from "@tabletop-playground/api";
|
|
2
|
+
export const DELTA = 0.021;
|
|
3
|
+
/**
|
|
4
|
+
* Object transforms aren't getting replicated reliably.
|
|
5
|
+
* When an object stops moving, force a few trnaform updates.
|
|
6
|
+
*/
|
|
7
|
+
export class BugForceTransformUpdates {
|
|
8
|
+
constructor() {
|
|
9
|
+
this._idToRemainingPokeCount = new Map();
|
|
10
|
+
// Only add if not already processing
|
|
11
|
+
this._maybeStartPoking = (obj) => {
|
|
12
|
+
const id = obj.getId();
|
|
13
|
+
const count = this._idToRemainingPokeCount.get(id);
|
|
14
|
+
if (count === undefined) {
|
|
15
|
+
this._idToRemainingPokeCount.set(id, 3);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
init() {
|
|
20
|
+
const linkObj = (obj) => {
|
|
21
|
+
obj.onMovementStopped.add(this._maybeStartPoking);
|
|
22
|
+
obj.onSnapped.add(this._maybeStartPoking);
|
|
23
|
+
};
|
|
24
|
+
for (const obj of world.getAllObjects()) {
|
|
25
|
+
linkObj(obj);
|
|
26
|
+
}
|
|
27
|
+
globalEvents.onObjectCreated.add(linkObj);
|
|
28
|
+
setInterval(() => {
|
|
29
|
+
this.pokeAll();
|
|
30
|
+
}, 100);
|
|
31
|
+
}
|
|
32
|
+
pokeAll() {
|
|
33
|
+
for (const [id, count] of this._idToRemainingPokeCount) {
|
|
34
|
+
const obj = world.getObjectById(id);
|
|
35
|
+
if (!obj || !obj.isValid() || count < -1 || obj.isHeld()) {
|
|
36
|
+
this._idToRemainingPokeCount.delete(id);
|
|
37
|
+
}
|
|
38
|
+
else if (count >= 0) {
|
|
39
|
+
this._idToRemainingPokeCount.set(id, count - 1);
|
|
40
|
+
const dir = count % 2 === 1 ? 1 : -1;
|
|
41
|
+
this.poke(obj, dir);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
poke(obj, dir) {
|
|
46
|
+
const pos = obj.getPosition();
|
|
47
|
+
const rot = obj.getRotation();
|
|
48
|
+
pos.x += dir * DELTA;
|
|
49
|
+
rot.yaw += dir * DELTA;
|
|
50
|
+
obj.setPosition(pos);
|
|
51
|
+
obj.setRotation(rot);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=bug-force-transform-updates.js.map
|
package/build/esm/lib/bug-workarounds/bug-force-transform-updates/bug-force-transform-updates.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bug-force-transform-updates.js","sourceRoot":"","sources":["../../../../../src/lib/bug-workarounds/bug-force-transform-updates/bug-force-transform-updates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,YAAY,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAG3E,MAAM,CAAC,MAAM,KAAK,GAAW,KAAK,CAAC;AAEnC;;;GAGG;AACH,MAAM,OAAO,wBAAwB;IAArC;QACqB,4BAAuB,GAAwB,IAAI,GAAG,EAAE,CAAC;QAE1E,qCAAqC;QAC5B,sBAAiB,GAAG,CAAC,GAAe,EAAQ,EAAE;YACnD,MAAM,EAAE,GAAW,GAAG,CAAC,KAAK,EAAE,CAAC;YAC/B,MAAM,KAAK,GAAuB,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACvE,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBACtB,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;YAC5C,CAAC;QACL,CAAC,CAAC;IAsCN,CAAC;IApCG,IAAI;QACA,MAAM,OAA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AE,GAAW;QAC7B,MAAM,GAAG,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC;QAC9B,MAAM,GAAG,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC;QAC9B,GAAG,CAAC,CAAC,IAAI,GAAG,GAAG,KAAK,CAAC;QACrB,GAAG,CAAC,GAAG,IAAI,GAAG,GAAG,KAAK,CAAC;QACvB,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACrB,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dice-snap-rotation-obj.js","sourceRoot":"","sources":["../../../../../src/lib/game-object/dice-snap-rotation/dice-snap-rotation-obj.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,IAAI,gBAAgB,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Dice, } from "@tabletop-playground/api";
|
|
2
|
+
const snappedHandler = (dice, player, snapPoint, grabPosition, grabRotation) => {
|
|
3
|
+
// Read face value from what it was when grabbed.
|
|
4
|
+
dice.setRotation(grabRotation);
|
|
5
|
+
const faceIndex = dice.getCurrentFaceIndex();
|
|
6
|
+
// Get the yaw from the snapped rotation.
|
|
7
|
+
const yaw = dice.getRotation().yaw;
|
|
8
|
+
// Change to correct face, rotate yaw in that face axis.
|
|
9
|
+
dice.setCurrentFace(faceIndex);
|
|
10
|
+
dice.setRotation(dice.getRotation().compose([0, yaw, 0]));
|
|
11
|
+
};
|
|
12
|
+
export class DiceSnapRotation {
|
|
13
|
+
constructor(dice) {
|
|
14
|
+
if (!dice || !(dice instanceof Dice)) {
|
|
15
|
+
throw new Error("not Dice");
|
|
16
|
+
}
|
|
17
|
+
dice.onSnapped.add(snappedHandler);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=dice-snap-rotation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dice-snap-rotation.js","sourceRoot":"","sources":["../../../../../src/lib/game-object/dice-snap-rotation/dice-snap-rotation.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,IAAI,GAKP,MAAM,0BAA0B,CAAC;AAElC,MAAM,cAAc,GAAG,CACnB,IAAU,EACV,MAAc,EACd,SAAoB,EACpB,YAAwD,EACxD,YAAkE,EAC9D,EAAE;IACN,iDAAiD;IACjD,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAC/B,MAAM,SAAS,GAAG,IAAI,CAAC,mBAAmB,EAAE,CAAC;IAE7C,yCAAyC;IACzC,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC;IAEnC,wDAAwD;IACxD,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;IAC/B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9D,CAAC,CAAC;AAEF,MAAM,OAAO,gBAAgB;IACzB,YAAY,IAAU;QAClB,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,YAAY,IAAI,CAAC,EAAE,CAAC;YACnC,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;QAChC,CAAC;QACD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACvC,CAAC;CACJ"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Color } from "@tabletop-playground/api";
|
|
2
|
-
|
|
2
|
+
import { TurnOrderWidgetParams } from "./turn-order-widget-params";
|
|
3
|
+
import { TurnEntryWidget } from "./turn-entry-widget";
|
|
4
|
+
export type TurnEntryWartGenerator = (widget: TurnEntryWidget, params: TurnOrderWidgetParams) => TurnEntryWart;
|
|
3
5
|
/**
|
|
4
6
|
* Augment a TurnEntryWidget. May update its own widgets independently of
|
|
5
7
|
* changes to turn order (e.g. change score value when score changes).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turn-entry-wart.js","sourceRoot":"","sources":["../../../../../src/lib/widget/turn-order-widget/turn-entry-wart.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"turn-entry-wart.js","sourceRoot":"","sources":["../../../../../src/lib/widget/turn-order-widget/turn-entry-wart.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,MAAM,OAAgB,aAAa;CAUlC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export * from "./lib/adjacency/adjacency";
|
|
2
|
+
export * from "./lib/broadcast/broadcast";
|
|
3
|
+
export * from "./lib/bug-workarounds/bug-card-holder-assignment";
|
|
4
|
+
export * from "./lib/bug-workarounds/bug-unique-cards";
|
|
5
|
+
export * from "./lib/card-util/card-util";
|
|
6
|
+
export * from "./lib/context-menu/abstract-right-click-card";
|
|
7
|
+
export * from "./lib/context-menu/abstract-right-click-deck";
|
|
8
|
+
export * from "./lib/context-menu/leave-seat";
|
|
9
|
+
export * from "./lib/data-store/data-store";
|
|
10
|
+
export * from "./lib/dice-group/dice-group";
|
|
11
|
+
export * from "./lib/error-handler/bugsplat-remote-reporter";
|
|
12
|
+
export * from "./lib/error-handler/error-batcher";
|
|
13
|
+
export * from "./lib/error-handler/error-handler";
|
|
14
|
+
export * from "./lib/event/on-card-became-singleton-or-deck";
|
|
15
|
+
export * from "./lib/event/triggerable-multicast-delegate";
|
|
16
|
+
export * from "./lib/facing/facing";
|
|
17
|
+
export * from "./lib/find/find";
|
|
18
|
+
export * from "./lib/game-object/cardholder-player-name/cardholder-player-name";
|
|
19
|
+
export * from "./lib/game-object/deleted-items-container/deleted-items-container";
|
|
20
|
+
export * from "./lib/game-object/garbage/garbage-container";
|
|
21
|
+
export * from "./lib/game-object/garbage/simple-card-garbage-handler";
|
|
22
|
+
export * from "./lib/game-object/garbage/simple-to-container-handler";
|
|
23
|
+
export * from "./lib/game-object/garbage/simple-to-snap-point-handler";
|
|
24
|
+
export * from "./lib/global/global-init";
|
|
25
|
+
export * from "./lib/global/i-global";
|
|
26
|
+
export * from "./lib/heap/heap";
|
|
27
|
+
export * from "./lib/layout-objects/layout-objects";
|
|
28
|
+
export * from "./lib/locale/locale";
|
|
29
|
+
export * from "./lib/namespace-id/namespace-id";
|
|
30
|
+
export * from "./lib/nsid/nsid";
|
|
31
|
+
export * from "./lib/parse/parse-color";
|
|
32
|
+
export * from "./lib/perf/perf";
|
|
33
|
+
export * from "./lib/setup/abstract-setup";
|
|
34
|
+
export * from "./lib/shuffle/shuffle";
|
|
35
|
+
export * from "./lib/spawn/spawn";
|
|
36
|
+
export * from "./lib/svg/svg-sparkline";
|
|
37
|
+
export * from "./lib/turn-order/turn-order";
|
|
38
|
+
export * from "./lib/ui-visibility/ui-visibility";
|
|
39
|
+
export * from "./lib/whisper-reporter/whisper-reporter";
|
|
40
|
+
export * from "./lib/widget/confirm-button/confirm-button";
|
|
41
|
+
export * from "./lib/widget/d6widget/d6widget";
|
|
42
|
+
export * from "./lib/widget/end-turn-button/end-turn-button";
|
|
43
|
+
export * from "./lib/widget/end-turn-button/end-turn-locale.data";
|
|
44
|
+
export * from "./lib/widget/hot-seat-button/hot-seat-button";
|
|
45
|
+
export * from "./lib/widget/hot-seat-button/hot-seat-locale.data";
|
|
46
|
+
export * from "./lib/widget/perf-widget/perf-widget-locale.data";
|
|
47
|
+
export * from "./lib/widget/perf-widget/perf-widget";
|
|
48
|
+
export * from "./lib/widget/turn-order-widget/turn-clicked-widget";
|
|
49
|
+
export * from "./lib/widget/turn-order-widget/turn-entry-wart";
|
|
50
|
+
export * from "./lib/widget/turn-order-widget/turn-entry-widget";
|
|
51
|
+
export * from "./lib/widget/turn-order-widget/turn-order-locale.data";
|
|
52
|
+
export * from "./lib/widget/turn-order-widget/turn-order-widget-params";
|
|
53
|
+
export * from "./lib/widget/turn-order-widget/turn-order-widget";
|
|
54
|
+
export * from "./locale.data";
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export * from "./lib/adjacency/adjacency";
|
|
2
|
+
export * from "./lib/broadcast/broadcast";
|
|
3
|
+
export * from "./lib/bug-workarounds/bug-card-holder-assignment";
|
|
4
|
+
export * from "./lib/bug-workarounds/bug-unique-cards";
|
|
5
|
+
export * from "./lib/card-util/card-util";
|
|
6
|
+
export * from "./lib/context-menu/abstract-right-click-card";
|
|
7
|
+
export * from "./lib/context-menu/abstract-right-click-deck";
|
|
8
|
+
export * from "./lib/context-menu/leave-seat";
|
|
9
|
+
export * from "./lib/data-store/data-store";
|
|
10
|
+
export * from "./lib/dice-group/dice-group";
|
|
11
|
+
export * from "./lib/error-handler/bugsplat-remote-reporter";
|
|
12
|
+
export * from "./lib/error-handler/error-batcher";
|
|
13
|
+
export * from "./lib/error-handler/error-handler";
|
|
14
|
+
export * from "./lib/event/on-card-became-singleton-or-deck";
|
|
15
|
+
export * from "./lib/event/triggerable-multicast-delegate";
|
|
16
|
+
export * from "./lib/facing/facing";
|
|
17
|
+
export * from "./lib/find/find";
|
|
18
|
+
export * from "./lib/game-object/cardholder-player-name/cardholder-player-name";
|
|
19
|
+
export * from "./lib/game-object/deleted-items-container/deleted-items-container";
|
|
20
|
+
export * from "./lib/game-object/garbage/garbage-container";
|
|
21
|
+
export * from "./lib/game-object/garbage/simple-card-garbage-handler";
|
|
22
|
+
export * from "./lib/game-object/garbage/simple-to-container-handler";
|
|
23
|
+
export * from "./lib/game-object/garbage/simple-to-snap-point-handler";
|
|
24
|
+
export * from "./lib/global/global-init";
|
|
25
|
+
export * from "./lib/global/i-global";
|
|
26
|
+
export * from "./lib/heap/heap";
|
|
27
|
+
export * from "./lib/layout-objects/layout-objects";
|
|
28
|
+
export * from "./lib/locale/locale";
|
|
29
|
+
export * from "./lib/namespace-id/namespace-id";
|
|
30
|
+
export * from "./lib/nsid/nsid";
|
|
31
|
+
export * from "./lib/parse/parse-color";
|
|
32
|
+
export * from "./lib/perf/perf";
|
|
33
|
+
export * from "./lib/setup/abstract-setup";
|
|
34
|
+
export * from "./lib/shuffle/shuffle";
|
|
35
|
+
export * from "./lib/spawn/spawn";
|
|
36
|
+
export * from "./lib/svg/svg-sparkline";
|
|
37
|
+
export * from "./lib/turn-order/turn-order";
|
|
38
|
+
export * from "./lib/ui-visibility/ui-visibility";
|
|
39
|
+
export * from "./lib/whisper-reporter/whisper-reporter";
|
|
40
|
+
export * from "./lib/widget/confirm-button/confirm-button";
|
|
41
|
+
export * from "./lib/widget/d6widget/d6widget";
|
|
42
|
+
export * from "./lib/widget/end-turn-button/end-turn-button";
|
|
43
|
+
export * from "./lib/widget/end-turn-button/end-turn-locale.data";
|
|
44
|
+
export * from "./lib/widget/hot-seat-button/hot-seat-button";
|
|
45
|
+
export * from "./lib/widget/hot-seat-button/hot-seat-locale.data";
|
|
46
|
+
export * from "./lib/widget/perf-widget/perf-widget-locale.data";
|
|
47
|
+
export * from "./lib/widget/perf-widget/perf-widget";
|
|
48
|
+
export * from "./lib/widget/turn-order-widget/turn-clicked-widget";
|
|
49
|
+
export * from "./lib/widget/turn-order-widget/turn-entry-wart";
|
|
50
|
+
export * from "./lib/widget/turn-order-widget/turn-entry-widget";
|
|
51
|
+
export * from "./lib/widget/turn-order-widget/turn-order-locale.data";
|
|
52
|
+
export * from "./lib/widget/turn-order-widget/turn-order-widget-params";
|
|
53
|
+
export * from "./lib/widget/turn-order-widget/turn-order-widget";
|
|
54
|
+
export * from "./locale.data";
|
|
55
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;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CAAC;AACnE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,kDAAkD,CAAC;AACjE,cAAc,uDAAuD,CAAC;AACtE,cAAc,yDAAyD,CAAC;AACxE,cAAc,kDAAkD,CAAC;AACjE,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export type AdjacencyResult = {
|
|
2
|
+
node: string;
|
|
3
|
+
distance: number;
|
|
4
|
+
path: string[];
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Nodes have tags, links connect tags.
|
|
8
|
+
* Tansit nodes are on a path, but do not add to distance ("hyperlane").
|
|
9
|
+
*
|
|
10
|
+
* If two nodes share a tag they are NOT connected UNLESS there is a link
|
|
11
|
+
* from tag back to itself.
|
|
12
|
+
*
|
|
13
|
+
* A link may connect to multiple nodes that share the tag.
|
|
14
|
+
*/
|
|
15
|
+
export declare class Adjacency {
|
|
16
|
+
private readonly _nodeToTagSet;
|
|
17
|
+
private readonly _tagToNodeSet;
|
|
18
|
+
private readonly _tagToLinkedTagSet;
|
|
19
|
+
private readonly _transitNodes;
|
|
20
|
+
/**
|
|
21
|
+
* Add a node tag. Node tags may name the node, a specific edge, or a
|
|
22
|
+
* possibly-many-neighbors "hub tag" such as a wormhole.
|
|
23
|
+
*
|
|
24
|
+
* @param node
|
|
25
|
+
* @param tags
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
addNodeTags(node: string, tags: string[]): this;
|
|
29
|
+
removeNodeTags(node: string, tags: string[]): this;
|
|
30
|
+
hasNodeTag(node: string, tag: string): boolean;
|
|
31
|
+
_hasTagNode(tag: string, node: string): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Add a link. A node with one tag is connected to a node with the other.
|
|
34
|
+
*
|
|
35
|
+
* @param tag1
|
|
36
|
+
* @param tag2
|
|
37
|
+
* @returns
|
|
38
|
+
*/
|
|
39
|
+
addLink(tag1: string, tag2: string): this;
|
|
40
|
+
removeLink(tag1: string, tag2: string): this;
|
|
41
|
+
hasLink(tag1: string, tag2: string): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Transit nodes can appear along a path but do not add to distance
|
|
44
|
+
* (e.g. hyperlanes).
|
|
45
|
+
*
|
|
46
|
+
* @param node
|
|
47
|
+
* @returns
|
|
48
|
+
*/
|
|
49
|
+
addTransitNode(node: string): this;
|
|
50
|
+
removeTransitNode(node: string): this;
|
|
51
|
+
hasTransitNode(node: string): boolean;
|
|
52
|
+
_getAdjacentNodeSet(node: string): Set<string>;
|
|
53
|
+
/**
|
|
54
|
+
* Compute shortest paths to all nodes within maxDistance.
|
|
55
|
+
*
|
|
56
|
+
* @param origin
|
|
57
|
+
* @param maxDistance
|
|
58
|
+
* @returns
|
|
59
|
+
*/
|
|
60
|
+
get(origin: string, maxDistance: number): AdjacencyResult[];
|
|
61
|
+
}
|