<commit_before>var scene = require('./scene'),
    shipYard = require('./ship_yard'),
    torpedoLauncher = require('./torpedo_launcher'),
    beam = require('./beam'),
    system = require('./system'),
    camera = require('./camera'),
    _ = require('lodash');

module.exports = function Renderer (config) {
  var stage = scene(config),
      ships = shipYard(stage.scene),
      launcher = torpedoLauncher(stage.scene),
      tractor = torpedoLauncher(stage.scene),
      particleBeam = beam(),
      planets = system(stage.scene),
      cam = camera(stage.camera);

  stage.scene.add(launcher.system);
  tractor.system.add(particleBeam);
  hideBeam();

  // TODO move launcher and tractor out of renderer
  return _.extend({}, stage, ships, planets, cam, {
    addTorpedo: launcher.add,
    moveTorpedo: launcher.move,
    extractTorpedo: tractor.add,
    moveExtractedTorpedo: tractor.move,
    addWeapons: addWeapons,
    hideBeam: hideBeam,
    showBeam: showBeam
  });

  function addWeapons (name) {
    ships.addObjectToShip(name, tractor.system);
    log('Added weapons to ' + name);
  }<commit_msg>Position camera ready for initial pan<commit_after>var scene = require('./scene'),
    shipYard = require('./ship_yard'),
    torpedoLauncher = require('./torpedo_launcher'),
    beam = require('./beam'),
    system = require('./system'),
    camera = require('./camera'),
    _ = require('lodash');

module.exports = function Renderer (config) {
  var stage = scene(config),
      ships = shipYard(stage.scene),
      launcher = torpedoLauncher(stage.scene),
      tractor = torpedoLauncher(stage.scene),
      particleBeam = beam(),
      planets = system(stage.scene),
      cam = camera(stage.camera);

  stage.scene.add(launcher.system);
  tractor.system.add(particleBeam);
  cam.lookAt(0, 20000, 0);
  hideBeam();

  // TODO move launcher and tractor out of renderer
  return _.extend({}, stage, ships, planets, cam, {
    addTorpedo: launcher.add,
    moveTorpedo: launcher.move,
    extractTorpedo: tractor.add,
    moveExtractedTorpedo: tractor.move,
    addWeapons: addWeapons,
    hideBeam: hideBeam,
    showBeam: showBeam
  });

  function addWeapons (name) {
    ships.addObjectToShip(name, tractor.system);
    log('Added weapons to ' + name);
  }
{'fraction_non_alphanumeric': 0.14078310602727673, 'fraction_numerical': 0.0030796304443466782, 'mean_word_length': 3.511904761904762, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '7207307', 'n_tokens_mistral': 753, 'n_tokens_neox': 716, 'n_words': 154}