src/utils/particle.js
function _createParticle(profile, { width, height }) {
	const { random } = Math;
	const {
		deltaX,
		deltaY,
		deltaOpacity,
		radius,
		color,
		opacity
	} = getParticleValues(profile);

	return {
		init() {
			this.x = random() * width;
			this.y = random() * -height;
			this.deltaX = deltaX;
			this.deltaY = deltaY;
			this.color = color;
			this.radius = radius;
			this.opacity = opacity;
			this.deltaOpacity = deltaOpacity;

			return this;
		}
	};
}
function _createParticle(profile, { width, height }) {
	const { random } = Math;
	const {
		deltaX,
		deltaY,
		deltaOpacity,
		radius,
		color,
		opacity
	} = getParticleValues(profile);

	return {
		init() {
			this.x = random() * width;
			this.y = random() * -height;
			this.deltaX = deltaX;
			this.deltaY = deltaY;
			this.color = color;
			this.radius = radius;
			this.opacity = opacity;
			this.deltaOpacity = deltaOpacity;

			return this;
		}
	};
}
function _createParticle ( profile , { width , height } ) { const { random } = Math ; const { deltaX , deltaY , deltaOpacity , radius , color , opacity } = getParticleValues ( profile ) ; return { init ( ) { this . x = random ( ) * width ; this . y = random ( ) * - height ; this . deltaX = deltaX ; this . deltaY = deltaY ; this . color = color ; this . radius = radius ; this . opacity = opacity ; this . deltaOpacity = deltaOpacity ; return this ; } } ; }
Create a single particle Object.

@private

@param  {array}  profile - particle profile that contains type and velocity
@param  {object} bounds  - canvas width and height

@return {object} particle Object
Create a single particle Object .