Current File : /home/jeshor13/11bsouth.com/Particles/RedCircles.js
var SpinnyParticle = function(position, mass) {
  AttractionParticle.call(this, position, mass)
  this.angle = 0
  this.aVelocity = 0
  this.aAcceleration = 0.01
  
  // this.update = function() {
  //   Particle.prototype.update.call(this)
  //   this.angle += this.aVelocity;
  //   this.aVelocity += this.aAcceleration;
  //   if (this.angle > TWO_PI * 3 || this.angle < 0) {
  //     this.aVelocity *= -1;
  //     this.aAcceleration *= -1;
  //   }

  //}
  this.render = function() {
    push()
    translate(this.position.x, this.position.y);
    rotate(this.angle)
    fill(255,0,0)
    rect(0, 0, this.mass*10, this.mass*10)
    pop()
  }

}

SpinnyParticle.prototype = Object.create(AttractionParticle.prototype);
SpinnyParticle.constructor = SpinnyParticle;