demo/editor/rainyday.js
function Drop(rainyday, centerX, centerY, min, base) {
    this.x = Math.floor(centerX);
    this.y = Math.floor(centerY);
    this.r = (Math.random() * base) + min;
    this.rainyday = rainyday;
    this.context = rainyday.context;
    this.reflection = rainyday.reflected;
}
function Drop(rainyday, centerX, centerY, min, base) {
    this.x = Math.floor(centerX);
    this.y = Math.floor(centerY);
    this.r = (Math.random() * base) + min;
    this.rainyday = rainyday;
    this.context = rainyday.context;
    this.reflection = rainyday.reflected;
}
function Drop ( rainyday , centerX , centerY , min , base ) { this . x = Math . floor ( centerX ) ; this . y = Math . floor ( centerY ) ; this . r = ( Math . random ( ) * base ) + min ; this . rainyday = rainyday ; this . context = rainyday . context ; this . reflection = rainyday . reflected ; }
Defines a new raindrop object.
@param rainyday reference to the parent object
@param centerX x position of the center of this drop
@param centerY y position of the center of this drop
@param min minimum size of a drop
@param base base value for randomizing drop size
Defines a new raindrop object .