node-three-screenshot icon indicating copy to clipboard operation
node-three-screenshot copied to clipboard

How can I use the scene with camera?

Open marlinilram opened this issue 7 years ago • 1 comments

Hi, thanks for this npm module! I'm wondering how can I use it with camera?

marlinilram avatar Jul 02 '18 13:07 marlinilram

You can pass a second argument with options:

toPNG(scene, {
  camera: new THREE.PerspectiveCamera(...),
  // alternatively:
  cameraPosition: new THREE.Vector3(1, 2, 3),
})

See the source for more information.

dbkaplun avatar Jul 02 '18 13:07 dbkaplun