Jump to content

webgl has hit a snag


rossi46
 Share

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.

Link to comment
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

Link to comment
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);

 

Link to comment
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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...