Skip to content

A utility for wrapping Adobe Animate HTML5 canvas exports in modern web modules

License

Notifications You must be signed in to change notification settings

IJsLauw/adobe-animate-canvas-umd

 
 

Repository files navigation

adobe-animate-canvas-umd

Wraps Adobe Animate HTML5 canvas export files in UMD for use in modern JavaScript module ecosystems

Conversion example

Give it a try at wittnl.github.io/adobe-animate-canvas-umd

Usage

canvas-umd does depend on a global reference to createjs. That variable will need to exist before loading this one in order to work. Despite my best efforts, there's no workable solution for shimming it into a module format.

This library only works in a browser environment currently, CanvasRenderingContext2D support in node sucks

var umd = CanvasUmd({ 
    'module-name': 'my-module'
    'parse-labels': true
}).convert(AnimateJS);

Options

  • module-name - Override output module namespace. Without it, module name will be inherited by input filename by default.
  • parse-labels - Experimental Parse out top-level frame labels and add them to lib.properties for static evaluation.

UMD Enhancements

  • Better component organization and no global variables
  • Integrates with isometric JavaScript workflow (Webpack/AMD modules)
  • Adds frameLabels to the lib.properties object, enabling evaluation prior to constructing the animation

About

A utility for wrapping Adobe Animate HTML5 canvas exports in modern web modules

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 97.4%
  • Shell 2.6%