fix 3mf import
This commit is contained in:
parent
a67f841889
commit
9b19d8518a
2 changed files with 10 additions and 2 deletions
7
src/ext/jszip.esm.js
Normal file
7
src/ext/jszip.esm.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
||||
|
||||
//import original library
|
||||
import * as JSZip from "./jszip.js";
|
||||
|
||||
//export object attached to the window object
|
||||
export default self.JSZip;
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
'use strict';
|
||||
|
||||
import { THREE } from '../ext/three.js';
|
||||
import * as JSZip from '../ext/jszip.js';
|
||||
import JSZip from '../ext/jszip.esm.js';
|
||||
|
||||
let { BufferAttribute, Matrix4 } = THREE;
|
||||
|
||||
|
|
@ -218,7 +218,8 @@ function extractItems(records) {
|
|||
*/
|
||||
export function parseAsync(data) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
let zip = await JSZip.default.loadAsync(data);
|
||||
console.log(JSZip)
|
||||
let zip = await JSZip.loadAsync(data);
|
||||
let models = {};
|
||||
for (let [key, value] of Object.entries(zip.files)) {
|
||||
if (key.endsWith(".model")) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue