yskang

threejs-viewer-4

May 6th, 2020 (edited)
1,018
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Add Scene
  2. const scene = new THREE.Scene();
  3. this.scene = scene;
  4.  
  5. // Add camera
  6. const camera = new THREE.PerspectiveCamera(
  7.     45,
  8.     window.innerWidth / window.innerHeight,
  9.     0.001,
  10.     10000
  11. );
  12. camera.position.y = 2.0;
  13. camera.position.z = 9.0;
  14. this.scene.add( camera );
  15. this.camera = camera;
Add Comment
Please, Sign In to add comment