@htmlbricks/hb-pad-joystick 0.66.7 → 0.66.9

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 ADDED
@@ -0,0 +1,34 @@
1
+ ## `hb-pad-joystick` — pad joystick
2
+
3
+ **Category:** utilities
4
+ **Tags:** utilities, controls
5
+
6
+ ### What it does
7
+
8
+ Touch-friendly directional control: either a four-way D-pad that emits cardinal directions or an analog joystick that streams position and cardinal direction with customizable colors.
9
+
10
+ ### Custom element
11
+
12
+ `hb-pad-joystick`
13
+
14
+ ### Attributes (snake_case; use string values in HTML)
15
+
16
+ - `id`, `style` (optional): strings.
17
+ - `pad_or_joystick` (optional): `"dpad"` | `"joystick"` (default pad-style behavior when omitted per examples).
18
+ - `joystick_parameters` (optional): JSON string — `internalFillColor`, `internalLineWidth`, `internalStrokeColor`, `externalLineWidth`, `externalStrokeColor`.
19
+
20
+ ### Events
21
+
22
+ - `sendDirection`: `{ direction: "up" | "right" | "down" | "left"; id: string }`.
23
+ - `sendJoystickPosition`: `{ x; y; cardinalDirection; id: string }` (cardinal set per `CardinalDirection` in types).
24
+
25
+ ### Usage notes
26
+
27
+ - **CSS variables:** `--hb-pad-joystick-size` (default `200px`).
28
+ - Use `pad_or_joystick="joystick"` for analog mode; see `extra/docs.ts`.
29
+
30
+ ### Minimal HTML example
31
+
32
+ ```html
33
+ <hb-pad-joystick pad_or_joystick="dpad"></hb-pad-joystick>
34
+ ```
package/manifest.json CHANGED
@@ -249,5 +249,5 @@
249
249
  "size": {},
250
250
  "iifePath": "main.iife.js",
251
251
  "repoName": "@htmlbricks/hb-pad-joystick",
252
- "version": "0.66.7"
252
+ "version": "0.66.9"
253
253
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htmlbricks/hb-pad-joystick",
3
- "version": "0.66.7",
3
+ "version": "0.66.9",
4
4
  "contributors": [],
5
5
  "description": "Touch-friendly directional control: either a four-way D-pad that emits cardinal directions or an analog joystick (html5-joystick-new) that streams position and cardinal direction with customizable colors.",
6
6
  "licenses": [