mirror of
https://github.com/TECHNOFAB11/ergogen.git
synced 2025-12-12 16:10:04 +01:00
Outlining improvements
This commit is contained in:
parent
5a25c1c423
commit
5e68bdb630
5 changed files with 92 additions and 80 deletions
|
|
@ -25,6 +25,7 @@ module.exports = class Point {
|
|||
}
|
||||
|
||||
shift(s, relative=true) {
|
||||
s[0] *= this.meta.mirrored ? -1 : 1
|
||||
if (relative) {
|
||||
s = m.point.rotate(s, this.r)
|
||||
}
|
||||
|
|
@ -34,7 +35,10 @@ module.exports = class Point {
|
|||
}
|
||||
|
||||
rotate(angle, origin=[0, 0]) {
|
||||
this.p = m.point.rotate(this.p, angle, origin)
|
||||
angle *= this.meta.mirrored ? -1 : 1
|
||||
if (origin) {
|
||||
this.p = m.point.rotate(this.p, angle, origin)
|
||||
}
|
||||
this.r += angle
|
||||
return this
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue