Jump to content

why are canvas libraries faster than canvas itself

Recommended Posts

The libraries are not faster than writing native Javascript, they are just coded in an optimal way. You could try to go through their source code if you want to learn some techniques.

A common technique to make canvas appear faster is to draw on a buffer (a hidden canvas) and then use drawImage() to draw the contents of the hidden canvas onto the visible canvas.

Without more information on how you are writing code for canvas, I can't tell you how to optimize it.

  • Like 1
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.

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.

  • Create New...