mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-02-05 10:01:24 +01:00
refactor: Migrate features to a new module and remove legacy script reference
This commit is contained in:
parent
b18732b8b8
commit
e7c853bf52
5 changed files with 323 additions and 270 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue