awesome-repositories.com
博客
MCP
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
buuing avatar

buuing/lucky-canvas

0
View on GitHub↗
8,728 星标·1,028 分支·TypeScript·Apache-2.0·5 次浏览100px.net↗

Lucky Canvas

Lucky Canvas is a canvas-based lottery component library that enables developers to build interactive prize wheels, grid-based lottery games, and slot machines for web and mobile applications. The project provides a rendering engine that draws directly on HTML Canvas elements, with automatic device pixel ratio scaling to ensure crisp displays on high-DPI mobile screens.

The library packages each lottery type as a self-contained plugin with its own configuration and rendering logic, and wraps the core canvas functionality in framework-specific bindings for Vue, React, Taro, and UniApp without duplicating game logic. Developers can assign configurable probability weights to each prize, control spin speed and acceleration through animation physics parameters, and attach callback functions that fire before a draw starts and after a prize is awarded.

The project supports creating configurable prize wheels with customizable segments, grid-based lottery games with custom cell positions and appearances, and slot machine games with configurable reels and spin direction. Each widget type offers programmatic draw triggers, prize odds configuration, and styling options for text and images within prize segments. The library can be installed via package managers and embedded into projects built with Vue, React, or Taro-based mobile apps.

Features

  • Lottery Widgets - Provides interactive prize wheels, grids, and slot machines as embeddable canvas components for web and mobile apps.
  • Lottery Game Widgets - Provides the core canvas-based lottery game creation for wheels, grids, and slot machines.
  • Grid Prize Configurations - Provides configurable grid cells with custom positions, sizes, text, images, and win probabilities.
  • Prize Odds Configuration - Sets weighted odds for each prize item to control win likelihood in frontend or backend lottery logic.
  • Prize Odds Configurations - Assigns configurable probability weights to each prize for controlling win likelihood.
  • Weighted Prize Odds - Assigns configurable probability weights to each prize for controlled random selection during draws.
  • Prize Grids - Provides configurable grid lotteries where prize cells have custom positions, appearances, and win odds.
  • Slot Machine Games - Provides slot-machine games with configurable reels, spin speed, direction, and prize order.
  • Prize Grid Renderers - Renders configurable grid lottery games on Canvas for interactive prize selection.
  • Lottery Game Widgets - Provides interactive lottery games built on Canvas that support wheel, grid, and slot-machine prize draws.
  • Canvas Rendering Engines - Renders lottery games by drawing directly on an HTML Canvas element using TypeScript.
  • Canvas Components - Provides a Canvas-based component for animated lottery draws with DPR-aware rendering for mobile devices.
  • Draw Lifecycle Hooks - Ships callback hooks that fire before and after each lottery draw animation completes.
  • Multi-Framework Adapters - Wraps core Canvas logic in framework-specific bindings for Vue, React, Taro, and UniApp.
  • Lottery Draw Triggers - Starts lottery spins and stops at specified prize indices via scripted method calls.
  • Slot Machine Widgets - Builds configurable slot-machine lottery games with Canvas for animated reel-based prize draws.
  • Prize Wheel Renderers - Draws interactive lottery wheels on Canvas and spins them to select random prizes.
  • Prize Wheel Animations - Provides configurable spin animation physics for lottery wheels, controlling speed and acceleration during draws.
  • Prize Wheel Creators - Creates configurable spinning wheel lotteries with customizable prizes and backgrounds.
  • Prize Wheel Drawers - Draws configurable spinning wheel lottery games on Canvas for web and mobile.
  • Prize Wheels - Provides spinning wheel lotteries with customizable prizes, colors, images, and probability weights.
  • React Prize Wheel Components - Ships a React component for configurable spinning-wheel lottery games with spin animations.
  • Vue Prize Wheel Components - Ships a Vue component for configuring prize blocks and buttons on a canvas-based wheel.
  • Taro Lottery Widget Embeddings - Embeds wheel, grid, or slot-machine lottery components into Taro-based mobile apps.
  • Device Pixel Ratio Management - Automatically adjusts Canvas resolution based on device pixel ratio for crisp rendering on high-DPI screens.
  • Slot Machine Prize Configurations - Defines prize items, text, images, and visual styling for each slot in a spinning game.
  • Cross-Platform Plugin Implementations - Integrates a single lottery canvas component across multiple frameworks including Vue, React, and WeChat Mini Programs.
  • Canvas Rendering - Automatically adjusts canvas clarity based on device pixel ratio for crisp lottery displays on mobile screens.
  • Lifecycle Callbacks - Fires user-defined callbacks at the start and end of each lottery draw lifecycle.
  • Plugin-Based Architectures - Packages each lottery type as a self-contained plugin with its own configuration and rendering logic.
  • Canvas Animations - Manages spin speed, acceleration, and deceleration for wheel and slot machine animations with programmatic control.
  • Animation Physics - Controls spin speed, acceleration, and deceleration via parameters for realistic wheel and slot-machine motion.
  • Prize Segment Stylings - Sets font properties, colors, and images for each prize segment on the lottery wheel.
  • Async Prize Draw Triggers - Starts wheel animations programmatically and stops at specified prize indices after async results.
  • Slot Machine Spin Controllers - Sets rotation speed, direction, and prize order for each reel in a slot machine.
  • Slot Spin Triggers - Triggers slot machines to begin spinning and stop at specified prize indices.
  • Slot Machine Layout Configurations - Configures global row and column spacing, spin mode, acceleration, and deceleration for slot machine games.
  • JavaScript 框架汇总 - Listed in the “JavaScript 项目” section of the Great Open Source Project awesome list.

Star 历史

buuing/lucky-canvas 的 Star 历史图表buuing/lucky-canvas 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

常见问题解答

buuing/lucky-canvas 是做什么的?

Lucky Canvas is a canvas-based lottery component library that enables developers to build interactive prize wheels, grid-based lottery games, and slot machines for web and mobile applications. The project provides a rendering engine that draws directly on HTML Canvas elements, with automatic device pixel ratio scaling to ensure crisp displays on high-DPI mobile screens.

buuing/lucky-canvas 的主要功能有哪些?

buuing/lucky-canvas 的主要功能包括:Lottery Widgets, Lottery Game Widgets, Grid Prize Configurations, Prize Odds Configuration, Prize Odds Configurations, Weighted Prize Odds, Prize Grids, Slot Machine Games。

buuing/lucky-canvas 有哪些开源替代品?

buuing/lucky-canvas 的开源替代品包括: konvajs/react-konva — react-konva is a declarative React canvas graphics library and 2D vector graphics framework. It serves as a rendering… dream-num/luckysheet — Luckysheet upgraded to Univer. flipboard/react-canvas — react-canvas is a library for drawing user interface elements to a hardware-accelerated canvas instead of the standard… leaferjs/leafer-ui — Leafer UI is a high-performance HTML5 canvas rendering engine and 2D vector graphics library. It utilizes a… cmiscm/leonsans — This project is a programmable font system and canvas typography engine that renders a geometric sans-serif typeface… konvajs/konva — Konva is an object-oriented HTML5 canvas framework designed for building interactive 2D graphical applications. It…

Lucky Canvas 的开源替代方案

相似的开源项目,按与 Lucky Canvas 的功能重合度排序。
  • konvajs/react-konvakonvajs 的头像

    konvajs/react-konva

    6,362在 GitHub 上查看↗

    react-konva is a declarative React canvas graphics library and 2D vector graphics framework. It serves as a rendering engine and interactive canvas toolset that allows for the drawing and management of complex 2D shapes and graphics using a React component model. The library maps reactive component trees to an underlying object-oriented graphics scene graph, enabling the synchronization of visual states with application data. It provides specialized tools for building interactive graphical interfaces, including support for multi-touch gestures, drag-and-drop functionality, and real-time trans

    TypeScript
    在 GitHub 上查看↗6,362
  • dream-num/luckysheetdream-num 的头像

    dream-num/Luckysheet

    16,644在 GitHub 上查看↗

    Luckysheet upgraded to Univer

    JavaScriptcanvaschartconditional-formatting
    在 GitHub 上查看↗16,644
  • flipboard/react-canvasFlipboard 的头像

    Flipboard/react-canvas

    13,203在 GitHub 上查看↗

    react-canvas is a library for drawing user interface elements to a hardware-accelerated canvas instead of the standard document tree. It provides a system for rendering components to a canvas to improve rendering speed and frame rates. The project includes a layer manager to organize visual elements and cache expensive drawing operations. It features a text engine capable of rendering multi-line text with precise character metric measurements and truncation, as well as a virtualized list system that processes only visible items to maintain smooth scrolling. Interaction is handled through a c

    JavaScript
    在 GitHub 上查看↗13,203
  • cmiscm/leonsanscmiscm 的头像

    cmiscm/leonsans

    10,179在 GitHub 上查看↗

    This project is a programmable font system and canvas typography engine that renders a geometric sans-serif typeface using raw coordinate data. It functions as a coordinate-based text animator, allowing for the real-time modification of glyph shapes and font weights. The system distinguishes itself through the ability to extract and manipulate the point coordinates of characters to create morphing effects, wave animations, and shape transitions. It enables dynamic weight interpolation and point-to-line visualizations, moving beyond static font rendering to produce procedural typography. The

    JavaScript
    在 GitHub 上查看↗10,179
  • 查看 Lucky Canvas 的所有 30 个替代方案→