Skip to content

v2.0.0-rc1

Pre-release
Pre-release

Choose a tag to compare

@andrewstart andrewstart released this 18 Mar 17:18
· 61 commits to ts-and-v5-rewrite since this release

First release candidate for version 2

Breaking changes:

  • Dropped support for PixiJS v4, now supports v5
  • The PIXI.animate namespace is no longer added to the window (and the PIXI namespace is no longer required). If you would like to use the namespace, use the IIFE build located in pixi-animate/dist/pixi-animate.js.
    • The ambient type declarations to describe that namespace are now in pixi-animate/dist/pixi-animate-ambient.d.ts
  • Instead of mixing into the PixiJS display object classes, subclasses are now provided in the library for the added and shorthand methods (PIXI.animate.Container, etc).
  • Graphics.c() is no longer a shorthand for closePath() (it overrode the setColorTransform() shorthand). Instead, the shorthand is cp().
  • Because PixiJS Graphics class has lost its addHole() method, there is no longer an h() shorthand either. Instead, the beginHole() and endHole() methods are supported with bh() and eh() shorthands.
  • The SymbolLoader plugin for Loader no longer exists, so individual images are no longer added to PIXI's global texture cache by resource name, and shape assets are no longer added to a global shape cache.
  • The global ShapesCache object has been dropped from the pixi-animate API.
  • load() no longer has so many variants allowed. Instead, the first argument is always the scene that you want to load, followed by either a callback or an options object. If using the legacy shim, pass in the constructor for the main scene MovieClip, as you did in v1.
    • createInstance now defaults to false, instead of true, when calling load().
  • The expected asset format is now a contained module (require() or import()) based one where you must call a setup function and provide a reference to the pixi-animate library.
    • To use v1 assets, you can include the pixi-animate/v1-asset-shim.js file in your project, which will update the PIXI and PIXI.animate namespaces with the appropriate changes so that old assets will work (you will have to ensure that the PIXI and PIXI.animate namespaces are set up correctly). You may have to use the pixijs-legacy build, the shim in combination with the standard build hasn't been tested.
    • If you want to update to the new asset format, a node script is provided to replace v1 assets with their v2 equivalent: pixi-animate/scripts/assetConversion.js. See the readme for usage.
      • In this release, the script does not update graphics shape data for the closePath/hole changes mentioned above - you'll have to do that manually.

Other changes

  • Source code is now written in Typescript, so type declarations are built automatically.