-
-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from jakubfiala/add-adaptive-stroke-flag
Add adaptive stroke flag
- Loading branch information
Showing
7 changed files
with
147 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// make a class for Point | ||
class Point { | ||
constructor(x, y) { | ||
this._x = x; | ||
this._y = y; | ||
} | ||
|
||
get x() { | ||
return this._x; | ||
} | ||
|
||
get y() { | ||
return this._y; | ||
} | ||
|
||
set x(x) { | ||
this._x = x; | ||
} | ||
|
||
set y(y) { | ||
this._y = y; | ||
} | ||
|
||
set(x, y) { | ||
this._x = x; | ||
this._y = y; | ||
} | ||
} | ||
|
||
// make a class for the mouse data | ||
class Mouse extends Point { | ||
constructor() { | ||
super(0, 0); | ||
this._down = false; | ||
this._px = 0; | ||
this._py = 0; | ||
} | ||
|
||
get down() { | ||
return this._down; | ||
} | ||
|
||
set down(d) { | ||
this._down = d; | ||
} | ||
|
||
get x() { | ||
return this._x; | ||
} | ||
|
||
get y() { | ||
return this._y; | ||
} | ||
|
||
set x(x) { | ||
this._x = x; | ||
} | ||
|
||
set y(y) { | ||
this._y = y; | ||
} | ||
|
||
get px() { | ||
return this._px; | ||
} | ||
|
||
get py() { | ||
return this._py; | ||
} | ||
|
||
set px(px) { | ||
this._px = px; | ||
} | ||
|
||
set py(py) { | ||
this._py = py; | ||
} | ||
|
||
} | ||
|
||
export default Mouse; |