npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pkp-docu-animator

v1.0.3

Published

Standalone Remotion-based 2D Animated Docu & Shorts Video Generator Engine

Readme

🎬 PKP Docu-Animator (pkp-docu-animator) v1.0.3

Standalone Remotion-based 2D/3D Animated Cricket Documentary & Shorts Video Generator Engine.

Built with SOLID Principles, a modular Base Engine Core, specialized domain engines, and end-to-end Full Video Flow Templates. Convert structured JSON scripts or TS flow templates into 4K/HD 2D Animated videos (1920x1080 long-form or 1080x1920 vertical Shorts) with voiceover sync, pitch Hawkeye ball tracking, polar wagon wheels, head-to-head VS cards, karaoke subtitles, and cinematic camera VFX.


🏛️ SOLID Architecture & Engine Ecosystem

The engine is decoupled into domain-specific modules adhering to Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion principles:

| Engine | Responsibility | Key Visual Capabilities | | :--- | :--- | :--- | | BaseEngine | Core Animation Math & Physics | Normalized progress (0.0 - 1.0), spring physics, cubic bezier, overshoot bounce, lifecycle hooks | | StatsDataEngine | Cricket Match Statistics | Polar Wagon Wheel shot distribution (angleInDegrees), career bar metrics, stats comparison grids | | PitchVisualizerEngine | 2D Pitch & Hawkeye Motion | Ball trajectory delivery curve (seam/spin), bounce point pulse marker, delivery speed gauge | | PlayerCardEngine | Player Battles & Spotlight | Split-screen head-to-head VS duels, player attribute spotlight cards | | KineticTypographyEngine | Motion Text & Quotes | Letter-staggered kinetic title reveals, quote animations with glowing spring physics | | RetroArchiveEngine | Vintage 1990s Aesthetics | Vintage newspaper cutouts, polaroids, dressing room secret quotes | | VfxCameraEngine | Camera Physics & VFX | Camera zoom/pan, pseudo-random camera shake physics during drama moments, film grain | | AudioSyncEngine | Multi-Track Audio Sync | Voiceover audio, background music auto-ducking during speech, timed SFX cues | | SubtitleEngine | Subtitles & Karaoke | High-visibility active word karaoke captions synced to voiceover timestamps | | OrchestratorEngine | Master Video Pipeline | Coordinates sub-engines, builds Remotion sequence timelines, parses documentary scripts |


🎬 Dedicated Full Video Flow Templates

Templates are organized into clean, dedicated directories (src/templates/) that orchestrate complete end-to-end documentary video flows from Scene 1 to Scene N:

src/templates/
├── HistoricalRivalry/              # Complete 5-Scene Match Rivalry Flow
│   ├── index.tsx                   # Flow Component & Config Builder
│   ├── Scene1_NewspaperHeadline.tsx
│   ├── Scene2_DressingRoomQuote.tsx
│   ├── Scene3_VersusClash.tsx
│   ├── Scene4_PitchHawkeye.tsx
│   └── Scene5_WagonWheelStats.tsx
├── ControversialDrama/             # Complete 4-Scene Controversy & Secret Drama Flow
│   ├── index.tsx                   # Flow Component & Config Builder
│   ├── Scene1_KineticHook.tsx
│   ├── Scene2_SecretQuote.tsx
│   ├── Scene3_TweetReaction.tsx
│   └── Scene4_PressStatement.tsx
└── PlayerComparison/              # Complete 3-Scene Legend Head-to-Head Comparison Flow
    ├── index.tsx                   # Flow Component & Config Builder
    ├── Scene1_PlayerSpotlight.tsx
    ├── Scene2_CareerStatsGrid.tsx
    └── Scene3_LegendQuoteOutro.tsx

🚀 Quick Start & Usage

1. Render a Full Video Flow Template (TypeScript / Node.js)

import { HistoricalRivalry, renderDocuVideo } from 'pkp-docu-animator';

// 1. Generate Full Video Flow Configuration with persistent UUIDs
const docuConfig = HistoricalRivalry.buildHistoricalRivalryConfig({
  headline: 'SACHIN HEROIC 136 IN TEAR GAS NIGHT',
  dressingRoomQuote: 'Dressing room mein tear gas ki boo thi... aur Sachin back pain mein ro rahe the.',
  player1Name: 'Sachin Tendulkar',
  player2Name: 'Wasim Akram',
  bowlerName: 'Saqlain Mushtaq',
  speedKmph: 88,
  wagonWheelStats: [
    { label: 'Cover Drive', value: '34 Runs', angleInDegrees: 310, distanceRatio: 0.9, color: '#38bdf8' },
    { label: 'Straight Drive', value: '28 Runs', angleInDegrees: 270, distanceRatio: 0.95, color: '#4ade80' },
  ],
});

// 2. Render to MP4
const result = await renderDocuVideo({
  config: docuConfig,
  outputFilename: 'chennai_test_1999.mp4',
});

console.log('✅ Documentary Video Saved to:', result.outputPath);

2. React / Remotion Direct Flow Component

import { HistoricalRivalry } from 'pkp-docu-animator';

export const MyComposition = () => (
  <HistoricalRivalry.HistoricalRivalryFlow
    headline="THE CHENNAI TEST 1999"
    dressingRoomQuote="Dressing room secret quote..."
    player1Name="Sachin Tendulkar"
    player2Name="Wasim Akram"
    bowlerName="Saqlain Mushtaq"
    speedKmph={88}
  />
);

🔑 Key Policies & Guarantees

  • Zero Hardcoded Text Fallbacks: If a title, quote, or headline prop is omitted, it strictly evaluates to '' or null, ensuring no dummy text leaks onto the video output.
  • Persistent UUID v4 Scene Identifiers: Scene IDs are generated persistently via generateUUID() (crypto.randomUUID()) per flow run rather than on every render frame.
  • Dynamic Plugin System: Extend new engines via EngineRegistry.getInstance().registerEngine(...) or templates via TemplateManager.getInstance().registerTemplate(...).