@benev/tact 0.1.0-3 → 0.1.0-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +111 -103
- package/package.json +7 -7
- package/s/core/bindings/action.ts +14 -4
- package/s/core/bindings/parts/defaults.ts +3 -1
- package/s/core/bindings/parts/lens-algo.ts +17 -13
- package/s/core/bindings/resolver.ts +12 -12
- package/s/core/bindings/sample-map.ts +25 -0
- package/s/core/bindings/types.ts +3 -1
- package/s/core/core.test.ts +46 -34
- package/s/core/devices/auto-gamepads.ts +8 -0
- package/s/core/devices/device.ts +12 -0
- package/s/core/devices/infra/group.ts +24 -0
- package/s/core/devices/infra/sampler.ts +22 -0
- package/s/core/devices/standard/gamepad.ts +83 -0
- package/s/core/{controllers → devices}/standard/index.ts +2 -1
- package/s/core/devices/standard/keyboard.ts +31 -0
- package/s/core/{controllers → devices}/standard/pointer.ts +15 -11
- package/s/core/devices/standard/primary.ts +20 -0
- package/s/core/devices/standard/stick.ts +27 -0
- package/s/core/{controllers/standard/virtual-gamepad.ts → devices/standard/vpad.ts} +9 -9
- package/s/core/{controllers → devices}/types.ts +0 -1
- package/s/core/hub/hub.ts +78 -62
- package/s/core/hub/meta-bindings.ts +23 -0
- package/s/core/hub/parts/connected.ts +15 -0
- package/s/core/hub/port.ts +26 -0
- package/s/core/hub/types.ts +5 -6
- package/s/core/index.ts +12 -14
- package/s/core/testing/testing.ts +19 -14
- package/s/deck/deck.ts +77 -0
- package/s/deck/index.ts +14 -0
- package/s/deck/parts/catalog.ts +58 -0
- package/s/deck/parts/db.ts +66 -0
- package/s/deck/parts/device-skins/device-icons.ts +38 -0
- package/s/deck/parts/device-skins/device-skin.ts +29 -0
- package/s/deck/parts/local-storage-kv.ts +8 -0
- package/s/deck/parts/merge-bindings.ts +21 -0
- package/s/deck/parts/overlay-visibility.ts +49 -0
- package/s/deck/views/deck-overlay/component.ts +48 -0
- package/s/deck/views/deck-overlay/style.css.ts +112 -0
- package/s/deck/views/framework.ts +14 -0
- package/s/demo/game/game.ts +85 -0
- package/s/demo/game/parts/agent.ts +10 -0
- package/s/demo/game/parts/game-bindings.ts +20 -0
- package/s/demo/game/parts/logic.ts +24 -0
- package/s/demo/game/parts/player.ts +32 -0
- package/s/demo/game/parts/renderer.ts +113 -0
- package/s/demo/game/parts/state.ts +24 -0
- package/s/demo/game/parts/virtual-device.ts +13 -0
- package/s/demo/main.bundle.ts +6 -12
- package/s/demo/main.css +30 -2
- package/s/demo/ui/tact-demo/component.ts +13 -0
- package/s/demo/ui/tact-demo/style.css.ts +4 -0
- package/s/demo/ui/theater/styles.css.ts +57 -0
- package/s/demo/ui/theater/view.ts +53 -0
- package/s/demo/ui/theater/virtual/style.css.ts +43 -0
- package/s/demo/ui/theater/virtual/view.ts +31 -0
- package/s/demo/ui/utils/loader.ts +5 -0
- package/s/index.html.ts +16 -6
- package/s/index.ts +3 -1
- package/s/nubs/components.ts +14 -0
- package/s/nubs/index.ts +6 -0
- package/s/nubs/lookpad/component.ts +45 -0
- package/s/nubs/stick/component.ts +115 -0
- package/s/nubs/stick/style.css.ts +70 -0
- package/s/nubs/{virtual-gamepad/view.ts → vpad/component.ts} +21 -11
- package/s/nubs/{virtual-gamepad → vpad}/styles.css.ts +1 -0
- package/s/utils/circular-clamp.ts +15 -0
- package/s/utils/dispensers.ts +20 -0
- package/s/utils/split-axis.ts +10 -2
- package/x/core/bindings/action.d.ts +3 -1
- package/x/core/bindings/action.js +12 -4
- package/x/core/bindings/action.js.map +1 -1
- package/x/core/bindings/parts/defaults.js +3 -1
- package/x/core/bindings/parts/defaults.js.map +1 -1
- package/x/core/bindings/parts/lens-algo.js +14 -7
- package/x/core/bindings/parts/lens-algo.js.map +1 -1
- package/x/core/bindings/resolver.d.ts +5 -4
- package/x/core/bindings/resolver.js +12 -10
- package/x/core/bindings/resolver.js.map +1 -1
- package/x/core/bindings/sample-map.d.ts +7 -0
- package/x/core/bindings/sample-map.js +22 -0
- package/x/core/bindings/sample-map.js.map +1 -0
- package/x/core/bindings/types.d.ts +3 -1
- package/x/core/core.test.d.ts +5 -4
- package/x/core/core.test.js +45 -34
- package/x/core/core.test.js.map +1 -1
- package/x/core/devices/auto-gamepads.d.ts +2 -0
- package/x/core/devices/auto-gamepads.js +6 -0
- package/x/core/devices/auto-gamepads.js.map +1 -0
- package/x/core/devices/device.d.ts +5 -0
- package/x/core/devices/device.js +7 -0
- package/x/core/devices/device.js.map +1 -0
- package/x/core/devices/infra/group.d.ts +8 -0
- package/x/core/devices/infra/group.js +21 -0
- package/x/core/devices/infra/group.js.map +1 -0
- package/x/core/devices/infra/sampler.d.ts +9 -0
- package/x/core/devices/infra/sampler.js +18 -0
- package/x/core/devices/infra/sampler.js.map +1 -0
- package/x/core/devices/standard/gamepad.d.ts +11 -0
- package/x/core/devices/standard/gamepad.js +65 -0
- package/x/core/devices/standard/gamepad.js.map +1 -0
- package/x/core/{controllers → devices}/standard/index.d.ts +2 -1
- package/x/core/{controllers → devices}/standard/index.js +2 -1
- package/x/core/devices/standard/index.js.map +1 -0
- package/x/core/devices/standard/keyboard.d.ts +9 -0
- package/x/core/devices/standard/keyboard.js +28 -0
- package/x/core/devices/standard/keyboard.js.map +1 -0
- package/x/core/devices/standard/pointer.d.ts +15 -0
- package/x/core/{controllers → devices}/standard/pointer.js +14 -11
- package/x/core/devices/standard/pointer.js.map +1 -0
- package/x/core/devices/standard/primary.d.ts +10 -0
- package/x/core/devices/standard/primary.js +17 -0
- package/x/core/devices/standard/primary.js.map +1 -0
- package/x/core/devices/standard/stick.d.ts +15 -0
- package/x/core/devices/standard/stick.js +24 -0
- package/x/core/devices/standard/stick.js.map +1 -0
- package/x/core/devices/standard/vpad.d.ts +7 -0
- package/x/core/{controllers/standard/virtual-gamepad.js → devices/standard/vpad.js} +10 -10
- package/x/core/devices/standard/vpad.js.map +1 -0
- package/x/core/{controllers → devices}/types.d.ts +0 -1
- package/x/core/{controllers → devices}/types.js.map +1 -1
- package/x/core/hub/hub.d.ts +27 -23
- package/x/core/hub/hub.js +71 -61
- package/x/core/hub/hub.js.map +1 -1
- package/x/core/hub/meta-bindings.d.ts +2 -0
- package/x/core/hub/meta-bindings.js +21 -0
- package/x/core/hub/meta-bindings.js.map +1 -0
- package/x/core/hub/parts/connected.d.ts +14 -0
- package/x/core/hub/parts/connected.js +12 -0
- package/x/core/hub/parts/connected.js.map +1 -0
- package/x/core/hub/port.d.ts +10 -0
- package/x/core/hub/port.js +19 -0
- package/x/core/hub/port.js.map +1 -0
- package/x/core/hub/types.d.ts +5 -5
- package/x/core/hub/types.js +1 -1
- package/x/core/hub/types.js.map +1 -1
- package/x/core/index.d.ts +12 -12
- package/x/core/index.js +12 -12
- package/x/core/index.js.map +1 -1
- package/x/core/testing/testing.d.ts +13 -11
- package/x/core/testing/testing.js +14 -13
- package/x/core/testing/testing.js.map +1 -1
- package/x/deck/deck.d.ts +35 -0
- package/x/deck/deck.js +50 -0
- package/x/deck/deck.js.map +1 -0
- package/x/deck/index.d.ts +10 -0
- package/x/deck/index.js +11 -0
- package/x/deck/index.js.map +1 -0
- package/x/deck/parts/catalog.d.ts +23 -0
- package/x/deck/parts/catalog.js +35 -0
- package/x/deck/parts/catalog.js.map +1 -0
- package/x/deck/parts/db.d.ts +20 -0
- package/x/deck/parts/db.js +52 -0
- package/x/deck/parts/db.js.map +1 -0
- package/x/deck/parts/device-skins/device-icons.d.ts +12 -0
- package/x/deck/parts/device-skins/device-icons.js +27 -0
- package/x/deck/parts/device-skins/device-icons.js.map +1 -0
- package/x/deck/parts/device-skins/device-skin.d.ts +14 -0
- package/x/deck/parts/device-skins/device-skin.js +22 -0
- package/x/deck/parts/device-skins/device-skin.js.map +1 -0
- package/x/deck/parts/local-storage-kv.js +6 -0
- package/x/deck/parts/local-storage-kv.js.map +1 -0
- package/x/deck/parts/merge-bindings.d.ts +2 -0
- package/x/deck/parts/merge-bindings.js +15 -0
- package/x/deck/parts/merge-bindings.js.map +1 -0
- package/x/deck/parts/overlay-visibility.d.ts +21 -0
- package/x/deck/parts/overlay-visibility.js +35 -0
- package/x/deck/parts/overlay-visibility.js.map +1 -0
- package/x/deck/views/deck-overlay/component.d.ts +2 -0
- package/x/deck/views/deck-overlay/component.js +40 -0
- package/x/deck/views/deck-overlay/component.js.map +1 -0
- package/x/deck/views/deck-overlay/style.css.js +109 -0
- package/x/deck/views/deck-overlay/style.css.js.map +1 -0
- package/x/deck/views/framework.d.ts +3 -0
- package/x/deck/views/framework.js +8 -0
- package/x/deck/views/framework.js.map +1 -0
- package/x/demo/game/game.d.ts +20 -0
- package/x/demo/game/game.js +63 -0
- package/x/demo/game/game.js.map +1 -0
- package/x/demo/game/parts/agent.d.ts +7 -0
- package/x/demo/game/parts/agent.js +8 -0
- package/x/demo/game/parts/agent.js.map +1 -0
- package/x/demo/game/parts/game-bindings.d.ts +15 -0
- package/x/demo/game/parts/game-bindings.js +10 -0
- package/x/demo/game/parts/game-bindings.js.map +1 -0
- package/x/demo/game/parts/logic.d.ts +8 -0
- package/x/demo/game/parts/logic.js +21 -0
- package/x/demo/game/parts/logic.js.map +1 -0
- package/x/demo/game/parts/player.d.ts +14 -0
- package/x/demo/game/parts/player.js +26 -0
- package/x/demo/game/parts/player.js.map +1 -0
- package/x/demo/game/parts/renderer.d.ts +13 -0
- package/x/demo/game/parts/renderer.js +91 -0
- package/x/demo/game/parts/renderer.js.map +1 -0
- package/x/demo/game/parts/state.d.ts +8 -0
- package/x/demo/game/parts/state.js +20 -0
- package/x/demo/game/parts/state.js.map +1 -0
- package/x/demo/game/parts/virtual-device.d.ts +8 -0
- package/x/demo/game/parts/virtual-device.js +11 -0
- package/x/demo/game/parts/virtual-device.js.map +1 -0
- package/x/demo/main.bundle.js +4 -10
- package/x/demo/main.bundle.js.map +1 -1
- package/x/demo/main.bundle.min.js +315 -54
- package/x/demo/main.bundle.min.js.map +4 -4
- package/x/demo/main.css +30 -2
- package/x/demo/ui/tact-demo/component.d.ts +4 -0
- package/x/demo/ui/tact-demo/component.js +12 -0
- package/x/demo/ui/tact-demo/component.js.map +1 -0
- package/x/demo/ui/tact-demo/style.css.d.ts +2 -0
- package/x/demo/ui/tact-demo/style.css.js +3 -0
- package/x/demo/ui/tact-demo/style.css.js.map +1 -0
- package/x/demo/ui/theater/styles.css.js +56 -0
- package/x/demo/ui/theater/styles.css.js.map +1 -0
- package/x/demo/ui/theater/view.d.ts +2 -0
- package/x/demo/ui/theater/view.js +42 -0
- package/x/demo/ui/theater/view.js.map +1 -0
- package/x/demo/ui/theater/virtual/style.css.d.ts +2 -0
- package/x/demo/ui/theater/virtual/style.css.js +42 -0
- package/x/demo/ui/theater/virtual/style.css.js.map +1 -0
- package/x/demo/ui/theater/virtual/view.d.ts +4 -0
- package/x/demo/ui/theater/virtual/view.js +19 -0
- package/x/demo/ui/theater/virtual/view.js.map +1 -0
- package/x/demo/ui/utils/loader.d.ts +1 -0
- package/x/demo/ui/utils/loader.js +3 -0
- package/x/demo/ui/utils/loader.js.map +1 -0
- package/x/index.d.ts +3 -1
- package/x/index.html +47 -8
- package/x/index.html.js +16 -6
- package/x/index.html.js.map +1 -1
- package/x/index.js +3 -1
- package/x/index.js.map +1 -1
- package/x/nubs/components.d.ts +9 -0
- package/x/nubs/components.js +11 -0
- package/x/nubs/components.js.map +1 -0
- package/x/nubs/index.d.ts +4 -0
- package/x/nubs/index.js +5 -0
- package/x/nubs/index.js.map +1 -0
- package/x/nubs/lookpad/component.d.ts +4 -0
- package/x/nubs/lookpad/component.js +36 -0
- package/x/nubs/lookpad/component.js.map +1 -0
- package/x/nubs/stick/component.d.ts +368 -0
- package/x/nubs/stick/component.js +101 -0
- package/x/nubs/stick/component.js.map +1 -0
- package/x/nubs/stick/style.css.d.ts +2 -0
- package/x/nubs/stick/style.css.js +69 -0
- package/x/nubs/stick/style.css.js.map +1 -0
- package/x/nubs/vpad/component.d.ts +368 -0
- package/x/nubs/{virtual-gamepad/view.js → vpad/component.js} +20 -11
- package/x/nubs/vpad/component.js.map +1 -0
- package/x/nubs/vpad/styles.css.d.ts +2 -0
- package/x/nubs/vpad/styles.css.js.map +1 -0
- package/x/nubs/vpad/utils/gamepad-inputs.js.map +1 -0
- package/x/nubs/vpad/utils/prevent-default-touch-shenanigans.js.map +1 -0
- package/x/nubs/vpad/utils/touch-tracking.js.map +1 -0
- package/x/utils/circular-clamp.d.ts +2 -0
- package/x/utils/circular-clamp.js +8 -0
- package/x/utils/circular-clamp.js.map +1 -0
- package/x/utils/dispensers.d.ts +7 -0
- package/x/utils/dispensers.js +16 -0
- package/x/utils/dispensers.js.map +1 -0
- package/x/utils/split-axis.d.ts +7 -0
- package/x/utils/split-axis.js +7 -2
- package/x/utils/split-axis.js.map +1 -1
- package/s/core/controllers/controller.ts +0 -7
- package/s/core/controllers/infra/group.ts +0 -17
- package/s/core/controllers/infra/sampler.ts +0 -22
- package/s/core/controllers/standard/gamepad.ts +0 -77
- package/s/core/controllers/standard/keyboard.ts +0 -50
- package/s/core/controllers/standard/stick.ts +0 -30
- package/s/core/deck/deck.ts +0 -40
- package/s/core/deck/parts/bindings-depot.ts +0 -24
- package/s/core/deck/parts/local-storage-kv.ts +0 -7
- package/s/core/hub/auto-gamepads.ts +0 -8
- package/s/core/hub/bindings.ts +0 -18
- package/s/core/port/port.ts +0 -34
- package/s/core/port/utils/aggregate_samples_into_map.ts +0 -20
- package/s/core/port/utils/wipe_samples_map.ts +0 -8
- package/s/nubs/lookpad/utils/listeners.ts +0 -53
- package/s/nubs/lookpad/view.ts +0 -32
- package/s/nubs/stick/styles.ts +0 -22
- package/s/nubs/stick/utils/calculate_new_vector_from_pointer_position.ts +0 -27
- package/s/nubs/stick/utils/find_closest_point_on_circle.ts +0 -15
- package/s/nubs/stick/utils/make_pointer_listeners.ts +0 -50
- package/s/nubs/stick/utils/within_radius.ts +0 -6
- package/s/nubs/stick/view.ts +0 -50
- package/s/nubs/stick-graphic/styles.ts +0 -38
- package/s/nubs/stick-graphic/types/basis.ts +0 -5
- package/s/nubs/stick-graphic/utils/calculate_basis.ts +0 -19
- package/s/nubs/stick-graphic/utils/stick_vector_to_pixels.ts +0 -13
- package/s/nubs/stick-graphic/utils/transform.ts +0 -10
- package/s/nubs/stick-graphic/view.ts +0 -43
- package/x/core/controllers/controller.d.ts +0 -4
- package/x/core/controllers/controller.js +0 -3
- package/x/core/controllers/controller.js.map +0 -1
- package/x/core/controllers/infra/group.d.ts +0 -7
- package/x/core/controllers/infra/group.js +0 -13
- package/x/core/controllers/infra/group.js.map +0 -1
- package/x/core/controllers/infra/sampler.d.ts +0 -8
- package/x/core/controllers/infra/sampler.js +0 -17
- package/x/core/controllers/infra/sampler.js.map +0 -1
- package/x/core/controllers/standard/gamepad.d.ts +0 -9
- package/x/core/controllers/standard/gamepad.js +0 -66
- package/x/core/controllers/standard/gamepad.js.map +0 -1
- package/x/core/controllers/standard/index.js.map +0 -1
- package/x/core/controllers/standard/keyboard.d.ts +0 -9
- package/x/core/controllers/standard/keyboard.js +0 -39
- package/x/core/controllers/standard/keyboard.js.map +0 -1
- package/x/core/controllers/standard/pointer.d.ts +0 -11
- package/x/core/controllers/standard/pointer.js.map +0 -1
- package/x/core/controllers/standard/stick.d.ts +0 -15
- package/x/core/controllers/standard/stick.js +0 -27
- package/x/core/controllers/standard/stick.js.map +0 -1
- package/x/core/controllers/standard/virtual-gamepad.d.ts +0 -7
- package/x/core/controllers/standard/virtual-gamepad.js.map +0 -1
- package/x/core/deck/deck.d.ts +0 -16
- package/x/core/deck/deck.js +0 -31
- package/x/core/deck/deck.js.map +0 -1
- package/x/core/deck/parts/bindings-depot.d.ts +0 -9
- package/x/core/deck/parts/bindings-depot.js +0 -19
- package/x/core/deck/parts/bindings-depot.js.map +0 -1
- package/x/core/deck/parts/local-storage-kv.js +0 -5
- package/x/core/deck/parts/local-storage-kv.js.map +0 -1
- package/x/core/hub/auto-gamepads.d.ts +0 -2
- package/x/core/hub/auto-gamepads.js +0 -6
- package/x/core/hub/auto-gamepads.js.map +0 -1
- package/x/core/hub/bindings.d.ts +0 -2
- package/x/core/hub/bindings.js +0 -16
- package/x/core/hub/bindings.js.map +0 -1
- package/x/core/port/port.d.ts +0 -12
- package/x/core/port/port.js +0 -25
- package/x/core/port/port.js.map +0 -1
- package/x/core/port/utils/aggregate_samples_into_map.d.ts +0 -3
- package/x/core/port/utils/aggregate_samples_into_map.js +0 -11
- package/x/core/port/utils/aggregate_samples_into_map.js.map +0 -1
- package/x/core/port/utils/wipe_samples_map.d.ts +0 -2
- package/x/core/port/utils/wipe_samples_map.js +0 -5
- package/x/core/port/utils/wipe_samples_map.js.map +0 -1
- package/x/nubs/lookpad/utils/listeners.d.ts +0 -19
- package/x/nubs/lookpad/utils/listeners.js +0 -37
- package/x/nubs/lookpad/utils/listeners.js.map +0 -1
- package/x/nubs/lookpad/view.d.ts +0 -1
- package/x/nubs/lookpad/view.js +0 -24
- package/x/nubs/lookpad/view.js.map +0 -1
- package/x/nubs/stick/styles.d.ts +0 -1
- package/x/nubs/stick/styles.js +0 -22
- package/x/nubs/stick/styles.js.map +0 -1
- package/x/nubs/stick/utils/calculate_new_vector_from_pointer_position.d.ts +0 -3
- package/x/nubs/stick/utils/calculate_new_vector_from_pointer_position.js +0 -16
- package/x/nubs/stick/utils/calculate_new_vector_from_pointer_position.js.map +0 -1
- package/x/nubs/stick/utils/find_closest_point_on_circle.d.ts +0 -2
- package/x/nubs/stick/utils/find_closest_point_on_circle.js +0 -6
- package/x/nubs/stick/utils/find_closest_point_on_circle.js.map +0 -1
- package/x/nubs/stick/utils/make_pointer_listeners.d.ts +0 -16
- package/x/nubs/stick/utils/make_pointer_listeners.js +0 -34
- package/x/nubs/stick/utils/make_pointer_listeners.js.map +0 -1
- package/x/nubs/stick/utils/within_radius.d.ts +0 -2
- package/x/nubs/stick/utils/within_radius.js +0 -4
- package/x/nubs/stick/utils/within_radius.js.map +0 -1
- package/x/nubs/stick/view.d.ts +0 -2
- package/x/nubs/stick/view.js +0 -38
- package/x/nubs/stick/view.js.map +0 -1
- package/x/nubs/stick-graphic/styles.js +0 -38
- package/x/nubs/stick-graphic/styles.js.map +0 -1
- package/x/nubs/stick-graphic/types/basis.d.ts +0 -4
- package/x/nubs/stick-graphic/types/basis.js +0 -2
- package/x/nubs/stick-graphic/types/basis.js.map +0 -1
- package/x/nubs/stick-graphic/utils/calculate_basis.d.ts +0 -2
- package/x/nubs/stick-graphic/utils/calculate_basis.js +0 -10
- package/x/nubs/stick-graphic/utils/calculate_basis.js.map +0 -1
- package/x/nubs/stick-graphic/utils/stick_vector_to_pixels.d.ts +0 -2
- package/x/nubs/stick-graphic/utils/stick_vector_to_pixels.js +0 -7
- package/x/nubs/stick-graphic/utils/stick_vector_to_pixels.js.map +0 -1
- package/x/nubs/stick-graphic/utils/transform.d.ts +0 -2
- package/x/nubs/stick-graphic/utils/transform.js +0 -7
- package/x/nubs/stick-graphic/utils/transform.js.map +0 -1
- package/x/nubs/stick-graphic/view.d.ts +0 -3
- package/x/nubs/stick-graphic/view.js +0 -30
- package/x/nubs/stick-graphic/view.js.map +0 -1
- package/x/nubs/virtual-gamepad/styles.css.js.map +0 -1
- package/x/nubs/virtual-gamepad/utils/gamepad-inputs.js.map +0 -1
- package/x/nubs/virtual-gamepad/utils/prevent-default-touch-shenanigans.js.map +0 -1
- package/x/nubs/virtual-gamepad/utils/touch-tracking.js.map +0 -1
- package/x/nubs/virtual-gamepad/view.d.ts +0 -2
- package/x/nubs/virtual-gamepad/view.js.map +0 -1
- /package/s/nubs/{virtual-gamepad → vpad}/utils/gamepad-inputs.ts +0 -0
- /package/s/nubs/{virtual-gamepad → vpad}/utils/prevent-default-touch-shenanigans.ts +0 -0
- /package/s/nubs/{virtual-gamepad → vpad}/utils/touch-tracking.ts +0 -0
- /package/x/core/{controllers → devices}/types.js +0 -0
- /package/x/{core/deck → deck}/parts/local-storage-kv.d.ts +0 -0
- /package/x/{nubs/virtual-gamepad/styles.css.d.ts → deck/views/deck-overlay/style.css.d.ts} +0 -0
- /package/x/{nubs/stick-graphic/styles.d.ts → demo/ui/theater/styles.css.d.ts} +0 -0
- /package/x/nubs/{virtual-gamepad → vpad}/styles.css.js +0 -0
- /package/x/nubs/{virtual-gamepad → vpad}/utils/gamepad-inputs.d.ts +0 -0
- /package/x/nubs/{virtual-gamepad → vpad}/utils/gamepad-inputs.js +0 -0
- /package/x/nubs/{virtual-gamepad → vpad}/utils/prevent-default-touch-shenanigans.d.ts +0 -0
- /package/x/nubs/{virtual-gamepad → vpad}/utils/prevent-default-touch-shenanigans.js +0 -0
- /package/x/nubs/{virtual-gamepad → vpad}/utils/touch-tracking.d.ts +0 -0
- /package/x/nubs/{virtual-gamepad → vpad}/utils/touch-tracking.js +0 -0
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
import { VpadDevice } from "../../core/devices/standard/vpad.js";
|
|
2
|
+
declare const NubVpad_base: import("@e280/sly").ComponentClass<{
|
|
3
|
+
new (): {
|
|
4
|
+
readonly device: VpadDevice;
|
|
5
|
+
#private: any;
|
|
6
|
+
readonly shadow: ShadowRoot;
|
|
7
|
+
createShadow(): ShadowRoot;
|
|
8
|
+
render(_use: import("@e280/sly").Use): import("@e280/sly").Content;
|
|
9
|
+
updateNow: () => void;
|
|
10
|
+
update: import("@e280/stz").DebounceReturn<() => void>;
|
|
11
|
+
connectedCallback(): void;
|
|
12
|
+
disconnectedCallback(): void;
|
|
13
|
+
accessKey: string;
|
|
14
|
+
readonly accessKeyLabel: string;
|
|
15
|
+
autocapitalize: string;
|
|
16
|
+
autocorrect: boolean;
|
|
17
|
+
dir: string;
|
|
18
|
+
draggable: boolean;
|
|
19
|
+
hidden: boolean;
|
|
20
|
+
inert: boolean;
|
|
21
|
+
innerText: string;
|
|
22
|
+
lang: string;
|
|
23
|
+
readonly offsetHeight: number;
|
|
24
|
+
readonly offsetLeft: number;
|
|
25
|
+
readonly offsetParent: Element | null;
|
|
26
|
+
readonly offsetTop: number;
|
|
27
|
+
readonly offsetWidth: number;
|
|
28
|
+
outerText: string;
|
|
29
|
+
popover: string | null;
|
|
30
|
+
spellcheck: boolean;
|
|
31
|
+
title: string;
|
|
32
|
+
translate: boolean;
|
|
33
|
+
writingSuggestions: string;
|
|
34
|
+
attachInternals(): ElementInternals;
|
|
35
|
+
click(): void;
|
|
36
|
+
hidePopover(): void;
|
|
37
|
+
showPopover(): void;
|
|
38
|
+
togglePopover(options?: boolean): boolean;
|
|
39
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
40
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
41
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
42
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
43
|
+
readonly attributes: NamedNodeMap;
|
|
44
|
+
get classList(): DOMTokenList;
|
|
45
|
+
set classList(value: string);
|
|
46
|
+
className: string;
|
|
47
|
+
readonly clientHeight: number;
|
|
48
|
+
readonly clientLeft: number;
|
|
49
|
+
readonly clientTop: number;
|
|
50
|
+
readonly clientWidth: number;
|
|
51
|
+
readonly currentCSSZoom: number;
|
|
52
|
+
id: string;
|
|
53
|
+
innerHTML: string;
|
|
54
|
+
readonly localName: string;
|
|
55
|
+
readonly namespaceURI: string | null;
|
|
56
|
+
onfullscreenchange: ((this: Element, ev: Event) => any) | null;
|
|
57
|
+
onfullscreenerror: ((this: Element, ev: Event) => any) | null;
|
|
58
|
+
outerHTML: string;
|
|
59
|
+
readonly ownerDocument: Document;
|
|
60
|
+
get part(): DOMTokenList;
|
|
61
|
+
set part(value: string);
|
|
62
|
+
readonly prefix: string | null;
|
|
63
|
+
readonly scrollHeight: number;
|
|
64
|
+
scrollLeft: number;
|
|
65
|
+
scrollTop: number;
|
|
66
|
+
readonly scrollWidth: number;
|
|
67
|
+
readonly shadowRoot: ShadowRoot | null;
|
|
68
|
+
slot: string;
|
|
69
|
+
readonly tagName: string;
|
|
70
|
+
attachShadow(init: ShadowRootInit): ShadowRoot;
|
|
71
|
+
checkVisibility(options?: CheckVisibilityOptions): boolean;
|
|
72
|
+
closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null;
|
|
73
|
+
closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null;
|
|
74
|
+
closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K] | null;
|
|
75
|
+
closest<E extends Element = Element>(selectors: string): E | null;
|
|
76
|
+
computedStyleMap(): StylePropertyMapReadOnly;
|
|
77
|
+
getAttribute(qualifiedName: string): string | null;
|
|
78
|
+
getAttributeNS(namespace: string | null, localName: string): string | null;
|
|
79
|
+
getAttributeNames(): string[];
|
|
80
|
+
getAttributeNode(qualifiedName: string): Attr | null;
|
|
81
|
+
getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
|
|
82
|
+
getBoundingClientRect(): DOMRect;
|
|
83
|
+
getClientRects(): DOMRectList;
|
|
84
|
+
getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
|
|
85
|
+
getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
|
|
86
|
+
getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;
|
|
87
|
+
getElementsByTagName<K extends keyof MathMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>;
|
|
88
|
+
getElementsByTagName<K extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>;
|
|
89
|
+
getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
|
|
90
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
|
|
91
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
|
|
92
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>;
|
|
93
|
+
getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
|
|
94
|
+
getHTML(options?: GetHTMLOptions): string;
|
|
95
|
+
hasAttribute(qualifiedName: string): boolean;
|
|
96
|
+
hasAttributeNS(namespace: string | null, localName: string): boolean;
|
|
97
|
+
hasAttributes(): boolean;
|
|
98
|
+
hasPointerCapture(pointerId: number): boolean;
|
|
99
|
+
insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
|
|
100
|
+
insertAdjacentHTML(position: InsertPosition, string: string): void;
|
|
101
|
+
insertAdjacentText(where: InsertPosition, data: string): void;
|
|
102
|
+
matches(selectors: string): boolean;
|
|
103
|
+
releasePointerCapture(pointerId: number): void;
|
|
104
|
+
removeAttribute(qualifiedName: string): void;
|
|
105
|
+
removeAttributeNS(namespace: string | null, localName: string): void;
|
|
106
|
+
removeAttributeNode(attr: Attr): Attr;
|
|
107
|
+
requestFullscreen(options?: FullscreenOptions): Promise<void>;
|
|
108
|
+
requestPointerLock(options?: PointerLockOptions): Promise<void>;
|
|
109
|
+
scroll(options?: ScrollToOptions): void;
|
|
110
|
+
scroll(x: number, y: number): void;
|
|
111
|
+
scrollBy(options?: ScrollToOptions): void;
|
|
112
|
+
scrollBy(x: number, y: number): void;
|
|
113
|
+
scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
|
|
114
|
+
scrollTo(options?: ScrollToOptions): void;
|
|
115
|
+
scrollTo(x: number, y: number): void;
|
|
116
|
+
setAttribute(qualifiedName: string, value: string): void;
|
|
117
|
+
setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
|
|
118
|
+
setAttributeNode(attr: Attr): Attr | null;
|
|
119
|
+
setAttributeNodeNS(attr: Attr): Attr | null;
|
|
120
|
+
setHTMLUnsafe(html: string): void;
|
|
121
|
+
setPointerCapture(pointerId: number): void;
|
|
122
|
+
toggleAttribute(qualifiedName: string, force?: boolean): boolean;
|
|
123
|
+
webkitMatchesSelector(selectors: string): boolean;
|
|
124
|
+
get textContent(): string;
|
|
125
|
+
set textContent(value: string | null);
|
|
126
|
+
readonly baseURI: string;
|
|
127
|
+
readonly childNodes: NodeListOf<ChildNode>;
|
|
128
|
+
readonly firstChild: ChildNode | null;
|
|
129
|
+
readonly isConnected: boolean;
|
|
130
|
+
readonly lastChild: ChildNode | null;
|
|
131
|
+
readonly nextSibling: ChildNode | null;
|
|
132
|
+
readonly nodeName: string;
|
|
133
|
+
readonly nodeType: number;
|
|
134
|
+
nodeValue: string | null;
|
|
135
|
+
readonly parentElement: HTMLElement | null;
|
|
136
|
+
readonly parentNode: ParentNode | null;
|
|
137
|
+
readonly previousSibling: ChildNode | null;
|
|
138
|
+
appendChild<T extends Node>(node: T): T;
|
|
139
|
+
cloneNode(subtree?: boolean): Node;
|
|
140
|
+
compareDocumentPosition(other: Node): number;
|
|
141
|
+
contains(other: Node | null): boolean;
|
|
142
|
+
getRootNode(options?: GetRootNodeOptions): Node;
|
|
143
|
+
hasChildNodes(): boolean;
|
|
144
|
+
insertBefore<T extends Node>(node: T, child: Node | null): T;
|
|
145
|
+
isDefaultNamespace(namespace: string | null): boolean;
|
|
146
|
+
isEqualNode(otherNode: Node | null): boolean;
|
|
147
|
+
isSameNode(otherNode: Node | null): boolean;
|
|
148
|
+
lookupNamespaceURI(prefix: string | null): string | null;
|
|
149
|
+
lookupPrefix(namespace: string | null): string | null;
|
|
150
|
+
normalize(): void;
|
|
151
|
+
removeChild<T extends Node>(child: T): T;
|
|
152
|
+
replaceChild<T extends Node>(node: Node, child: T): T;
|
|
153
|
+
readonly ELEMENT_NODE: 1;
|
|
154
|
+
readonly ATTRIBUTE_NODE: 2;
|
|
155
|
+
readonly TEXT_NODE: 3;
|
|
156
|
+
readonly CDATA_SECTION_NODE: 4;
|
|
157
|
+
readonly ENTITY_REFERENCE_NODE: 5;
|
|
158
|
+
readonly ENTITY_NODE: 6;
|
|
159
|
+
readonly PROCESSING_INSTRUCTION_NODE: 7;
|
|
160
|
+
readonly COMMENT_NODE: 8;
|
|
161
|
+
readonly DOCUMENT_NODE: 9;
|
|
162
|
+
readonly DOCUMENT_TYPE_NODE: 10;
|
|
163
|
+
readonly DOCUMENT_FRAGMENT_NODE: 11;
|
|
164
|
+
readonly NOTATION_NODE: 12;
|
|
165
|
+
readonly DOCUMENT_POSITION_DISCONNECTED: 1;
|
|
166
|
+
readonly DOCUMENT_POSITION_PRECEDING: 2;
|
|
167
|
+
readonly DOCUMENT_POSITION_FOLLOWING: 4;
|
|
168
|
+
readonly DOCUMENT_POSITION_CONTAINS: 8;
|
|
169
|
+
readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
|
|
170
|
+
readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
|
|
171
|
+
dispatchEvent(event: Event): boolean;
|
|
172
|
+
ariaActiveDescendantElement: Element | null;
|
|
173
|
+
ariaAtomic: string | null;
|
|
174
|
+
ariaAutoComplete: string | null;
|
|
175
|
+
ariaBrailleLabel: string | null;
|
|
176
|
+
ariaBrailleRoleDescription: string | null;
|
|
177
|
+
ariaBusy: string | null;
|
|
178
|
+
ariaChecked: string | null;
|
|
179
|
+
ariaColCount: string | null;
|
|
180
|
+
ariaColIndex: string | null;
|
|
181
|
+
ariaColIndexText: string | null;
|
|
182
|
+
ariaColSpan: string | null;
|
|
183
|
+
ariaControlsElements: ReadonlyArray<Element> | null;
|
|
184
|
+
ariaCurrent: string | null;
|
|
185
|
+
ariaDescribedByElements: ReadonlyArray<Element> | null;
|
|
186
|
+
ariaDescription: string | null;
|
|
187
|
+
ariaDetailsElements: ReadonlyArray<Element> | null;
|
|
188
|
+
ariaDisabled: string | null;
|
|
189
|
+
ariaErrorMessageElements: ReadonlyArray<Element> | null;
|
|
190
|
+
ariaExpanded: string | null;
|
|
191
|
+
ariaFlowToElements: ReadonlyArray<Element> | null;
|
|
192
|
+
ariaHasPopup: string | null;
|
|
193
|
+
ariaHidden: string | null;
|
|
194
|
+
ariaInvalid: string | null;
|
|
195
|
+
ariaKeyShortcuts: string | null;
|
|
196
|
+
ariaLabel: string | null;
|
|
197
|
+
ariaLabelledByElements: ReadonlyArray<Element> | null;
|
|
198
|
+
ariaLevel: string | null;
|
|
199
|
+
ariaLive: string | null;
|
|
200
|
+
ariaModal: string | null;
|
|
201
|
+
ariaMultiLine: string | null;
|
|
202
|
+
ariaMultiSelectable: string | null;
|
|
203
|
+
ariaOrientation: string | null;
|
|
204
|
+
ariaOwnsElements: ReadonlyArray<Element> | null;
|
|
205
|
+
ariaPlaceholder: string | null;
|
|
206
|
+
ariaPosInSet: string | null;
|
|
207
|
+
ariaPressed: string | null;
|
|
208
|
+
ariaReadOnly: string | null;
|
|
209
|
+
ariaRelevant: string | null;
|
|
210
|
+
ariaRequired: string | null;
|
|
211
|
+
ariaRoleDescription: string | null;
|
|
212
|
+
ariaRowCount: string | null;
|
|
213
|
+
ariaRowIndex: string | null;
|
|
214
|
+
ariaRowIndexText: string | null;
|
|
215
|
+
ariaRowSpan: string | null;
|
|
216
|
+
ariaSelected: string | null;
|
|
217
|
+
ariaSetSize: string | null;
|
|
218
|
+
ariaSort: string | null;
|
|
219
|
+
ariaValueMax: string | null;
|
|
220
|
+
ariaValueMin: string | null;
|
|
221
|
+
ariaValueNow: string | null;
|
|
222
|
+
ariaValueText: string | null;
|
|
223
|
+
role: string | null;
|
|
224
|
+
animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation;
|
|
225
|
+
getAnimations(options?: GetAnimationsOptions): Animation[];
|
|
226
|
+
after(...nodes: (Node | string)[]): void;
|
|
227
|
+
before(...nodes: (Node | string)[]): void;
|
|
228
|
+
remove(): void;
|
|
229
|
+
replaceWith(...nodes: (Node | string)[]): void;
|
|
230
|
+
readonly nextElementSibling: Element | null;
|
|
231
|
+
readonly previousElementSibling: Element | null;
|
|
232
|
+
readonly childElementCount: number;
|
|
233
|
+
readonly children: HTMLCollection;
|
|
234
|
+
readonly firstElementChild: Element | null;
|
|
235
|
+
readonly lastElementChild: Element | null;
|
|
236
|
+
append(...nodes: (Node | string)[]): void;
|
|
237
|
+
prepend(...nodes: (Node | string)[]): void;
|
|
238
|
+
querySelector<K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null;
|
|
239
|
+
querySelector<K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null;
|
|
240
|
+
querySelector<K extends keyof MathMLElementTagNameMap>(selectors: K): MathMLElementTagNameMap[K] | null;
|
|
241
|
+
querySelector<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null;
|
|
242
|
+
querySelector<E extends Element = Element>(selectors: string): E | null;
|
|
243
|
+
querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
|
|
244
|
+
querySelectorAll<K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>;
|
|
245
|
+
querySelectorAll<K extends keyof MathMLElementTagNameMap>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>;
|
|
246
|
+
querySelectorAll<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>;
|
|
247
|
+
querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
|
|
248
|
+
replaceChildren(...nodes: (Node | string)[]): void;
|
|
249
|
+
readonly assignedSlot: HTMLSlotElement | null;
|
|
250
|
+
readonly attributeStyleMap: StylePropertyMap;
|
|
251
|
+
get style(): CSSStyleDeclaration;
|
|
252
|
+
set style(cssText: string);
|
|
253
|
+
contentEditable: string;
|
|
254
|
+
enterKeyHint: string;
|
|
255
|
+
inputMode: string;
|
|
256
|
+
readonly isContentEditable: boolean;
|
|
257
|
+
onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
258
|
+
onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
259
|
+
onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
260
|
+
onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
261
|
+
onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
262
|
+
onauxclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
263
|
+
onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
|
|
264
|
+
onbeforematch: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
265
|
+
onbeforetoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
|
|
266
|
+
onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
267
|
+
oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
268
|
+
oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
269
|
+
oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
270
|
+
onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
271
|
+
onclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
272
|
+
onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
273
|
+
oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
274
|
+
oncontextmenu: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
275
|
+
oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
276
|
+
oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
277
|
+
oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
278
|
+
oncut: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
279
|
+
ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
280
|
+
ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
281
|
+
ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
282
|
+
ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
283
|
+
ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
284
|
+
ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
285
|
+
ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
286
|
+
ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
287
|
+
ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
288
|
+
onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
289
|
+
onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
290
|
+
onerror: OnErrorEventHandler;
|
|
291
|
+
onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
292
|
+
onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
|
|
293
|
+
ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
294
|
+
oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
295
|
+
oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
296
|
+
onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
297
|
+
onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
298
|
+
onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
299
|
+
onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
300
|
+
onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
301
|
+
onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
302
|
+
onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
303
|
+
onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
304
|
+
onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
305
|
+
onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
306
|
+
onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
307
|
+
onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
308
|
+
onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
309
|
+
onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
310
|
+
onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
311
|
+
onpaste: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
312
|
+
onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
313
|
+
onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
314
|
+
onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
315
|
+
onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
316
|
+
onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
317
|
+
onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
318
|
+
onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
319
|
+
onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
320
|
+
onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
321
|
+
onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
322
|
+
onpointerrawupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
323
|
+
onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
324
|
+
onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
|
|
325
|
+
onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
326
|
+
onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
327
|
+
onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
328
|
+
onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
329
|
+
onscrollend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
330
|
+
onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
|
|
331
|
+
onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
332
|
+
onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
333
|
+
onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
334
|
+
onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
335
|
+
onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
336
|
+
onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
337
|
+
onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
338
|
+
onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
|
|
339
|
+
onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
340
|
+
ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
341
|
+
ontoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
|
|
342
|
+
ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
343
|
+
ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
344
|
+
ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
345
|
+
ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
346
|
+
ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
347
|
+
ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
348
|
+
ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
349
|
+
ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
350
|
+
onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
351
|
+
onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
352
|
+
onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
353
|
+
onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
354
|
+
onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
355
|
+
onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
356
|
+
onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
|
|
357
|
+
autofocus: boolean;
|
|
358
|
+
readonly dataset: DOMStringMap;
|
|
359
|
+
nonce?: string;
|
|
360
|
+
tabIndex: number;
|
|
361
|
+
blur(): void;
|
|
362
|
+
focus(options?: FocusOptions): void;
|
|
363
|
+
};
|
|
364
|
+
styles: import("lit").CSSResultGroup | undefined;
|
|
365
|
+
}, [device: VpadDevice]>;
|
|
366
|
+
export declare class NubVpad extends NubVpad_base {
|
|
367
|
+
}
|
|
368
|
+
export {};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { html } from "lit";
|
|
2
|
-
import { view } from "@e280/sly";
|
|
2
|
+
import { BaseElement, view } from "@e280/sly";
|
|
3
3
|
import { ev, MapG } from "@e280/stz";
|
|
4
4
|
import stylesCss from "./styles.css.js";
|
|
5
|
-
import { NubStick } from "../stick/
|
|
5
|
+
import { NubStick } from "../stick/component.js";
|
|
6
6
|
import { touchTracking } from "./utils/touch-tracking.js";
|
|
7
|
+
import { VpadDevice } from "../../core/devices/standard/vpad.js";
|
|
7
8
|
import { preventDefaultTouchShenanigans } from "./utils/prevent-default-touch-shenanigans.js";
|
|
8
|
-
|
|
9
|
-
use.name("
|
|
9
|
+
const NubVpadView = view(use => (device) => {
|
|
10
|
+
use.name("nub-vpad");
|
|
10
11
|
use.css(stylesCss);
|
|
11
12
|
const buttons = use.once(() => new Set());
|
|
12
13
|
const codes = use.once(() => new MapG());
|
|
@@ -26,11 +27,11 @@ export const VirtualGamepad = view(use => (controller) => {
|
|
|
26
27
|
buttons,
|
|
27
28
|
touchdown: button => {
|
|
28
29
|
const code = codes.require(button);
|
|
29
|
-
|
|
30
|
+
device.setSample(code, 1);
|
|
30
31
|
},
|
|
31
32
|
touchup: button => {
|
|
32
33
|
const code = codes.require(button);
|
|
33
|
-
|
|
34
|
+
device.setSample(code, 0);
|
|
34
35
|
},
|
|
35
36
|
}));
|
|
36
37
|
use.mount(() => ev(use.shadow, {
|
|
@@ -102,19 +103,27 @@ export const VirtualGamepad = view(use => (controller) => {
|
|
|
102
103
|
<div class="left side">
|
|
103
104
|
${renderLeftShoulder()}
|
|
104
105
|
${renderDPad()}
|
|
105
|
-
${NubStick
|
|
106
|
+
${NubStick.view
|
|
107
|
+
.props(device.stickLeft)
|
|
106
108
|
.attr("class", "stick")
|
|
107
|
-
.
|
|
109
|
+
.render()}
|
|
108
110
|
</div>
|
|
109
111
|
|
|
110
112
|
<div class="right side">
|
|
111
113
|
${renderRightShoulder()}
|
|
112
114
|
${renderButtonPad()}
|
|
113
|
-
${NubStick
|
|
115
|
+
${NubStick.view
|
|
116
|
+
.props(device.stickRight)
|
|
114
117
|
.attr("class", "stick")
|
|
115
|
-
.
|
|
118
|
+
.render()}
|
|
116
119
|
</div>
|
|
117
120
|
</div>
|
|
118
121
|
`;
|
|
119
122
|
});
|
|
120
|
-
|
|
123
|
+
export class NubVpad extends (NubVpadView
|
|
124
|
+
.component(class extends BaseElement {
|
|
125
|
+
device = new VpadDevice();
|
|
126
|
+
})
|
|
127
|
+
.props(el => [el.device])) {
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../s/nubs/vpad/component.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.css.js","sourceRoot":"","sources":["../../../s/nubs/vpad/styles.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkIjB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gamepad-inputs.js","sourceRoot":"","sources":["../../../../s/nubs/vpad/utils/gamepad-inputs.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,aAAa;IAC5B,OAAO;QACN,aAAa,EAAE,CAAC;QAEhB,uBAAuB,EAAE,CAAC;QAC1B,yBAAyB,EAAE,CAAC;QAC5B,yBAAyB,EAAE,CAAC;QAC5B,0BAA0B,EAAE,CAAC;QAE7B,wBAAwB,EAAE,CAAC;QAC3B,0BAA0B,EAAE,CAAC;QAC7B,0BAA0B,EAAE,CAAC;QAC7B,2BAA2B,EAAE,CAAC;QAE9B,0BAA0B,EAAE,CAAC;QAC7B,2BAA2B,EAAE,CAAC;QAE9B,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,CAAC;QAEd,YAAY,EAAE,CAAC;QACf,cAAc,EAAE,CAAC;QACjB,cAAc,EAAE,CAAC;QACjB,eAAe,EAAE,CAAC;QAElB,sBAAsB,EAAE,CAAC;QACzB,uBAAuB,EAAE,CAAC;QAE1B,qBAAqB,EAAE,CAAC;QACxB,sBAAsB,EAAE,CAAC;QAEzB,eAAe,EAAE,CAAC;QAClB,cAAc,EAAE,CAAC;QACjB,eAAe,EAAE,CAAC;KAClB,CAAA;AACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prevent-default-touch-shenanigans.js","sourceRoot":"","sources":["../../../../s/nubs/vpad/utils/prevent-default-touch-shenanigans.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,8BAA8B;IAC7C,MAAM,SAAS,GAAG,CAAC,CAAa,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,EAAE,CAAA;IACvD,MAAM,IAAI,GAAG,EAAC,OAAO,EAAE,KAAK,EAAC,CAAA;IAE7B,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;IAErD,OAAO,GAAG,EAAE;QACX,MAAM,CAAC,mBAAmB,CAAC,WAAW,EAAE,SAAS,CAAC,CAAA;IACnD,CAAC,CAAA;AACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"touch-tracking.js","sourceRoot":"","sources":["../../../../s/nubs/vpad/utils/touch-tracking.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,EAAE,EAAE,IAAI,EAAC,MAAM,WAAW,CAAA;AAElC,MAAM,UAAU,aAAa,CAAC,EAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAKhE;IAED,MAAM,MAAM,GAAG,IAAI,IAAmB,CAAA;IAEtC,SAAS,SAAS,CAAC,KAAY;QAC9B,OAAO,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,KAAK,CACxD,SAAS,EACT,OAAO,CACP,CAAC,CAAA;IACH,CAAC;IAED,SAAS,UAAU,CAAC,KAAY;QAC/B,MAAM,OAAO,GAAG,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;QACrE,OAAO,CAAC,OAAO,IAAI,OAAO,YAAY,iBAAiB,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAC/E,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,SAAS,CAAA;IACb,CAAC;IAED,SAAS,QAAQ,CAAC,KAAiB;QAClC,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;YAC/C,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;YAC9B,KAAK,CAAC,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,CAAA;QACjC,CAAC;IACF,CAAC;IAED,SAAS,WAAW,CAAC,KAAiB;QACrC,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE,CAAC;YACtD,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;YAC9B,KAAK,CAAC,MAAM,GAAG,SAAS,CAAA;YACxB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;QAChC,CAAC;IACF,CAAC;IAED,OAAO,EAAE,CAAC,MAAM,EAAE;QACjB,UAAU,EAAE,QAAQ;QACpB,SAAS,EAAE,QAAQ;QACnB,WAAW,EAAE,WAAW;QACxB,QAAQ,EAAE,WAAW;KACrB,CAAC,CAAA;AACH,CAAC;AAED,MAAM,KAAK;IAIF;IACA;IAJR,OAAO,GAAkC,SAAS,CAAA;IAElD,YACQ,SAA8C,EAC9C,OAA4C;QAD5C,cAAS,GAAT,SAAS,CAAqC;QAC9C,YAAO,GAAP,OAAO,CAAqC;IACjD,CAAC;IAEJ,IAAI,MAAM;QACT,OAAO,IAAI,CAAC,OAAO,CAAA;IACpB,CAAC;IAED,IAAI,MAAM,CAAC,IAAmC;QAC7C,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAA;QAC7B,MAAM,OAAO,GAAG,IAAI,KAAK,QAAQ,CAAA;QAEjC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA;QAEnB,IAAI,OAAO,IAAI,QAAQ,EAAE,CAAC;YACzB,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;QACvB,CAAC;QACD,IAAI,OAAO,IAAI,IAAI;YAClB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IACtB,CAAC;CACD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Scalar, Vec2 } from "@benev/math";
|
|
2
|
+
export function circularClamp(vector, range) {
|
|
3
|
+
const v = Vec2.from(vector);
|
|
4
|
+
const distance = v.distance_(0, 0);
|
|
5
|
+
const modifiedDistance = Scalar.remap(distance, range.x, range.y, 0, 1, true);
|
|
6
|
+
return v.normalize().multiplyBy(modifiedDistance);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=circular-clamp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"circular-clamp.js","sourceRoot":"","sources":["../../s/utils/circular-clamp.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,MAAM,EAAE,IAAI,EAAK,MAAM,aAAa,CAAA;AAE5C,MAAM,UAAU,aAAa,CAAC,MAAU,EAAE,KAAW;IACpD,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC3B,MAAM,QAAQ,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAClC,MAAM,gBAAgB,GAAG,MAAM,CAAC,KAAK,CACpC,QAAQ,EACR,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAChB,CAAC,EAAE,CAAC,EACJ,IAAI,CACJ,CAAA;IACD,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAA;AAClD,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Dispenser, range } from "@e280/stz";
|
|
2
|
+
const palette = (n) => range(n).map(i => {
|
|
3
|
+
const d = (i * (360 / n)) + 180;
|
|
4
|
+
return `hsl(${d % 360}deg, 100%, 50%)`;
|
|
5
|
+
});
|
|
6
|
+
export class ColorDispenser extends Dispenser {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(() => palette(12));
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export class LetterDispenser extends Dispenser {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(() => [..."abcdefghijklmnopqrstuvwxyz"]);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=dispensers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispensers.js","sourceRoot":"","sources":["../../s/utils/dispensers.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAE,KAAK,EAAC,MAAM,WAAW,CAAA;AAE1C,MAAM,OAAO,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;IAC/C,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAA;IAC/B,OAAO,OAAO,CAAC,GAAG,GAAG,iBAAiB,CAAA;AACvC,CAAC,CAAC,CAAA;AAEF,MAAM,OAAO,cAAe,SAAQ,SAAiB;IACpD;QACC,KAAK,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAA;IACzB,CAAC;CACD;AAED,MAAM,OAAO,eAAgB,SAAQ,SAAiB;IACrD;QACC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,4BAA4B,CAAC,CAAC,CAAA;IAC/C,CAAC;CACD"}
|
package/x/utils/split-axis.d.ts
CHANGED
package/x/utils/split-axis.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
export function splitAxis(n) {
|
|
2
2
|
return (n >= 0)
|
|
3
|
-
? [
|
|
4
|
-
: [Math.abs(n)
|
|
3
|
+
? [n, 0]
|
|
4
|
+
: [0, Math.abs(n)];
|
|
5
|
+
}
|
|
6
|
+
export function splitVector(vector) {
|
|
7
|
+
const [right, left] = splitAxis(vector.x);
|
|
8
|
+
const [down, up] = splitAxis(vector.y);
|
|
9
|
+
return { up, down, left, right };
|
|
5
10
|
}
|
|
6
11
|
//# sourceMappingURL=split-axis.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-axis.js","sourceRoot":"","sources":["../../s/utils/split-axis.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"split-axis.js","sourceRoot":"","sources":["../../s/utils/split-axis.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,SAAS,CAAC,CAAS;IAClC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;QACd,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACR,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;AACpB,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,MAAU;IACrC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;IACzC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;IACtC,OAAO,EAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAC,CAAA;AAC/B,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import {SetG} from "@e280/stz"
|
|
3
|
-
import {Controller} from "../controller.js"
|
|
4
|
-
|
|
5
|
-
export class GroupController extends Controller {
|
|
6
|
-
controllers = new SetG<Controller>()
|
|
7
|
-
|
|
8
|
-
constructor(...controllers: Controller[]) {
|
|
9
|
-
super()
|
|
10
|
-
this.controllers.adds(...controllers)
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
takeSamples() {
|
|
14
|
-
return [...this.controllers].flatMap(controller => controller.takeSamples())
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import {sub} from "@e280/stz"
|
|
3
|
-
import {Controller} from "../controller.js"
|
|
4
|
-
import {Sample, SampleMap} from "../types.js"
|
|
5
|
-
|
|
6
|
-
export class SamplerController extends Controller {
|
|
7
|
-
on = sub<Sample>()
|
|
8
|
-
#map: SampleMap = new Map()
|
|
9
|
-
|
|
10
|
-
setSample(code: string, value: number) {
|
|
11
|
-
this.#map.set(code, value)
|
|
12
|
-
this.on.pub(code, value)
|
|
13
|
-
return this
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
takeSamples(): Sample[] {
|
|
17
|
-
const samples = [...this.#map]
|
|
18
|
-
this.#map.clear()
|
|
19
|
-
return samples
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|