Shahzaibkhatri Posted October 14, 2017 Share Posted October 14, 2017 Hello Experts I need your Best Guidline I need to know Is it possible to take 3d Model Canvas Screenshot ? And How Its Work can u show me demo ? Quote Link to comment Share on other sites More sharing options...
MarianG Posted October 15, 2017 Share Posted October 15, 2017 Hi. Try this :https://doc.babylonjs.com/tutorials/render_scene_on_a_png and a lot of examples here: https://doc.babylonjs.com/playground?code=CreateScreenshot JCPalmer and Shahzaibkhatri 1 1 Quote Link to comment Share on other sites More sharing options...
Shahzaibkhatri Posted October 15, 2017 Author Share Posted October 15, 2017 1 minute ago, bulisor said: Hi. Try this :https://doc.babylonjs.com/tutorials/render_scene_on_a_png and a lot of examples here: https://doc.babylonjs.com/playground?code=CreateScreenshot 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 Quote Link to comment Share on other sites More sharing options...
Arte Posted October 15, 2017 Share Posted October 15, 2017 Hi @Shahzaibkhatri, Function feedback will do job: BABYLON.Tools.CreateScreenshot(engine, camera, { width: 500, height: 500 },create_pic); function create_pic(base64Image) { // Send Email with base64Image } Quote Link to comment Share on other sites More sharing options...
Shahzaibkhatri Posted October 15, 2017 Author Share Posted October 15, 2017 1 minute ago, Arte said: Hi @Shahzaibkhatri, Function feedback will do job: BABYLON.Tools.CreateScreenshot(engine, camera, { width: 500, height: 500 },create_pic); function create_pic(base64Image) { // Send Email with base64Image } Can u Please Help me How I save screenshot on my server Data or Email ? Quote Link to comment Share on other sites More sharing options...
Arte Posted October 15, 2017 Share Posted October 15, 2017 Display Screen shot: <img id="image" src="#"/> $('#image').attr('src', base64Image); To save/send : Just use 'base64Image'. Quote Link to comment Share on other sites More sharing options...
Shahzaibkhatri Posted October 15, 2017 Author Share Posted October 15, 2017 size = { width: 600 , height: 400}; var i = 1; function myLoop () { setTimeout(function () { alert('Taking Screenshot!'); //Creating png screenshot scene.render(); var a = BABYLON.Tools.CreateScreenshot(engine, camera, {precision: 1}); var path = ""; $.ajax({ url:"save.php", type:'post', data: "dir=" + path + "&img=" + textureDynamic._canvas.toDataURL() }); i++; if (i < 1) { myLoop(); //console.log(done1); } }, 5000) } myLoop(); 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 Quote Link to comment Share on other sites More sharing options...
Arte Posted October 15, 2017 Share Posted October 15, 2017 BABYLON.Tools.CreateScreenshot(engine, camera, { width: 500, height: 500 },sendData); function sendData(base64Image) { $.ajax({ ............ data : { screnShot: base64Image }, ................ console.log(base64Image); } Shahzaibkhatri 1 Quote Link to comment Share on other sites More sharing options...
Shahzaibkhatri Posted October 15, 2017 Author Share Posted October 15, 2017 1 minute ago, Arte said: BABYLON.Tools.CreateScreenshot(engine, camera, { width: 500, height: 500 },sendData); function sendData(base64Image) { $.ajax({ ............ data : { screnShot: base64Image }, ................ console.log(base64Image); } Thanks for your response i'll let you know ASAP i'm trying this code.... Quote Link to comment Share on other sites More sharing options...
Arte Posted October 15, 2017 Share Posted October 15, 2017 Shahzaibkhatri 1 Quote Link to comment Share on other sites More sharing options...
Shahzaibkhatri Posted October 18, 2017 Author Share Posted October 18, 2017 On 10/15/2017 at 6:55 PM, Arte said: Hmm thanks for Help Quote Link to comment Share on other sites More sharing options...
Arte Posted October 18, 2017 Share Posted October 18, 2017 If you happy with answers, mark as Solved. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.