Module sprites

Module sprites 

Source
Expand description

Sprite processing and serving for map tile rendering.

Generates spritesheets from SVG files with support for high-DPI (@2x) and SDF (Signed Distance Field) sprites for dynamic styling.

§Usage

use martin_core::sprites::SpriteSources;
use std::path::PathBuf;

let mut sources = SpriteSources::default();
sources.add_source("icons".to_string(), PathBuf::from("/path/to/svg/directory"));
let spritesheet = sources.get_sprites("icons@2x", false).await.unwrap();

Structs§

CatalogSpriteEntry
Sprite source metadata.
SpriteSource
Sprite source directory.
SpriteSources
Thread-safe sprite source manager for serving sprites as .png or .json.
Spritesheet

Enums§

SpriteError
Errors that can occur during sprite processing.

Functions§

get_spritesheet
Generates spritesheet from sprite sources.

Type Aliases§

SpriteCatalog
Catalog mapping sprite names to metadata (e.g., “icons” -> CatalogSpriteEntry).