Jump to content

I need help in canvas Screenshot Take Function in Babylon.js


Recommended Posts

1 minute ago, bulisor said:

Thanks For Reply . I also need one more Help I Use Babylon js Render Scene to take screen shot its working Now very well I need Next help is I want a Function to send direct Screen shot to Email   currently when I click on send they download me Png on my computer .  Please Any Guidelines 

Link to comment
Share on other sites

  size = { width: 600 , height: 400};
    var i = 1;
    function myLoop () {
        setTimeout(function () {
            alert('Taking Screenshot!');
            //Creating png screenshot
          var a = BABYLON.Tools.CreateScreenshot(engine, camera, {precision: 1});
          var path = "";
             data: "dir=" + path + "&img=" + textureDynamic._canvas.toDataURL()
            if (i < 1) {
        }, 5000)

This is my current function that I use please let me know how I send screen shot to email or server can u wirte for me code
Link to comment
Share on other sites

1 minute ago, Arte said:

BABYLON.Tools.CreateScreenshot(engine, camera, { width: 500, height: 500 },sendData);

function sendData(base64Image) {



data : {

screnShot: base64Image





Thanks for your response i'll let you know ASAP i'm trying this code.... :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...