Skip to content

Commit

Permalink
Merge pull request #198 from unchartedsoftware/add-has-point
Browse files Browse the repository at this point in the history
feat: add hasPoint function to GraphPoints
  • Loading branch information
Nithos committed Jun 5, 2024
2 parents adf2321 + 19f0555 commit d3ad3d1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/data/GraphPoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ export class GraphPoints extends DataTexture {
];
}

public hasPoint(id: number | string): boolean {
return this.map.has(id);
}

public getPointByID(id: number | string): [number, number, number, number] {
return this.getPointByIndex(this.getPointIndex(id));
}
Expand Down

0 comments on commit d3ad3d1

Please sign in to comment.