Skip to content
developers
Developer home

VISWOO DOCUMENTATION

Examples

Source and walkthrough of the Prize Wheel and Hello World plugins.

Customers spin the wheel on screen by touch or by scanning the QR code with their phone; winners get a one-time code to show at the till. It is Viswoo’s first packaged plugin and follows every rule in these docs.

Download the source (ZIP)

File What
viswoo-plugin.json Permissions settings, events, codes, draw, public; settings schema (title and slices required; chance, stock and wins server-only); draw.pools.default from the slices; placement modes
player.html Screen view: the wheel drawn on a canvas, “Tap to spin” on touch screens, a QR code everywhere. Large code in the result layer
public/ Phone page: the same wheel, one spin per day, the won code kept in the browser
panel/ Till and stats tab: code lookup and redemption, last 30 days, remaining stock, phone link
shared/ Wheel drawing and QR generator shared by the screen and phone; pack inlines them into the screen view

Highlights:

  • No settings form; campaign dates and screens are in the panel’s Screens tab.
  • The wheel is drawn once the frame has a size and again on resize; labels shrink when they do not fit.
  • Spins happen on the server with call('draw'); the wheel spins until the result arrives and stops on it.
  • Errors are turned into bilingual text from their code (plugin.limit_reached, plugin.pool_empty, plugin.not_live …).

To run it in the simulator:

Terminal window
unzip carkifelek.zip -d carkifelek && cd carkifelek
npx @viswoo/plugin-sdk dev .

The smallest package: a panel tab, a greeting on screen and the greeting text in settings.

Download the source (ZIP)

viswoo-plugin init creates three templates (basic, interactive, server); each is a working plugin, described in Getting started.