A browser-based viewer and exporter for PopCap PAM (PopAnim) animation files, commonly used in Plants vs. Zombies 2.
Live Demo: https://lambdaed1th.github.io/pam-viewer/
- Load & Play: Drag-and-drop a folder containing
.pam.json(or.pambinary) and PNG textures - Playback Controls: Play/pause, frame stepping, speed adjustment, loop, reverse
- Frame Labels: Jump to named animation labels (idle, walk, attack, etc.)
- Sprite & Image Filters: Toggle individual sprites/images on or off with regex filtering
- Plant Layers / Zombie States: Specialized layer selectors for PvZ2 animations
- Zoom & Pan: Scroll to zoom, drag to pan, reset with one click
- Export:
- PNG — current frame
- GIF — animated GIF of the current frame range
- Sprite Sheet — all frames in a single PNG
- FLA — Adobe Animate project (XFL format in ZIP), including media textures
- Open the page in a modern browser
- Click 📂 or drag-and-drop a folder containing:
- A
.pam.jsonor.pamfile (the animation definition) - PNG images referenced by the animation
- A
- Use the toolbar to control playback and export
PAM (PopAnim) is PopCap's proprietary animation format. Each animation contains:
- Images: bitmap references with affine transforms
- Sprites: timelines of layered image/sprite instances with per-frame transforms and color tinting
- Main Sprite: the root timeline that composes all sprites
The viewer can load both the JSON representation (.pam.json) and the raw binary format (.pam).
The FLA export generates a complete Adobe Animate project structure:
DOMDocument.xml— project metadata, flow/command/sprite layersLIBRARY/source/— bitmap source symbolsLIBRARY/image/— image symbols with transformsLIBRARY/sprite/— animated sprite symbolsLIBRARY/main.xml— main animation timelineLIBRARY/media/— PNG textures (when loaded)
Pure HTML5/CSS/JavaScript (ES modules), no build tools or dependencies. Runs entirely in the browser.
This project is licensed under the GNU General Public License v3.0 — see the LICENSE file for details.