1.0.1 • Published 6 years ago

node-three-screenshot v1.0.1

Weekly downloads
14
License
-
Repository
github
Last release
6 years ago

node-three-screenshot Build Status

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();