add missing import
Revert "add missing import" Revert "add missing import" Revert "add other file exports to file.js" Revert "fix png imports" Revert "ignore pack folder"
This commit is contained in:
parent
76df802ab8
commit
c0baeb5db1
6 changed files with 3 additions and 8 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -11,4 +11,3 @@ node_modules
|
|||
package-lock.json
|
||||
three.js
|
||||
tmp
|
||||
pack
|
||||
|
|
@ -16,7 +16,6 @@ import { render } from '../kiri/render.js';
|
|||
import { wasm_ctrl } from '../geo/wasm.js';
|
||||
import { version } from '../moto/license.js';
|
||||
import { Widget, newWidget } from '../kiri/widget.js';
|
||||
import { load } from "../load/png.js";
|
||||
|
||||
import { CAM } from '../kiri-mode/cam/driver-be.js';
|
||||
import { DRAG } from '../kiri-mode/drag/driver.js';
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import { space as SPACE } from '../moto/space.js';
|
|||
import { stats } from '../kiri/stats.js';
|
||||
import { noop, utils } from '../kiri/utils.js';
|
||||
import { version } from '../moto/license.js';
|
||||
import { Widget, newWidget } from './widget.js';
|
||||
import { Widget } from './widget.js';
|
||||
import { showTools } from '../kiri-mode/cam/tools.js';
|
||||
|
||||
let { parseOpt, o2js, js2o, ls2o } = utils,
|
||||
|
|
|
|||
|
|
@ -100,6 +100,4 @@ 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 };
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ function parseAsync(bin, opt) {
|
|||
* opt.base = base added thickness in mm
|
||||
*/
|
||||
function parse(bin, opt = {}) {
|
||||
let img = new PNG();
|
||||
let img = new png.PNG();
|
||||
let progress = opt.progress || noop;
|
||||
let ondone = opt.done || noop;
|
||||
img.parse(bin, (err, output) => {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
/** Copyright Stewart Allen <sa@grid.space> -- 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';
|
||||
|
||||
|
|
@ -44,7 +43,7 @@ export function parse(text, opt = { }) {
|
|||
if (points.length < 3) {
|
||||
continue;
|
||||
}
|
||||
let poly = newPolygon().addPoints(points.map(p => newPoint(p.x, -p.y, 0)));
|
||||
let poly = newPolygon().addPoints(points.map(p => newPolygon.newPoint(p.x, -p.y, 0)));
|
||||
if (poly.appearsClosed()) poly.points.pop();
|
||||
if (type === 'polyline') poly.setOpen(true);
|
||||
poly._svg = { width, miter };
|
||||
|
|
|
|||
Loading…
Reference in a new issue