Skip to content

This project loads the LibLAG library from a CDN and initializes it on page load. It allows users to drag and drop .pag files, which are read as ArrayBuffers, parsed into PAGFile objects, and rendered onto a canvas using PAGPlayer.

Notifications You must be signed in to change notification settings

nakamuraos/pag-player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

PAG Player

Preview

This HTML implementation provides a complete solution for running PAG files using LibLAG in a browser with drag and drop functionality. Here's what the code includes:

  • A user-friendly interface with a drag and drop zone
  • PAG file player with play, pause, and stop controls
  • File information display showing dimensions and duration
  • Error handling for invalid files or loading issues

To use this implementation:

  • Simply open the HTML file in a modern browser
  • Drag and drop a .pag file onto the drop zone (or click to select)
  • The PAG animation will automatically play once loaded

The code loads the LibLAG library from a CDN and initializes it when the page loads. When a user drops a .pag file, it's read as an ArrayBuffer, loaded into a PAGFile object, and then rendered on the canvas using PAGPlayer.

Demo

Author

About

This project loads the LibLAG library from a CDN and initializes it on page load. It allows users to drag and drop .pag files, which are read as ArrayBuffers, parsed into PAGFile objects, and rendered onto a canvas using PAGPlayer.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages