refactor: Migrate features to a new module and remove legacy script reference

This commit is contained in:
Marc Emmanuel 2026-01-19 22:43:54 +01:00
parent b18732b8b8
commit e7c853bf52
5 changed files with 323 additions and 270 deletions

View file

@ -11,7 +11,7 @@ import { last } from "./arrayUtils";
* @param secure - Secure clipping to avoid edge artifacts
* @returns Clipped polygon points
*/
export const clipPoly = (points: [number, number][], graphWidth: number, graphHeight: number, secure: number = 0) => {
export const clipPoly = (points: [number, number][], graphWidth?: number, graphHeight?: number, secure: number = 0) => {
if (points.length < 2) return points;
if (points.some(point => point === undefined)) {
window.ERROR && console.error("Undefined point in clipPoly", points);