INNER CODE UNIT · JavaScript

draw

ren-yuan/c2.js · examples for p5.js/ArcField.js:31

function draw() {
    background('#cccccc');

    world.update();

    for(let i=0; i<world.particles.length; i++){
        let p = world.particles[i];
        stroke('#333333');
        strokeWeight(1);
        fill(p.color);
        circle(p.position.x, p.position.y, p.radius);
        strokeWeight(2);
        point(p.position.x, p.position.y);
    }
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…