Security News
Research
Supply Chain Attack on Rspack npm Packages Injects Cryptojacking Malware
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
@pixi/animate
Advanced tools
A plugin for PixiJS which provides a runtime for content export using PixiAnimate Extension.
.fla
Use this Animate CC plugin https://github.com/pixijs/animate-extension and follow this steps:
.fla
file.fla
file.fla
file go to publishing settings (from the File menu).js
file and some folders with it.Only things added to the stage will be exported!
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 install @pixi/animate
PixiJS | @pixi/animate |
---|---|
v5.x - v6.x | v2.x |
v7.x | v3.x |
https://pixijs.io/animate/docs/
Assets
to download anything needed.extend()
and e()
methods no longer exist on the display object classes.c()
is no longer the shorthand for closePath()
; instead, use cp()
.drawHole()
and h()
no longer exist. Instead of making the previous shape a hole, use beginHole()
(bh()
) before drawing a hole and endHole()
(eh()
) when it is complete.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:
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 build, 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 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).
npx animate-upgrade path/to/myFile.js path/to/my2ndFile.js
const asset = require('./myAsset');
npx animate-upgrade -e path/to/myFile.js path/to/my2ndFile.js
import asset from './myAsset'
or const asset = await import('./myAsset')
;npx animate-upgrade -a path/to/myFile.js path/to/my2ndFile.js
'@pixi/animate'
and runs setup()
. Individual library items are exported by name in addition to the default export.import asset, {MyScene} from './myAsset'
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
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.
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:
Copyright (c) 2016 Jibo, Inc.
Released under the MIT License.
FAQs
PIXI plugin for the PixiAnimate Extension
The npm package @pixi/animate receives a total of 125 weekly downloads. As such, @pixi/animate popularity was classified as not popular.
We found that @pixi/animate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.
Security News
Sonar’s acquisition of Tidelift highlights a growing industry shift toward sustainable open source funding, addressing maintainer burnout and critical software dependencies.