Developer Builds Client-Side RPG Token Maker Using HTML5 Canvas and a Zero-Dependency ZIP Writer
The author created a free VTT token maker for the FantasyGen site with the requirement that all image processing run in the browser rather than on a server. Users upload character portraits, adjust them within round or hexagonal frames, recolor the metal, and export single tokens or numbered batches as a ZIP. Simple circular or polygonal clipping failed on ornate borders with irregular openings, so the author computed a pixel-exact interior mask per border using a flood fill from the center. The article also covers fast real-time metallic tinting, handling opaque user-uploaded borders, and writing PNG or WebP batches into a ZIP without a heavy compression library.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in