diff options
Diffstat (limited to 'client/splash/renderer.js')
| -rw-r--r-- | client/splash/renderer.js | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/client/splash/renderer.js b/client/splash/renderer.js index e71a4526..ad111f1a 100644 --- a/client/splash/renderer.js +++ b/client/splash/renderer.js @@ -1,21 +1,15 @@ import * as THREE from 'three' -import { FOG_COLOR } from './constants' +import { FOG_COLOR, CAMERA_NEAR, CAMERA_FAR, CAMERA_X, CAMERA_Y, CAMERA_Z } from './constants' export const scene = new THREE.Scene() scene.fog = new THREE.Fog(FOG_COLOR, 2, 15) -export const camera = new THREE.PerspectiveCamera(35, window.innerWidth / window.innerHeight, 0.001, 15) -camera.position.set(3, 0.15, 3) - -// export const camera = new THREE.PerspectiveCamera(70, w / h, 1, 10000) -// camera.position.x = 0 -// camera.position.y = 0 -// camera.position.z = 200 +export const camera = new THREE.PerspectiveCamera(35, window.innerWidth / window.innerHeight, CAMERA_NEAR, CAMERA_FAR) +camera.position.set(CAMERA_X, CAMERA_Y, CAMERA_Z) export const renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true }) renderer.setClearColor(scene.fog.color) -// renderer.setClearColor(0x000000, 0) renderer.setPixelRatio(window.devicePixelRatio) renderer.setSize(window.innerWidth, window.innerHeight) @@ -40,3 +34,8 @@ export function init() { export function render() { renderer.render(scene, camera) } + + +window.scene = scene +window.THREE = THREE + |
