Closed stephanedemotte closed 5 years ago
Right, PixiPlugin needs some reference to the PIXI library object, which it looks for in the global scope (window in most cases). That's not really a bug or anything - it's just the nature of the beast. I assume you're using this in a build system or ES module environment rather than directly in the browser.
I'm thinking perhaps it's wise to add a PixiPlugin.registerPIXI() method that you can pass a reference into directly, like:
PixiPlugin.registerPIXI(PIXI);
I'm open to suggestions. For now, your workaround is fine or you can set it directly on the _gsScope object which is exported by TweenMax, TweenLite, and gsap/all.
The registerPIXI() method was added in GSAP 2.1.3.
Hello error with pixiplugin and Pixi v5 rc3
Work fine with Pixi v5 rc0
Thanks !
-- EDIT 1
Quick dirty fix
-- EDIT 2 To use the power of tree shaking we can simply import what we use
and don't forget to
When we build