TurboWarp QR Display

TurboWarp QR output

Show any text as a QR code on a sprite.

TurboWarp QR Display puts a QR code in place of a sprite's costume without changing it. The costume comes back when the QR code is hidden, the project stops, or the sprite is removed.

show profile as QR code with error correction Hhide QR code

Blocks

show as QR code

Encodes the text as UTF-8 at error correction level L, M, Q or H, and draws every module a whole number of stage units, at most 320 wide or within a size you give.

QR code size

Reports the side of the code the sprite shows, for laying out around it.

hide QR code

Puts the sprite's costume back.

showing QR code?

Reports whether the sprite still shows its QR code. Switching costume takes it off.

QR code error

Reports why the last show failed, such as text-too-long, or nothing after a success.

API capability

Unsandboxed extensions can read `Scratch.vm.runtime.ext_kubohiroyaqrdisplay`.

qr.show(util.target, text, 'H');
qr.hide(util.target);
const svg = qr.createQrSvg(text, 'M');

A QR code shown through the API ends on the same stop, load and removal events as one shown by a block.

Setup

Load the extension without the sandbox. One QR code holds up to 1273 bytes at level H. The text never leaves the browser, and error messages never contain it.