From 76df802ab8026ff342020f09cd6353a7384bdada Mon Sep 17 00:00:00 2001 From: bakedpotatolord Date: Tue, 8 Jul 2025 09:02:27 -0600 Subject: [PATCH] add other file exports to file.js add missing import --- src/load/file.js | 2 ++ src/load/svg.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/load/file.js b/src/load/file.js index c70ca280..88962c27 100644 --- a/src/load/file.js +++ b/src/load/file.js @@ -100,4 +100,6 @@ function load_file(file, opt) { }); } +Object.assign(load_file, { SVG, OBJ, STL, TMF, GBR, PNG: pngLoad.PNG }); + export { types, as_buffer, load_data, load_file, load_file as load }; diff --git a/src/load/svg.js b/src/load/svg.js index 498650d3..8024b6f8 100644 --- a/src/load/svg.js +++ b/src/load/svg.js @@ -1,6 +1,7 @@ /** Copyright Stewart Allen -- All Rights Reserved */ import { newPolygon } from '../geo/polygon.js'; +import { newPoint } from '../geo/point.js'; import { polygons } from '../geo/polygons.js'; import { THREE } from '../ext/three.js'; @@ -43,7 +44,7 @@ export function parse(text, opt = { }) { if (points.length < 3) { continue; } - let poly = newPolygon().addPoints(points.map(p => newPolygon.newPoint(p.x, -p.y, 0))); + let poly = newPolygon().addPoints(points.map(p => newPoint(p.x, -p.y, 0))); if (poly.appearsClosed()) poly.points.pop(); if (type === 'polyline') poly.setOpen(true); poly._svg = { width, miter };