Last active
March 8, 2019 08:30
-
-
Save peyloride/d6b8d854292dcc7ca1ef77d189a5bc6f to your computer and use it in GitHub Desktop.
Kamera ve sahne
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set the scene size. | |
const WIDTH = window.innerWidth; | |
const HEIGHT = window.innerHeight; | |
// Set some camera attributes. | |
const VIEW_ANGLE = 45; | |
const ASPECT = WIDTH / HEIGHT; | |
const NEAR = 0.1; | |
const FAR = 10000; | |
const camera = | |
new THREE.PerspectiveCamera( | |
VIEW_ANGLE, | |
ASPECT, | |
NEAR, | |
FAR | |
); | |
// Create a WebGL renderer, camera | |
// and a scene | |
const renderer = new THREE.WebGLRenderer({ antialias: true }); | |
const scene = new THREE.Scene(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment