FairyGUI is a Visualization Editor For Game Development.
PixiJS is a render library for create rich, interactive graphic.
This library create an interface between both to make development easier.
Analysing Fairy Config File and return a factory function.
Make sure all Resources used by the package were loaded.
This Function use PIXI.Application built-in loader to fetch necessary resources.
// Suppose your config filename is package1.fui
const create = addPackage(app, 'package1');
// Suppose 'main' is your component name.
const mainComp = create('main');
app.stage.addChild(mainComp);
-
app
PIXI.Application -
packageName
string
Returns function (string): PIXI.Container
The Function create can take specify component name,
which you created by fairyGUI Editor
and return the PIXI.Container for that entity.
-
resName
string
Returns PIXI.Container