UNPKG

pi-emergence

Version:
16 lines (13 loc) 401 B
/** * Utility/Helper class to draw stuff with the p5.js library */ class P5Ui { static drawCircleAt(pos, color = null, size = 16, thickness = 1) { if (!pos?.x || !pos?.y) return; stroke(color || "#CCCCCC"); strokeWeight(thickness); noFill(); ellipse(pos.x, pos.y, size, size); } } if (typeof module !== "undefined") module.exports = P5Ui;