npm.io
1.0.1 • Published 3 years ago

3dphoto

Licence
ISC
Version
1.0.1
Deps
3
Size
2.6 MB
Vulns
1
Weekly
0
Stars
1

3dphoto

Allows you to generate cinematic photos

Installation

Install 3dphoto with npm

  npm install 3dphoto

Usage/Examples

Make a cinematic photo

const photoCinematic = require('3dphoto');
const path = require('path');
const photo3d = new photoCinematic({
  downloadPath: path.join(__dirname, '../downloads')
});

photo3d.animate({
  image: path.join(__dirname, './uploads', 'brad.jpg'),
  toBase64: true
})
.then((data) => {
  console.log('DATA:', data);
})
.catch(err => {
  console.error(err);
});

Response

{
  "file": "DOWNLOAD_PATH/32e9ee6512eb42a4b230f166341d9729.gif",
  "base64": "R0lGODlhwAAAAfcAAAMDAwoKCgwNDQ0PDg4RDxIREBYQEB0RDiUSDCoVDjEYEDQ......YUTgh56"
}