-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing pixi-heaven #20
Comments
Our old system really dont like es6 modules. Either wait when I move it to v6, either.. lets try that thing: import * as PIXI from "pixi.js";
import * as spine from "pixi-spine";
(window as any).PIXI = PIXI;
(PIXI as any).spine = spine;
require('pixi-heaven' |
swap |
Thank you Ivan! The below has indeed worked: import * as PIXI from "pixi.js";
import * as spine from "pixi-spine";
(window as any).PIXI = PIXI;
require('pixi-heaven'); I didn't need to import PIXI spine. With preliminary testing it seems that the sprite masking that you have implemented in pixi-heaven has improved the performance a lot. One remaining question I have (I'm piggybacking on this thread but could start a new github issue too if you prefer) is regarding the snippet below. sprite = new PIXI.heaven.Sprite();
sprite.maskSprite = sprite2; //set it
sprite.pluginName = 'batchMasked'; //enable special plugin rendering
sprite2.renderable = false; //turn off rendering What is the renderable property doing in more detail? Would setting it to |
Yo! pixi-heaven is updated to v6, can you please try it without hacks? The only migration advice is to swap |
Hey everyone,
Hopefully this is a simple one. I use Next.js and render my PIXI app as a dynamic component.
I'm trying to use pixi-heaven to improve the peformance of masking a video. I installed pixi-heaven via npm (tried copy pasting js as well):
I import it as follows:
And whichever way I try to go (npm and importing the js file) I end up with PIXI is not defined:
I also tried a voodoo solution of trying to import the ts files straight into the codebase but unfortunately with a plethora of errors.
Could anyone please advise me on how to bring pixi-heaven into the project? I'm hoping I'm doing something silly or basic wrong.
The text was updated successfully, but these errors were encountered: