Skip to content

Instantly share code, notes, and snippets.

@peyloride
Last active March 8, 2019 08:30
Show Gist options
  • Save peyloride/d6b8d854292dcc7ca1ef77d189a5bc6f to your computer and use it in GitHub Desktop.
Save peyloride/d6b8d854292dcc7ca1ef77d189a5bc6f to your computer and use it in GitHub Desktop.
Kamera ve sahne
// 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