Basic orbiting planets in P5.js
Use of p5.js and JavaScript

Math is part of the standard JavaScript library.  You shouldn't pollute its namespace with your own code, because it could interfere with other JavaScript code on the page.  In this case, Math.degrees() is never used, and you could just use p5.js's radians() function instead of writing Math.radians().

The constructor for Orbiter is very unwieldy, with up to 10 parameters.  You can just eliminate most of them.  Furthermore, you should specify colors as a single p5.Color object rather than as four separate parameters.

There should be a windowResized() handler, so that the window (or the Stack Snippet) can be resized gracefully.

Physics and animation

The object around which a satellite orbits is called its primary.  I suggest that you name the parameter to the orbit() method accordingly.

Your planets' angular velocity is given by planets[i].orbitAngleMod= 1.4 - i/7, which is not consistent with the laws of physics.  According to Kepler's Third Law, \$T^2 \propto r^3\$ (where \$T\$ and \$r\$ are the orbital period and radius), so \$\omega \propto r^{-\frac{3}{2}}\$.  So, your inner planets are not as fast as they should be, and your outer planets are not as slow as they should be.

Handling the revolution completion with if(this.orbitAngle &gt;= 360){ this.orbitAngle = 0; } can lead to round-off glitches.  A modulo operation would be more appropriate.

I don't see the point of initializing the initial angles of the planets to i * 5 — an offset of up to 4° relative to the x axis is hardly visible.



class Orbiter {
    constructor(sizeRadius, orbitRadius, orbitAngle=0) {
        this.sizeRadius = sizeRadius;
        this.orbitRadius = orbitRadius;
        this.orbitAngle = 0; // degrees relative to x axis

        // 2000 is an arbitrary animation speed (which also depends on the frame rate)
        // The -1.5 exponent is due to Kepler's 3rd Law
        this.orbitAngleDelta = 2000 * Math.pow(orbitRadius, -1.5);
        this.x = this.y = 0;
        this.color = 'white';
    }

    orbit(primary) {
        this.x = primary.x + this.orbitRadius * cos(radians(this.orbitAngle));
        this.y = primary.y + this.orbitRadius * sin(radians(this.orbitAngle));
        this.orbitAngle = (this.orbitAngle + this.orbitAngleDelta) % 360;
    }

    display() {
        noStroke();
        fill(this.color);
        return ellipse(this.x, this.y, this.sizeRadius, this.sizeRadius);
    }
}

let planets = [];
let sun = new Orbiter(100, 0);

function setup() {
    createCanvas(windowWidth - 3, windowHeight - 3);
    frameRate(144);

    sun.x = windowWidth / 2;
    sun.y = windowHeight / 2;
    sun.color = color(255, 200, 0);

    // Instantiate 5 planets
    for (i = 0; i &lt; 5; i++) {
        planets[i] = new Orbiter(5 + 15 * i, 110 + 70 * i);
        let red = i * 50 + 5;
        planets[i].color = color(red, 255 - red, 255 - red);
    }
}

function windowResized() {
    resizeCanvas(windowWidth - 3, windowHeight - 3);
    sun.x = windowWidth / 2;
    sun.y = windowHeight / 2;
}

function draw() {
    background(0, 10, 40);
    sun.display()
    for (planet of planets) {
        planet.orbit(sun);
        planet.display();
    }
}
&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.3/p5.js"&gt;&lt;/script&gt;