Add a spinning prize wheel to a marketing campaign page where winning odds are determined by your backend server, not exposed in the browser.
Build a scratch-card giveaway component in a Vue app with each prize configured as a mix of images, text, and background colors.
Create a consistent slot machine animation across a WeChat Mini Program and a web app using the same plugin and prize configuration.
| buuing/lucky-canvas | isaacs/node-glob | howtographql/howtographql | |
|---|---|---|---|
| Stars | 8,710 | 8,713 | 8,718 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | easy | easy | easy |
| Complexity | 2/5 | 2/5 | 1/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Documentation is primarily in Chinese, English docs are listed as a work in progress.
Lucky-canvas is a JavaScript plugin for adding lottery and prize-drawing animations to a website or app. It provides three visual styles: a spinning prize wheel, a nine-grid scratch-card style picker, and a slot machine. All three are drawn with the Canvas API, which means they render sharply on screens of any pixel density, including high-resolution mobile displays. The README is written in Chinese, this summary is based on the description, topics, and visible structure of the project. The plugin is designed to work across many different JavaScript environments without rewriting your code. There are separate npm packages for plain JavaScript, Vue, React, UniApp, Taro (a cross-platform mini-app framework), and WeChat Mini Programs. Each package wraps the same core drawing engine, so the behavior is consistent regardless of which framework you use. You configure what appears in each segment of the wheel or grid by passing in a list of prizes. Each prize can be text, an image, a background color, or a button, and you can mix these freely. The plugin supports both modes of determining a winner: the result can be decided locally in the browser before the animation starts, or you can call your own backend during the spin and wait for a server response before landing on a prize. This lets you control the actual odds from a server rather than exposing probability logic to the browser. The project is actively maintained and has English documentation listed as a work in progress. The Chinese documentation and demo site live at 100px.net. It is released under an open-source license.
JavaScript plugin that adds animated prize wheels, nine-grid pickers, and slot machines to any website or mini-app, with server-controlled odds and support for Vue, React, and WeChat.
Mainly TypeScript. The stack also includes TypeScript, JavaScript, Vue.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.