Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Lucky SpinNew to Visual Studio Code? Get it now.
Lucky Spin

Lucky Spin

Lehifebo

|
1 install
| (0) | Free
A webview extension for VS Code that lets you spin reels and track your balance.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Lucky Spin

A lightweight VS Code extension that adds a reel spinner webview to the Explorer panel.

Players can spin the reels, track balance, and reset credits while keeping the UI inside a VS Code custom view.

Features

  • Webview-based slot machine UI inside the Explorer view
  • Current balance display and spin cost indicator
  • Animated reel behavior and result messages
  • Reset balance command to restore credits
  • Custom commands exposed in the Command Palette

Usage

  1. Open this extension folder in VS Code.
  2. Run npm install if dependencies are not already installed.
  3. Build the extension with:
npm run compile
  1. Press F5 to launch the extension in the Extension Development Host.
  2. Open the Code Spin view from the Explorer panel.
  3. Click Spin to play and Reset to restore the balance to 100.

Commands

  • codeSpin.spin — Trigger a reel spin from the Command Palette.
  • codeSpin.resetBalance — Reset the balance to 100.

Development

Use these scripts during development:

  • npm run compile — Compile TypeScript to JavaScript.
  • npm run watch — Run the TypeScript compiler in watch mode.
  • npm run lint — Run ESLint on the src folder.
  • npm test — Run the extension tests.

Project structure

  • src/extension.ts — Extension activation, webview provider, and message handling.
  • src/view.html.ts — Webview HTML builder and client-side slot logic.
  • src/view.css — External CSS used by the webview.
  • src/slotlogic.ts — Slot spin simulation and payout calculation.
  • src/test/extension.test.ts — Extension unit tests.

Notes

  • The extension contributes a custom Explorer webview named Code Spin.
  • The webview loads CSS via webview.asWebviewUri(...).
  • State persistence is handled with acquireVsCodeApi().setState(...).

License

This project is provided as-is. Update the license and contribution details as needed.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft