viral-viewer-2 4.5.7 → 4.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/compress/viral-compress.processor.d.ts +1 -2
- package/dist/components/compress/viral-compress.processor.js +5 -21
- package/dist/components/compress/viral-compress.processor.js.map +1 -1
- package/dist/components/worker-script/load-model-worker-3.script.js +2 -2
- package/dist/components/worker-script/load-model-worker-3.script.js.map +1 -1
- package/package.json +3 -2
|
@@ -1,28 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.ViralCompressProcessor = void 0;
|
|
13
|
-
const
|
|
4
|
+
const Pako = require("pako");
|
|
14
5
|
class ViralCompressProcessor {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
if (res) {
|
|
20
|
-
let text = yield res.text();
|
|
21
|
-
let decompress = lzstring.decompressFromEncodedURIComponent(text);
|
|
22
|
-
result = JSON.parse(decompress);
|
|
23
|
-
}
|
|
24
|
-
return result;
|
|
25
|
-
});
|
|
6
|
+
pakoUnzip(buffer) {
|
|
7
|
+
const uint8Array = new Uint8Array(buffer);
|
|
8
|
+
const inflatedData = Pako.inflate(uint8Array, { to: "string" });
|
|
9
|
+
return inflatedData;
|
|
26
10
|
}
|
|
27
11
|
}
|
|
28
12
|
exports.ViralCompressProcessor = ViralCompressProcessor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viral-compress.processor.js","sourceRoot":"","sources":["../../../src/components/compress/viral-compress.processor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"viral-compress.processor.js","sourceRoot":"","sources":["../../../src/components/compress/viral-compress.processor.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,MAAa,sBAAsB;IAC1B,SAAS,CAAC,MAAmB;QAClC,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;QAC1C,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;QAChE,OAAO,YAAY,CAAC;IACtB,CAAC;CACF;AAND,wDAMC"}
|
|
@@ -34046,8 +34046,8 @@ which can be placed in CurveUtils.
|
|
|
34046
34046
|
let result = [];
|
|
34047
34047
|
for (let index = 0; index < json.Solids.length; index++) {
|
|
34048
34048
|
const element = json.Solids[index];
|
|
34049
|
-
|
|
34050
|
-
const buffer = new Float32Array(element.Buffer);
|
|
34049
|
+
let buffer = addMesh(element.Indices, element.Vertices);
|
|
34050
|
+
// const buffer = new Float32Array(element.Buffer);
|
|
34051
34051
|
let dummyGeometry = new BufferGeometry();
|
|
34052
34052
|
dummyGeometry.setAttribute("position", new BufferAttribute(buffer, 3));
|
|
34053
34053
|
let geometry = new BufferGeometry();
|