Home

Awesome

Pixi Animate

A plugin for PixiJS which provides a runtime for content export using PixiAnimate Extension.

Build Status Dependency Status npm version

Running Content

Re-Export your .fla

Use this Animate CC plugin https://github.com/pixijs/animate-extension and follow this steps:

  1. Install the plugin
  2. Open your old .fla file
  3. Convert to PixiJS Animate (from the File menu), creating a new .fla file
  4. From that new .fla file go to publishing settings (from the File menu)
  5. Select the V2 format on the first dropdown
  6. Export your project, you should have a .js file and some folders with it.

Only things added to the stage will be exported!

Installing Library

To run content exported with Pixi Animate, you must load the JavaScript library within your project. You can install using NPM or your package manager of choice:

NPM

npm install @pixi/animate

Dependencies

PixiJS@pixi/animate
v5.x - v6.xv2.x
v7.xv3.x

Documentation

https://pixijs.io/animate/docs/

Breaking changes from v2.x to v3.x

Breaking Changes from v1.3

Using the legacy bundle file dist/animate-legacy.js (requires PIXI namespace to be set up) will restore the removed functionality so that assets published for the previous version of PixiAnimate will work correctly.

Changes that the legacy build doesn't account for:

Asset changes

The expected asset format is now a module based asset that uses ES6 classes, for use with require() (publish for CommonJS) or import() (publish for ES6). A script has been provided to update v1 assets to the new format - animate-upgrade (see bin/assetConversion.js for the source).

Note that this script will do its best to update graphics paths (*.shapes.json files), but you should confirm that they were properly updated (closePath & hole changes).

If you want to have a Typescript declaration specific to an individual asset file, use the animate-type-assets script to generate a .d.ts file. This script will work on any of the 3 variants of the current asset format. Example: npx animate-type-assets path/to/myFile.js path/to/my2ndFile.js

Considerations & Limitations in Animate

While we now support publishing tweens from Animate, there are some things to take into account to ensure that you get the smallest, most efficient asset size possible.

Tweens

Considerations with Graphics

In order to maintain an accurate export, Animate creates a unique Graphic (MovieClip in the runtime) instance for each usage in your library of anything that is a Graphic on the timeline. This has a few effects:

In order to minimize your asset size, there are a few things that you can do:

License

Copyright (c) 2016 Jibo, Inc.

Released under the MIT License.