Canvas snapshotting HTML Elements not visible

0 favourites
  • 3 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • I am trying to capture my current layout canvas using either the system's Canvas Snapshot or the Drawing canvas, but I only get a white screen.

    My current layout is only composed of HTML Element but somehow, the snapshot looks past it.

    Placing some random sprites on the layout will work.

    I tried it with the HTML Menu example project, same there. When capturing the snapshot while the menu is visible, it will not be in the saved image.

    Is there a step I'm missing when it's HTML Element?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Snapshot only saves what is drawn to the canvas. HTML elements are placed above the canvas and not drawn to it.

    This isn’t limited to construct. In general it looks like it’s not possible to just render html elements to a canvas but here’s a js library that does its own rendering from the html elements onto a canvas. However it says the result may not always look the same.

    html2canvas.hertzen.com

  • Ah yes... when you say it, it makes sense. It is placed on the top and I knew that...

    Looking into this library, need to refresh on my javascript to have it work inside of C3.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)