How we can take an object as a particle ?
pls give answer in a while
Answers
Explanation: Before we can create an entire ParticleSystem , we have to create an object that will describe a single particle. This is about as simple as a particle can get. Typical particle systems involve something called an emitter.
HOPE I HELPED YOU ☺️
HAVE A GOOD DAY AHEAD (—3—)
Before we can create an entire Particle System, we have to create an object that will describe a single particle. The good news: we've done this already. Our Mover object from the Forces section serves as the perfect template. For us, a particle is an independent body that moves about the screen. It has location, velocity, and acceleration, a constructor to initialize those variables, and functions to display() itself and update() its location.
// A simple Particle object
var Particle = function(position) {
this.acceleration = new PVector();
this.velocity = new PVector();
this.position = position.get();
};
Particle.prototype.update = function(){
this.velocity.add(this.acceleration);
this.position.add(this.velocity);
};
Particle.prototype.display = function() {
stroke(0, 0, 0);
fill(175, 175, 175);
ellipse(this.position.x, this.position.y, 8, 8);
};
Hope it helps you...
Pls mrk me brainliest...