preview.module
README.md
preview
The on-screen attack preview of forecastKit. Preview.show(preview, opts) draws the result of Odds.compute over the target in one of four layouts (big, duel, tooltip, minimal) and five themes (clean, scifi, fantasy, pixel, cartoon), with hit, damage, crit, graze and kill chance, follows the target's world position every frame, and scales to phone screens. Preview.showResult(result) shows HIT / CRIT / GRAZE / MISS / HEAL at the target in one of four result styles (stamp, burst, ticker, banner) and clears it. Preview.setStyle / Preview.setTheme / Preview.setResultStyle switch the look everywhere; Preview.catalog() lists every option.
Called by a game's targeting code (on hover / on confirm) or through the OddsPreview component. Uses the engine UI (screens forecastKit.preview, forecastKit.preview.result), worldToScreen and ui.fromViewport.