Sign in to follow this  

How to clear PIXI.Application?

Recommended Posts

I have implemented PIXI application with more containers  like containers inside another container. I am adding PIXI.Texture for video and PIXI.Sprite for Image view. Everything working fine for the first time. Whenever I try playing video again by closing and opening page, I can see blank and throwing Uncaught TypeError: Cannot read property 'updateTransform' of null

 I found somewhere that I need to clear the containers and PIXI.Applications. I am doing like below but could not get it done.

if (this.appRenderer != null || this.appRenderer.stage != null) {
} =>{ //it contains another container in which video and image functionalities implemented
this.appRenderer = null;
console.log("Component Unmount, Pixi release ",ex.message) //TO-DO

Share this post

Link to post
Share on other sites

I initialized like below


init = (glBaseElement) => {
//Create pixi application instance
this.baseElement = glBaseElement;
this.ticker = PIXI.Ticker.shared;
this.ticker.autoStart = false;
this.appRenderer = new PIXI.Application({
width: this.appRendererWidth,
height: this.appRendererHeight
this.imageSlideElementHolder = this.refs[glBaseElement];
this.mainContainer = new PIXI.Container();

Share this post

Link to post
Share on other sites



19 hours ago, ivan.popelyshev said:

Hi! I'm glad that you use custom appplication! 

It should work.

Can you use devtools, to see where exactly is that function called? it should be one more ticker.

I am using only one ticker

Share this post

Link to post
Share on other sites

what about the one inside application that is turned on by default? 

You have to read  and either get rid of application in favor of simple renderer, or notice that app has its own destroy:

Application was created as a helper class for hello-worlds and examples. Yes, we support it in production if people want, but I require from everyone to actually look inside and understand that it's just a mashup, you should get rid of it as soon as you encounter first problem.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.