function initScreenAnd3D() {

  HEIGHT = window.innerHeight;
  WIDTH = window.innerWidth;
  windowHalfX = WIDTH / 2;
  windowHalfY = HEIGHT / 2;

  scene = new THREE.Scene();
  
  scene.fog = new THREE.Fog(0xd6eae6, 160,350);
  
  aspectRatio = WIDTH / HEIGHT;
  fieldOfView = 50;
  nearPlane = 1;
  farPlane = 2000;
  camera = new THREE.PerspectiveCamera(
    fieldOfView,
    aspectRatio,
    nearPlane,
    farPlane
  );
  camera.position.x = 0;
  camera.position.z = cameraPosGame;
  camera.position.y = 30;
  camera.lookAt(new THREE.Vector3(0, 30, 0));

  renderer = new THREE.WebGLRenderer({
    alpha: true,
    antialias: true
  });
  renderer.setPixelRatio(window.devicePixelRatio); 
  renderer.setClearColor( malusClearColor, malusClearAlpha);
  
  renderer.setSize(WIDTH, HEIGHT);
  renderer.shadowMap.enabled = true;

  container = document.getElementById('world');
  container.appendChild(renderer.domElement);

  window.addEventListener('resize', handleWindowResize, false);
  document.addEventListener('mousedown', handleMouseDown, false);
  document.addEventListener("touchend", handleMouseDown, false);

  /*
  controls = new THREE.OrbitControls(camera, renderer.domElement);
  //controls.minPolarAngle = -Math.PI / 2; 
  //controls.maxPolarAngle = Math.PI / 2;
  //controls.noZoom = true;
  controls.noPan = true;
  //*/
  
  clock = new THREE.Clock();

}
//INIT THREE JS, SCREEN AND MOUSE EVENTS

INIT THREE JS, SCREEN AND MOUSE EVENTS
INIT THREE JS SCREEN AND MOUSE EVENTS
function initScreenAnd3D() {
  HEIGHT = window.innerHeight;
  WIDTH = window.innerWidth;
  windowHalfX = WIDTH / 2;
  windowHalfY = HEIGHT / 2;
  scene = new THREE.Scene();
  scene.fog = new THREE.Fog(0xd6eae6, 160,350);
  aspectRatio = WIDTH / HEIGHT;
  fieldOfView = 50;
  nearPlane = 1;
  farPlane = 2000;
  camera = new THREE.PerspectiveCamera(
    fieldOfView,
    aspectRatio,
    nearPlane,
    farPlane
  );
  camera.position.x = 0;
  camera.position.z = cameraPosGame;
  camera.position.y = 30;
  camera.lookAt(new THREE.Vector3(0, 30, 0));
  renderer = new THREE.WebGLRenderer({
    alpha: true,
    antialias: true
  });
  renderer.setPixelRatio(window.devicePixelRatio); 
  renderer.setClearColor( malusClearColor, malusClearAlpha);
  renderer.setSize(WIDTH, HEIGHT);
  renderer.shadowMap.enabled = true;
  container = document.getElementById('world');
  container.appendChild(renderer.domElement);
  window.addEventListener('resize', handleWindowResize, false);
  document.addEventListener('mousedown', handleMouseDown, false);
  document.addEventListener("touchend", handleMouseDown, false);
  clock = new THREE.Clock();
}
function initScreenAnd3D ( ) { HEIGHT = window . innerHeight ; WIDTH = window . innerWidth ; windowHalfX = WIDTH / 2 ; windowHalfY = HEIGHT / 2 ; scene = new THREE . Scene ( ) ; scene . fog = new THREE . Fog ( 0xd6eae6 , 160 , 350 ) ; aspectRatio = WIDTH / HEIGHT ; fieldOfView = 50 ; nearPlane = 1 ; farPlane = 2000 ; camera = new THREE . PerspectiveCamera ( fieldOfView , aspectRatio , nearPlane , farPlane ) ; camera . position . x = 0 ; camera . position . z = cameraPosGame ; camera . position . y = 30 ; camera . lookAt ( new THREE . Vector3 ( 0 , 30 , 0 ) ) ; renderer = new THREE . WebGLRenderer ( { alpha : true , antialias : true } ) ; renderer . setPixelRatio ( window . devicePixelRatio ) ; renderer . setClearColor ( malusClearColor , malusClearAlpha ) ; renderer . setSize ( WIDTH , HEIGHT ) ; renderer . shadowMap . enabled = true ; container = document . getElementById ( 'world' ) ; container . appendChild ( renderer . domElement ) ; window . addEventListener ( 'resize' , handleWindowResize , false ) ; document . addEventListener ( 'mousedown' , handleMouseDown , false ) ; document . addEventListener ( "touchend" , handleMouseDown , false ) ; clock = new THREE . Clock ( ) ; }
INIT THREE JS, SCREEN AND MOUSE EVENTS
INIT THREE JS SCREEN AND MOUSE EVENTS
/*
  controls = new THREE.OrbitControls(camera, renderer.domElement);
  //controls.minPolarAngle = -Math.PI / 2; 
  //controls.maxPolarAngle = Math.PI / 2;
  //controls.noZoom = true;
  controls.noPan = true;
  //*/