drawing shapes on a canvas when the user clicks
This commit is contained in:
15
src/point.js
Normal file
15
src/point.js
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
export default class Point {
|
||||
constructor(newX, newY) {
|
||||
this.x = newX;
|
||||
this.y = newY;
|
||||
}
|
||||
|
||||
getX() { return this.x; }
|
||||
getY() { return this.y; }
|
||||
|
||||
setX(newX) { this.x = newX; }
|
||||
setY(newY) { this.y = newY; }
|
||||
|
||||
getPoint() { return {x: this.x, y: this.y}; }
|
||||
};
|
||||
Reference in New Issue
Block a user