class CM {
constructor() {
this.thunks = [];
}
clear() {
this.thunks = [];
}
render(ps) {
__clearCanvas(ps);
this.thunks.forEach((thunk) => thunk(ps));
return this;
}
circle(x, y, r) {
let thisCall = `.circle(${x}, ${y}, ${r})`;
let callParams = {
op: "circle",
x,
y,
r
};
let thunk = (ps) => {
let center = new ps.Point(x, y);
let radius = r;
let path = new ps.Path.Circle(center, radius);
path.strokeColor = "white";
callParams.obj = path;
path.callParams = callParams;
};
this.thunks.push(thunk);
return this;
}
point(x, y) {}
select() {}
deselect() {}
}