More outline cleanup changes (#1562)
This commit is contained in:
parent
880ff0deee
commit
c5d322709a
4 changed files with 126 additions and 28 deletions
|
@ -1,3 +1,5 @@
|
|||
import { mix } from "../utils.mjs";
|
||||
|
||||
export class Point {
|
||||
constructor(type, x, y) {
|
||||
this.type = type;
|
||||
|
@ -57,6 +59,9 @@ export class Point {
|
|||
static translated(z, dx, dy) {
|
||||
return new Point(z.type, z.x + dx || 0, z.y + dy || 0);
|
||||
}
|
||||
static mix(type, a, b, p) {
|
||||
return new Point(type, mix(a.x, b.x, p), mix(a.y, b.y, p));
|
||||
}
|
||||
}
|
||||
Point.Type = {
|
||||
Corner: 0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue