-
Notifications
You must be signed in to change notification settings - Fork 39
Pixi v5 support #17
Comments
Hello can anyone help on this I have the same problem |
Same error. |
Quick solution is to clone/download files from src/ and |
Because PIXI object is not defined when using Pixi.js 5.0.0 the tweenManager cannot read it. I don't know |
Yes, pixiJs v5 doesn't add PIXI to the window object. import * as PIXI from 'pixi.js';
window['PIXI'] = PIXI;
import 'pixi-tween'; Hope this helps! |
This is actually a troubling advice because Babel will reorder statements between imports to after the imports. This misses the whole point of giving const PIXI = require('pixi.js');
window.PIXI = PIXI;
const PixiTween = require('pixi-tween'); |
This problem is still here and it feels very weird to still have to use an ugly workaround ( An alternative solution I found with webpack is to load the packages dynamically: import(/* webpackChunkName: "pixi.js" */ 'pixi.js').then((module) => {
window.PIXI = module; // required for pixi-tween
import(/* webpackChunkName: "pixi-tween" */ 'pixi-tween').then((module) => {
// we are ready
});
}); |
The package is not that complicated to re-engineer. The author made it quite clean. I suggest forking it and fix the issue yourself. I would do it if I have some time. Otherwise, my work around is just simply copy the whole src folder of
|
Hi!
Pixi-Tween 0.2.0 not working with Pixi.js 5.0.0-rc.3
Uncaught ReferenceError: PIXI is not defined
at Object../node_modules/pixi-tween/build/pixi-tween.js (pixi-tween.js:formatted:1)
at e (pixi-tween.js:formatted:1)
at Object. (pixi-tween.js:formatted:1)
at e (pixi-tween.js:formatted:1)
at Object../node_modules/pixi-tween/build/pixi-tween.js (pixi-tween.js:formatted:1)
at e (pixi-tween.js:formatted:1)
at pixi-tween.js:formatted:1
at Object../node_modules/pixi-tween/build/pixi-tween.js (pixi-tween.js:formatted:1)
at webpack_require (pixi-tween.js:formatted:1)
at Module../src/scripts/app/hints_component/limit_hints.js (pixi-tween.js:formatted:1)
The text was updated successfully, but these errors were encountered: