connect PaSoRi as
Shows the WebUSB device picker and assigns the selected reader to a name such as `left` or `right`.
TurboWarp NFC input
Connect Sony PaSoRi readers under project-local names, read NFC card IDm and PMm values, and write IDm values into Temporary Variables.
Open the user guide at https://kubohiroya.github.io/turbowarp-webusb-pasori/.
pnpm add --save-exact @kubohiroya/turbowarp-webusb-pasori@0.2.0
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-webusb-pasori@0.2.0/dist/webusb-pasori.jsShows the WebUSB device picker and assigns the selected reader to a name such as `left` or `right`.
Polls a named reader until a card is present and stores its IDm.
Reports the most recent IDm read by a named reader.
Unsandboxed extensions can read `Scratch.vm.runtime.ext_kubohiroyawebusbpasori`.
const left = await pasori.connectPasori({readerId: 'left'});
await pasori.connectPasori({readerId: 'right'});
const card = await left.readCardInfo();
const idm = await pasori.waitForNfcIdm({readerId: 'left', signal});This extension is intentionally scoped to Sony PaSoRi card ID reading. WebUSB requires a secure context, browser support, a user gesture, and device permission. Some operating system drivers or browser protected-interface rules can prevent `claimInterface(0)` from succeeding.