<commit_before>/*jshint white: false, strict: false, plusplus: false, onevar: false,
  nomen: false */
/*global define: false, console: false, window: false, setTimeout: false */

define( function ( require ) {
  var Component = require( './Component' );

  function CameraComponent( paladin, options ) {
      options = options || {};
      this.object = new paladin.subsystem.graphics.SceneObject();
      this.camera = (options && options.camera) ? options.camera : new paladin.subsystem.graphics.Camera({
        targeted: options.targeted
      });
      this.camera.setParent( this.object );
      this.entity = null;
      if (options.position) {
          this.object.position = options.position;
      }
      if (options.rotation) {
          this.object.rotation = options.rotation;
      }
  }
  CameraComponent.prototype = new Component( {
      type: 'graphics',
      subtype: [ 'camera' ],
      requires: [ 'spatial' ]
  } );
  CameraComponent.prototype.constructor = CameraComponent;
  CameraComponent.prototype.onAdd = function( entity ) {
      entity.spatial.sceneObjects.graphics.bindChild( this.object );
      this.entity = entity;
  };
  CameraComponent.prototype.onRemove = function( entity ) {
      /* Note(<EMAIL>):
       * Not implemented.
       */
  };

  return CameraComponent;

});
<commit_msg>Simplify CameraComponent ctor camera setup.<commit_after>/*jshint white: false, strict: false, plusplus: false, onevar: false,
  nomen: false */
/*global define: false, console: false, window: false, setTimeout: false */

define( function ( require ) {
  var Component = require( './Component' );

  function CameraComponent( paladin, options ) {
      options = options || {};
      this.object = new paladin.subsystem.graphics.SceneObject();
      this.camera = options.camera || new paladin.subsystem.graphics.Camera({
          targeted: options.targeted
      });
      this.camera.setParent( this.object );
      this.entity = null;
      if (options.position) {
          this.object.position = options.position;
      }
      if (options.rotation) {
          this.object.rotation = options.rotation;
      }
  }
  CameraComponent.prototype = new Component( {
      type: 'graphics',
      subtype: [ 'camera' ],
      requires: [ 'spatial' ]
  } );
  CameraComponent.prototype.constructor = CameraComponent;
  CameraComponent.prototype.onAdd = function( entity ) {
      entity.spatial.sceneObjects.graphics.bindChild( this.object );
      this.entity = entity;
  };
  CameraComponent.prototype.onRemove = function( entity ) {
      /* Note(<EMAIL>):
       * Not implemented.
       */
  };

  return CameraComponent;

});

{'fraction_non_alphanumeric': 0.1299286518963575, 'fraction_numerical': 0.0, 'mean_word_length': 2.8664731494920175, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3280355', 'n_tokens_mistral': 757, 'n_tokens_neox': 738, 'n_words': 166}