<commit_before>/*
 * Copyright 2015 Google Inc. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

var Emitter = require('./emitter');
var Eyes = require('./eyes');
var THREE = require('../node_modules/three/three');
THREE.VRControls = require('../node_modules/three/examples/js/controls/VRControls');
THREE.VREffect = require('../node_modules/three/examples/js/effects/VREffect');
var Util = require('./util');
var VertexDistorter = require('./vertex-distorter');
require('../node_modules/webvr-boilerplate/build/webvr-manager');

function PhotosphereRenderer() {
  this.init();
}
PhotosphereRenderer.prototype = new Emitter();

PhotosphereRenderer.prototype.init = function() {
  var container = document.querySelector('body');
  var camera = new THREE.PerspectiveCamera(80, window.innerWidth / window.innerHeight, 0.1, 100);
  var cameraDummy = new THREE.Object3D();
  cameraDummy.add(camera);

  // Antialiasing temporarily disabled to improve performance.
  var renderer = new THREE.WebGLRenderer({antialias: false});
  renderer.setClearColor(0x000000, 0);
  renderer.setSize(window.innerWidth, window.innerHeight);

  // Round down fractional DPR values for better performance.
  var pixelRatio = window.devicePixelRatio < 1 ? 1 : Math.floor(window.devicePixelRatio)
  renderer.setPixelRatio(pixelRatio);
  container.appendChild(renderer.domElement);

  var controls = new THREE.VRControls(camera);
  var effect = new THREE.VREffect(renderer);
  effect.setSize(window.innerWidth, window.innerHeight);

  this.camera = camera;<commit_msg>changes as suggested by @borismus<commit_after>/*
 * Copyright 2015 Google Inc. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

var Emitter = require('./emitter');
var Eyes = require('./eyes');
var THREE = require('../node_modules/three/three');
THREE.VRControls = require('../node_modules/three/examples/js/controls/VRControls');
THREE.VREffect = require('../node_modules/three/examples/js/effects/VREffect');
var Util = require('./util');
var VertexDistorter = require('./vertex-distorter');
require('../node_modules/webvr-boilerplate/build/webvr-manager');

function PhotosphereRenderer() {
  this.init();
}
PhotosphereRenderer.prototype = new Emitter();

PhotosphereRenderer.prototype.init = function() {
  var container = document.querySelector('body');
  var camera = new THREE.PerspectiveCamera(80, window.innerWidth / window.innerHeight, 0.1, 100);
  var cameraDummy = new THREE.Object3D();
  cameraDummy.add(camera);

  // Antialiasing temporarily disabled to improve performance.
  var renderer = new THREE.WebGLRenderer({antialias: false});
  renderer.setClearColor(0x000000, 0);
  renderer.setSize(window.innerWidth, window.innerHeight);

  // Round down fractional DPR values for better performance.
  renderer.setPixelRatio(Math.max(1, Math.floor(window.devicePixelRatio)));
  container.appendChild(renderer.domElement);

  var controls = new THREE.VRControls(camera);
  var effect = new THREE.VREffect(renderer);
  effect.setSize(window.innerWidth, window.innerHeight);

  this.camera = camera;
{'fraction_non_alphanumeric': 0.1181044957472661, 'fraction_numerical': 0.012393681652490888, 'mean_word_length': 4.764705882352941, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6786498', 'n_tokens_mistral': 1202, 'n_tokens_neox': 1128, 'n_words': 344}