viral-viewer-2 1.1.7 → 1.1.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.
package/LICENSE CHANGED
@@ -1,57 +1,57 @@
1
- MIT License
2
-
3
- Copyright (c) 2023 Viral
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-
23
- ============
24
- == VIRAL ==
25
- ============
26
-
27
-
28
- Copyright (c) 2023, Viral
29
- All rights reserved.
30
-
31
- Redistribution and use in source and binary forms, with or without
32
- modification, are permitted provided that the following conditions are met:
33
-
34
- 1. Redistributions of source code must retain the above copyright notice, this
35
- list of conditions and the following disclaimer.
36
- 2. Redistributions in binary form must reproduce the above copyright notice,
37
- this list of conditions and the following disclaimer in the documentation
38
- and/or other materials provided with the distribution.
39
-
40
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
41
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
42
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
43
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
44
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
45
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
46
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
47
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
48
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
49
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
50
-
51
- The views and conclusions contained in the software and documentation are those
52
- of the authors and should not be interpreted as representing official policies,
53
- either expressed or implied, of the FreeBSD Project.
54
-
55
-
56
- The MIT License (MIT)
57
-
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Viral
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ ============
24
+ == VIRAL ==
25
+ ============
26
+
27
+
28
+ Copyright (c) 2023, Viral
29
+ All rights reserved.
30
+
31
+ Redistribution and use in source and binary forms, with or without
32
+ modification, are permitted provided that the following conditions are met:
33
+
34
+ 1. Redistributions of source code must retain the above copyright notice, this
35
+ list of conditions and the following disclaimer.
36
+ 2. Redistributions in binary form must reproduce the above copyright notice,
37
+ this list of conditions and the following disclaimer in the documentation
38
+ and/or other materials provided with the distribution.
39
+
40
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
41
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
42
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
43
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
44
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
45
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
46
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
47
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
48
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
49
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
50
+
51
+ The views and conclusions contained in the software and documentation are those
52
+ of the authors and should not be interpreted as representing official policies,
53
+ either expressed or implied, of the FreeBSD Project.
54
+
55
+
56
+ The MIT License (MIT)
57
+
@@ -25,12 +25,12 @@ class ViralNavigationCube {
25
25
  }
26
26
  injectCubeWrapperElement() {
27
27
  if (this.viralViewerApi.targetElement) {
28
- this.viralViewerApi.targetElement.innerHTML += `<div style="position: absolute;
29
- right: 10px;
30
- top: 10px;
31
- display: flex;">
32
- <svg xmlns="http://www.w3.org/2000/svg" style="fill:white;cursor: pointer;" height="20px" viewBox="0 0 576 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M280.37 148.26L96 300.11V464a16 16 0 0 0 16 16l112.06-.29a16 16 0 0 0 15.92-16V368a16 16 0 0 1 16-16h64a16 16 0 0 1 16 16v95.64a16 16 0 0 0 16 16.05L464 480a16 16 0 0 0 16-16V300L295.67 148.26a12.19 12.19 0 0 0-15.3 0zM571.6 251.47L488 182.56V44.05a12 12 0 0 0-12-12h-56a12 12 0 0 0-12 12v72.61L318.47 43a48 48 0 0 0-61 0L4.34 251.47a12 12 0 0 0-1.6 16.9l25.5 31A12 12 0 0 0 45.15 301l235.22-193.74a12.19 12.19 0 0 1 15.3 0L530.9 301a12 12 0 0 0 16.9-1.6l25.5-31a12 12 0 0 0-1.7-16.93z"/></svg>
33
- <div id="orientCubeWrapper" style="height:130px;width:130px"></div>
28
+ this.viralViewerApi.targetElement.innerHTML += `<div style="position: absolute;
29
+ right: 10px;
30
+ top: 10px;
31
+ display: flex;">
32
+ <svg xmlns="http://www.w3.org/2000/svg" style="fill:white;cursor: pointer;" height="20px" viewBox="0 0 576 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M280.37 148.26L96 300.11V464a16 16 0 0 0 16 16l112.06-.29a16 16 0 0 0 15.92-16V368a16 16 0 0 1 16-16h64a16 16 0 0 1 16 16v95.64a16 16 0 0 0 16 16.05L464 480a16 16 0 0 0 16-16V300L295.67 148.26a12.19 12.19 0 0 0-15.3 0zM571.6 251.47L488 182.56V44.05a12 12 0 0 0-12-12h-56a12 12 0 0 0-12 12v72.61L318.47 43a48 48 0 0 0-61 0L4.34 251.47a12 12 0 0 0-1.6 16.9l25.5 31A12 12 0 0 0 45.15 301l235.22-193.74a12.19 12.19 0 0 1 15.3 0L530.9 301a12 12 0 0 0 16.9-1.6l25.5-31a12 12 0 0 0-1.7-16.93z"/></svg>
33
+ <div id="orientCubeWrapper" style="height:130px;width:130px"></div>
34
34
  </div>`;
35
35
  }
36
36
  }
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ViralViewerWorker = void 0;
4
4
  const three_1 = require("three");
5
5
  class ViralViewerWorker {
6
- constructor(viralViewerApi, scriptUrl = "../worker-script/load-model-worker.script") {
6
+ constructor(viralViewerApi, scriptUrl = "../worker-script/load-model-worker.script.js") {
7
7
  this.viralViewerApi = viralViewerApi;
8
- this.worker = new Worker(scriptUrl, { type: "module" });
8
+ this.worker = new Worker(new URL(scriptUrl), { type: "module" });
9
9
  }
10
10
  loadModel(model, callbackOnSuccess = () => { }) {
11
11
  const noneStructuralMesh = new three_1.Mesh();
@@ -1 +1 @@
1
- {"version":3,"file":"viral-viewer.worker.js","sourceRoot":"","sources":["../../../src/components/worker/viral-viewer.worker.ts"],"names":[],"mappings":";;;AAEA,iCAA0I;AAC1I,MAAa,iBAAiB;IAE1B,YAAmB,cAA8B,EAAE,YAAoB,2CAA2C;QAA/F,mBAAc,GAAd,cAAc,CAAgB;QAC7C,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC5D,CAAC;IACM,SAAS,CAAC,KAA8B,EAAE,iBAAiB,GAAG,GAAG,EAAE,GAAG,CAAC;QAC1E,MAAM,kBAAkB,GAAG,IAAI,YAAI,EAAE,CAAC;QACtC,kBAAkB,CAA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C;4BACD,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;4BAClB,QAAQ,CAAC,MAAM,CAAC,CAAC;4BACjB,QAAQ,CAAC,MAAM,CAAC,CAAC;4BACjB,CAAC;4BACD,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;4BAClB,QAAQ,CAAC,MAAM,CAAC,CAAC;4BACjB,QAAQ,CAAC,MAAM,CAAC,CAAC;4BACjB,CAAC;yBACJ,CAAC;wBACF,IAAI,OAAO,GAAG,IAAI,eAAO,EAAE,CAAC;wBAC5B,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;wBAC3B,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;wBACjC,MAAM,KAAK,GAAG,IAAI,qBAAa,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;wBACrD,MAAM,IAAI,GAAG,IAAI,oBAAY,CACzB,KAAK,EACL,IAAI,yBAAiB,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAC9C,CAAC;wBACF,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;wBACrB,kBAAkB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;qBACtC;oBACD,6BAA6B;oBAC7B,MAAM;gBACV,KAAK,CAAC;oBACF,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;oBACxB,iBAAiB,EAAE,CAAC;oBACpB,MAAM;gBACV;oBACI,MAAM;aACb;QACL,CAAC,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACtD,CAAC;CACJ;AAjGD,8CAiGC"}
package/package.json CHANGED
@@ -1,30 +1,30 @@
1
- {
2
- "name": "viral-viewer-2",
3
- "version": "1.1.7",
4
- "description": "",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "files": [
8
- "dist",
9
- "LICENSE",
10
- "README.md"
11
- ],
12
- "scripts": {
13
- "test": "echo \"Error: no test specified\" && exit 1",
14
- "build": "npx tsc"
15
- },
16
- "keywords": [],
17
- "author": "",
18
- "license": "ISC",
19
- "devDependencies": {
20
- "@types/node": "^20.2.5",
21
- "@types/three": "^0.152.1",
22
- "typescript": "^5.0.4"
23
- },
24
- "dependencies": {
25
- "camera-controls": "^2.3.7",
26
- "lz-string": "^1.5.0",
27
- "potree-core-viral": "^0.2.3",
28
- "three": "^0.152.2"
29
- }
1
+ {
2
+ "name": "viral-viewer-2",
3
+ "version": "1.1.8",
4
+ "description": "",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist",
9
+ "LICENSE",
10
+ "README.md"
11
+ ],
12
+ "scripts": {
13
+ "test": "echo \"Error: no test specified\" && exit 1",
14
+ "build": "npx tsc"
15
+ },
16
+ "keywords": [],
17
+ "author": "",
18
+ "license": "ISC",
19
+ "devDependencies": {
20
+ "@types/node": "^20.2.5",
21
+ "@types/three": "^0.152.1",
22
+ "typescript": "^5.0.4"
23
+ },
24
+ "dependencies": {
25
+ "camera-controls": "^2.3.7",
26
+ "lz-string": "^1.5.0",
27
+ "potree-core-viral": "^0.2.3",
28
+ "three": "^0.152.2"
29
+ }
30
30
  }
@@ -1,126 +0,0 @@
1
- declare function addCustomMesh3(indices: any, vertices: any, material: any, callback: any): void;
2
- declare function addCustomMesh4(indices: any, vertices: any, material: any, instances: any, callback: any): void;
3
- declare function progressStructuralGeometries(json: any, callback: any): void;
4
- declare function progressNoneStructuralGeometries(json: any, callback: any): void;
5
- declare function rgbToHex(r: any, g: any, b: any): string;
6
- declare function componentToHex(c: any): any;
7
- declare class Matrix4 {
8
- constructor(...args: any[]);
9
- elements: number[];
10
- set(n11: any, n12: any, n13: any, n14: any, n21: any, n22: any, n23: any, n24: any, n31: any, n32: any, n33: any, n34: any, n41: any, n42: any, n43: any, n44: any): Matrix4;
11
- identity(): Matrix4;
12
- clone(): Matrix4;
13
- copy(m: any): Matrix4;
14
- copyPosition(m: any): Matrix4;
15
- setFromMatrix3(m: any): Matrix4;
16
- extractBasis(xAxis: any, yAxis: any, zAxis: any): Matrix4;
17
- makeBasis(xAxis: any, yAxis: any, zAxis: any): Matrix4;
18
- extractRotation(m: any): Matrix4;
19
- makeRotationFromEuler(euler: any): Matrix4;
20
- makeRotationFromQuaternion(q: any): Matrix4;
21
- lookAt(eye: any, target: any, up: any): Matrix4;
22
- multiply(m: any, n: any): Matrix4;
23
- premultiply(m: any): Matrix4;
24
- multiplyMatrices(a: any, b: any): Matrix4;
25
- multiplyScalar(s: any): Matrix4;
26
- determinant(): number;
27
- transpose(): Matrix4;
28
- setPosition(x: any, y: any, z: any): Matrix4;
29
- invert(): Matrix4;
30
- scale(v: any): Matrix4;
31
- getMaxScaleOnAxis(): number;
32
- makeTranslation(x: any, y: any, z: any): Matrix4;
33
- makeRotationX(theta: any): Matrix4;
34
- makeRotationY(theta: any): Matrix4;
35
- makeRotationZ(theta: any): Matrix4;
36
- makeRotationAxis(axis: any, angle: any): Matrix4;
37
- makeScale(x: any, y: any, z: any): Matrix4;
38
- makeShear(xy: any, xz: any, yx: any, yz: any, zx: any, zy: any): Matrix4;
39
- compose(position: any, quaternion: any, scale: any): Matrix4;
40
- decompose(position: any, quaternion: any, scale: any): Matrix4;
41
- makePerspective(left: any, right: any, top: any, bottom: any, near: any, far: any): Matrix4;
42
- makeOrthographic(left: any, right: any, top: any, bottom: any, near: any, far: any): Matrix4;
43
- equals(matrix: any): boolean;
44
- fromArray(array: any, offset?: number): Matrix4;
45
- toArray(array?: any[], offset?: number): any[];
46
- isMatrix4: boolean;
47
- }
48
- declare class Vector3 {
49
- constructor(x?: number, y?: number, z?: number);
50
- x: number;
51
- y: number;
52
- z: number;
53
- set(x: any, y: any, z: any): Vector3;
54
- setScalar(scalar: any): Vector3;
55
- setX(x: any): Vector3;
56
- setY(y: any): Vector3;
57
- setZ(z: any): Vector3;
58
- setComponent(index: any, value: any): Vector3;
59
- getComponent(index: any): number;
60
- clone(): any;
61
- copy(v: any): Vector3;
62
- add(v: any, w: any): Vector3;
63
- addScalar(s: any): Vector3;
64
- addVectors(a: any, b: any): Vector3;
65
- addScaledVector(v: any, s: any): Vector3;
66
- sub(v: any, w: any): Vector3;
67
- subScalar(s: any): Vector3;
68
- subVectors(a: any, b: any): Vector3;
69
- multiply(v: any, w: any): Vector3;
70
- multiplyScalar(scalar: any): Vector3;
71
- multiplyVectors(a: any, b: any): Vector3;
72
- applyEuler(euler: any): Vector3;
73
- applyAxisAngle(axis: any, angle: any): Vector3;
74
- applyMatrix3(m: any): Vector3;
75
- applyNormalMatrix(m: any): Vector3;
76
- applyMatrix4(m: any): Vector3;
77
- applyQuaternion(q: any): Vector3;
78
- project(camera: any): Vector3;
79
- unproject(camera: any): Vector3;
80
- transformDirection(m: any): Vector3;
81
- divide(v: any): Vector3;
82
- divideScalar(scalar: any): Vector3;
83
- min(v: any): Vector3;
84
- max(v: any): Vector3;
85
- clamp(min: any, max: any): Vector3;
86
- clampScalar(minVal: any, maxVal: any): Vector3;
87
- clampLength(min: any, max: any): Vector3;
88
- floor(): Vector3;
89
- ceil(): Vector3;
90
- round(): Vector3;
91
- roundToZero(): Vector3;
92
- negate(): Vector3;
93
- dot(v: any): number;
94
- lengthSq(): number;
95
- length(): number;
96
- manhattanLength(): number;
97
- normalize(): Vector3;
98
- setLength(length: any): Vector3;
99
- lerp(v: any, alpha: any): Vector3;
100
- lerpVectors(v1: any, v2: any, alpha: any): Vector3;
101
- cross(v: any, w: any): Vector3;
102
- crossVectors(a: any, b: any): Vector3;
103
- projectOnVector(v: any): Vector3;
104
- projectOnPlane(planeNormal: any): Vector3;
105
- reflect(normal: any): Vector3;
106
- angleTo(v: any): number;
107
- distanceTo(v: any): number;
108
- distanceToSquared(v: any): number;
109
- manhattanDistanceTo(v: any): number;
110
- setFromSpherical(s: any): Vector3;
111
- setFromSphericalCoords(radius: any, phi: any, theta: any): Vector3;
112
- setFromCylindrical(c: any): Vector3;
113
- setFromCylindricalCoords(radius: any, theta: any, y: any): Vector3;
114
- setFromMatrixPosition(m: any): Vector3;
115
- setFromMatrixScale(m: any): Vector3;
116
- setFromMatrixColumn(m: any, index: any): Vector3;
117
- setFromMatrix3Column(m: any, index: any): Vector3;
118
- equals(v: any): boolean;
119
- fromArray(array: any, offset?: number): Vector3;
120
- toArray(array?: any[], offset?: number): any[];
121
- fromBufferAttribute(attribute: any, index: any, offset: any): Vector3;
122
- random(): Vector3;
123
- randomDirection(): Vector3;
124
- isVector3: boolean;
125
- [Symbol.iterator](): Generator<number, void, unknown>;
126
- }