aframe-babia-components 1.2.0 → 1.2.3
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-selector.js +256 -79
- package/components/filters/babia-treebuilder.js +4 -5
- package/components/geometries/babia-cyl.js +180 -0
- package/components/others/assets/tooltip.png +0 -0
- package/components/others/babia-camera.js +195 -0
- package/components/others/babia-controls.js +62 -37
- package/components/others/babia-navigator.js +55 -49
- package/components/others/babia-range-selector.js +208 -0
- package/components/others/babia-slider.js +36 -8
- package/components/others/babia-ui.js +246 -73
- package/components/others/common.js +60 -73
- package/components/queriers/babia-querycsv.js +96 -0
- package/components/queriers/babia-queryes.js +203 -132
- package/components/visualizers/babia-bars.js +4 -35
- package/components/visualizers/babia-barsmap.js +2 -30
- package/components/visualizers/babia-boats.js +291 -279
- package/components/visualizers/babia-bubbles.js +9 -26
- package/components/visualizers/babia-city.js +19 -9
- package/components/visualizers/babia-cyls.js +197 -201
- package/components/visualizers/babia-cylsmap.js +171 -241
- package/components/visualizers/babia-doughnut.js +2 -28
- package/components/visualizers/babia-network.js +191 -124
- package/components/visualizers/babia-pie.js +2 -30
- package/dist/aframe-babia-components.js +6785 -5626
- package/dist/aframe-babia-components.min.js +7 -1
- package/dist/aframe-babia-components.min.js.map +1 -0
- package/docs/APIs/CHARTS.md +11 -4
- package/docs/APIs/DATAMANAGEMENT.md +7 -0
- package/docs/APIs/OTHERS.md +27 -0
- package/docs/APIs/QUERIERS.md +16 -0
- package/docs/RELEASE_NOTES.md +44 -23
- package/docs/Tutorials/multiuser.md +47 -2
- package/docs/Tutorials/temporal_evol_with_boats.md +4 -4
- package/examples/assets/door/New Bitmap Image.jpg +0 -0
- package/examples/assets/door/door.mtl +26 -0
- package/examples/assets/door/door.obj +6927 -0
- package/examples/assets/popups/0.png +0 -0
- package/examples/assets/popups/1.png +0 -0
- package/examples/assets/popups/10.png +0 -0
- package/examples/assets/popups/2.png +0 -0
- package/examples/assets/popups/3.png +0 -0
- package/examples/assets/popups/4.png +0 -0
- package/examples/assets/popups/5.png +0 -0
- package/examples/assets/popups/6.png +0 -0
- package/examples/assets/popups/7.png +0 -0
- package/examples/assets/popups/8.png +0 -0
- package/examples/assets/popups/9.png +0 -0
- package/examples/assets/popups/close.jpg +0 -0
- package/examples/assets/popups/info.jpg +0 -0
- package/examples/assets/textures/brownwall.png +0 -0
- package/examples/assets/textures/concrete.png +0 -0
- package/examples/assets/textures/white-wall-texture.jpg +0 -0
- package/examples/boats/boats_new_element/data1.json +18 -18
- package/examples/boats/boats_new_element/data2.json +19 -19
- package/examples/boats/boats_new_element/index.html +1 -1
- package/examples/charts/cyls/index.html +13 -4
- package/examples/charts/cyls/primitive.html +76 -0
- package/examples/charts/cylsmap/index.html +14 -5
- package/examples/charts_querier/bars_querier/data.csv +10 -0
- package/examples/charts_querier/bars_querier/index_csv.html +80 -0
- package/examples/dashboard/chaoss-dashboards.html +259 -0
- package/examples/dashboard/chaoss-issues.html +248 -0
- package/examples/dashboard/chaoss-pr.html +248 -0
- package/examples/dashboard/index.html +247 -0
- package/examples/dashboard/issues_queries/80-percent-open-time.json +123 -0
- package/examples/dashboard/issues_queries/issues-by-organization.json +107 -0
- package/examples/dashboard/issues_queries/issues.json +117 -0
- package/examples/dashboard/issues_queries/median-open-time.json +123 -0
- package/examples/dashboard/issues_queries/organizations.json +130 -0
- package/examples/dashboard/issues_queries/projects.json +130 -0
- package/examples/dashboard/issues_queries/repositories.json +130 -0
- package/examples/dashboard/issues_queries/status.json +107 -0
- package/examples/dashboard/issues_queries/submitter.json +125 -0
- package/examples/dashboard/issues_queries/submitters.json +113 -0
- package/examples/dashboard/pullrequests_queries/80-percent-open-time.json +123 -0
- package/examples/dashboard/pullrequests_queries/median-open-time.json +123 -0
- package/examples/dashboard/pullrequests_queries/organizations.json +130 -0
- package/examples/dashboard/pullrequests_queries/projects.json +130 -0
- package/examples/dashboard/pullrequests_queries/pull-requests-by-organization.json +107 -0
- package/examples/dashboard/pullrequests_queries/pull-requests.json +117 -0
- package/examples/dashboard/pullrequests_queries/repositories.json +130 -0
- package/examples/dashboard/pullrequests_queries/status.json +107 -0
- package/examples/dashboard/pullrequests_queries/submitter.json +125 -0
- package/examples/dashboard/pullrequests_queries/submitters.json +113 -0
- package/examples/dashboard/range.html +88 -0
- package/examples/dashboard/template.html +136 -0
- package/examples/demos/1.0.11/index_multiuser_ui.html +1 -1
- package/examples/multi_bars/data.json +14 -0
- package/examples/multi_bars/data2.json +15 -0
- package/examples/multi_bars/data3.json +23 -0
- package/examples/multi_bars/easyrtc.js +11984 -0
- package/examples/multi_bars/index.html +97 -0
- package/examples/multi_bars/index1.html +111 -0
- package/examples/multi_bars/index2.html +102 -0
- package/examples/multi_bars/index3.html +104 -0
- package/examples/multi_boats/data3.json +174 -0
- package/examples/multi_boats/data4.json +192 -0
- package/examples/multi_boats/easyrtc.js +11984 -0
- package/examples/multi_boats/index_multi_boats.html +223 -0
- package/examples/multi_boats/jetuml.html +256 -0
- package/examples/multi_boats/jetuml_code_data.json +1 -0
- package/examples/multi_boats/jetuml_evolution_experiment.html +419 -0
- package/examples/multi_boats/only_queryjson.html +132 -0
- package/examples/multi_boats/only_queryjson2.html +167 -0
- package/examples/multi_boats/only_queryjson3.html +165 -0
- package/examples/multi_boats/queryjson_treebuilder.html +132 -0
- package/examples/multi_boats/with_selector.html +255 -0
- package/examples/multiuser/choose_avatar/index.html +18 -8
- package/examples/selector_boats/jetuml.html +74 -0
- package/examples/selector_boats/jetuml_evol_data.json +1 -0
- package/examples/selector_boats/jetuml_from_3_2_to_1_0.json +62382 -0
- package/examples/selector_boats/jetumltest.html +80 -0
- package/examples/ui/link/index.html +12 -11
- package/examples/ui/network/data.json +123 -0
- package/examples/ui/network/links.json +13 -0
- package/examples/ui/network/network.html +75 -0
- package/examples/ui/network/network_nodes_links.html +82 -0
- package/examples/ui/network/nodes.json +12 -0
- package/index.html +73 -2
- package/index.js +12 -1
- package/package.json +6 -3
- package/tests/screenshots/other_snapshots.js/chaoss-issues.png +0 -0
- package/tests/screenshots/other_snapshots.js/chaoss-pr.png +0 -0
- package/tests/screenshots/other_snapshots.js/template.png +0 -0
- package/tests/ui.js +7 -0
- package/webpack.common.js +10 -1
- package/webpack.devnossl.js +16 -0
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<title>BabiaXR - Multiuser Babia-boats Demo</title>
|
|
7
|
+
<meta name="description" content="Babiaxr multiuser demo using babia-boats.">
|
|
8
|
+
</meta>
|
|
9
|
+
<!-- Aframe -->
|
|
10
|
+
<script src="https://aframe.io/releases/1.2.0/aframe.min.js"></script>
|
|
11
|
+
<script src="https://cdn.jsdelivr.net/gh/donmccurdy/aframe-extras@v6.1.0/dist/aframe-extras.min.js"></script>
|
|
12
|
+
<script
|
|
13
|
+
src="https://unpkg.com/aframe-environment-component@1.2.0/dist/aframe-environment-component.min.js"></script>
|
|
14
|
+
<script src="../../dist/aframe-babia-components.js"></script>
|
|
15
|
+
<!-- Mulituser -->
|
|
16
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.3.0/socket.io.slim.js"></script>
|
|
17
|
+
<script src="./easyrtc.js"></script>
|
|
18
|
+
<script src="https://unpkg.com/networked-aframe@^0.8.0/dist/networked-aframe.js"></script>
|
|
19
|
+
<!-- Gitlab Corner -->
|
|
20
|
+
<link rel="stylesheet" href="../assets/gitlab-corner.css">
|
|
21
|
+
</head>
|
|
22
|
+
|
|
23
|
+
<body>
|
|
24
|
+
<a-scene id="AframeScene" networked-scene="
|
|
25
|
+
room: index_multi_boats;
|
|
26
|
+
adapter: easyrtc;
|
|
27
|
+
debug: true;
|
|
28
|
+
audio: true;
|
|
29
|
+
serverURL: https://f-l2108-pc02.aulas.etsit.urjc.es:49153/">
|
|
30
|
+
|
|
31
|
+
<a-assets>
|
|
32
|
+
<!-- Dummy asset to make the scene sync (WIP)-->
|
|
33
|
+
<img src="https://wallpapercave.com/wp/wp2345390.jpg?dummy=8484744">
|
|
34
|
+
|
|
35
|
+
<!-- Templates -->
|
|
36
|
+
<!-- Camara -->
|
|
37
|
+
<template id="rig-template">
|
|
38
|
+
<a-entity class="rig"></a-entity>
|
|
39
|
+
</template>
|
|
40
|
+
<template id="camera-template">
|
|
41
|
+
<a-entity class="camera"></a-entity>
|
|
42
|
+
</template>
|
|
43
|
+
<template id="avatar-template">
|
|
44
|
+
<a-sphere class="avatar" networked-audio-source></a-sphere>
|
|
45
|
+
</template>
|
|
46
|
+
<template id="username-tag-template">
|
|
47
|
+
<a-text class="username-tag"></a-text>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
</a-assets>
|
|
51
|
+
|
|
52
|
+
<!-- Environment -->
|
|
53
|
+
<a-entity environment="preset: yavapai" renderer="antialias: true"></a-entity>
|
|
54
|
+
|
|
55
|
+
<!-- Querier -->
|
|
56
|
+
<a-entity id="datajetuml" babia-queryjson="url: ./jetuml_code_data.json;"></a-entity>
|
|
57
|
+
<!-- Treebuilder -->
|
|
58
|
+
<a-entity id="treedata" babia-treebuilder="field: file_path; split_by: /; from: datajetuml"></a-entity>
|
|
59
|
+
<!-- Boats Visualizer -->
|
|
60
|
+
<a-entity babia-boats="from: treedata; area: num_funs; height: loc_per_function; color: ccn"
|
|
61
|
+
position="0 0.1 0"scale="0.03 0.03 0.03"></a-entity>
|
|
62
|
+
|
|
63
|
+
<!-- Camera -->
|
|
64
|
+
<a-entity id="rig" position="2.25 1.6 3" rotation="0 0 0"
|
|
65
|
+
networked="template:#rig-template; attachTemplateToLocal:false">
|
|
66
|
+
<a-entity id="camera" camera look-controls wasd-controls="fly: false"
|
|
67
|
+
networked="template:#camera-template;attachTemplateToLocal:false;">
|
|
68
|
+
<a-sphere id="avatar" color="#D3FFE4" scale="0.25 0.25 0.25"
|
|
69
|
+
networked="template:#avatar-template;attachTemplateToLocal:false;">
|
|
70
|
+
<a-text id="username-tag"
|
|
71
|
+
networked="template:#username-tag-template; attachTemplateToLocal:false"
|
|
72
|
+
position="-0.5 1.5 0" width="5" color="black" value="username"></a-text>
|
|
73
|
+
</a-sphere>
|
|
74
|
+
</a-entity>
|
|
75
|
+
<!-- Hand Controls -->
|
|
76
|
+
<a-entity id="leftHand" oculus-touch-controls="hand: left"
|
|
77
|
+
teleport-controls="cameraRig: #rig; teleportOrigin: #avatar; collisionEntities: #environmentGround;
|
|
78
|
+
hitCylinderColor: #ff3468; curveHitColor: #ff3468; curveMissColor: #333333; curveLineWidth: 0.01; button: trigger"></a-entity>
|
|
79
|
+
<a-entity id="rightHand" laser-controls="hand: right" oculus-touch-controls="hand: right"
|
|
80
|
+
raycaster="objects: .babiaxraycasterclass, #audio_button"></a-entity>
|
|
81
|
+
<a-entity id="cursor" cursor="rayOrigin:mouse" raycaster="objects: .babiaxraycasterclass, #audio_button">
|
|
82
|
+
</a-entity>
|
|
83
|
+
</a-entity>
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
<!-- Audio Button -->
|
|
88
|
+
<a-plane id="audio_button" position="7 2.5 0" rotation="0 0 0" height="0.5" width="1.5" color="#000" scale="0.5 0.5 0.5">
|
|
89
|
+
<a-text id="audio_label" value="Stop Audio" color="#fff" width="4" position="-0.5 0 0" rotation="0 0 0">
|
|
90
|
+
</a-text>
|
|
91
|
+
</a-plane>
|
|
92
|
+
|
|
93
|
+
</a-scene>
|
|
94
|
+
|
|
95
|
+
<script>
|
|
96
|
+
/* Avatar */
|
|
97
|
+
let avatar = document.getElementById('avatar')
|
|
98
|
+
let usernameTag = document.getElementById('username-tag')
|
|
99
|
+
|
|
100
|
+
let color = getRandomColor();
|
|
101
|
+
usernameTag.setAttribute('value', color)
|
|
102
|
+
avatar.setAttribute('color', color)
|
|
103
|
+
|
|
104
|
+
function getRandomColor() {
|
|
105
|
+
var digits = '0123456789ABCDEF';
|
|
106
|
+
var color = '#';
|
|
107
|
+
for (var i = 0; i < 6; i++) {
|
|
108
|
+
color += digits[Math.floor(Math.random() * 16)];
|
|
109
|
+
}
|
|
110
|
+
return color;
|
|
111
|
+
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* Audio */
|
|
115
|
+
let audioButton = document.getElementById('audio_button');
|
|
116
|
+
let audioLabel = document.getElementById('audio_label');
|
|
117
|
+
|
|
118
|
+
audioButton.addEventListener('click', function (event) {
|
|
119
|
+
if (audioLabel.getAttribute('value') === 'Stop Audio') {
|
|
120
|
+
stopAudio();
|
|
121
|
+
} else {
|
|
122
|
+
turnOnAudio();
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
function turnOnAudio() {
|
|
126
|
+
NAF.connection.adapter.enableMicrophone(true);
|
|
127
|
+
audioButton.setAttribute('color', '#000');
|
|
128
|
+
audioLabel.setAttribute('color', '#fff');
|
|
129
|
+
audioLabel.setAttribute('value', 'Stop Audio');
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function stopAudio() {
|
|
133
|
+
NAF.connection.adapter.enableMicrophone(false);
|
|
134
|
+
audioButton.setAttribute('color', '#fff');
|
|
135
|
+
audioLabel.setAttribute('color', '#000');
|
|
136
|
+
audioLabel.setAttribute('value', 'Turn on Audio');
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* Update avatar height in VR */
|
|
140
|
+
|
|
141
|
+
document.addEventListener('controllerconnected', (event) => {
|
|
142
|
+
rig.setAttribute('position', { x: 4, y: 1.6, z: 3 })
|
|
143
|
+
})
|
|
144
|
+
</script>
|
|
145
|
+
<script>
|
|
146
|
+
// Schemas with components and attributes for syncronization
|
|
147
|
+
NAF.schemas.add({
|
|
148
|
+
template: '#rig-template',
|
|
149
|
+
components: [
|
|
150
|
+
'position',
|
|
151
|
+
'rotation'
|
|
152
|
+
]
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
NAF.schemas.add({
|
|
156
|
+
template: '#camera-template',
|
|
157
|
+
components: [
|
|
158
|
+
'position',
|
|
159
|
+
'rotation'
|
|
160
|
+
]
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
NAF.schemas.add({
|
|
164
|
+
template: '#avatar-template',
|
|
165
|
+
components: [
|
|
166
|
+
'position',
|
|
167
|
+
'rotation',
|
|
168
|
+
'color',
|
|
169
|
+
'scale'
|
|
170
|
+
]
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
NAF.schemas.add({
|
|
174
|
+
template: '#username-tag-template',
|
|
175
|
+
components: [
|
|
176
|
+
'value',
|
|
177
|
+
'color',
|
|
178
|
+
'width',
|
|
179
|
+
'position',
|
|
180
|
+
'rotation'
|
|
181
|
+
]
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
</script>
|
|
185
|
+
|
|
186
|
+
<!-- GITLAB CORNER-->
|
|
187
|
+
<div class="gitlab-corner-wrapper"><a
|
|
188
|
+
href="https://gitlab.com/babiaxr/aframe-babia-components/-/blob/master/examples/multi_boats/index_multi_boats.html"
|
|
189
|
+
class="gitlab-corner" aria-label="View source on GitLab"><svg id="logo_art" data-name="logo art"
|
|
190
|
+
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 586 559">
|
|
191
|
+
<g id="g44">
|
|
192
|
+
<path id="path46" class="cls-1"
|
|
193
|
+
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" />
|
|
194
|
+
</g>
|
|
195
|
+
<g id="g48">
|
|
196
|
+
<path id="path50" class="cls-2" d="M293,434.91h0l62.16-191.28H230.87L293,434.91Z" />
|
|
197
|
+
</g>
|
|
198
|
+
<g id="g56">
|
|
199
|
+
<path id="path58" class="cls-1" d="M293,434.91,230.82,243.63h-87L293,434.91Z" />
|
|
200
|
+
</g>
|
|
201
|
+
<g id="g64">
|
|
202
|
+
<path id="path66" class="cls-3"
|
|
203
|
+
d="M143.75,243.69h0l-18.91,58.12a12.88,12.88,0,0,0,4.66,14.39L293,435,143.75,243.69Z" />
|
|
204
|
+
</g>
|
|
205
|
+
<g id="g72">
|
|
206
|
+
<path id="path74" class="cls-2"
|
|
207
|
+
d="M143.78,243.69h87.11L193.4,128.49a6.47,6.47,0,0,0-12.27,0l-37.35,115.2Z" />
|
|
208
|
+
</g>
|
|
209
|
+
<g id="g76">
|
|
210
|
+
<path id="path78" class="cls-1" d="M293,434.91l62.16-191.28H442.3L293,434.91Z" />
|
|
211
|
+
</g>
|
|
212
|
+
<g id="g80">
|
|
213
|
+
<path id="path82" class="cls-3"
|
|
214
|
+
d="M442.24,243.69h0l18.91,58.12a12.85,12.85,0,0,1-4.66,14.39L293,434.91l149.2-191.22Z" />
|
|
215
|
+
</g>
|
|
216
|
+
<g id="g84">
|
|
217
|
+
<path id="path86" class="cls-2"
|
|
218
|
+
d="M442.28,243.69h-87.1l37.42-115.2a6.46,6.46,0,0,1,12.26,0l37.42,115.2Z" />
|
|
219
|
+
</g>
|
|
220
|
+
</svg></a></div>
|
|
221
|
+
</body>
|
|
222
|
+
|
|
223
|
+
</html>
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<title>BabiaXR - Multiuser Babia-boats Demo</title>
|
|
7
|
+
<meta name="description" content="Babiaxr multiuser demo using babia-boats.">
|
|
8
|
+
</meta>
|
|
9
|
+
<!-- Aframe -->
|
|
10
|
+
<script src="https://aframe.io/releases/1.2.0/aframe.min.js"></script>
|
|
11
|
+
<script src="https://cdn.jsdelivr.net/gh/donmccurdy/aframe-extras@v6.1.0/dist/aframe-extras.min.js"></script>
|
|
12
|
+
<script
|
|
13
|
+
src="https://unpkg.com/aframe-environment-component@1.2.0/dist/aframe-environment-component.min.js"></script>
|
|
14
|
+
<script src="../../dist/aframe-babia-components.js"></script>
|
|
15
|
+
<!-- Mulituser -->
|
|
16
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.3.0/socket.io.slim.js"></script>
|
|
17
|
+
<script src="./easyrtc.js"></script>
|
|
18
|
+
<script src="https://unpkg.com/networked-aframe@^0.8.0/dist/networked-aframe.js"></script>
|
|
19
|
+
<!-- Gitlab Corner -->
|
|
20
|
+
<link rel="stylesheet" href="../assets/gitlab-corner.css">
|
|
21
|
+
</head>
|
|
22
|
+
|
|
23
|
+
<body>
|
|
24
|
+
<a-scene id="AframeScene" networked-scene="
|
|
25
|
+
room: multi_boats_jetuml;
|
|
26
|
+
adapter: easyrtc;
|
|
27
|
+
debug: true;
|
|
28
|
+
audio: true;
|
|
29
|
+
serverURL: https://f-l2108-pc02.aulas.etsit.urjc.es:49153/;
|
|
30
|
+
">
|
|
31
|
+
|
|
32
|
+
<a-assets>
|
|
33
|
+
<!-- Dummy asset to make the scene sync (WIP)-->
|
|
34
|
+
<img src="https://wallpapercave.com/wp/wp2345390.jpg?dummy=8484744">
|
|
35
|
+
|
|
36
|
+
<!-- Templates -->
|
|
37
|
+
|
|
38
|
+
<!-- Selector and navigator -->
|
|
39
|
+
<template id="selector-template">
|
|
40
|
+
<a-entity class="selector"></a-entity>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<!-- Camera -->
|
|
44
|
+
<template id="rig-template">
|
|
45
|
+
<a-entity class="rig"></a-entity>
|
|
46
|
+
</template>
|
|
47
|
+
<template id="camera-template">
|
|
48
|
+
<a-entity class="camera"></a-entity>
|
|
49
|
+
</template>
|
|
50
|
+
<template id="avatar-template">
|
|
51
|
+
<a-sphere class="avatar" networked-audio-source></a-sphere>
|
|
52
|
+
</template>
|
|
53
|
+
<template id="username-tag-template">
|
|
54
|
+
<a-text class="username-tag"></a-text>
|
|
55
|
+
</template>
|
|
56
|
+
</a-assets>
|
|
57
|
+
|
|
58
|
+
<!-- Environment -->
|
|
59
|
+
<a-entity environment="preset: yavapai" renderer="antialias: true"></a-entity>
|
|
60
|
+
|
|
61
|
+
<!-- Slider -->
|
|
62
|
+
<a-entity id="nav" babia-navigator position="6 1 1" rotation="0 0 0" scale="0.5 0.5 0.5"
|
|
63
|
+
></a-entity>
|
|
64
|
+
|
|
65
|
+
<!-- Querier -->
|
|
66
|
+
<a-entity id="querier" babia-queryjson="url:../selector_boats/jetuml_evol_data.json;"></a-entity>
|
|
67
|
+
<!-- Selector -->
|
|
68
|
+
<a-entity id="selector" networked="template:#selector-template; networkId:selector; persistent: true; owner: scene"
|
|
69
|
+
babia-selector="from: querier; controller: nav"
|
|
70
|
+
></a-entity>
|
|
71
|
+
<!-- Treebuilder -->
|
|
72
|
+
<a-entity id="treebuilder" babia-treebuilder="field: path; split_by: /; from: selector"></a-entity>
|
|
73
|
+
|
|
74
|
+
<!-- Boats Visualizer -->
|
|
75
|
+
<a-entity id="boats" babia-boats="from: treebuilder; area: num_funs; height: loc_per_function; color: ccn"
|
|
76
|
+
position="1 0.1 0" scale="0.03 0.03 0.03"></a-entity>
|
|
77
|
+
|
|
78
|
+
<!-- Camera -->
|
|
79
|
+
<a-entity id="rig" position="4 1.6 3" rotation="0 0 0"
|
|
80
|
+
networked="template:#rig-template; attachTemplateToLocal:false">
|
|
81
|
+
<a-entity id="camera" camera look-controls wasd-controls="fly: false"
|
|
82
|
+
networked="template:#camera-template;attachTemplateToLocal:false;">
|
|
83
|
+
<a-sphere id="avatar" color="#D3FFE4" scale="0.25 0.25 0.25"
|
|
84
|
+
networked="template:#avatar-template;attachTemplateToLocal:false;">
|
|
85
|
+
<a-text id="username-tag"
|
|
86
|
+
networked="template:#username-tag-template; attachTemplateToLocal:false"
|
|
87
|
+
position="-0.5 1.5 0" width="5" color="black" value="username"></a-text>
|
|
88
|
+
</a-sphere>
|
|
89
|
+
</a-entity>
|
|
90
|
+
<!-- Hand Controls -->
|
|
91
|
+
<a-entity id="leftHand" interaction-hands aabb-collider="objects: .grabbable"
|
|
92
|
+
hand-controls="hand: left; handModelStyle: highPoly" mixin="touch"
|
|
93
|
+
teleport-controls="cameraRig: #cameraRig; teleportOrigin: #head; collisionEntities: .environmentGround;
|
|
94
|
+
hitCylinderColor: #ff3468; curveHitColor: #ff3468; curveMissColor: #333333; curveLineWidth: 0.01; button: grip">
|
|
95
|
+
<a-entity id="tooltip_trigger_L" class="tips" tooltip="text: Grab; width: 0.07; height: 0.03; targetPosition: 0.002 -0.02 -0.014; lineHorizontalAlign: right; rotation: -90 0 0; src:assets/tooltip.png"
|
|
96
|
+
position="-0.09 -0.04 -0.08"></a-entity>
|
|
97
|
+
<a-entity id="tooltip_grip_L" class="tips" tooltip="text: Teleport; width: 0.08; height: 0.04; targetPosition: 0.006 -0.008 0.033; rotation: -90 0 0; src:assets/tooltip.png"
|
|
98
|
+
position="0.085 -0.01 0.07"></a-entity>
|
|
99
|
+
</a-entity>
|
|
100
|
+
<a-entity id="rightHand" interaction-hands aabb-collider="objects: .grabbable"
|
|
101
|
+
hand-controls="hand: right; handModelStyle: highPoly" mixin="touch"
|
|
102
|
+
laser-controls="hand: right" raycaster="objects: .babiaxraycasterclass, #audio_button">
|
|
103
|
+
<a-entity id="tooltip_trigger_R" class="tips" tooltip="text: Click/Grab ; width: 0.07; height: 0.03; targetPosition: 0.005 -0.02 -0.014; lineHorizontalAlign: left; rotation: -90 0 0; src:assets/tooltip.png"
|
|
104
|
+
position="0.09 -0.04 -0.08"></a-entity>
|
|
105
|
+
<a-entity id="tooltip_grip_R" class="tips" tooltip="text: Open/Close \nTips; width: 0.08; height: 0.04; targetPosition: -0.006 -0.008 0.033; rotation: -90 0 0; lineHorizontalAlign: right; src:assets/tooltip.png"
|
|
106
|
+
position="-0.085 -0.01 0.07"></a-entity>
|
|
107
|
+
</a-entity>
|
|
108
|
+
<a-entity id="cursor" cursor="rayOrigin:mouse" raycaster="objects: .babiaxraycasterclass, #audio_button">
|
|
109
|
+
</a-entity>
|
|
110
|
+
</a-entity>
|
|
111
|
+
|
|
112
|
+
<!-- Audio Button -->
|
|
113
|
+
<a-plane id="audio_button" position="7 2.5 0" rotation="0 0 0" height="0.5" width="1.5" color="#000" scale="0.5 0.5 0.5">
|
|
114
|
+
<a-text id="audio_label" value="Stop Audio" color="#fff" width="4" position="-0.5 0 0" rotation="0 0 0">
|
|
115
|
+
</a-text>
|
|
116
|
+
</a-plane>
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
</a-scene>
|
|
120
|
+
|
|
121
|
+
<script>
|
|
122
|
+
/* Camera */
|
|
123
|
+
let rig = document.getElementById('rig')
|
|
124
|
+
let avatar = document.getElementById('avatar')
|
|
125
|
+
let usernameTag = document.getElementById('username-tag')
|
|
126
|
+
|
|
127
|
+
let color = getRandomColor();
|
|
128
|
+
usernameTag.setAttribute('value', color)
|
|
129
|
+
avatar.setAttribute('color', color)
|
|
130
|
+
|
|
131
|
+
function getRandomColor() {
|
|
132
|
+
var digits = '0123456789ABCDEF';
|
|
133
|
+
var color = '#';
|
|
134
|
+
for (var i = 0; i < 6; i++) {
|
|
135
|
+
color += digits[Math.floor(Math.random() * 16)];
|
|
136
|
+
}
|
|
137
|
+
return color;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* Audio */
|
|
141
|
+
let audioButton = document.getElementById('audio_button');
|
|
142
|
+
let audioLabel = document.getElementById('audio_label');
|
|
143
|
+
|
|
144
|
+
audioButton.addEventListener('click', function (event) {
|
|
145
|
+
if (audioLabel.getAttribute('value') === 'Stop Audio') {
|
|
146
|
+
stopAudio();
|
|
147
|
+
} else {
|
|
148
|
+
turnOnAudio();
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
function turnOnAudio() {
|
|
152
|
+
NAF.connection.adapter.enableMicrophone(true);
|
|
153
|
+
audioButton.setAttribute('color', '#000');
|
|
154
|
+
audioLabel.setAttribute('color', '#fff');
|
|
155
|
+
audioLabel.setAttribute('value', 'Stop Audio');
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function stopAudio() {
|
|
159
|
+
NAF.connection.adapter.enableMicrophone(false);
|
|
160
|
+
audioButton.setAttribute('color', '#fff');
|
|
161
|
+
audioLabel.setAttribute('color', '#000');
|
|
162
|
+
audioLabel.setAttribute('value', 'Turn on Audio');
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
/* Update avatar height in VR */
|
|
167
|
+
|
|
168
|
+
document.addEventListener('controllerconnected', (event) => {
|
|
169
|
+
rig.setAttribute('position', { x: 4, y: 1.6, z: 3 })
|
|
170
|
+
})
|
|
171
|
+
|
|
172
|
+
</script>
|
|
173
|
+
<script>
|
|
174
|
+
NAF.schemas.add({
|
|
175
|
+
template: '#selector-template',
|
|
176
|
+
components: [
|
|
177
|
+
'babia-selector'
|
|
178
|
+
]
|
|
179
|
+
})
|
|
180
|
+
|
|
181
|
+
// Avatar
|
|
182
|
+
NAF.schemas.add({
|
|
183
|
+
template: '#rig-template',
|
|
184
|
+
components: [
|
|
185
|
+
'position',
|
|
186
|
+
'rotation'
|
|
187
|
+
]
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
NAF.schemas.add({
|
|
191
|
+
template: '#camera-template',
|
|
192
|
+
components: [
|
|
193
|
+
'position',
|
|
194
|
+
'rotation'
|
|
195
|
+
]
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
NAF.schemas.add({
|
|
199
|
+
template: '#avatar-template',
|
|
200
|
+
components: [
|
|
201
|
+
'position',
|
|
202
|
+
'rotation',
|
|
203
|
+
'color',
|
|
204
|
+
'scale'
|
|
205
|
+
]
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
NAF.schemas.add({
|
|
209
|
+
template: '#username-tag-template',
|
|
210
|
+
components: [
|
|
211
|
+
'value',
|
|
212
|
+
'color',
|
|
213
|
+
'width',
|
|
214
|
+
'position',
|
|
215
|
+
'rotation'
|
|
216
|
+
]
|
|
217
|
+
});
|
|
218
|
+
</script>
|
|
219
|
+
|
|
220
|
+
<!-- GITLAB CORNER-->
|
|
221
|
+
<div class="gitlab-corner-wrapper"><a
|
|
222
|
+
href="https://gitlab.com/babiaxr/aframe-babia-components/-/blob/master/examples/multi_boats/jetuml.html"
|
|
223
|
+
class="gitlab-corner" aria-label="View source on GitLab"><svg id="logo_art" data-name="logo art"
|
|
224
|
+
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 586 559">
|
|
225
|
+
<g id="g44">
|
|
226
|
+
<path id="path46" class="cls-1"
|
|
227
|
+
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" />
|
|
228
|
+
</g>
|
|
229
|
+
<g id="g48">
|
|
230
|
+
<path id="path50" class="cls-2" d="M293,434.91h0l62.16-191.28H230.87L293,434.91Z" />
|
|
231
|
+
</g>
|
|
232
|
+
<g id="g56">
|
|
233
|
+
<path id="path58" class="cls-1" d="M293,434.91,230.82,243.63h-87L293,434.91Z" />
|
|
234
|
+
</g>
|
|
235
|
+
<g id="g64">
|
|
236
|
+
<path id="path66" class="cls-3"
|
|
237
|
+
d="M143.75,243.69h0l-18.91,58.12a12.88,12.88,0,0,0,4.66,14.39L293,435,143.75,243.69Z" />
|
|
238
|
+
</g>
|
|
239
|
+
<g id="g72">
|
|
240
|
+
<path id="path74" class="cls-2"
|
|
241
|
+
d="M143.78,243.69h87.11L193.4,128.49a6.47,6.47,0,0,0-12.27,0l-37.35,115.2Z" />
|
|
242
|
+
</g>
|
|
243
|
+
<g id="g76">
|
|
244
|
+
<path id="path78" class="cls-1" d="M293,434.91l62.16-191.28H442.3L293,434.91Z" />
|
|
245
|
+
</g>
|
|
246
|
+
<g id="g80">
|
|
247
|
+
<path id="path82" class="cls-3"
|
|
248
|
+
d="M442.24,243.69h0l18.91,58.12a12.85,12.85,0,0,1-4.66,14.39L293,434.91l149.2-191.22Z" />
|
|
249
|
+
</g>
|
|
250
|
+
<g id="g84">
|
|
251
|
+
<path id="path86" class="cls-2"
|
|
252
|
+
d="M442.28,243.69h-87.1l37.42-115.2a6.46,6.46,0,0,1,12.26,0l37.42,115.2Z" />
|
|
253
|
+
</g>
|
|
254
|
+
</svg></a></div>
|
|
255
|
+
</body>
|
|
256
|
+
</html>
|