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 data
object The Object loaded by AEDataLoader
opt
object optional The animation option parameters
Name Type Description noreplay
boolean 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 jsonPath
string The JSON url
opt
object optional The animation option parameters
Name Type Description noreplay
boolean 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 name
string The name of element
Returns:
Type Description Element - The found Element
-
Pause AfterEffects animation
-
Start AfterEffects animation
Name Type Description isLoop
boolean Enable Loop playing
-
Resume AfterEffects animation
-
Stop AfterEffects animation
-
Update by current time
Name Type Description nowTime
number The current time
-
Update by delta time
Name Type Description deltaTime
number The delta time
-
Update by frame
Name Type Description frame
number The current frame number