Refactor scene management with store
This commit is contained in:
parent
f9079e4823
commit
871b4116ff
10 changed files with 69 additions and 59 deletions
19
src/sketchObjects/Edge.ts
Normal file
19
src/sketchObjects/Edge.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { mp5 } from '../../main';
|
||||
import { colors } from '../constants/colors';
|
||||
|
||||
export class Edge {
|
||||
x: number;
|
||||
y: number;
|
||||
r: number;
|
||||
|
||||
constructor(x: number, y: number, r: number) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.r = r;
|
||||
}
|
||||
|
||||
draw() {
|
||||
mp5.fill(mp5.color(colors.grey));
|
||||
mp5.ellipse(this.x, this.y, this.r * 2);
|
||||
}
|
||||
}
|
||||
Reference in a new issue