Screenshots

You can allow your members to take screenshots of your game in its current state. At the moment this just works on anything in the <canvas> element and doesn't include any html UI elements (though support for that is on our todo list)

To basic call for screenshot creation use the javascript:

new Clay.Screenshot();

Scribble below and Click here for a demo

This will bring up a modal with the screenshot allowing the user to post it to Clay.io

For something more advanced, use:

function screenshot()
{
    var options = {
        prompt: false, // optional - default: true. If set false, it doesn't show the screenshot window on construct.
        id: "canvas" // ID of your canvas. Default is to pick first canvas on page
    }
    var screenshot = new Clay.Screenshot( options );

    screenshot.save( function( response ) { // Callback function is optional
        console.log( response ); // { url: 'urlToImagePage', imageSrc: 'urlToImage', success: boolean, error: "truthy" }
    );
}

The above example doesn't show the prompt window, and you're able to call save whenever you'd like

Provide Feedback

We take customer support, and the quality of our developer tools and documentation very seriously. We want to hear how you think we can improve our documentation! Let us know if anything is missing, or unclear on this documentation page, and we'll get that fixed!

1416712235