aframe-babia-components 1.2.5 → 1.2.6
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/components/filters/babia-treebuilder.js +17 -12
- package/components/others/babia-camera.js +52 -40
- package/components/others/babia-experiment.js +457 -0
- package/components/others/babia-poster.js +383 -0
- package/components/others/babia-task.js +247 -0
- package/components/others/babia-ui.js +312 -147
- package/components/others/common.js +36 -5
- package/components/visualizers/babia-boats.js +708 -87
- package/components/visualizers/babia-network.js +268 -212
- package/dist/aframe-babia-components.js +20590 -18317
- package/dist/aframe-babia-components.min.js +3 -3
- package/dist/aframe-babia-components.min.js.map +1 -1
- package/docs/APIs/CHARTS.md +233 -207
- package/docs/APIs/OTHERS.md +143 -56
- package/docs/RELEASE_NOTES.md +5 -0
- package/docs/Tutorials/how_to_prepare_an_experiment.md +148 -0
- package/examples/assets/palettes/bluetored.jpg +0 -0
- package/examples/assets/textures/360-panorama.jpg +0 -0
- package/examples/assets/textures/floor-texture.jpg +0 -0
- package/examples/assets/textures/metalic-texture.jpg +0 -0
- package/examples/boats/boats_dependency/dependencieslist_cloudinary.json +1 -0
- package/examples/boats/boats_dependency/dependencieslist_express.json +4376 -0
- package/examples/boats/boats_dependency/dependencieslist_filestash.json +39533 -0
- package/examples/boats/boats_dependency/dependencieslist_ghdesktop.json +127660 -0
- package/examples/boats/boats_dependency/dependencieslist_karma.json +1 -0
- package/examples/boats/boats_dependency/dependencieslist_pm2.json +13726 -0
- package/examples/boats/boats_dependency/dependencieslist_portainer.json +41818 -0
- package/examples/boats/boats_dependency/dependencieslist_sh.json +5194 -0
- package/examples/boats/boats_dependency/experiment.html +277 -0
- package/examples/boats/boats_dependency/index.html +300 -0
- package/examples/boats/boats_dependency/index_gradient.html +209 -0
- package/examples/boats/boats_dependency/index_normalcity.html +207 -0
- package/examples/boats/boats_dependency/index_quarter_levels_01.html +213 -0
- package/examples/boats/boats_dependency/index_quarter_levels_02.html +213 -0
- package/examples/boats/boats_dependency/index_quarter_levels_03.html +213 -0
- package/examples/boats/boats_dependency/index_quarter_levels_querystring.html +243 -0
- package/examples/boats/boats_dependency/index_tree.html +211 -0
- package/examples/boats/boats_dependency/index_tree_gradient.html +212 -0
- package/examples/boats/boats_dependency/index_tree_wireframe.html +243 -0
- package/examples/charts/network_chart/network_chart.html +10 -2
- package/examples/charts/pie/index.html +3 -4
- package/examples/codecityjs/perceval2021/index.html +1 -1
- package/examples/codecityjs/projects_analysis/argouml_landscape.html +1 -1
- package/examples/codecityjs/projects_analysis/argouml_numfuns.html +3 -3
- package/examples/codecityjs/projects_analysis/argouml_table.html +1 -1
- package/examples/codecityjs/projects_analysis/argouml_tokens.html +1 -1
- package/examples/codecityjs/projects_analysis/experiment_interface.html +1 -1
- package/examples/codecityjs/projects_analysis/experiment_interface_task5.html +1 -1
- package/examples/codecityjs/projects_analysis/experiment_interface_vr_2021.html +1 -1
- package/examples/codecityjs/projects_analysis/experiment_interface_vr_task5.html +1 -1
- package/examples/codecityjs/projects_analysis/perceval_landscape.html +1 -1
- package/examples/codecityjs/projects_analysis/perceval_table.html +1 -1
- package/examples/dashboard/chaoss-dashboards.html +1 -1
- package/examples/dashboard/chaoss-issues.html +1 -1
- package/examples/dashboard/chaoss-pr.html +1 -1
- package/examples/dashboard/range.html +1 -1
- package/examples/dashboard/template.html +1 -1
- package/examples/experiment/city.html +352 -0
- package/examples/experiment/index.html +527 -0
- package/examples/experiment/pie.html +90 -0
- package/examples/experiment/sample-3s.mp3 +0 -0
- package/examples/experiment/sample.mp4 +0 -0
- package/examples/experiment/staticdata/80-percent-open-time-issues2.json +1 -0
- package/examples/experiment/staticdata/80-percent-open-time-pr.json +1 -0
- package/examples/experiment/staticdata/issues-by-organization.json +1 -0
- package/examples/experiment/staticdata/issues.json +1 -0
- package/examples/experiment/staticdata/jetuml_code_data.json +1 -0
- package/examples/experiment/staticdata/median-open-time-issues.json +1 -0
- package/examples/experiment/staticdata/median-open-time-pr.json +1 -0
- package/examples/experiment/staticdata/organizations-issues.json +1 -0
- package/examples/experiment/staticdata/organizations-pr.json +1 -0
- package/examples/experiment/staticdata/projects-issues.json +1 -0
- package/examples/experiment/staticdata/projects-pr.json +1 -0
- package/examples/experiment/staticdata/pull-requests-by-organization.json +1 -0
- package/examples/experiment/staticdata/pull-requests.json +1 -0
- package/examples/experiment/staticdata/repositories-issues-asignees.json +1 -0
- package/examples/experiment/staticdata/repositories-issues-avgdays.json +1 -0
- package/examples/experiment/staticdata/repositories-issues-count.json +1 -0
- package/examples/experiment/staticdata/repositories-issues-submitters.json +1 -0
- package/examples/experiment/staticdata/repositories-pr-asignees.json +1 -0
- package/examples/experiment/staticdata/repositories-pr-avgdays.json +1 -0
- package/examples/experiment/staticdata/repositories-pr-count.json +1 -0
- package/examples/experiment/staticdata/repositories-pr-submitters.json +1 -0
- package/examples/experiment/staticdata/status-issues.json +1 -0
- package/examples/experiment/staticdata/status-pr.json +1 -0
- package/examples/experiment/staticdata/submitter-issues-avgdays.json +1 -0
- package/examples/experiment/staticdata/submitter-issues-count.json +1 -0
- package/examples/experiment/staticdata/submitter-issues-repo.json +1 -0
- package/examples/experiment/staticdata/submitter-pr-avgdays.json +1 -0
- package/examples/experiment/staticdata/submitter-pr-count.json +1 -0
- package/examples/experiment/staticdata/submitter-pr-repo.json +1 -0
- package/examples/experiment/staticdata/submitters-issues.json +1 -0
- package/examples/experiment/staticdata/submitters-pr.json +1 -0
- package/examples/multi_boats/jetuml_evolution_experiment.html +1 -1
- package/index.js +23 -9
- package/package.json +1 -1
- package/examples/charts_querier/network_chart_querier/data.json +0 -123
- package/examples/charts_querier/network_chart_querier/links.json +0 -13
- package/examples/charts_querier/network_chart_querier/network_chart_querier.html +0 -68
- package/examples/charts_querier/network_chart_querier/network_chart_querier_nodes_links.html +0 -74
- package/examples/charts_querier/network_chart_querier/nodes.json +0 -12
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<title>Babia Template - Visualize your Data </title>
|
|
7
|
+
<meta name="description" content="Museum build aframe and babia">
|
|
8
|
+
</meta>
|
|
9
|
+
<script src="https://aframe.io/releases/1.2.0/aframe.min.js"></script>
|
|
10
|
+
<script
|
|
11
|
+
src="https://rawgit.com/fernandojsg/aframe-teleport-controls/master/dist/aframe-teleport-controls.min.js"></script>
|
|
12
|
+
<script src="https://unpkg.com/aframe-tooltip-component/dist/aframe-tooltip-component.min.js"></script>
|
|
13
|
+
<script src="../../../dist/aframe-babia-components.js"></script>
|
|
14
|
+
<link rel="stylesheet" href="../../../assets/gitlab-corner.css">
|
|
15
|
+
</head>
|
|
16
|
+
|
|
17
|
+
<body>
|
|
18
|
+
<a-scene id="scene" renderer="sortObjects: true" stats>
|
|
19
|
+
|
|
20
|
+
<!-- Assets -->
|
|
21
|
+
<a-assets>
|
|
22
|
+
<img id="sky" src="../../assets/textures/360-panorama.jpg">
|
|
23
|
+
<img id="floor" src="../../assets/textures/floor-texture.jpg">
|
|
24
|
+
<img id="metalic" src="../../assets/textures/metalic-texture.jpg">
|
|
25
|
+
<img id="wall" src="../../assets/textures/white-wall-texture.jpg">
|
|
26
|
+
<img id="colorlegend" src="../../assets/palettes/bluetored.jpg">
|
|
27
|
+
<a-asset-item id="door-obj" src="../../assets/door/door.obj"></a-asset-item>
|
|
28
|
+
<a-asset-item id="door-mtl" src="../../assets/door/door.mtl"></a-asset-item>
|
|
29
|
+
</a-assets>
|
|
30
|
+
|
|
31
|
+
<!-- Enviroment -->
|
|
32
|
+
<a-sky src="#sky"></a-sky>
|
|
33
|
+
|
|
34
|
+
<!-- Room -->
|
|
35
|
+
<a-entity id="Room">
|
|
36
|
+
<a-entity id="floorRoom" material="shader: flat; src: #floor"
|
|
37
|
+
geometry="primitive: box; width: 7; depth: 9; height: 0.1"></a-entity>
|
|
38
|
+
<!-- <a-entity id="ceiling" geometry="primitive: box; width: 7; depth: 9; height: 0.1"
|
|
39
|
+
position="0 3 0" material="shader: flat; src: #wall"></a-entity> -->
|
|
40
|
+
<a-entity id="door" obj-model="obj: #door-obj; mtl: #door-mtl" position="3.4 1.2 -2.7" rotation="-90 -90 0"
|
|
41
|
+
scale="0.013 0.013 0.011"></a-entity>
|
|
42
|
+
<a-entity id="wall1" position="3.65 1.5 0">
|
|
43
|
+
<a-entity id="wall1-1" geometry="primitive: box; width: 0.5; depth: 8.7; height: 3"
|
|
44
|
+
material="shader: flat; src: #wall"></a-entity>
|
|
45
|
+
</a-entity>
|
|
46
|
+
<a-entity id="wall2" position="-3.5 1.5 0">
|
|
47
|
+
<a-entity id="wall2-1" geometry="primitive: box; width: 0.3; depth: 8.7; height: 1"
|
|
48
|
+
material="shader: flat; src: #wall; repeat: 5 1" position="0 -1 0"></a-entity>
|
|
49
|
+
<a-entity id="wall2-2" geometry="primitive: box; width: 0.3; depth: 8.7; height: 0.3"
|
|
50
|
+
material="shader: flat; src: #wall; repeat: 5 1" position="0 1.35 0"></a-entity>
|
|
51
|
+
<a-entity id="wall2-3" geometry="primitive: box; width: 0.3; depth: 0.5; height: 1.7"
|
|
52
|
+
material="shader: flat; src: #wall; repeat: 1 3" position="0 0.35 0"></a-entity>
|
|
53
|
+
<a-entity id="wall2-4" geometry="primitive: box; width: 0.3; depth: 0.6; height: 1.7"
|
|
54
|
+
material="shader: flat; src: #wall; repeat: 1 3" position="0 0.35 4.35">
|
|
55
|
+
</a-entity>
|
|
56
|
+
<a-entity id="wall2-5" geometry="primitive: box; width: 0.3; depth: 0.6; height: 1.7"
|
|
57
|
+
material="shader: flat; src: #wall; repeat: 1 3" position="0 0.35 -4.35">
|
|
58
|
+
</a-entity>
|
|
59
|
+
</a-entity>
|
|
60
|
+
<a-entity id="wall3" position="0 1.5 -4.5">
|
|
61
|
+
<a-entity id="wall3-1" geometry="primitive: box; width: 7; depth: 0.3; height: 3"
|
|
62
|
+
material="shader: flat; src: #wall"></a-entity>
|
|
63
|
+
<a-entity id="column3" geometry="primitive: box; width: 0.3; depth: 0.3; height: 3"
|
|
64
|
+
material="shader: flat; src: #wall; repeat: 1 5" position="0 0 0.15"></a-entity>
|
|
65
|
+
</a-entity>
|
|
66
|
+
<a-entity id="wall4" position="0 1.5 4.5">
|
|
67
|
+
<a-entity id="wall4-1" geometry="primitive: box; width: 7.3; depth: 0.3; height: 1"
|
|
68
|
+
material="shader: flat; src: #wall; repeat: 5 1" position="0 -1 0"></a-entity>
|
|
69
|
+
<a-entity id="wall4-2" geometry="primitive: box; width: 7.3; depth: 0.3; height: 0.3"
|
|
70
|
+
material="shader: flat; src: #wall; repeat: 5 1" position="0 1.35 0"></a-entity>
|
|
71
|
+
<a-entity id="wall4-3" geometry="primitive: box; width: 0.5; depth: 0.3; height: 1.7"
|
|
72
|
+
material="shader: flat; src: #wall; repeat: 1 3" position="0 0.35 0"></a-entity>
|
|
73
|
+
<a-entity id="wall4-4" geometry="primitive: box; width: 0.3; depth: 0.3; height: 1.7"
|
|
74
|
+
material="shader: flat; src: #wall; repeat: 1 3" position="-3.2 0.35 0">
|
|
75
|
+
</a-entity>
|
|
76
|
+
<a-entity id="wall4-5" geometry="primitive: box; width: 0.6; depth: 0.3; height: 1.7"
|
|
77
|
+
material="shader: flat; src: #wall; repeat: 1 3" position="3.4 0.35 0">
|
|
78
|
+
</a-entity>
|
|
79
|
+
<a-entity id="column4" geometry="primitive: box; width: 0.3; depth: 0.3; height: 3"
|
|
80
|
+
material="shader: flat; src: #wall; repeat: 1 5" position="0 0 -0.15">
|
|
81
|
+
</a-entity>
|
|
82
|
+
</a-entity>
|
|
83
|
+
</a-entity>
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
<!-- Querier Components -->
|
|
87
|
+
<!-- Slider -->
|
|
88
|
+
|
|
89
|
+
<!-- Querier -->
|
|
90
|
+
<a-entity id="portainerquerier" babia-queryjson="url:./dependencieslist_portainer.json;"></a-entity>
|
|
91
|
+
<a-entity id="cloudinaryquerier" babia-queryjson="url:./dependencieslist_cloudinary.json;"></a-entity>
|
|
92
|
+
<a-entity id="aframequerier" babia-queryjson="url:./dependencieslist_sh.json;"></a-entity>
|
|
93
|
+
<a-entity id="expressquerier" babia-queryjson="url:./dependencieslist_express.json;"></a-entity>
|
|
94
|
+
<a-entity id="karmaquerier" babia-queryjson="url:./dependencieslist_karma.json;"></a-entity>
|
|
95
|
+
<a-entity id="pm2querier" babia-queryjson="url:./dependencieslist_pm2.json;"></a-entity>
|
|
96
|
+
<a-entity id="filestashquerier" babia-queryjson="url:./dependencieslist_filestash.json;"></a-entity>
|
|
97
|
+
<a-entity id="ghquerier" babia-queryjson="url:./dependencieslist_ghdesktop.json;"></a-entity>
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
<!-- Treebuilder -->
|
|
101
|
+
<a-entity id="ghdesktop" babia-treebuilder="field: parentsPath; split_by: /; from: ghquerier">
|
|
102
|
+
</a-entity>
|
|
103
|
+
<!-- <a-entity id="filestash" babia-treebuilder="field: parentsPath; split_by: /; from: filestashquerier">
|
|
104
|
+
</a-entity> -->
|
|
105
|
+
<a-entity id="portainer" babia-treebuilder="field: parentsPath; split_by: /; from: portainerquerier">
|
|
106
|
+
</a-entity>
|
|
107
|
+
<!-- <a-entity id="cloudinary" babia-treebuilder="field: parentsPath; split_by: /; from: cloudinaryquerier">
|
|
108
|
+
</a-entity>
|
|
109
|
+
<a-entity id="express" babia-treebuilder="field: parentsPath; split_by: /; from: expressquerier">
|
|
110
|
+
</a-entity> -->
|
|
111
|
+
<a-entity id="pm2" babia-treebuilder="field: parentsPath; split_by: /; from: pm2querier"></a-entity>
|
|
112
|
+
<a-entity id="sortinghat" babia-treebuilder="field: parentsPath; split_by: /; from: aframequerier">
|
|
113
|
+
</a-entity>
|
|
114
|
+
<!-- <a-entity id="karma" babia-treebuilder="field: parentsPath; split_by: /; from: karmaquerier"></a-entity> -->
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
<!-- Visualizer Components -->
|
|
121
|
+
<a-entity id="boats"
|
|
122
|
+
babia-boats="from: sortinghat; area: loc/age; height: age_days; color: license; height_building_legend: -0.5; extra: 0.01; treeQuartersLevelHeight: 0.1;
|
|
123
|
+
highlightQuarter: false; treeLayout: true; gradientBaseColor: true; metricsInfoId: boatsmetricsinfo; treeFixQuarterHeight: true; treeHideOneSonQuarters: true;
|
|
124
|
+
legend_scale: 0.25; height_quarter_legend_box: 3; height_quarter_legend_title: 1.5; legend_lookat: [laser-controls]; zone_elevation: 0.01; maxBuildingHeight: 0.4; minBuildingHeight: 0.0025; building_separation: 0.2; autoscale: true; baseAlpha: 0.6; highlightBuildingByField: depName; transparent20ByRepeatedField: depName; numericColorLegendId: babianumericcolorlegend"
|
|
125
|
+
position="0 0.5 -1" scale="1 1 1" rotation="0 180 0"></a-entity>
|
|
126
|
+
|
|
127
|
+
<a-entity id="interface"
|
|
128
|
+
babia-ui="target: boats; showOnly: height:age_days, area:loc/age, area:size/age, area:ncommits/age, color:license, color:timesInstalled, color:timesAppears, color:last_act_days, color:ncommits_ly, color:ncommiters_ly, color:nvuln, color:nissues_ratio; hideRows: depth, width; hideFields: noMetric, level, timesAppearsSameId, nvuln, nvuln_critic, nvuln_high, nvuln_mod, nvuln_low, nvuln_info; customQuerierLabel: Project; customAttributeSwitch: transparent20ByRepeatedField:depName, wireframeByRepeatedField:depName; customAttributeLabel: transparent20ByRepeatedField:Transparency, wireframeByRepeatedField:Wireframe"
|
|
129
|
+
position="-3 1.5 0" rotation="0 90 0" scale="0.1 0.1 0.1">
|
|
130
|
+
</a-entity>
|
|
131
|
+
|
|
132
|
+
<!-- <a-entity id="slider" babia-slider="min: 0; max: 20; value: 10; size: 2"
|
|
133
|
+
position="-3 2.1 1" rotation="0 90 0" scale="1 1 1"></a-entity> -->
|
|
134
|
+
<a-entity id="bardescription" position="2.5 0.6 0.6" rotation="-30 -90 0" scale="0.6 0.6 0.6">
|
|
135
|
+
<!-- Close tooltips -->
|
|
136
|
+
<a-plane id="rotatecity" visible="false" babia-lookat="[laser-controls]" class="babiaxraycasterclass"
|
|
137
|
+
scale="0.8 0.8 0.8" position="0 3 0" geometry="primitive: plane; width: 2; height: 0.5" color="#012752"
|
|
138
|
+
text="value: Rotate City; color: white; align: center; wrapCount: 30; width: 3.6; transparent: false; alphaTest: 6; opacity: 6">
|
|
139
|
+
</a-plane>
|
|
140
|
+
<a-plane id="closelegends" babia-lookat="[laser-controls]" class="babiaxraycasterclass" scale="0.8 0.8 0.8" position="0 1.5 0" geometry="primitive: plane; width: 2; height: 0.5" color="#012752"
|
|
141
|
+
text="value: Close All Tooltips; color: white; align: center; wrapCount: 30; width: 3.6; transparent: false; alphaTest: 6; opacity: 6">
|
|
142
|
+
</a-plane>
|
|
143
|
+
<a-plane id="wireframe" visible="false" babia-lookat="[laser-controls]" class="babiaxraycasterclass"
|
|
144
|
+
scale="0.8 0.8 0.8" position="0 2.5 0" geometry="primitive: plane; width: 2; height: 0.5"
|
|
145
|
+
color="#012752"
|
|
146
|
+
text="value: Wireframe; color: white; align: center; wrapCount: 30; width: 3.6; transparent: false; alphaTest: 6; opacity: 6">
|
|
147
|
+
</a-plane>
|
|
148
|
+
<!-- <a-plane id="transparencies80" babia-lookat="[laser-controls]" class="babiaxraycasterclass"
|
|
149
|
+
scale="0.8 0.8 0.8" position="0 2 0" geometry="primitive: plane; width: 2; height: 0.5" color="#012752"
|
|
150
|
+
text="value: Transparencies 80%; color: white; align: center; wrapCount: 30; width: 3.6; transparent: false; alphaTest: 6; opacity: 6">
|
|
151
|
+
</a-plane> -->
|
|
152
|
+
<a-plane id="transparencies20" visible="false" babia-lookat="[laser-controls]" class="babiaxraycasterclass"
|
|
153
|
+
scale="0.8 0.8 0.8" position="0 1.5 0" geometry="primitive: plane; width: 2; height: 0.5"
|
|
154
|
+
color="#012752"
|
|
155
|
+
text="value: Transparencies; color: white; align: center; wrapCount: 30; width: 3.6; transparent: false; alphaTest: 6; opacity: 6">
|
|
156
|
+
</a-plane>
|
|
157
|
+
<a-plane id="babianumericcolorlegend" src="#colorlegend" height="0.5" width="1" position="0 -0.7 0.1">
|
|
158
|
+
</a-plane>
|
|
159
|
+
<a-box src="#floor" height="2.2" width="3.2" depth="0.1" position="0 0 0"></a-box>
|
|
160
|
+
<a-box src="#metalic" height="2" width="3" depth="0.05" position="0 0 0.05"></a-box>
|
|
161
|
+
<a-entity position="0 0.1 0.1" id="boatsmetricsinfo"></a-entity>
|
|
162
|
+
</a-entity>
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
<!-- Lights -->
|
|
166
|
+
<a-entity position="5 50 0" light="type: hemisphere; color: #CEE4F0; intensity: 1; groundColor: #454545">
|
|
167
|
+
</a-entity>
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
<!-- Controls and Camera -->
|
|
172
|
+
<a-entity id="cameraRig" position="0 1.6 3">
|
|
173
|
+
<a-entity id="head" camera babia-camera="raycasterMouse: .babiaxraycasterclass;
|
|
174
|
+
raycasterHand: .babiaxraycasterclass; teleportCollision: #floorRoom" look-controls
|
|
175
|
+
wasd-controls="fly: true; acceleration: 10">
|
|
176
|
+
<a-entity></a-entity>
|
|
177
|
+
</a-entity>
|
|
178
|
+
</a-entity>
|
|
179
|
+
|
|
180
|
+
</a-scene>
|
|
181
|
+
<div class="gitlab-corner-wrapper"><a
|
|
182
|
+
href="https://gitlab.com/babiaxr/aframe-babia-components/-/blob/master/examples/" class="gitlab-corner"
|
|
183
|
+
aria-label="View source on GitLab"><svg id="logo_art" data-name="logo art"
|
|
184
|
+
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 586 559">
|
|
185
|
+
<g id="g44">
|
|
186
|
+
<path id="path46" class="cls-1"
|
|
187
|
+
d="M461.17,301.83l-18.91-58.12L404.84,128.43a6.47,6.47,0,0,0-12.27,0L355.15,243.64H230.82L193.4,128.43a6.46,6.46,0,0,0-12.26,0L143.78,243.64l-18.91,58.19a12.88,12.88,0,0,0,4.66,14.39L293,435,456.44,316.22a12.9,12.9,0,0,0,4.73-14.39" />
|
|
188
|
+
</g>
|
|
189
|
+
<g id="g48">
|
|
190
|
+
<path id="path50" class="cls-2" d="M293,434.91h0l62.16-191.28H230.87L293,434.91Z" />
|
|
191
|
+
</g>
|
|
192
|
+
<g id="g56">
|
|
193
|
+
<path id="path58" class="cls-1" d="M293,434.91,230.82,243.63h-87L293,434.91Z" />
|
|
194
|
+
</g>
|
|
195
|
+
<g id="g64">
|
|
196
|
+
<path id="path66" class="cls-3"
|
|
197
|
+
d="M143.75,243.69h0l-18.91,58.12a12.88,12.88,0,0,0,4.66,14.39L293,435,143.75,243.69Z" />
|
|
198
|
+
</g>
|
|
199
|
+
<g id="g72">
|
|
200
|
+
<path id="path74" class="cls-2"
|
|
201
|
+
d="M143.78,243.69h87.11L193.4,128.49a6.47,6.47,0,0,0-12.27,0l-37.35,115.2Z" />
|
|
202
|
+
</g>
|
|
203
|
+
<g id="g76">
|
|
204
|
+
<path id="path78" class="cls-1" d="M293,434.91l62.16-191.28H442.3L293,434.91Z" />
|
|
205
|
+
</g>
|
|
206
|
+
<g id="g80">
|
|
207
|
+
<path id="path82" class="cls-3"
|
|
208
|
+
d="M442.24,243.69h0l18.91,58.12a12.85,12.85,0,0,1-4.66,14.39L293,434.91l149.2-191.22Z" />
|
|
209
|
+
</g>
|
|
210
|
+
<g id="g84">
|
|
211
|
+
<path id="path86" class="cls-2"
|
|
212
|
+
d="M442.28,243.69h-87.1l37.42-115.2a6.46,6.46,0,0,1,12.26,0l37.42,115.2Z" />
|
|
213
|
+
</g>
|
|
214
|
+
</svg></a></div>
|
|
215
|
+
|
|
216
|
+
<script>
|
|
217
|
+
document.getElementById("rotatecity").addEventListener('click', function (event) {
|
|
218
|
+
let ewl = document.getElementById("boats")
|
|
219
|
+
let currentRotation = ewl.getAttribute("rotation") || { x: 0, y: 0, z: 0 }
|
|
220
|
+
let currentPosition = ewl.getAttribute("position")
|
|
221
|
+
let newZrotation = currentRotation.z + 90
|
|
222
|
+
ewl.setAttribute("rotation", { x: currentRotation.x, y: currentRotation.y, z: newZrotation })
|
|
223
|
+
if (newZrotation === 180) {
|
|
224
|
+
ewl.setAttribute("position", { x: currentPosition.x + 1.5, y: currentPosition.y + 1.3, z: currentPosition.z })
|
|
225
|
+
} else if (newZrotation === 360) {
|
|
226
|
+
ewl.setAttribute("rotation", { x: currentRotation.x, y: currentRotation.y, z: 0 })
|
|
227
|
+
ewl.setAttribute("position", { x: currentPosition.x - 1.5, y: currentPosition.y - 1.3, z: currentPosition.z })
|
|
228
|
+
} else if (newZrotation === 90) {
|
|
229
|
+
ewl.setAttribute("position", { x: currentPosition.x - 1.5, y: currentPosition.y + 1.2, z: currentPosition.z })
|
|
230
|
+
} else if (newZrotation === 270) {
|
|
231
|
+
ewl.setAttribute("position", { x: currentPosition.x + 1.5, y: currentPosition.y - 1.2, z: currentPosition.z })
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
}, false);
|
|
235
|
+
|
|
236
|
+
document.getElementById("closelegends").addEventListener('click', function (event) {
|
|
237
|
+
let ewl = document.getElementById("boats").components['babia-boats'].entitiesWithLegend
|
|
238
|
+
let newEwl = []
|
|
239
|
+
for (let i = 0; i < ewl.length; i++) {
|
|
240
|
+
newEwl.push(ewl[i])
|
|
241
|
+
}
|
|
242
|
+
for (let v = 0; v < newEwl.length; v++) {
|
|
243
|
+
newEwl[v].entity.click()
|
|
244
|
+
}
|
|
245
|
+
}, false);
|
|
246
|
+
|
|
247
|
+
</script>
|
|
248
|
+
|
|
249
|
+
<script>
|
|
250
|
+
// Get Query string values
|
|
251
|
+
function getValueFromQueryString(string) {
|
|
252
|
+
string = string.replace(/[\[\]]/g, '\\$&');
|
|
253
|
+
var regex = new RegExp('[?&]' + string + '(=([^&#]*)|&|#|$)'),
|
|
254
|
+
results = regex.exec(window.location.href);
|
|
255
|
+
if (!results) return null;
|
|
256
|
+
if (!results[2]) return '';
|
|
257
|
+
return decodeURIComponent(results[2].replace(/\+/g, ' '));
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/* Set username and password for ElasticSearch queriers*/
|
|
261
|
+
let buildingsep = getValueFromQueryString('buildingsep');
|
|
262
|
+
let quarterheight = getValueFromQueryString('quarterheight');
|
|
263
|
+
let extra = getValueFromQueryString('extra');
|
|
264
|
+
if (buildingsep) {
|
|
265
|
+
document.getElementById("boats").setAttribute('babia-boats', 'building_separation', parseFloat(buildingsep))
|
|
266
|
+
}
|
|
267
|
+
if (quarterheight) {
|
|
268
|
+
document.getElementById("boats").setAttribute('babia-boats', 'treeQuartersLevelHeight', parseFloat(quarterheight))
|
|
269
|
+
}
|
|
270
|
+
if (extra) {
|
|
271
|
+
document.getElementById("boats").setAttribute('babia-boats', 'extra', parseFloat(extra))
|
|
272
|
+
}
|
|
273
|
+
</script>
|
|
274
|
+
|
|
275
|
+
</body>
|
|
276
|
+
|
|
277
|
+
</html>
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<title>Babia Template - Visualize your Data </title>
|
|
7
|
+
<meta name="description" content="Museum build aframe and babia">
|
|
8
|
+
</meta>
|
|
9
|
+
<script src="https://aframe.io/releases/1.2.0/aframe.min.js"></script>
|
|
10
|
+
<script
|
|
11
|
+
src="https://rawgit.com/fernandojsg/aframe-teleport-controls/master/dist/aframe-teleport-controls.min.js"></script>
|
|
12
|
+
<script src="https://unpkg.com/aframe-tooltip-component/dist/aframe-tooltip-component.min.js"></script>
|
|
13
|
+
<script src="../../../dist/aframe-babia-components.js"></script>
|
|
14
|
+
<link rel="stylesheet" href="../../../assets/gitlab-corner.css">
|
|
15
|
+
</head>
|
|
16
|
+
|
|
17
|
+
<body>
|
|
18
|
+
<a-scene id="scene" renderer="sortObjects: true" stats>
|
|
19
|
+
|
|
20
|
+
<!-- Assets -->
|
|
21
|
+
<a-assets>
|
|
22
|
+
<img id="sky" src="../../assets/textures/360-panorama.jpg">
|
|
23
|
+
<img id="floor" src="../../assets/textures/floor-texture.jpg">
|
|
24
|
+
<img id="metalic" src="../../assets/textures/metalic-texture.jpg">
|
|
25
|
+
<img id="wall" src="../../assets/textures/white-wall-texture.jpg">
|
|
26
|
+
<img id="colorlegend" src="../../assets/palettes/bluetored.jpg">
|
|
27
|
+
<a-asset-item id="door-obj" src="../../assets/door/door.obj"></a-asset-item>
|
|
28
|
+
<a-asset-item id="door-mtl" src="../../assets/door/door.mtl"></a-asset-item>
|
|
29
|
+
</a-assets>
|
|
30
|
+
|
|
31
|
+
<!-- Enviroment -->
|
|
32
|
+
<a-sky src="#sky"></a-sky>
|
|
33
|
+
|
|
34
|
+
<!-- Room -->
|
|
35
|
+
<a-entity id="Room">
|
|
36
|
+
<a-entity id="floorRoom" material="shader: flat; src: #floor"
|
|
37
|
+
geometry="primitive: box; width: 7; depth: 9; height: 0.1"></a-entity>
|
|
38
|
+
<!-- <a-entity id="ceiling" geometry="primitive: box; width: 7; depth: 9; height: 0.1"
|
|
39
|
+
position="0 3 0" material="shader: flat; src: #wall"></a-entity> -->
|
|
40
|
+
<a-entity id="door" obj-model="obj: #door-obj; mtl: #door-mtl" position="3.4 1.2 -2.7" rotation="-90 -90 0"
|
|
41
|
+
scale="0.013 0.013 0.011"></a-entity>
|
|
42
|
+
<a-entity id="wall1" position="3.65 1.5 0">
|
|
43
|
+
<a-entity id="wall1-1" geometry="primitive: box; width: 0.5; depth: 8.7; height: 3"
|
|
44
|
+
material="shader: flat; src: #wall"></a-entity>
|
|
45
|
+
</a-entity>
|
|
46
|
+
<a-entity id="wall2" position="-3.5 1.5 0">
|
|
47
|
+
<a-entity id="wall2-1" geometry="primitive: box; width: 0.3; depth: 8.7; height: 1"
|
|
48
|
+
material="shader: flat; src: #wall; repeat: 5 1" position="0 -1 0"></a-entity>
|
|
49
|
+
<a-entity id="wall2-2" geometry="primitive: box; width: 0.3; depth: 8.7; height: 0.3"
|
|
50
|
+
material="shader: flat; src: #wall; repeat: 5 1" position="0 1.35 0"></a-entity>
|
|
51
|
+
<a-entity id="wall2-3" geometry="primitive: box; width: 0.3; depth: 0.5; height: 1.7"
|
|
52
|
+
material="shader: flat; src: #wall; repeat: 1 3" position="0 0.35 0"></a-entity>
|
|
53
|
+
<a-entity id="wall2-4" geometry="primitive: box; width: 0.3; depth: 0.6; height: 1.7"
|
|
54
|
+
material="shader: flat; src: #wall; repeat: 1 3" position="0 0.35 4.35">
|
|
55
|
+
</a-entity>
|
|
56
|
+
<a-entity id="wall2-5" geometry="primitive: box; width: 0.3; depth: 0.6; height: 1.7"
|
|
57
|
+
material="shader: flat; src: #wall; repeat: 1 3" position="0 0.35 -4.35">
|
|
58
|
+
</a-entity>
|
|
59
|
+
</a-entity>
|
|
60
|
+
<a-entity id="wall3" position="0 1.5 -4.5">
|
|
61
|
+
<a-entity id="wall3-1" geometry="primitive: box; width: 7; depth: 0.3; height: 3"
|
|
62
|
+
material="shader: flat; src: #wall"></a-entity>
|
|
63
|
+
<a-entity id="column3" geometry="primitive: box; width: 0.3; depth: 0.3; height: 3"
|
|
64
|
+
material="shader: flat; src: #wall; repeat: 1 5" position="0 0 0.15"></a-entity>
|
|
65
|
+
</a-entity>
|
|
66
|
+
<a-entity id="wall4" position="0 1.5 4.5">
|
|
67
|
+
<a-entity id="wall4-1" geometry="primitive: box; width: 7.3; depth: 0.3; height: 1"
|
|
68
|
+
material="shader: flat; src: #wall; repeat: 5 1" position="0 -1 0"></a-entity>
|
|
69
|
+
<a-entity id="wall4-2" geometry="primitive: box; width: 7.3; depth: 0.3; height: 0.3"
|
|
70
|
+
material="shader: flat; src: #wall; repeat: 5 1" position="0 1.35 0"></a-entity>
|
|
71
|
+
<a-entity id="wall4-3" geometry="primitive: box; width: 0.5; depth: 0.3; height: 1.7"
|
|
72
|
+
material="shader: flat; src: #wall; repeat: 1 3" position="0 0.35 0"></a-entity>
|
|
73
|
+
<a-entity id="wall4-4" geometry="primitive: box; width: 0.3; depth: 0.3; height: 1.7"
|
|
74
|
+
material="shader: flat; src: #wall; repeat: 1 3" position="-3.2 0.35 0">
|
|
75
|
+
</a-entity>
|
|
76
|
+
<a-entity id="wall4-5" geometry="primitive: box; width: 0.6; depth: 0.3; height: 1.7"
|
|
77
|
+
material="shader: flat; src: #wall; repeat: 1 3" position="3.4 0.35 0">
|
|
78
|
+
</a-entity>
|
|
79
|
+
<a-entity id="column4" geometry="primitive: box; width: 0.3; depth: 0.3; height: 3"
|
|
80
|
+
material="shader: flat; src: #wall; repeat: 1 5" position="0 0 -0.15">
|
|
81
|
+
</a-entity>
|
|
82
|
+
</a-entity>
|
|
83
|
+
</a-entity>
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
<!-- Querier Components -->
|
|
87
|
+
<!-- Slider -->
|
|
88
|
+
|
|
89
|
+
<!-- Querier -->
|
|
90
|
+
<a-entity id="portainerquerier" babia-queryjson="url:./dependencieslist_portainer.json;"></a-entity>
|
|
91
|
+
<a-entity id="cloudinaryquerier" babia-queryjson="url:./dependencieslist_cloudinary.json;"></a-entity>
|
|
92
|
+
<a-entity id="aframequerier" babia-queryjson="url:./dependencieslist_sh.json;"></a-entity>
|
|
93
|
+
<a-entity id="expressquerier" babia-queryjson="url:./dependencieslist_express.json;"></a-entity>
|
|
94
|
+
<a-entity id="karmaquerier" babia-queryjson="url:./dependencieslist_karma.json;"></a-entity>
|
|
95
|
+
<a-entity id="pm2querier" babia-queryjson="url:./dependencieslist_pm2.json;"></a-entity>
|
|
96
|
+
<a-entity id="filestashquerier" babia-queryjson="url:./dependencieslist_filestash.json;"></a-entity>
|
|
97
|
+
<a-entity id="ghquerier" babia-queryjson="url:./dependencieslist_ghdesktop.json;"></a-entity>
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
<!-- Treebuilder -->
|
|
101
|
+
<a-entity id="ghdesktop" babia-treebuilder="field: parentsPath; split_by: /; from: ghquerier">
|
|
102
|
+
</a-entity>
|
|
103
|
+
<a-entity id="filestash" babia-treebuilder="field: parentsPath; split_by: /; from: filestashquerier">
|
|
104
|
+
</a-entity>
|
|
105
|
+
<a-entity id="portainer" babia-treebuilder="field: parentsPath; split_by: /; from: portainerquerier">
|
|
106
|
+
</a-entity>
|
|
107
|
+
<!-- <a-entity id="cloudinary" babia-treebuilder="field: parentsPath; split_by: /; from: cloudinaryquerier">
|
|
108
|
+
</a-entity>
|
|
109
|
+
<a-entity id="express" babia-treebuilder="field: parentsPath; split_by: /; from: expressquerier">
|
|
110
|
+
</a-entity> -->
|
|
111
|
+
<a-entity id="sortinghat" babia-treebuilder="field: parentsPath; split_by: /; from: aframequerier">
|
|
112
|
+
</a-entity>
|
|
113
|
+
<!-- <a-entity id="karma" babia-treebuilder="field: parentsPath; split_by: /; from: karmaquerier"></a-entity>
|
|
114
|
+
<a-entity id="pm2" babia-treebuilder="field: parentsPath; split_by: /; from: pm2querier"></a-entity> -->
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
<!-- Visualizer Components -->
|
|
120
|
+
<a-entity id="boats"
|
|
121
|
+
babia-boats="from: sortinghat; area: loc_age; height: age_days; color: last_act_days; height_building_legend: -0.5; extra: 0.01; treeQuartersLevelHeight: 0.1;
|
|
122
|
+
highlightQuarter: false; treeLayout: true; gradientBaseColor: true; metricsInfoId: boatsmetricsinfo; treeFixQuarterHeight: true; treeHideOneSonQuarters: true;
|
|
123
|
+
legend_scale: 0.25; height_quarter_legend_box: 3; height_quarter_legend_title: 1.5; legend_lookat: [laser-controls]; zone_elevation: 0.01; maxBuildingHeight: 0.4; minBuildingHeight: 0.0025; building_separation: 0.2; autoscale: true; baseAlpha: 0.6; highlightBuildingByField: depName; transparent20ByRepeatedField: depName;"
|
|
124
|
+
position="0 0.3 -1" scale="1 1 1" rotation="0 180 0"></a-entity>
|
|
125
|
+
|
|
126
|
+
<a-entity id="interface"
|
|
127
|
+
babia-ui="target: boats; showOnly: height:age_days, height:ncommits, area:loc_age, area:size_age, area:ncommits/age, color:license, color:timesInstalled, color:timesAppears, color:last_act, color:last_act_days, color:nvuln, color:ncommits_ly, color:commiters_ly, color:nissues_ratio; hideRows: depth, width; hideFields: noMetric, level, timesAppearsSameId, nvuln, nvuln_critic, nvuln_high, nvuln_mod, nvuln_low, nvuln_info; customQuerierLabel: Project; customAttributeSwitch: transparent20ByRepeatedField:depName, wireframeByRepeatedField:depName; customAttributeLabel: transparent20ByRepeatedField:Transparency, wireframeByRepeatedField:Wireframe"
|
|
128
|
+
position="-3 1.5 0" rotation="0 90 0" scale="0.1 0.1 0.1">
|
|
129
|
+
</a-entity>
|
|
130
|
+
|
|
131
|
+
<!-- <a-entity id="slider" babia-slider="min: 0; max: 20; value: 10; size: 2"
|
|
132
|
+
position="-3 2.1 1" rotation="0 90 0" scale="1 1 1"></a-entity> -->
|
|
133
|
+
<a-entity id="bardescription" position="2.5 0.6 0.6" rotation="-30 -90 0" scale="0.6 0.6 0.6">
|
|
134
|
+
<!-- Close tooltips -->
|
|
135
|
+
<a-plane id="rotatecity" visible="false" babia-lookat="[laser-controls]" class="babiaxraycasterclass"
|
|
136
|
+
scale="0.8 0.8 0.8" position="0 3 0" geometry="primitive: plane; width: 2; height: 0.5" color="#012752"
|
|
137
|
+
text="value: Rotate City; color: white; align: center; wrapCount: 30; width: 3.6; transparent: false; alphaTest: 6; opacity: 6">
|
|
138
|
+
</a-plane>
|
|
139
|
+
<a-plane id="wireframe" visible="false" babia-lookat="[laser-controls]" class="babiaxraycasterclass" scale="0.8 0.8 0.8"
|
|
140
|
+
position="0 2.5 0" geometry="primitive: plane; width: 2; height: 0.5" color="#012752"
|
|
141
|
+
text="value: Wireframe; color: white; align: center; wrapCount: 30; width: 3.6; transparent: false; alphaTest: 6; opacity: 6">
|
|
142
|
+
</a-plane>
|
|
143
|
+
<!-- <a-plane id="transparencies80" babia-lookat="[laser-controls]" class="babiaxraycasterclass"
|
|
144
|
+
scale="0.8 0.8 0.8" position="0 2 0" geometry="primitive: plane; width: 2; height: 0.5" color="#012752"
|
|
145
|
+
text="value: Transparencies 80%; color: white; align: center; wrapCount: 30; width: 3.6; transparent: false; alphaTest: 6; opacity: 6">
|
|
146
|
+
</a-plane> -->
|
|
147
|
+
<a-plane id="transparencies20" visible="false" babia-lookat="[laser-controls]" class="babiaxraycasterclass"
|
|
148
|
+
scale="0.8 0.8 0.8" position="0 1.5 0" geometry="primitive: plane; width: 2; height: 0.5"
|
|
149
|
+
color="#012752"
|
|
150
|
+
text="value: Transparencies; color: white; align: center; wrapCount: 30; width: 3.6; transparent: false; alphaTest: 6; opacity: 6">
|
|
151
|
+
</a-plane>
|
|
152
|
+
<a-plane src="#colorlegend" height="0.5" width="1" position="0 -0.7 0.1"></a-plane>
|
|
153
|
+
<a-box src="#floor" height="2.2" width="3.2" depth="0.1" position="0 0 0"></a-box>
|
|
154
|
+
<a-box src="#metalic" height="2" width="3" depth="0.05" position="0 0 0.05"></a-box>
|
|
155
|
+
<a-entity position="0 0.1 0.1" id="boatsmetricsinfo"></a-entity>
|
|
156
|
+
</a-entity>
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
<!-- Lights -->
|
|
160
|
+
<a-entity position="5 50 0" light="type: hemisphere; color: #CEE4F0; intensity: 1; groundColor: #454545">
|
|
161
|
+
</a-entity>
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
<!-- Controls and Camera -->
|
|
166
|
+
<a-entity id="cameraRig" position="0 1.6 3">
|
|
167
|
+
<a-entity id="head" camera babia-camera="raycasterMouse: .babiaxraycasterclass;
|
|
168
|
+
raycasterHand: .babiaxraycasterclass; teleportCollision: #floorRoom" look-controls
|
|
169
|
+
wasd-controls="fly: true; acceleration: 10">
|
|
170
|
+
<a-entity></a-entity>
|
|
171
|
+
</a-entity>
|
|
172
|
+
</a-entity>
|
|
173
|
+
|
|
174
|
+
</a-scene>
|
|
175
|
+
<div class="gitlab-corner-wrapper"><a
|
|
176
|
+
href="https://gitlab.com/babiaxr/aframe-babia-components/-/blob/master/examples/" class="gitlab-corner"
|
|
177
|
+
aria-label="View source on GitLab"><svg id="logo_art" data-name="logo art"
|
|
178
|
+
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 586 559">
|
|
179
|
+
<g id="g44">
|
|
180
|
+
<path id="path46" class="cls-1"
|
|
181
|
+
d="M461.17,301.83l-18.91-58.12L404.84,128.43a6.47,6.47,0,0,0-12.27,0L355.15,243.64H230.82L193.4,128.43a6.46,6.46,0,0,0-12.26,0L143.78,243.64l-18.91,58.19a12.88,12.88,0,0,0,4.66,14.39L293,435,456.44,316.22a12.9,12.9,0,0,0,4.73-14.39" />
|
|
182
|
+
</g>
|
|
183
|
+
<g id="g48">
|
|
184
|
+
<path id="path50" class="cls-2" d="M293,434.91h0l62.16-191.28H230.87L293,434.91Z" />
|
|
185
|
+
</g>
|
|
186
|
+
<g id="g56">
|
|
187
|
+
<path id="path58" class="cls-1" d="M293,434.91,230.82,243.63h-87L293,434.91Z" />
|
|
188
|
+
</g>
|
|
189
|
+
<g id="g64">
|
|
190
|
+
<path id="path66" class="cls-3"
|
|
191
|
+
d="M143.75,243.69h0l-18.91,58.12a12.88,12.88,0,0,0,4.66,14.39L293,435,143.75,243.69Z" />
|
|
192
|
+
</g>
|
|
193
|
+
<g id="g72">
|
|
194
|
+
<path id="path74" class="cls-2"
|
|
195
|
+
d="M143.78,243.69h87.11L193.4,128.49a6.47,6.47,0,0,0-12.27,0l-37.35,115.2Z" />
|
|
196
|
+
</g>
|
|
197
|
+
<g id="g76">
|
|
198
|
+
<path id="path78" class="cls-1" d="M293,434.91l62.16-191.28H442.3L293,434.91Z" />
|
|
199
|
+
</g>
|
|
200
|
+
<g id="g80">
|
|
201
|
+
<path id="path82" class="cls-3"
|
|
202
|
+
d="M442.24,243.69h0l18.91,58.12a12.85,12.85,0,0,1-4.66,14.39L293,434.91l149.2-191.22Z" />
|
|
203
|
+
</g>
|
|
204
|
+
<g id="g84">
|
|
205
|
+
<path id="path86" class="cls-2"
|
|
206
|
+
d="M442.28,243.69h-87.1l37.42-115.2a6.46,6.46,0,0,1,12.26,0l37.42,115.2Z" />
|
|
207
|
+
</g>
|
|
208
|
+
</svg></a></div>
|
|
209
|
+
|
|
210
|
+
<script>
|
|
211
|
+
document.getElementById("rotatecity").addEventListener('click', function (event) {
|
|
212
|
+
let ewl = document.getElementById("boats")
|
|
213
|
+
let currentRotation = ewl.getAttribute("rotation") || { x: 0, y: 0, z: 0 }
|
|
214
|
+
let currentPosition = ewl.getAttribute("position")
|
|
215
|
+
let newZrotation = currentRotation.z + 90
|
|
216
|
+
ewl.setAttribute("rotation", { x: currentRotation.x, y: currentRotation.y, z: newZrotation })
|
|
217
|
+
if (newZrotation === 180) {
|
|
218
|
+
ewl.setAttribute("position", { x: currentPosition.x + 1.5, y: currentPosition.y + 1.3, z: currentPosition.z })
|
|
219
|
+
} else if (newZrotation === 360) {
|
|
220
|
+
ewl.setAttribute("rotation", { x: currentRotation.x, y: currentRotation.y, z: 0 })
|
|
221
|
+
ewl.setAttribute("position", { x: currentPosition.x - 1.5, y: currentPosition.y - 1.3, z: currentPosition.z })
|
|
222
|
+
} else if (newZrotation === 90) {
|
|
223
|
+
ewl.setAttribute("position", { x: currentPosition.x - 1.5, y: currentPosition.y + 1.2, z: currentPosition.z })
|
|
224
|
+
} else if (newZrotation === 270) {
|
|
225
|
+
ewl.setAttribute("position", { x: currentPosition.x + 1.5, y: currentPosition.y - 1.2, z: currentPosition.z })
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
}, false);
|
|
229
|
+
// transparent80ByRepeatedField: depName; transparent20ByRepeatedField: id;
|
|
230
|
+
document.getElementById("wireframe").addEventListener('click', function (event) {
|
|
231
|
+
let ewl = document.getElementById("boats")
|
|
232
|
+
let currentWireframe = ewl.getAttribute("babia-boats")
|
|
233
|
+
if (currentWireframe.wireframeByRepeatedField) {
|
|
234
|
+
ewl.removeAttribute("babia-boats", "wireframeByRepeatedField")
|
|
235
|
+
} else {
|
|
236
|
+
ewl.setAttribute("babia-boats", "wireframeByRepeatedField", "depName")
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
}, false);
|
|
241
|
+
|
|
242
|
+
document.getElementById("transparencies20").addEventListener('click', function (event) {
|
|
243
|
+
let ewl = document.getElementById("boats")
|
|
244
|
+
let currentBoats = ewl.getAttribute("babia-boats")
|
|
245
|
+
if (currentBoats.transparent20ByRepeatedField) {
|
|
246
|
+
//ewl.removeAttribute("babia-boats", "transparent80ByRepeatedField")
|
|
247
|
+
ewl.removeAttribute("babia-boats", "transparent20ByRepeatedField")
|
|
248
|
+
} else {
|
|
249
|
+
//ewl.setAttribute("babia-boats", "transparent80ByRepeatedField", "depName")
|
|
250
|
+
ewl.setAttribute("babia-boats", "transparent20ByRepeatedField", "id")
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
}, false);
|
|
255
|
+
|
|
256
|
+
document.getElementById("transparencies80").addEventListener('click', function (event) {
|
|
257
|
+
let ewl = document.getElementById("boats")
|
|
258
|
+
let currentBoats = ewl.getAttribute("babia-boats")
|
|
259
|
+
if (currentBoats.transparent80ByRepeatedField) {
|
|
260
|
+
ewl.removeAttribute("babia-boats", "transparent80ByRepeatedField")
|
|
261
|
+
//ewl.removeAttribute("babia-boats", "transparent20ByRepeatedField")
|
|
262
|
+
} else {
|
|
263
|
+
ewl.setAttribute("babia-boats", "transparent80ByRepeatedField", "depName")
|
|
264
|
+
//ewl.setAttribute("babia-boats", "transparent20ByRepeatedField", "id")
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
}, false);
|
|
269
|
+
|
|
270
|
+
</script>
|
|
271
|
+
|
|
272
|
+
<script>
|
|
273
|
+
// Get Query string values
|
|
274
|
+
function getValueFromQueryString(string) {
|
|
275
|
+
string = string.replace(/[\[\]]/g, '\\$&');
|
|
276
|
+
var regex = new RegExp('[?&]' + string + '(=([^&#]*)|&|#|$)'),
|
|
277
|
+
results = regex.exec(window.location.href);
|
|
278
|
+
if (!results) return null;
|
|
279
|
+
if (!results[2]) return '';
|
|
280
|
+
return decodeURIComponent(results[2].replace(/\+/g, ' '));
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/* Set username and password for ElasticSearch queriers*/
|
|
284
|
+
let buildingsep = getValueFromQueryString('buildingsep');
|
|
285
|
+
let quarterheight = getValueFromQueryString('quarterheight');
|
|
286
|
+
let extra = getValueFromQueryString('extra');
|
|
287
|
+
if (buildingsep) {
|
|
288
|
+
document.getElementById("boats").setAttribute('babia-boats', 'building_separation', parseFloat(buildingsep))
|
|
289
|
+
}
|
|
290
|
+
if (quarterheight) {
|
|
291
|
+
document.getElementById("boats").setAttribute('babia-boats', 'treeQuartersLevelHeight', parseFloat(quarterheight))
|
|
292
|
+
}
|
|
293
|
+
if (extra) {
|
|
294
|
+
document.getElementById("boats").setAttribute('babia-boats', 'extra', parseFloat(extra))
|
|
295
|
+
}
|
|
296
|
+
</script>
|
|
297
|
+
|
|
298
|
+
</body>
|
|
299
|
+
|
|
300
|
+
</html>
|