open-index/open-npm huggingface dataset:
npm package: @geogdev/sprites
Description: Sprite generation for Geog tiles
Latest version: 0.1.2

# Geog Basemaps Sprites

This directory contains sprite generation for Geog Basemaps POI icons.

## Quick Start

```bash
# Generate sprites for light theme (default)
npm run sprites

# Generate sprites for a specific theme
npm run sprites:light
npm run sprites:dark
npm run sprites:warm
npm run sprites:gray

# Generate all theme sprites
npm run sprites:all-themes
```

## Generated Sprites

Sprites are generated for each theme:

| Theme | Output Files |
|-------|--------------|
| light | `dist/light.json`, `dist/light.png`, `dist/light@2x.json`, `dist/light@2x.png` |
| dark | `dist/dark.json`, `dist/dark.png`, `dist/dark@2x.json`, `dist/dark@2x.png` |
| warm | `dist/warm.json`, `dist/warm.png`, `dist/warm@2x.json`, `dist/warm@2x.png` |
| gray | `dist/gray.json`, `dist/gray.png`, `dist/gray@2x.json`, `dist/gray@2x.png` |

## Directory Structure

```
sprites/
├── icons-light/     # Pre-processed SVG icons for light theme (315 icons)
├── icons-dark/      # Pre-processed SVG icons for dark theme
├── icons-warm/      # Pre-processed SVG icons for warm theme
├── icons-gray/      # Pre-processed SVG icons for gray theme
├── dist/            # Generated sprite sheets (output)
└── scripts/
    ├── generate-theme-sprites.sh  # Generates sprites from icons-* directories
    └── poi-icons.js               # POI icon definitions
```

## Requirements

- **Node.js** 18+
- **Spreet** (Rust tool for sprite sheet generation)
  ```bash
  cargo install spreet
  ```

## Testing

View the sprite preview page to verify icons render correctly:

```bash
# From repository root
open preview/sprites-preview.html
```

In the basemaps viewer (run `npm run dev` in `/app`), check the "local sprites" box to load sprites from `/sprites/dist`.