Controller driver lab extracted from Tandemonium. Vendor-agnostic gamepad drivers, a 3D visualizer, and a slot/claim manager for multi-controller coordination.
Pre-1.0 — the API will change.
@usersfirst/controller-core— vendor-agnostic gamepad drivers (DualSense, Switch Pro, Xbox) plus the WebHID sensor-fusion runtime and the slot/claimControllerManager(exported at@usersfirst/controller-core/manager, drivers at@usersfirst/controller-core/drivers/*, sensor fusion at@usersfirst/controller-core/sensor-fusion).@usersfirst/controller-visualizer— Three.js-based 3D controller overlay/visualizer. Ships per-vendor GLB models and thecontroller-profilesthat bind Gamepad-API indices to mesh names.threeis a peer dependency.apps/overlay— reference Electron overlay app that consumes both packages. Mirrors the originalpetegordon/tandemonium/controller-overlayUX (transparent always-on-top window, button-combo settings, gyro HUD, multi-player slot/claim demo).
A Steam companion package (@usersfirst/controller-steam) will land in a later pass. The Steamworks SDK is never bundled or auto-downloaded by this repo.
npm install
npm --workspace @usersfirst/overlay run start # single controller
npm --workspace @usersfirst/overlay run start:multi # two-player slot/claimSee apps/overlay/README.md for build/packaging.
@usersfirst/controller-core is covered by the built-in node:test runner with
no external dependencies — the suite imports only from ./src, so it runs
without npm install:
npm test # all workspaces (currently just core)
npm --workspace @usersfirst/controller-core testCoverage focuses on the things most likely to regress silently: HID
parse-offset correctness (PlayStationDriver.parseReport), the IMU-offset probe
that disambiguates PlayStation-family clones, and the DEVICES/registry
invariants. The probe test runs against a real GameSir Super Nova capture
committed under packages/core/test/fixtures/.
CI runs the same suite on every PR via .github/workflows/ci.yml.
The gyro sensor-fusion runtime (@usersfirst/controller-core/sensor-fusion) is derived from JibbSmart/GamepadMotionHelpers by Julian "Jibb" Smart (MIT). The gravity tracking, tilt correction, and continuous bias-calibration math are ported from Jibb's reference implementation, and GyroWiki — especially the "Finding Gravity with Sensor Fusion" article — was indispensable in building it. Thank you, Jibb, for both the code and the writing that makes gyro input approachable. See packages/core/THIRD_PARTY_NOTICES.md for the upstream license text.
The GLB controller models in packages/visualizer/assets/controllers/ derive from larfingshnew/3d-controller-overlay (MIT). See packages/visualizer/ASSETS_ATTRIBUTION.md for the upstream license text.