<commit_before>/* Omega Ship Missile Gfx
 *
 * Copyright (C) 2014 <NAME> <<EMAIL>>
 *  Licensed under the AGPLv3 http://www.gnu.org/licenses/agpl.txt
 */

//= require "ui/particles"
//= require "ui/canvas/components/particles/base"

//= require "omega/ship/attack/projectile"

Omega.ShipMissile = function(args){
  if(!args) args = {};
  var event_cb = args['event_cb'];

  this.init_projectile(args);
  this.init_particles(event_cb);

  /// offset particles so they are emerging from end of missile, not middle
  this.particles.mesh.position.set(0, 0, -50);
  this.mesh.add(this.particles.mesh);
};

Omega.ShipMissile.prototype = {
  speed            : 1000000,
  rot_theta        : 0.55,
  theta_tolerance  : Math.PI / 32,
  launch_distance  :  250,
  arrival_distance :   50,

  particle_age     :     1,

  _particle_group : function(event_cb){
    return new SPE.Group({
      maxAge   : this.particle_age,
      texture  : Omega.UI.Particles.load('ship.missile', event_cb)
    });
  },

  _particle_emitter : function(){
    return new SPE.Emitter({
      alive           :    1,
      particleCount   :   25,
      sizeStart       :   75,
      sizeEnd         :    5,
      opacityStart    :    1,<commit_msg>UI: adjust missle acceleration / rotation tolerence<commit_after>/* Omega Ship Missile Gfx
 *
 * Copyright (C) 2014 <NAME> <<EMAIL>>
 *  Licensed under the AGPLv3 http://www.gnu.org/licenses/agpl.txt
 */

//= require "ui/particles"
//= require "ui/canvas/components/particles/base"

//= require "omega/ship/attack/projectile"

Omega.ShipMissile = function(args){
  if(!args) args = {};
  var event_cb = args['event_cb'];

  this.init_projectile(args);
  this.init_particles(event_cb);

  /// offset particles so they are emerging from end of missile, not middle
  this.particles.mesh.position.set(0, 0, -50);
  this.mesh.add(this.particles.mesh);
};

Omega.ShipMissile.prototype = {
  speed            : 1000000,
  acceleration     : 1000000,
  rot_theta        : 0.55,
  theta_tolerance  : Math.PI / 64,
  launch_distance  :  250,
  arrival_distance :   50,

  particle_age     :     1,

  _particle_group : function(event_cb){
    return new SPE.Group({
      maxAge   : this.particle_age,
      texture  : Omega.UI.Particles.load('ship.missile', event_cb)
    });
  },

  _particle_emitter : function(){
    return new SPE.Emitter({
      alive           :    1,
      particleCount   :   25,
      sizeStart       :   75,
      sizeEnd         :    5,
      opacityStart    :    1,
{'fraction_non_alphanumeric': 0.1286970423661071, 'fraction_numerical': 0.02997601918465228, 'mean_word_length': 2.5604551920341394, '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': '5931264', 'n_tokens_mistral': 912, 'n_tokens_neox': 840, 'n_words': 176}