viral-viewer-2 1.9.3 → 1.9.5
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 +57 -57
- package/dist/components/keyboard/viral-keyboard.d.ts +5 -0
- package/dist/components/keyboard/viral-keyboard.js +11 -0
- package/dist/components/keyboard/viral-keyboard.js.map +1 -0
- package/dist/components/mouse/viral-mouse.js +12 -12
- package/dist/components/mouse/viral-mouse.js.map +1 -1
- package/dist/components/spinner/viral-spinner.js +159 -159
- package/dist/components/tools/tools/viral-tool-measure.d.ts +1 -1
- package/dist/components/tools/tools/viral-tool-measure.js +16 -4
- package/dist/components/tools/tools/viral-tool-measure.js.map +1 -1
- package/dist/components/worker/load-model.d.ts +126 -0
- package/dist/components/worker/load-model.js +1265 -0
- package/dist/components/worker/load-model.js.map +1 -0
- package/dist/viral-viewer-api.d.ts +0 -2
- package/dist/viral-viewer-api.js +1 -2
- package/dist/viral-viewer-api.js.map +1 -1
- package/package.json +29 -29
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
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ViralKeyboard = void 0;
|
|
4
|
+
class ViralKeyboard {
|
|
5
|
+
constructor(viralViewerApi) {
|
|
6
|
+
this.viralViewerApi = viralViewerApi;
|
|
7
|
+
// this.setupKeyPress();
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.ViralKeyboard = ViralKeyboard;
|
|
11
|
+
//# sourceMappingURL=viral-keyboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viral-keyboard.js","sourceRoot":"","sources":["../../../src/components/keyboard/viral-keyboard.ts"],"names":[],"mappings":";;;AAEA,MAAa,aAAa;IAEtB,YAAmB,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;QAC7C,wBAAwB;IAC5B,CAAC;CAWJ;AAfD,sCAeC"}
|
|
@@ -30,12 +30,12 @@ class ViralMouse {
|
|
|
30
30
|
(_a = this.viralViewerApi.viralCamera.camera) === null || _a === void 0 ? void 0 : _a.updateMatrixWorld();
|
|
31
31
|
(_b = this.viralViewerApi.viralCamera.cameraControls) === null || _b === void 0 ? void 0 : _b.setOrbitPoint(result[0].point.x, result[0].point.y, result[0].point.z);
|
|
32
32
|
//#region Tools
|
|
33
|
-
if (this.viralViewerApi.viralTools.viralToolMeasure.isActivated) {
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
if (this.viralViewerApi.viralTools.viralToolElevation.isActivated) {
|
|
37
|
-
|
|
38
|
-
}
|
|
33
|
+
// if (this.viralViewerApi.viralTools.viralToolMeasure.isActivated) {
|
|
34
|
+
// this.viralViewerApi.viralTools.viralToolMeasure.onMouseClick(this.position);
|
|
35
|
+
// }
|
|
36
|
+
// if (this.viralViewerApi.viralTools.viralToolElevation.isActivated) {
|
|
37
|
+
// this.viralViewerApi.viralTools.viralToolElevation.onMouseClick(this.position);
|
|
38
|
+
// }
|
|
39
39
|
//#endregion
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -60,12 +60,12 @@ class ViralMouse {
|
|
|
60
60
|
this.position.x = ((event.clientX - bounds.left) / (bounds.right - bounds.left)) * 2 - 1;
|
|
61
61
|
this.position.y = -((event.clientY - bounds.top) / (bounds.bottom - bounds.top)) * 2 + 1;
|
|
62
62
|
//#region Tools
|
|
63
|
-
if (this.viralViewerApi.viralTools.viralToolElevation.isActivated) {
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
if (this.viralViewerApi.viralTools.viralToolMeasure.isActivated) {
|
|
67
|
-
|
|
68
|
-
}
|
|
63
|
+
// if (this.viralViewerApi.viralTools.viralToolElevation.isActivated) {
|
|
64
|
+
// this.viralViewerApi.viralTools.viralToolElevation.onMouseMove(this.position);
|
|
65
|
+
// }
|
|
66
|
+
// if (this.viralViewerApi.viralTools.viralToolMeasure.isActivated) {
|
|
67
|
+
// this.viralViewerApi.viralTools.viralToolMeasure.onMouseMove(this.position);
|
|
68
|
+
// }
|
|
69
69
|
//#endregion
|
|
70
70
|
};
|
|
71
71
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viral-mouse.js","sourceRoot":"","sources":["../../../src/components/mouse/viral-mouse.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iCAAgC;AAGhC,MAAa,UAAU;IAInB,YAAmB,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;QAHjD,aAAQ,GAAG,IAAI,eAAO,EAAE,CAAC;QACzB,gBAAW,GAAG,IAAI,eAAO,EAAE,CAAC;QAgCpB,gBAAW,GAAG,CAAO,MAAa,EAAE,EAAE;;YAC1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AAI,CAAC,aAAa,CAAC;IAE/C,CAAC;CAWJ;AA5ED,gCA4EC"}
|
|
@@ -6,170 +6,170 @@ class ViralSpinner {
|
|
|
6
6
|
constructor(viralViewerApi) {
|
|
7
7
|
this.viralViewerApi = viralViewerApi;
|
|
8
8
|
this.spinner = null;
|
|
9
|
-
this.logo = `<svg
|
|
10
|
-
viewBox="0 0 135.46667 135.46667"
|
|
11
|
-
version="1.1"
|
|
12
|
-
id="svg7238"
|
|
13
|
-
sodipodi:docname="viral2-green.svg"
|
|
14
|
-
inkscape:export-filename="viral2-512.png"
|
|
15
|
-
inkscape:export-xdpi="96"
|
|
16
|
-
inkscape:export-ydpi="96"
|
|
17
|
-
inkscape:version="1.2.2 (732a01da63, 2022-12-09)"
|
|
18
|
-
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
19
|
-
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
20
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
21
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
22
|
-
xmlns:svg="http://www.w3.org/2000/svg">
|
|
23
|
-
<sodipodi:namedview
|
|
24
|
-
id="namedview7240"
|
|
25
|
-
pagecolor="#ffffff"
|
|
26
|
-
bordercolor="#000000"
|
|
27
|
-
borderopacity="0.25"
|
|
28
|
-
inkscape:showpageshadow="2"
|
|
29
|
-
inkscape:pageopacity="0.0"
|
|
30
|
-
inkscape:pagecheckerboard="0"
|
|
31
|
-
inkscape:deskcolor="#d1d1d1"
|
|
32
|
-
inkscape:document-units="px"
|
|
33
|
-
showgrid="false"
|
|
34
|
-
showborder="false"
|
|
35
|
-
inkscape:zoom="0.99327643"
|
|
36
|
-
inkscape:cx="-5.53723"
|
|
37
|
-
inkscape:cy="208.4012"
|
|
38
|
-
inkscape:window-width="1920"
|
|
39
|
-
inkscape:window-height="1025"
|
|
40
|
-
inkscape:window-x="-8"
|
|
41
|
-
inkscape:window-y="-8"
|
|
42
|
-
inkscape:window-maximized="1"
|
|
43
|
-
inkscape:current-layer="layer1" />
|
|
44
|
-
<defs
|
|
45
|
-
id="defs7235">
|
|
46
|
-
<linearGradient
|
|
47
|
-
inkscape:collect="always"
|
|
48
|
-
id="linearGradient1616">
|
|
49
|
-
<stop
|
|
50
|
-
style="stop-color:#56674d;stop-opacity:1;"
|
|
51
|
-
offset="0"
|
|
52
|
-
id="stop1612" />
|
|
53
|
-
<stop
|
|
54
|
-
style="stop-color:#ffffff;stop-opacity:0;"
|
|
55
|
-
offset="1"
|
|
56
|
-
id="stop1614" />
|
|
57
|
-
</linearGradient>
|
|
58
|
-
<linearGradient
|
|
59
|
-
inkscape:collect="always"
|
|
60
|
-
xlink:href="#linearGradient15690"
|
|
61
|
-
id="linearGradient18609"
|
|
62
|
-
gradientUnits="userSpaceOnUse"
|
|
63
|
-
gradientTransform="translate(-166.15654,32.013661)"
|
|
64
|
-
x1="307.17484"
|
|
65
|
-
y1="52.350281"
|
|
66
|
-
x2="326.05994"
|
|
67
|
-
y2="54.673866" />
|
|
68
|
-
<linearGradient
|
|
69
|
-
inkscape:collect="always"
|
|
70
|
-
id="linearGradient15690">
|
|
71
|
-
<stop
|
|
72
|
-
style="stop-color:#56674d;stop-opacity:1;"
|
|
73
|
-
offset="0"
|
|
74
|
-
id="stop15686" />
|
|
75
|
-
<stop
|
|
76
|
-
style="stop-color:#496e7c;stop-opacity:0;"
|
|
77
|
-
offset="1"
|
|
78
|
-
id="stop15688" />
|
|
79
|
-
</linearGradient>
|
|
80
|
-
<linearGradient
|
|
81
|
-
inkscape:collect="always"
|
|
82
|
-
xlink:href="#linearGradient15766"
|
|
83
|
-
id="linearGradient16111-2"
|
|
84
|
-
gradientUnits="userSpaceOnUse"
|
|
85
|
-
x1="94.716965"
|
|
86
|
-
y1="77.459938"
|
|
87
|
-
x2="120.0867"
|
|
88
|
-
y2="65.915489" />
|
|
89
|
-
<linearGradient
|
|
90
|
-
inkscape:collect="always"
|
|
91
|
-
id="linearGradient15766">
|
|
92
|
-
<stop
|
|
93
|
-
style="stop-color:#56674d;stop-opacity:1;"
|
|
94
|
-
offset="0"
|
|
95
|
-
id="stop15762" />
|
|
96
|
-
<stop
|
|
97
|
-
style="stop-color:#496e7c;stop-opacity:0;"
|
|
98
|
-
offset="1"
|
|
99
|
-
id="stop15764" />
|
|
100
|
-
</linearGradient>
|
|
101
|
-
<linearGradient
|
|
102
|
-
inkscape:collect="always"
|
|
103
|
-
xlink:href="#linearGradient15924"
|
|
104
|
-
id="linearGradient18611"
|
|
105
|
-
gradientUnits="userSpaceOnUse"
|
|
106
|
-
gradientTransform="translate(-166.15654,32.013661)"
|
|
107
|
-
x1="252.87965"
|
|
108
|
-
y1="104.78405"
|
|
109
|
-
x2="305.49805"
|
|
110
|
-
y2="61.56583" />
|
|
111
|
-
<linearGradient
|
|
112
|
-
inkscape:collect="always"
|
|
113
|
-
id="linearGradient15924">
|
|
114
|
-
<stop
|
|
115
|
-
style="stop-color:#56674d;stop-opacity:1;"
|
|
116
|
-
offset="0"
|
|
117
|
-
id="stop15920" />
|
|
118
|
-
<stop
|
|
119
|
-
style="stop-color:#ffffff;stop-opacity:0;"
|
|
120
|
-
offset="1"
|
|
121
|
-
id="stop15922" />
|
|
122
|
-
</linearGradient>
|
|
123
|
-
<linearGradient
|
|
124
|
-
inkscape:collect="always"
|
|
125
|
-
xlink:href="#linearGradient1616"
|
|
126
|
-
id="linearGradient18613"
|
|
127
|
-
gradientUnits="userSpaceOnUse"
|
|
128
|
-
gradientTransform="translate(-166.15654,32.013661)"
|
|
129
|
-
x1="262.83365"
|
|
130
|
-
y1="98.616089"
|
|
131
|
-
x2="303.40704"
|
|
132
|
-
y2="56.86591" />
|
|
133
|
-
</defs>
|
|
134
|
-
<g
|
|
135
|
-
inkscape:label="Layer 1"
|
|
136
|
-
inkscape:groupmode="layer"
|
|
137
|
-
id="layer1"
|
|
138
|
-
transform="translate(-81.132986,-92.575601)">
|
|
139
|
-
<g
|
|
140
|
-
id="g489"
|
|
141
|
-
transform="matrix(1.5365255,0,0,1.474116,-14.471343,-5.8524295)">
|
|
142
|
-
<path
|
|
143
|
-
id="path11327-0-0-0"
|
|
144
|
-
style="fill:url(#linearGradient18609);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
|
145
|
-
d="m 130.56075,85.04143 c 0.52476,0.26239 -18.03983,28.95537 -21.66379,32.11329 -3.42113,2.98116 -7.7736,3.69559 -11.21431,3.82302 -3.4407,0.12743 -10.95953,-1.27434 -10.95953,-1.27434 l 9.53171,15.82074 c 10.00038,14.90295 18.17614,-1.81278 29.33516,-18.06246 3.96568,-5.77479 7.78809,-12.47359 12.92015,-21.46123 4.04139,-7.0776 -7.96539,-10.97224 -7.94939,-10.95902 z" />
|
|
146
|
-
<path
|
|
147
|
-
style="fill:url(#linearGradient16111-2);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
|
148
|
-
d="m 95.83013,56.198256 16.05664,29.946913 c 0,0 -10.06725,0.637171 -12.870796,-1.019467 L 87.652946,64.863746 c 0,0 -2.527248,-8.028321 8.177184,-8.66549 z"
|
|
149
|
-
id="path11425-3-4-8"
|
|
150
|
-
sodipodi:nodetypes="ccccc"
|
|
151
|
-
class="UnoptimicedTransforms"
|
|
152
|
-
transform="translate(-14.07671,30.372343)" />
|
|
153
|
-
<path
|
|
154
|
-
id="path11327-0-5-6-6-4-3"
|
|
155
|
-
style="fill:url(#linearGradient18611);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
|
156
|
-
d="m 130.56075,85.04143 c -1.47647,3.17228 -18.24916,29.13777 -21.66379,32.11329 -3.42112,2.98116 -7.7736,3.69559 -11.2143,3.82302 -3.4407,0.12743 -10.95954,-1.27434 -10.95954,-1.27434 l 4.7656,7.91063 h 5.2e-4 c 0.002,0.001 10.85017,15.99897 19.37348,5.76286 2.99574,-3.59774 5.15135,-6.65533 6.98187,-9.54746 2.95629,-4.67075 5.06469,-8.90995 8.4947,-14.29586 14.90527,-23.40477 3.86084,-23.27687 4.22146,-24.49214 z"
|
|
157
|
-
sodipodi:nodetypes="csscccsssc" />
|
|
158
|
-
<path
|
|
159
|
-
id="path11327-0-5-6-6-7-5-9"
|
|
160
|
-
style="fill:url(#linearGradient18613);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
|
161
|
-
d="m 130.56075,85.04143 c -1.47647,3.17228 -18.24916,29.13777 -21.66379,32.11329 -3.42112,2.98116 -7.7736,3.69559 -11.2143,3.82302 -3.4407,0.12743 -10.95954,-1.27434 -10.95954,-1.27434 l 4.7656,7.91063 h 5.2e-4 c 0.002,0.001 12.41225,10.17869 19.50733,-1.0945 10.41305,-16.54503 3.05221,-4.8499 9.84606,-15.81454 14.04378,-22.66534 9.3575,-24.44829 9.71812,-25.66356 z"
|
|
162
|
-
sodipodi:nodetypes="csscccssc" />
|
|
163
|
-
</g>
|
|
164
|
-
</g>
|
|
9
|
+
this.logo = `<svg
|
|
10
|
+
viewBox="0 0 135.46667 135.46667"
|
|
11
|
+
version="1.1"
|
|
12
|
+
id="svg7238"
|
|
13
|
+
sodipodi:docname="viral2-green.svg"
|
|
14
|
+
inkscape:export-filename="viral2-512.png"
|
|
15
|
+
inkscape:export-xdpi="96"
|
|
16
|
+
inkscape:export-ydpi="96"
|
|
17
|
+
inkscape:version="1.2.2 (732a01da63, 2022-12-09)"
|
|
18
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
19
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
20
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
21
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
22
|
+
xmlns:svg="http://www.w3.org/2000/svg">
|
|
23
|
+
<sodipodi:namedview
|
|
24
|
+
id="namedview7240"
|
|
25
|
+
pagecolor="#ffffff"
|
|
26
|
+
bordercolor="#000000"
|
|
27
|
+
borderopacity="0.25"
|
|
28
|
+
inkscape:showpageshadow="2"
|
|
29
|
+
inkscape:pageopacity="0.0"
|
|
30
|
+
inkscape:pagecheckerboard="0"
|
|
31
|
+
inkscape:deskcolor="#d1d1d1"
|
|
32
|
+
inkscape:document-units="px"
|
|
33
|
+
showgrid="false"
|
|
34
|
+
showborder="false"
|
|
35
|
+
inkscape:zoom="0.99327643"
|
|
36
|
+
inkscape:cx="-5.53723"
|
|
37
|
+
inkscape:cy="208.4012"
|
|
38
|
+
inkscape:window-width="1920"
|
|
39
|
+
inkscape:window-height="1025"
|
|
40
|
+
inkscape:window-x="-8"
|
|
41
|
+
inkscape:window-y="-8"
|
|
42
|
+
inkscape:window-maximized="1"
|
|
43
|
+
inkscape:current-layer="layer1" />
|
|
44
|
+
<defs
|
|
45
|
+
id="defs7235">
|
|
46
|
+
<linearGradient
|
|
47
|
+
inkscape:collect="always"
|
|
48
|
+
id="linearGradient1616">
|
|
49
|
+
<stop
|
|
50
|
+
style="stop-color:#56674d;stop-opacity:1;"
|
|
51
|
+
offset="0"
|
|
52
|
+
id="stop1612" />
|
|
53
|
+
<stop
|
|
54
|
+
style="stop-color:#ffffff;stop-opacity:0;"
|
|
55
|
+
offset="1"
|
|
56
|
+
id="stop1614" />
|
|
57
|
+
</linearGradient>
|
|
58
|
+
<linearGradient
|
|
59
|
+
inkscape:collect="always"
|
|
60
|
+
xlink:href="#linearGradient15690"
|
|
61
|
+
id="linearGradient18609"
|
|
62
|
+
gradientUnits="userSpaceOnUse"
|
|
63
|
+
gradientTransform="translate(-166.15654,32.013661)"
|
|
64
|
+
x1="307.17484"
|
|
65
|
+
y1="52.350281"
|
|
66
|
+
x2="326.05994"
|
|
67
|
+
y2="54.673866" />
|
|
68
|
+
<linearGradient
|
|
69
|
+
inkscape:collect="always"
|
|
70
|
+
id="linearGradient15690">
|
|
71
|
+
<stop
|
|
72
|
+
style="stop-color:#56674d;stop-opacity:1;"
|
|
73
|
+
offset="0"
|
|
74
|
+
id="stop15686" />
|
|
75
|
+
<stop
|
|
76
|
+
style="stop-color:#496e7c;stop-opacity:0;"
|
|
77
|
+
offset="1"
|
|
78
|
+
id="stop15688" />
|
|
79
|
+
</linearGradient>
|
|
80
|
+
<linearGradient
|
|
81
|
+
inkscape:collect="always"
|
|
82
|
+
xlink:href="#linearGradient15766"
|
|
83
|
+
id="linearGradient16111-2"
|
|
84
|
+
gradientUnits="userSpaceOnUse"
|
|
85
|
+
x1="94.716965"
|
|
86
|
+
y1="77.459938"
|
|
87
|
+
x2="120.0867"
|
|
88
|
+
y2="65.915489" />
|
|
89
|
+
<linearGradient
|
|
90
|
+
inkscape:collect="always"
|
|
91
|
+
id="linearGradient15766">
|
|
92
|
+
<stop
|
|
93
|
+
style="stop-color:#56674d;stop-opacity:1;"
|
|
94
|
+
offset="0"
|
|
95
|
+
id="stop15762" />
|
|
96
|
+
<stop
|
|
97
|
+
style="stop-color:#496e7c;stop-opacity:0;"
|
|
98
|
+
offset="1"
|
|
99
|
+
id="stop15764" />
|
|
100
|
+
</linearGradient>
|
|
101
|
+
<linearGradient
|
|
102
|
+
inkscape:collect="always"
|
|
103
|
+
xlink:href="#linearGradient15924"
|
|
104
|
+
id="linearGradient18611"
|
|
105
|
+
gradientUnits="userSpaceOnUse"
|
|
106
|
+
gradientTransform="translate(-166.15654,32.013661)"
|
|
107
|
+
x1="252.87965"
|
|
108
|
+
y1="104.78405"
|
|
109
|
+
x2="305.49805"
|
|
110
|
+
y2="61.56583" />
|
|
111
|
+
<linearGradient
|
|
112
|
+
inkscape:collect="always"
|
|
113
|
+
id="linearGradient15924">
|
|
114
|
+
<stop
|
|
115
|
+
style="stop-color:#56674d;stop-opacity:1;"
|
|
116
|
+
offset="0"
|
|
117
|
+
id="stop15920" />
|
|
118
|
+
<stop
|
|
119
|
+
style="stop-color:#ffffff;stop-opacity:0;"
|
|
120
|
+
offset="1"
|
|
121
|
+
id="stop15922" />
|
|
122
|
+
</linearGradient>
|
|
123
|
+
<linearGradient
|
|
124
|
+
inkscape:collect="always"
|
|
125
|
+
xlink:href="#linearGradient1616"
|
|
126
|
+
id="linearGradient18613"
|
|
127
|
+
gradientUnits="userSpaceOnUse"
|
|
128
|
+
gradientTransform="translate(-166.15654,32.013661)"
|
|
129
|
+
x1="262.83365"
|
|
130
|
+
y1="98.616089"
|
|
131
|
+
x2="303.40704"
|
|
132
|
+
y2="56.86591" />
|
|
133
|
+
</defs>
|
|
134
|
+
<g
|
|
135
|
+
inkscape:label="Layer 1"
|
|
136
|
+
inkscape:groupmode="layer"
|
|
137
|
+
id="layer1"
|
|
138
|
+
transform="translate(-81.132986,-92.575601)">
|
|
139
|
+
<g
|
|
140
|
+
id="g489"
|
|
141
|
+
transform="matrix(1.5365255,0,0,1.474116,-14.471343,-5.8524295)">
|
|
142
|
+
<path
|
|
143
|
+
id="path11327-0-0-0"
|
|
144
|
+
style="fill:url(#linearGradient18609);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
|
145
|
+
d="m 130.56075,85.04143 c 0.52476,0.26239 -18.03983,28.95537 -21.66379,32.11329 -3.42113,2.98116 -7.7736,3.69559 -11.21431,3.82302 -3.4407,0.12743 -10.95953,-1.27434 -10.95953,-1.27434 l 9.53171,15.82074 c 10.00038,14.90295 18.17614,-1.81278 29.33516,-18.06246 3.96568,-5.77479 7.78809,-12.47359 12.92015,-21.46123 4.04139,-7.0776 -7.96539,-10.97224 -7.94939,-10.95902 z" />
|
|
146
|
+
<path
|
|
147
|
+
style="fill:url(#linearGradient16111-2);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
|
148
|
+
d="m 95.83013,56.198256 16.05664,29.946913 c 0,0 -10.06725,0.637171 -12.870796,-1.019467 L 87.652946,64.863746 c 0,0 -2.527248,-8.028321 8.177184,-8.66549 z"
|
|
149
|
+
id="path11425-3-4-8"
|
|
150
|
+
sodipodi:nodetypes="ccccc"
|
|
151
|
+
class="UnoptimicedTransforms"
|
|
152
|
+
transform="translate(-14.07671,30.372343)" />
|
|
153
|
+
<path
|
|
154
|
+
id="path11327-0-5-6-6-4-3"
|
|
155
|
+
style="fill:url(#linearGradient18611);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
|
156
|
+
d="m 130.56075,85.04143 c -1.47647,3.17228 -18.24916,29.13777 -21.66379,32.11329 -3.42112,2.98116 -7.7736,3.69559 -11.2143,3.82302 -3.4407,0.12743 -10.95954,-1.27434 -10.95954,-1.27434 l 4.7656,7.91063 h 5.2e-4 c 0.002,0.001 10.85017,15.99897 19.37348,5.76286 2.99574,-3.59774 5.15135,-6.65533 6.98187,-9.54746 2.95629,-4.67075 5.06469,-8.90995 8.4947,-14.29586 14.90527,-23.40477 3.86084,-23.27687 4.22146,-24.49214 z"
|
|
157
|
+
sodipodi:nodetypes="csscccsssc" />
|
|
158
|
+
<path
|
|
159
|
+
id="path11327-0-5-6-6-7-5-9"
|
|
160
|
+
style="fill:url(#linearGradient18613);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
|
161
|
+
d="m 130.56075,85.04143 c -1.47647,3.17228 -18.24916,29.13777 -21.66379,32.11329 -3.42112,2.98116 -7.7736,3.69559 -11.2143,3.82302 -3.4407,0.12743 -10.95954,-1.27434 -10.95954,-1.27434 l 4.7656,7.91063 h 5.2e-4 c 0.002,0.001 12.41225,10.17869 19.50733,-1.0945 10.41305,-16.54503 3.05221,-4.8499 9.84606,-15.81454 14.04378,-22.66534 9.3575,-24.44829 9.71812,-25.66356 z"
|
|
162
|
+
sodipodi:nodetypes="csscccssc" />
|
|
163
|
+
</g>
|
|
164
|
+
</g>
|
|
165
165
|
</svg>`;
|
|
166
166
|
this.injectSpinner();
|
|
167
167
|
}
|
|
168
168
|
injectSpinner() {
|
|
169
169
|
// Create the @keyframes animation
|
|
170
|
-
const keyframes = `@keyframes spin {
|
|
171
|
-
0% { transform: rotate(0deg); }
|
|
172
|
-
100% { transform: rotate(360deg); }
|
|
170
|
+
const keyframes = `@keyframes spin {
|
|
171
|
+
0% { transform: rotate(0deg); }
|
|
172
|
+
100% { transform: rotate(360deg); }
|
|
173
173
|
}`;
|
|
174
174
|
// Create a style element and append the keyframes animation
|
|
175
175
|
const style = document.createElement('style');
|
|
@@ -10,7 +10,6 @@ export declare class ViralToolMeasure {
|
|
|
10
10
|
isActivated: boolean;
|
|
11
11
|
measures: ViralMeasure[];
|
|
12
12
|
private point1;
|
|
13
|
-
private tempPoint1;
|
|
14
13
|
private point2;
|
|
15
14
|
private tempPoint2;
|
|
16
15
|
private defaultSprite;
|
|
@@ -25,5 +24,6 @@ export declare class ViralToolMeasure {
|
|
|
25
24
|
private makeLine;
|
|
26
25
|
private makeDistanceSprite;
|
|
27
26
|
private dispose;
|
|
27
|
+
onKeyPress(evt: KeyboardEvent): void;
|
|
28
28
|
}
|
|
29
29
|
export {};
|
|
@@ -10,7 +10,6 @@ class ViralToolMeasure {
|
|
|
10
10
|
this.isActivated = false;
|
|
11
11
|
this.measures = [];
|
|
12
12
|
this.point1 = null;
|
|
13
|
-
this.tempPoint1 = null;
|
|
14
13
|
this.point2 = null;
|
|
15
14
|
this.tempPoint2 = null;
|
|
16
15
|
this.defaultSprite = this.makeSprite();
|
|
@@ -89,6 +88,8 @@ class ViralToolMeasure {
|
|
|
89
88
|
//distance sprite
|
|
90
89
|
let distanceSprite = this.makeDistanceSprite(this.point1, this.point2);
|
|
91
90
|
this.measureObject.add(distanceSprite);
|
|
91
|
+
//rerender
|
|
92
|
+
this.viralTools.viralViewerApi.viralRenderer.render();
|
|
92
93
|
}
|
|
93
94
|
else if (this.point1 && this.point2) {
|
|
94
95
|
this.resetPickedPoints();
|
|
@@ -134,7 +135,7 @@ class ViralToolMeasure {
|
|
|
134
135
|
let circleMaterial = new three_1.SpriteMaterial({
|
|
135
136
|
map: circleTexture,
|
|
136
137
|
sizeAttenuation: false,
|
|
137
|
-
|
|
138
|
+
depthWrite: false
|
|
138
139
|
});
|
|
139
140
|
let circleSprite = new three_1.Sprite(circleMaterial);
|
|
140
141
|
circleSprite.scale.setScalar(0.08);
|
|
@@ -143,7 +144,8 @@ class ViralToolMeasure {
|
|
|
143
144
|
makeLine(position1, position2) {
|
|
144
145
|
let lineMaterial = new three_1.LineBasicMaterial({
|
|
145
146
|
color: (0, threejs_1.hexToThreejsColor)(colors_1.Colors.primary),
|
|
146
|
-
linewidth: 10
|
|
147
|
+
linewidth: 10,
|
|
148
|
+
depthWrite: false
|
|
147
149
|
});
|
|
148
150
|
const points = [position1, position2];
|
|
149
151
|
const geometry = new three_1.BufferGeometry().setFromPoints(points);
|
|
@@ -193,7 +195,7 @@ class ViralToolMeasure {
|
|
|
193
195
|
let sprite = new three_1.Sprite(new three_1.SpriteMaterial({
|
|
194
196
|
map: texture,
|
|
195
197
|
sizeAttenuation: false,
|
|
196
|
-
|
|
198
|
+
depthWrite: false
|
|
197
199
|
}));
|
|
198
200
|
sprite.scale.set(0.002 * canvas.width * 0.7, 0.0025 * canvas.height * 0.7, 1);
|
|
199
201
|
let positionPoint = (0, threejs_1.middlePoint)(position1, position2);
|
|
@@ -206,6 +208,16 @@ class ViralToolMeasure {
|
|
|
206
208
|
(0, threejs_1.clearChildren)(this.tempMeasure);
|
|
207
209
|
this.viralTools.viralViewerApi.viralRenderer.render();
|
|
208
210
|
}
|
|
211
|
+
onKeyPress(evt) {
|
|
212
|
+
if (evt.code == "Escape") {
|
|
213
|
+
(0, threejs_1.clearChildren)(this.tempMeasure);
|
|
214
|
+
this.point1 = null;
|
|
215
|
+
this.point2 = null;
|
|
216
|
+
this.tempPoint2 = null;
|
|
217
|
+
//rerender
|
|
218
|
+
this.viralTools.viralViewerApi.viralRenderer.render();
|
|
219
|
+
}
|
|
220
|
+
}
|
|
209
221
|
}
|
|
210
222
|
exports.ViralToolMeasure = ViralToolMeasure;
|
|
211
223
|
//# sourceMappingURL=viral-tool-measure.js.map
|