_createCircle(radius) {
        // create radius first so it can be referenced (`+ 1` to include max)
        radius = radius ? radius : Math.floor(Math.random() * (RADIUS_BOUNDS.max - RADIUS_BOUNDS.min + 1)) + RADIUS_BOUNDS.min;
        const circleConfig = {
            x: this._calculateWithinBounds(GLOBALS.drawer._canvas.width, radius),
            y: this._calculateWithinBounds(GLOBALS.drawer._canvas.height, radius),
            dx: (Math.random() - 0.5) * SPEED_SCALAR,
            dy: (Math.random() - 0.5) * SPEED_SCALAR,
            radius,
            color: COLORS[Math.floor(Math.random() * COLORS.length)]
        };
        return new Circle(circleConfig);
    }
/**
     * Creates and returns a Circle object.
     * @private
     * @param {number} [radius] the radius of the circle; a falsy value will cause a random one to be generated
     * @return a new Circle object with CircleBehavior.AMBIENT behavior
     */
Creates and returns a Circle object.
@private
@param {number} [radius] the radius of the circle; a falsy value will cause a random one to be generated
@return a new Circle object with CircleBehavior.AMBIENT behavior
Creates and returns a Circle object . @private @param { number } [ radius ] the radius of the circle ; a falsy value will cause a random one to be generated @return a new Circle object with CircleBehavior . AMBIENT behavior
_createCircle(radius) {
        radius = radius ? radius : Math.floor(Math.random() * (RADIUS_BOUNDS.max - RADIUS_BOUNDS.min + 1)) + RADIUS_BOUNDS.min;
        const circleConfig = {
            x: this._calculateWithinBounds(GLOBALS.drawer._canvas.width, radius),
            y: this._calculateWithinBounds(GLOBALS.drawer._canvas.height, radius),
            dx: (Math.random() - 0.5) * SPEED_SCALAR,
            dy: (Math.random() - 0.5) * SPEED_SCALAR,
            radius,
            color: COLORS[Math.floor(Math.random() * COLORS.length)]
        };
        return new Circle(circleConfig);
    }
_createCircle ( radius ) { radius = radius ? radius : Math . floor ( Math . random ( ) * ( RADIUS_BOUNDS . max - RADIUS_BOUNDS . min + 1 ) ) + RADIUS_BOUNDS . min ; const circleConfig = { x : this . _calculateWithinBounds ( GLOBALS . drawer . _canvas . width , radius ) , y : this . _calculateWithinBounds ( GLOBALS . drawer . _canvas . height , radius ) , dx : ( Math . random ( ) - 0.5 ) * SPEED_SCALAR , dy : ( Math . random ( ) - 0.5 ) * SPEED_SCALAR , radius , color : COLORS [ Math . floor ( Math . random ( ) * COLORS . length ) ] } ; return new Circle ( circleConfig ) ; }
Creates and returns a Circle object.
Creates and returns a Circle object .
// create radius first so it can be referenced (`+ 1` to include max)