Reputation: 2007
I have a complete project made with Playcanvas (a JS GameEngine Framework) that uses the HTML canvas tag. This project can also generate images in different format (base64, dataUrl, blob, jpeg).
I want to put this project on the server side to create a new Web service that can deliver images, generated from that Playcanvas project.
So, is this possible to use a functional code from the client-side and put it on the server-side with Node.JS? I know some works like node-canvas that achieve a similar goal.
Upvotes: 1
Views: 244
Reputation: 196
You can use puppeteer(headless chrome) to get the full control of a browser on the server side. You can then render the images on the server in required format and can export to the front end.
https://github.com/GoogleChrome/puppeteer
Upvotes: 2