update() {
        // clear canvas
        GLOBALS.drawer.clear();

        for (const circleType in GLOBALS.circles) {
            GLOBALS.circles[circleType].forEach((circle) => {
                // get the bounded draw method and delegate execution to a Drawer object
                GLOBALS.drawer.draw(this._getBoundedArcMethod(circle), circle._color);
                // update the circle's position based on its behavior
                circle.update(GLOBALS.drawer._canvas);
            });
        } // for

        // get next animation frame
        window.requestAnimationFrame(FUNCTIONS.update.bind(FUNCTIONS)); // `this` gets set to `window` normally
    }
/**
     * Draws on the canvas each animation frame.
     */
Draws on the canvas each animation frame.
Draws on the canvas each animation frame .
update() {
        GLOBALS.drawer.clear();
        for (const circleType in GLOBALS.circles) {
            GLOBALS.circles[circleType].forEach((circle) => {
                GLOBALS.drawer.draw(this._getBoundedArcMethod(circle), circle._color);
                circle.update(GLOBALS.drawer._canvas);
            });
        } 
        window.requestAnimationFrame(FUNCTIONS.update.bind(FUNCTIONS)); 
    }
update ( ) { GLOBALS . drawer . clear ( ) ; for ( const circleType in GLOBALS . circles ) { GLOBALS . circles [ circleType ] . forEach ( ( circle ) => { GLOBALS . drawer . draw ( this . _getBoundedArcMethod ( circle ) , circle . _color ) ; circle . update ( GLOBALS . drawer . _canvas ) ; } ) ; } window . requestAnimationFrame ( FUNCTIONS . update . bind ( FUNCTIONS ) ) ; }
Draws on the canvas each animation frame.
Draws on the canvas each animation frame .
// clear canvas // get the bounded draw method and delegate execution to a Drawer object // update the circle's position based on its behavior // for // get next animation frame // `this` gets set to `window` normally