<commit_before>/* Omega Planet JS Representation
 *
 * Copyright (C) 2013 <NAME> <<EMAIL>>
 *  Licensed under the AGPLv3+ http://www.gnu.org/licenses/agpl.txt
 */

// TODO also load planet moons

//= require 'omega/planet/orbit'
//= require 'omega/planet/gfx'

Omega.Planet = function(parameters){
  this.color = '000000';
  this.components = [];
  this.shader_components = [];
  $.extend(this, parameters);

  this.location = Omega.convert_entity(this.location)
};

Omega.Planet.prototype = {
  constructor: Omega.Planet,
  json_class : 'Cosmos::Entities::Planet',

  toJSON : function(){
    return {json_class : this.json_class,
            id         : this.id,
            name       : this.name,
            location   : this.location ? this.location.toJSON() : null,
            parent_id  : this.parent_id,
            color      : this.color,
            size       : this.size};
  },

  colori : function(){
    return parseInt('0x' + this.color) % this._num_textures;
  },

  clicked_in : function(canvas){
    canvas.focus_on(this.location);
    canvas.follow(this.location);
  }
};

THREE.EventDispatcher.prototype.apply( Omega.Planet.prototype );<commit_msg>UI: remove planet client camera#focus_on call<commit_after>/* Omega Planet JS Representation
 *
 * Copyright (C) 2013 <NAME> <<EMAIL>>
 *  Licensed under the AGPLv3+ http://www.gnu.org/licenses/agpl.txt
 */

// TODO also load planet moons

//= require 'omega/planet/orbit'
//= require 'omega/planet/gfx'

Omega.Planet = function(parameters){
  this.color = '000000';
  this.components = [];
  this.shader_components = [];
  $.extend(this, parameters);

  this.location = Omega.convert_entity(this.location)
};

Omega.Planet.prototype = {
  constructor: Omega.Planet,
  json_class : 'Cosmos::Entities::Planet',

  toJSON : function(){
    return {json_class : this.json_class,
            id         : this.id,
            name       : this.name,
            location   : this.location ? this.location.toJSON() : null,
            parent_id  : this.parent_id,
            color      : this.color,
            size       : this.size};
  },

  colori : function(){
    return parseInt('0x' + this.color) % this._num_textures;
  },

  clicked_in : function(canvas){
    canvas.follow(this.location);
  }
};

THREE.EventDispatcher.prototype.apply( Omega.Planet.prototype );
{'fraction_non_alphanumeric': 0.14145299145299145, 'fraction_numerical': 0.010256410256410256, 'mean_word_length': 2.7576243980738364, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2219992', 'n_tokens_mistral': 775, 'n_tokens_neox': 744, 'n_words': 144}