Jump to content

multi canvas


vivek madishetty
 Share

Recommended Posts

Hi i am currently working on a game using pixi. I have used too many animations which is effecting the performance. I am using very heavy assets(4k background). i would like to know if i can use multiple canvas one over the other. and render them as per requirement. the renderer redrawing the whole background slowing the speed of the game. and suggestions.

some animations require a higher frame rate but the other animation will do well with lower frame rate. 

i would like to optimize the game as much as possible.  

Link to comment
Share on other sites

Yes, you can.

The more canvases you usem, the more memory they eat and the more time browser's compositeLayers will take per frame.

In some of my games I used two canvases, one for back one for front. I even made back larger and moved it with css. I don't know why sometimes its faster than one canvas, it depends on browser and device.

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