Jump to content

why are canvas libraries faster than canvas itself


Hema

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 comment
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
×
×
  • Create New...