Example
// create base container object
const stage = new PIXI.Container();
// create the AfterEffects instance from json path
PIXI.AfterEffects.fromJSONPath('bodymovin.json').then((ae) => {
// add AfterEffects to stage
stage.addChild(ae);
// start AfterEffects animation
ae.play();
});
Extends
- PIXI.Container
Methods
-
PIXI.AfterEffects.fromData (data, opt)PIXI.AfterEffects static
-
Create PIXI.AfterEffects instance from object created by AEDataLoader
Name Type Description dataobject The Object loaded by AEDataLoader
optobject optional The animation option parameters
Name Type Description noreplayboolean optional enables no repeat mode. if enabled this option, instantly destroy already played component.
Returns:
Type Description PIXI.AfterEffects The newly created AfterEffects -
Create PIXI.AfterEffects instance from JSON url
Name Type Description jsonPathstring The JSON url
optobject optional The animation option parameters
Name Type Description noreplayboolean optional enables no repeat mode. if enabled this option, instantly destroy already played component.
Returns:
Type Description Promise -
Find element by name
Name Type Description namestring The name of element
Returns:
Type Description Element - The found Element
-
Pause AfterEffects animation
-
Start AfterEffects animation
Name Type Description isLoopboolean Enable Loop playing
-
Resume AfterEffects animation
-
Stop AfterEffects animation
-
Update by current time
Name Type Description nowTimenumber The current time
-
Update by delta time
Name Type Description deltaTimenumber The delta time
-
Update by frame
Name Type Description framenumber The current frame number