node-three-screenshot
v1.0.1
Published
Take a PNG screenshot of a THREE scene
Downloads
6
Readme
node-three-screenshot
Take a PNG screenshot of a THREE scene
Usage
You will need to install the dependencies for node-canvas.
$ npm install node-three-screenshot
import { toPNG } from 'node-three-screenshot';
fs.writeFileSync('out.png', toPNG(scene));
With Jest
$ npm install jest-image-snapshot
import { toPNG } from 'node-three-screenshot';
import { toMatchImageSnapshot } from 'jest-image-snapshot';
expect.extend({ toMatchImageSnapshot });
expect(toPNG(obj)).toMatchImageSnapshot();