From 56436fc4edb2a7e7857c36ed485d3aa283a33e91 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Fri, 14 Feb 2020 09:28:51 -0500 Subject: [PATCH] add loading of raw vertices --- js/kiri.js | 4 ++++ js/license.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/js/kiri.js b/js/kiri.js index 6ff4afcc..1449e4c0 100644 --- a/js/kiri.js +++ b/js/kiri.js @@ -1967,11 +1967,15 @@ self.kiri.license = exports.LICENSE; for (var i=0; i 0, isstl = lower.indexOf(".stl") > 0, issvg = lower.indexOf(".svg") > 0, isgcode = lower.indexOf(".gcode") > 0 || lower.indexOf(".nc") > 0; reader.file = files[i]; reader.onloadend = function (e) { + if (israw) platformAdd( + newWidget().loadVertices(JSON.parse(e.target.result).toFloat32()) + ); if (isstl) platformAdd( newWidget() .loadVertices(new MOTO.STL().parse(e.target.result)) diff --git a/js/license.js b/js/license.js index 438d7570..0c46ec48 100644 --- a/js/license.js +++ b/js/license.js @@ -1,7 +1,7 @@ var exports = { COPYRIGHT:"Copyright (C) 2014-2019 Stewart Allen - All Rights Reserved", LICENSE:"See the license.md file included with the source distribution", - VERSION:"1.5.9" + VERSION:"1.6.0" }; if (!module) var module = {}; module.exports = exports;