JanVac91

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. JanVac91

    Take a screenshot to hide the change of state

    Thank you so much for the answers! I think i'll rewrite our team engine to use scenes and not states. Thank you again and have a nice day!
  2. Hello everyone! I'm trying to accomplish the following task: - When there is a change of state I want to take a screenshot of the canvas, show to the user while the state is changing. Now I read that I should use canvas.toDataURL to obtain the base64 encoded Image. I can't understand the steps to accomplish this task. 1) I save the URL with canvas.toDataURL(). 2) I should convert the base64 to an image right? 3) I should add the Image to the cache OR i Should do a load.image? 4) The operation should be async right? Because in my trying the debugger console is saying that the image hasn't been retrieved and I don't understand how I can make toDataURL (or the conversion from base64 to png) async because there are no methods. Thanks for the help!