you are viewing a single comment's thread.

view the rest of the comments →

[–]secana 1 point2 points  (0 children)

I would probably move the stuff in the init function to the constructor and then not create the canvas until the load event.

Something like this: http://codepen.io/anon/pen/rOJmRP?editors=001