Sign in to follow this  
rossi46

webgl has hit a snag

Recommended Posts

When you minimize the browser, RAF stops working, but setInterval still is. When you change to normal, the "delta" in RAF becomes big (seconds), so if you depend on delta frame and spawn particles, you'll spawn too many objects. That's my guess.

Check how many runtime generated textures are in your projects and estimate how much memory do you use, check if you forget to destroy() unused generated textures. I really don't know what to advice, the number of facts you've provided is too small.

Share this post


Link to post
Share on other sites
35 minutes ago, ivan.popelyshev said:

When you minimize the browser, RAF stops working, but setInterval still is. When you change to normal, the "delta" in RAF becomes big (seconds), so if you depend on delta frame and spawn particles, you'll spawn too many objects. That's my guess.

Check how many runtime generated textures are in your projects and estimate how much memory do you use, check if you forget to destroy() unused generated textures. I really don't know what to advice, the number of facts you've provided is too small.

here is memory of my game. I do not use particles.

 2017-11-07_16-21-44.thumb.jpg.bfb278cb3fc7056db3b6fee599906946.jpg

Share this post


Link to post
Share on other sites
55 minutes ago, ivan.popelyshev said:

It wont show you total video memory used. Try to switch off several features of your game to understand what exactly is hitting the snag :)

I deleted all game and i just have create canvas it is hitting the snag.

I load one image size 1110x624

and just create game 

loader.add("iconsAnimation", ConfigSt.BASE_URL + "assets/images/anim.png");


this.game = new PIXI.Application(1140, 500, { antialias: false, transparent: true, resolution: 1 });
        //this.game.ticker.speed = 2;
        //this.game.ticker.minFPS = 60;
        $("#gamePlay").append(this.game.view);
        this.mainContainer = new Container();
        this.containerColumn1 = new Container();
        this.containerColumn2 = new Container();
        this.containerColumn3 = new Container();
        this.containerColumn4 = new Container();
        this.containerColumn5 = new Container();
        this.effectContainer = new Container();
        this.iconsContainer = new Container();
        this.mainContainer.addChild(this.containerColumn1, this.containerColumn2, this.containerColumn3, this.containerColumn4, this.containerColumn5, this.iconsContainer);
        this.game.stage.addChild(this.mainContainer, this.effectContainer);

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.