Easiest way to render in Node using Three.js

What is the easiest way to render in Node.js?

I tried SoftwareRenderer and got it working, but I keep running into inconsistencies with WebGLrenderer.

I just tried headless-gl and got it working for a very simple example.

It’s important to me that I get the same result in the backend and the frontend. With SoftwareRender that worked fine I have not tested with headless-gl.

Are there any other options? What do you recommend?

I’ve used Puppeteer to render with WebGL and save it out to images in the past – it’s basically just headless chrome.

3 Likes

Do you use some CI with it?

You can use it for CI but I haven’t done any testing with image diffs or anything myself. There’s some discussion around that in this issue, though:

Ok, I have one example that work with rare webgl extensions, but with “headless:false” flag and circle ci.