fix jszip for production
This commit is contained in:
parent
e12f498afa
commit
9674b50be0
10 changed files with 64 additions and 21 deletions
|
|
@ -1,7 +0,0 @@
|
|||
/** 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 JSZip;
|
||||
|
|
@ -1872,7 +1872,7 @@ function init_lang() {
|
|||
}
|
||||
|
||||
export function run() {
|
||||
init_lang();
|
||||
client.start();
|
||||
init_lang();
|
||||
return api;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { space } from '../../moto/space.js';
|
|||
import { local } from '../../data/local.js';
|
||||
import { utils } from './utils.js';
|
||||
import { version } from '../../moto/license.js';
|
||||
import JSZip from '../../ext/jszip.esm.js';
|
||||
import { JSZip } from '../../ext/jszip-esm.js';
|
||||
|
||||
const { areEqual, ls2o, js2o } = utils;
|
||||
const { COLOR } = consts;
|
||||
|
|
@ -660,7 +660,7 @@ function settingsImportUrl(url, ask) {
|
|||
|
||||
function settingsImportZip(data, ask) {
|
||||
let alert = api.show.alert("Importing Workspace");
|
||||
JSZip.loadAsync(data).then(zip => {
|
||||
new JSZip().loadAsync(data).then(zip => {
|
||||
for (let [key,value] of Object.entries(zip.files)) {
|
||||
if (key === "workspace.json") {
|
||||
value.async("string").then(json => {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
import '../../add/array.js';
|
||||
import '../../add/class.js';
|
||||
import '../../add/three.js';
|
||||
import '../../ext/jszip.js';
|
||||
|
||||
import { base } from '../../geo/base.js';
|
||||
import { codec } from '../core/codec.js';
|
||||
|
|
@ -17,6 +16,7 @@ import { wasm_ctrl } from '../../geo/wasm.js';
|
|||
import { version } from '../../moto/license.js';
|
||||
import { Widget, newWidget } from '../core/widget.js';
|
||||
import { load } from "../../load/png.js";
|
||||
import { JSZip } from '../../ext/jszip-esm.js';
|
||||
|
||||
import { CAM } from '../mode/cam/driver-be.js';
|
||||
import { DRAG } from '../mode/drag/driver.js';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
'use strict';
|
||||
|
||||
import { THREE } from '../ext/three.js';
|
||||
import JSZip from '../ext/jszip.esm.js';
|
||||
import { JSZip } from '../ext/jszip-esm.js';
|
||||
|
||||
let { BufferAttribute, Matrix4 } = THREE;
|
||||
|
||||
|
|
@ -218,7 +218,7 @@ function extractItems(records) {
|
|||
*/
|
||||
export function parseAsync(data) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
let zip = await JSZip.loadAsync(data);
|
||||
let zip = await new JSZip().loadAsync(data);
|
||||
let models = {};
|
||||
for (let [key, value] of Object.entries(zip.files)) {
|
||||
if (key.endsWith(".model")) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue