2020-09-23から1日間の記事一覧

オブジェクト指向的なフラクタルの木の描画

{ class CG { constructor (canvas) { this.canvas = canvas; this.ctx = canvas.getContext ('2d'); canvas.width = canvas.clientWidth; canvas.height = canvas.clientHeight; } line (x0 = 0, y0 = 0, x1 = 0, y1 = 0, color = "black") { let { ctx } =…