viral-viewer-2 4.5.7 → 4.5.8
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.
|
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ViralCompressProcessor = void 0;
|
|
13
13
|
const lzstring = require("lz-string");
|
|
14
|
+
const pakoLib = require("pako");
|
|
14
15
|
class ViralCompressProcessor {
|
|
15
16
|
decompressed(path) {
|
|
16
17
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -24,6 +25,13 @@ class ViralCompressProcessor {
|
|
|
24
25
|
return result;
|
|
25
26
|
});
|
|
26
27
|
}
|
|
28
|
+
pakoDecompressed(compressedArrayBuffer) {
|
|
29
|
+
const decompressedArrayBuffer = pakoLib.inflate(compressedArrayBuffer);
|
|
30
|
+
// Now, `decompressedArrayBuffer` contains the decompressed data
|
|
31
|
+
// If you want to convert it to a string or another data type, you can do so like this:
|
|
32
|
+
const decompressedString = new TextDecoder().decode(decompressedArrayBuffer);
|
|
33
|
+
return decompressedString;
|
|
34
|
+
}
|
|
27
35
|
}
|
|
28
36
|
exports.ViralCompressProcessor = ViralCompressProcessor;
|
|
29
37
|
//# sourceMappingURL=viral-compress.processor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viral-compress.processor.js","sourceRoot":"","sources":["../../../src/components/compress/viral-compress.processor.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,sCAAsC;
|
|
1
|
+
{"version":3,"file":"viral-compress.processor.js","sourceRoot":"","sources":["../../../src/components/compress/viral-compress.processor.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,sCAAsC;AACtC,gCAAgC;AAChC,MAAa,sBAAsB;IACpB,YAAY,CAAC,IAAY;;YACpC,IAAI,MAAM,GAAmC,IAAI,CAAC;YAClD,IAAI,GAAG,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,CAAC;YAC5B,IAAI,GAAG,EAAE;gBACP,IAAI,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;gBAC5B,IAAI,UAAU,GAAG,QAAQ,CAAC,iCAAiC,CAAC,IAAI,CAAC,CAAC;gBAElE,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;aACjC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC;KAAA;IACM,gBAAgB,CAAC,qBAAkC;QACxD,MAAM,uBAAuB,GAAG,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;QAEvE,gEAAgE;QAEhE,uFAAuF;QACvF,MAAM,kBAAkB,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CACjD,uBAAuB,CACxB,CAAC;QACF,OAAO,kBAAkB,CAAC;IAC5B,CAAC;CACF;AAvBD,wDAuBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "viral-viewer-2",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,12 +18,14 @@
|
|
|
18
18
|
"license": "ISC",
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@types/node": "^20.2.5",
|
|
21
|
+
"@types/pako": "^2.0.0",
|
|
21
22
|
"@types/three": "^0.152.1",
|
|
22
23
|
"typescript": "^5.0.4"
|
|
23
24
|
},
|
|
24
25
|
"dependencies": {
|
|
25
26
|
"camera-controls": "^2.3.7",
|
|
26
27
|
"lz-string": "^1.5.0",
|
|
28
|
+
"pako": "^2.1.0",
|
|
27
29
|
"potree-core-viral": "^0.2.3",
|
|
28
30
|
"three": "^0.152.2",
|
|
29
31
|
"three-mesh-bvh": "^0.6.7"
|