fix for small bianry files

This commit is contained in:
Stewart Allen 2022-03-05 18:41:05 -05:00
commit 4e8bb6b7ea
2 changed files with 1 additions and 2 deletions

View file

@ -176,7 +176,7 @@ async function run() {
let engine = kiri.newEngine();
let data = await fetch(model)
let buf = data.arrayBuffer().buffer;
let buf = new Uint8Array(data.arrayBuffer()).buffer;
return engine.parse(buf)
.then(data => { if (verbose) console.log({loaded: data}) })

View file

@ -23,7 +23,6 @@ function STL() {
this.colors = null;
}
SP.load = function(url, callback, formdata, scale) {
let stl = this,
xhr = new XMLHttpRequest();