aframe-babia-components 1.2.2 → 1.2.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/components/filters/babia-selector.js +256 -79
- package/components/filters/babia-treebuilder.js +1 -2
- package/components/geometries/babia-bar.js +13 -1
- package/components/geometries/babia-cyl.js +189 -0
- package/components/others/assets/tooltip.png +0 -0
- package/components/others/babia-camera.js +195 -0
- package/components/others/babia-controls.js +56 -31
- package/components/others/babia-navigator.js +55 -49
- package/components/others/babia-range-selector.js +218 -0
- package/components/others/babia-slider.js +36 -8
- package/components/others/babia-ui.js +246 -73
- package/components/others/common.js +91 -83
- package/components/queriers/babia-querycsv.js +96 -0
- package/components/queriers/babia-queryes.js +209 -131
- package/components/visualizers/babia-bars.js +15 -38
- package/components/visualizers/babia-barsmap.js +19 -34
- package/components/visualizers/babia-boats.js +221 -134
- package/components/visualizers/babia-bubbles.js +13 -26
- package/components/visualizers/babia-cyls.js +203 -201
- package/components/visualizers/babia-cylsmap.js +173 -241
- package/components/visualizers/babia-doughnut.js +6 -28
- package/components/visualizers/babia-network.js +191 -124
- package/components/visualizers/babia-pie.js +6 -30
- package/dist/aframe-babia-components.js +21913 -19571
- package/dist/aframe-babia-components.min.js +7 -1
- package/dist/aframe-babia-components.min.js.map +1 -1
- package/docs/APIs/CHARTS.md +33 -14
- package/docs/APIs/DATAMANAGEMENT.md +7 -0
- package/docs/APIs/OTHERS.md +42 -0
- package/docs/APIs/QUERIERS.md +18 -0
- package/docs/RELEASE_NOTES.md +58 -21
- package/docs/Tutorials/multiuser.md +47 -2
- 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/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/charts_querier/multichart_querier/manual_colors.html +81 -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/{index.html → index_multi_boats.html} +50 -55
- package/examples/multi_boats/jetuml.html +124 -115
- 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 +121 -111
- package/examples/multiuser/choose_avatar/index.html +18 -8
- package/examples/selector_boats/jetuml_from_3_2_to_1_0.json +62382 -0
- 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 +69 -3
- package/index.js +6 -1
- package/package.json +4 -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 +1 -1
- package/webpack.devnossl.js +16 -0
- package/.idea/vcs.xml +0 -6
- package/.idea/workspace.xml +0 -79
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"uid": "001",
|
|
4
|
+
"width": "5",
|
|
5
|
+
"height": "20",
|
|
6
|
+
"depth": "5"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"uid": "/barrio",
|
|
10
|
+
"children": [
|
|
11
|
+
{
|
|
12
|
+
"uid": "/barrio/002",
|
|
13
|
+
"width": "4",
|
|
14
|
+
"height": "3",
|
|
15
|
+
"depth": "4"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"uid": "/barrio/003",
|
|
19
|
+
"children": [
|
|
20
|
+
{
|
|
21
|
+
"uid": "barrio/003/block1",
|
|
22
|
+
"width": "10",
|
|
23
|
+
"height": "2",
|
|
24
|
+
"depth": "5"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"uid": "barrio/003/block2",
|
|
28
|
+
"width": "3",
|
|
29
|
+
"height": "1",
|
|
30
|
+
"depth": "3"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"uid": "barrio/003/block3",
|
|
34
|
+
"width": "1",
|
|
35
|
+
"height": "1",
|
|
36
|
+
"depth": "1"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"uid": "/barrio/004",
|
|
42
|
+
"width": "1",
|
|
43
|
+
"height": "1",
|
|
44
|
+
"depth": "3"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"uid": "003",
|
|
50
|
+
"width": "3",
|
|
51
|
+
"height": "1",
|
|
52
|
+
"depth": "5"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"uid": "004",
|
|
56
|
+
"width": "1",
|
|
57
|
+
"height": "1",
|
|
58
|
+
"depth": "2"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"uid": "005",
|
|
62
|
+
"width": "5",
|
|
63
|
+
"height": "10",
|
|
64
|
+
"depth": "3"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"uid": "006",
|
|
68
|
+
"width": "3",
|
|
69
|
+
"height": "1",
|
|
70
|
+
"depth": "3"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"uid": "007",
|
|
74
|
+
"width": "6",
|
|
75
|
+
"height": "1",
|
|
76
|
+
"depth": "6"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"uid": "008",
|
|
80
|
+
"width": "3",
|
|
81
|
+
"height": "1",
|
|
82
|
+
"depth": "3"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"uid": "009",
|
|
86
|
+
"width": "5",
|
|
87
|
+
"height": "1",
|
|
88
|
+
"depth": "5"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"uid": "010",
|
|
92
|
+
"width": "5",
|
|
93
|
+
"height": "1",
|
|
94
|
+
"depth": "5"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"uid": "011",
|
|
98
|
+
"width": "3",
|
|
99
|
+
"height": "1",
|
|
100
|
+
"depth": "3"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"uid": "012",
|
|
104
|
+
"width": "3",
|
|
105
|
+
"height": "1",
|
|
106
|
+
"depth": "3"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"uid": "013",
|
|
110
|
+
"width": "1",
|
|
111
|
+
"height": "5",
|
|
112
|
+
"depth": "1"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"uid": "014",
|
|
116
|
+
"width": "3",
|
|
117
|
+
"height": "1",
|
|
118
|
+
"depth": "3"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"uid": "015",
|
|
122
|
+
"width": "4",
|
|
123
|
+
"height": "1",
|
|
124
|
+
"depth": "4"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"uid": "016",
|
|
128
|
+
"width": "5",
|
|
129
|
+
"height": "1",
|
|
130
|
+
"depth": "5"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"uid": "017",
|
|
134
|
+
"width": "3",
|
|
135
|
+
"height": "9",
|
|
136
|
+
"depth": "3"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"uid": "018",
|
|
140
|
+
"width": "3",
|
|
141
|
+
"height": "1",
|
|
142
|
+
"depth": "3"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"uid": "019",
|
|
146
|
+
"width": "5",
|
|
147
|
+
"height": "1",
|
|
148
|
+
"depth": "5"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"uid": "020",
|
|
152
|
+
"width": "3",
|
|
153
|
+
"height": "1",
|
|
154
|
+
"depth": "3"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"uid": "021",
|
|
158
|
+
"width": "5",
|
|
159
|
+
"height": "1",
|
|
160
|
+
"depth": "5"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"uid": "022",
|
|
164
|
+
"width": "7",
|
|
165
|
+
"height": "1",
|
|
166
|
+
"depth": "7"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"uid": "023",
|
|
170
|
+
"width": "3",
|
|
171
|
+
"height": "1",
|
|
172
|
+
"depth": "3"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"uid": "024",
|
|
176
|
+
"width": "6",
|
|
177
|
+
"height": "10",
|
|
178
|
+
"depth": "6"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"uid": "025",
|
|
182
|
+
"width": "5",
|
|
183
|
+
"height": "1",
|
|
184
|
+
"depth": "5"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"uid": "026",
|
|
188
|
+
"width": "2",
|
|
189
|
+
"height": "1",
|
|
190
|
+
"depth": "2"
|
|
191
|
+
}
|
|
192
|
+
]
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
<body>
|
|
24
24
|
<a-scene id="AframeScene" networked-scene="
|
|
25
|
-
room:
|
|
25
|
+
room: index_multi_boats;
|
|
26
26
|
adapter: easyrtc;
|
|
27
27
|
debug: true;
|
|
28
28
|
audio: true;
|
|
@@ -47,39 +47,19 @@
|
|
|
47
47
|
<a-text class="username-tag"></a-text>
|
|
48
48
|
</template>
|
|
49
49
|
|
|
50
|
-
<!-- Querier and treebuilder -->
|
|
51
|
-
<template id="querier-template">
|
|
52
|
-
<a-entity class="querier"></a-entity>
|
|
53
|
-
</template>
|
|
54
|
-
<template id="treebuilder-template">
|
|
55
|
-
<a-entity class="treebuilder"></a-entity>
|
|
56
|
-
</template>
|
|
57
|
-
|
|
58
|
-
<!-- Boats -->
|
|
59
|
-
<template id="boats-template">
|
|
60
|
-
<a-entity class="boats"></a-entity>
|
|
61
|
-
</template>
|
|
62
50
|
</a-assets>
|
|
63
51
|
|
|
64
52
|
<!-- Environment -->
|
|
65
|
-
<a-entity environment="preset: yavapai" renderer="antialias: true">
|
|
66
|
-
|
|
53
|
+
<a-entity environment="preset: yavapai" renderer="antialias: true"></a-entity>
|
|
67
54
|
|
|
68
|
-
<!-- Sync entities, persistent -->
|
|
69
55
|
<!-- Querier -->
|
|
70
|
-
<a-entity id="datajetuml" babia-queryjson="url: ./jetuml_code_data.json;"
|
|
71
|
-
networked="template:#querier-template; networkId:querier; persistent: true; owner: scene"></a-entity>
|
|
56
|
+
<a-entity id="datajetuml" babia-queryjson="url: ./jetuml_code_data.json;"></a-entity>
|
|
72
57
|
<!-- Treebuilder -->
|
|
73
|
-
<a-entity id="treedata" babia-treebuilder="field: file_path; split_by: /; from: datajetuml"
|
|
74
|
-
networked="template:#treebuilder-template; networkId:treebuilder; persistent: true; owner: scene">
|
|
75
|
-
</a-entity>
|
|
76
|
-
|
|
58
|
+
<a-entity id="treedata" babia-treebuilder="field: file_path; split_by: /; from: datajetuml"></a-entity>
|
|
77
59
|
<!-- Boats Visualizer -->
|
|
78
60
|
<a-entity babia-boats="from: treedata; area: num_funs; height: loc_per_function; color: ccn"
|
|
79
|
-
|
|
80
|
-
scale="0.03 0.03 0.03"></a-entity>
|
|
61
|
+
position="0 0.1 0"scale="0.03 0.03 0.03"></a-entity>
|
|
81
62
|
|
|
82
|
-
<!--Sync entities, not persistent-->
|
|
83
63
|
<!-- Camera -->
|
|
84
64
|
<a-entity id="rig" position="2.25 1.6 3" rotation="0 0 0"
|
|
85
65
|
networked="template:#rig-template; attachTemplateToLocal:false">
|
|
@@ -92,23 +72,31 @@
|
|
|
92
72
|
position="-0.5 1.5 0" width="5" color="black" value="username"></a-text>
|
|
93
73
|
</a-sphere>
|
|
94
74
|
</a-entity>
|
|
95
|
-
|
|
96
|
-
<!-- Hand Controls -->
|
|
75
|
+
<!-- Hand Controls -->
|
|
97
76
|
<a-entity id="leftHand" oculus-touch-controls="hand: left"
|
|
98
|
-
|
|
99
|
-
|
|
77
|
+
teleport-controls="cameraRig: #rig; teleportOrigin: #avatar; collisionEntities: #environmentGround;
|
|
78
|
+
hitCylinderColor: #ff3468; curveHitColor: #ff3468; curveMissColor: #333333; curveLineWidth: 0.01; button: trigger"></a-entity>
|
|
100
79
|
<a-entity id="rightHand" laser-controls="hand: right" oculus-touch-controls="hand: right"
|
|
101
80
|
raycaster="objects: .babiaxraycasterclass, #audio_button"></a-entity>
|
|
102
81
|
<a-entity id="cursor" cursor="rayOrigin:mouse" raycaster="objects: .babiaxraycasterclass, #audio_button">
|
|
103
82
|
</a-entity>
|
|
104
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>
|
|
105
92
|
|
|
106
93
|
</a-scene>
|
|
107
94
|
|
|
108
95
|
<script>
|
|
96
|
+
/* Avatar */
|
|
109
97
|
let avatar = document.getElementById('avatar')
|
|
110
98
|
let usernameTag = document.getElementById('username-tag')
|
|
111
|
-
|
|
99
|
+
|
|
112
100
|
let color = getRandomColor();
|
|
113
101
|
usernameTag.setAttribute('value', color)
|
|
114
102
|
avatar.setAttribute('color', color)
|
|
@@ -122,6 +110,37 @@
|
|
|
122
110
|
return color;
|
|
123
111
|
|
|
124
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
|
+
})
|
|
125
144
|
</script>
|
|
126
145
|
<script>
|
|
127
146
|
// Schemas with components and attributes for syncronization
|
|
@@ -162,35 +181,11 @@
|
|
|
162
181
|
]
|
|
163
182
|
});
|
|
164
183
|
|
|
165
|
-
NAF.schemas.add({
|
|
166
|
-
template: '#querier-template',
|
|
167
|
-
components: [
|
|
168
|
-
'babia-queryjson'
|
|
169
|
-
]
|
|
170
|
-
})
|
|
171
|
-
|
|
172
|
-
NAF.schemas.add({
|
|
173
|
-
template: '#treebuilder-template',
|
|
174
|
-
components: [
|
|
175
|
-
'babia-treebuilder'
|
|
176
|
-
]
|
|
177
|
-
})
|
|
178
|
-
|
|
179
|
-
NAF.schemas.add({
|
|
180
|
-
template: '#boats-template',
|
|
181
|
-
components: [
|
|
182
|
-
'position',
|
|
183
|
-
'rotation',
|
|
184
|
-
'scale',
|
|
185
|
-
'babia-boats'
|
|
186
|
-
]
|
|
187
|
-
});
|
|
188
|
-
|
|
189
184
|
</script>
|
|
190
185
|
|
|
191
186
|
<!-- GITLAB CORNER-->
|
|
192
187
|
<div class="gitlab-corner-wrapper"><a
|
|
193
|
-
href="https://gitlab.com/babiaxr/aframe-babia-components/-/blob/master/examples/multi_boats/
|
|
188
|
+
href="https://gitlab.com/babiaxr/aframe-babia-components/-/blob/master/examples/multi_boats/index_multi_boats.html"
|
|
194
189
|
class="gitlab-corner" aria-label="View source on GitLab"><svg id="logo_art" data-name="logo art"
|
|
195
190
|
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 586 559">
|
|
196
191
|
<g id="g44">
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="utf-8">
|
|
6
|
-
<title>
|
|
7
|
-
<meta name="description" content="
|
|
6
|
+
<title>BabiaXR - Multiuser Babia-boats Demo</title>
|
|
7
|
+
<meta name="description" content="Babiaxr multiuser demo using babia-boats.">
|
|
8
8
|
</meta>
|
|
9
9
|
<!-- Aframe -->
|
|
10
10
|
<script src="https://aframe.io/releases/1.2.0/aframe.min.js"></script>
|
|
@@ -22,18 +22,25 @@
|
|
|
22
22
|
|
|
23
23
|
<body>
|
|
24
24
|
<a-scene id="AframeScene" networked-scene="
|
|
25
|
-
room:
|
|
25
|
+
room: multi_boats_jetuml;
|
|
26
26
|
adapter: easyrtc;
|
|
27
27
|
debug: true;
|
|
28
28
|
audio: true;
|
|
29
|
-
serverURL: https://f-l2108-pc02.aulas.etsit.urjc.es:49153
|
|
29
|
+
serverURL: https://f-l2108-pc02.aulas.etsit.urjc.es:49153/;
|
|
30
|
+
">
|
|
30
31
|
|
|
31
32
|
<a-assets>
|
|
32
33
|
<!-- Dummy asset to make the scene sync (WIP)-->
|
|
33
34
|
<img src="https://wallpapercave.com/wp/wp2345390.jpg?dummy=8484744">
|
|
34
35
|
|
|
35
36
|
<!-- Templates -->
|
|
36
|
-
|
|
37
|
+
|
|
38
|
+
<!-- Selector and navigator -->
|
|
39
|
+
<template id="selector-template">
|
|
40
|
+
<a-entity class="selector"></a-entity>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<!-- Camera -->
|
|
37
44
|
<template id="rig-template">
|
|
38
45
|
<a-entity class="rig"></a-entity>
|
|
39
46
|
</template>
|
|
@@ -46,51 +53,30 @@
|
|
|
46
53
|
<template id="username-tag-template">
|
|
47
54
|
<a-text class="username-tag"></a-text>
|
|
48
55
|
</template>
|
|
49
|
-
|
|
50
|
-
<!-- Querier , Selector and treebuilder -->
|
|
51
|
-
<template id="querier-template">
|
|
52
|
-
<a-entity class="querier"></a-entity>
|
|
53
|
-
</template>
|
|
54
|
-
<template id="selector-template">
|
|
55
|
-
<a-entity class="selector"></a-entity>
|
|
56
|
-
</template>
|
|
57
|
-
<template id="treebuilder-template">
|
|
58
|
-
<a-entity class="treebuilder"></a-entity>
|
|
59
|
-
</template>
|
|
60
|
-
|
|
61
|
-
<!-- Boats -->
|
|
62
|
-
<template id="boats-template">
|
|
63
|
-
<a-entity class="boats"></a-entity>
|
|
64
|
-
</template>
|
|
65
56
|
</a-assets>
|
|
66
57
|
|
|
67
58
|
<!-- Environment -->
|
|
68
|
-
<a-entity environment="preset: yavapai" renderer="antialias: true">
|
|
59
|
+
<a-entity environment="preset: yavapai" renderer="antialias: true"></a-entity>
|
|
69
60
|
|
|
70
|
-
<!-- No sync entities -->
|
|
71
61
|
<!-- Slider -->
|
|
72
|
-
<a-entity id="nav" babia-navigator position="6
|
|
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>
|
|
73
64
|
|
|
74
|
-
<!-- Sync entities, persistent -->
|
|
75
65
|
<!-- Querier -->
|
|
76
|
-
<a-entity id="
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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>
|
|
81
71
|
<!-- Treebuilder -->
|
|
82
|
-
<a-entity id="
|
|
83
|
-
networked="template:#treebuilder-template; networkId:treebuilder; persistent: true; owner: scene">
|
|
84
|
-
</a-entity>
|
|
72
|
+
<a-entity id="treebuilder" babia-treebuilder="field: path; split_by: /; from: selector"></a-entity>
|
|
85
73
|
|
|
86
74
|
<!-- Boats Visualizer -->
|
|
87
|
-
<a-entity babia-boats="from:
|
|
88
|
-
|
|
89
|
-
scale="0.03 0.03 0.03"></a-entity>
|
|
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>
|
|
90
77
|
|
|
91
|
-
<!--Sync entities, not persistent-->
|
|
92
78
|
<!-- Camera -->
|
|
93
|
-
<a-entity id="rig" position="
|
|
79
|
+
<a-entity id="rig" position="4 1.6 3" rotation="0 0 0"
|
|
94
80
|
networked="template:#rig-template; attachTemplateToLocal:false">
|
|
95
81
|
<a-entity id="camera" camera look-controls wasd-controls="fly: false"
|
|
96
82
|
networked="template:#camera-template;attachTemplateToLocal:false;">
|
|
@@ -101,23 +87,43 @@
|
|
|
101
87
|
position="-0.5 1.5 0" width="5" color="black" value="username"></a-text>
|
|
102
88
|
</a-sphere>
|
|
103
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>
|
|
104
107
|
</a-entity>
|
|
105
|
-
<!-- Hand Controls -->
|
|
106
|
-
<a-entity id="leftHand" oculus-touch-controls="hand: left"
|
|
107
|
-
teleport-controls="cameraRig: #rig; teleportOrigin: #avatar; collisionEntities: #environmentGround;
|
|
108
|
-
hitCylinderColor: #ff3468; curveHitColor: #ff3468; curveMissColor: #333333; curveLineWidth: 0.01; button: trigger"></a-entity>
|
|
109
|
-
<a-entity id="rightHand" laser-controls="hand: right" oculus-touch-controls="hand: right"
|
|
110
|
-
raycaster="objects: .babiaxraycasterclass, #audio_button"></a-entity>
|
|
111
108
|
<a-entity id="cursor" cursor="rayOrigin:mouse" raycaster="objects: .babiaxraycasterclass, #audio_button">
|
|
112
109
|
</a-entity>
|
|
113
110
|
</a-entity>
|
|
114
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
|
+
|
|
115
119
|
</a-scene>
|
|
116
120
|
|
|
117
121
|
<script>
|
|
122
|
+
/* Camera */
|
|
123
|
+
let rig = document.getElementById('rig')
|
|
118
124
|
let avatar = document.getElementById('avatar')
|
|
119
125
|
let usernameTag = document.getElementById('username-tag')
|
|
120
|
-
|
|
126
|
+
|
|
121
127
|
let color = getRandomColor();
|
|
122
128
|
usernameTag.setAttribute('value', color)
|
|
123
129
|
avatar.setAttribute('color', color)
|
|
@@ -129,11 +135,50 @@
|
|
|
129
135
|
color += digits[Math.floor(Math.random() * 16)];
|
|
130
136
|
}
|
|
131
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
|
+
}
|
|
132
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');
|
|
133
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
|
+
|
|
134
172
|
</script>
|
|
135
173
|
<script>
|
|
136
|
-
|
|
174
|
+
NAF.schemas.add({
|
|
175
|
+
template: '#selector-template',
|
|
176
|
+
components: [
|
|
177
|
+
'babia-selector'
|
|
178
|
+
]
|
|
179
|
+
})
|
|
180
|
+
|
|
181
|
+
// Avatar
|
|
137
182
|
NAF.schemas.add({
|
|
138
183
|
template: '#rig-template',
|
|
139
184
|
components: [
|
|
@@ -170,78 +215,42 @@
|
|
|
170
215
|
'rotation'
|
|
171
216
|
]
|
|
172
217
|
});
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
NAF.schemas.add({
|
|
176
|
-
template: '#querier-template',
|
|
177
|
-
components: [
|
|
178
|
-
'babia-queryjson'
|
|
179
|
-
]
|
|
180
|
-
})
|
|
181
|
-
|
|
182
|
-
NAF.schemas.add({
|
|
183
|
-
template: '#selector-template',
|
|
184
|
-
components: [
|
|
185
|
-
'babia-selector'
|
|
186
|
-
]
|
|
187
|
-
})
|
|
188
|
-
|
|
189
|
-
NAF.schemas.add({
|
|
190
|
-
template: '#treebuilder-template',
|
|
191
|
-
components: [
|
|
192
|
-
'babia-treebuilder'
|
|
193
|
-
]
|
|
194
|
-
})
|
|
195
|
-
|
|
196
|
-
NAF.schemas.add({
|
|
197
|
-
template: '#boats-template',
|
|
198
|
-
components: [
|
|
199
|
-
'position',
|
|
200
|
-
'rotation',
|
|
201
|
-
'scale',
|
|
202
|
-
'babia-boats'
|
|
203
|
-
]
|
|
204
|
-
});
|
|
205
|
-
|
|
206
218
|
</script>
|
|
207
219
|
|
|
208
|
-
|
|
209
|
-
|
|
210
220
|
<!-- GITLAB CORNER-->
|
|
211
221
|
<div class="gitlab-corner-wrapper"><a
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
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>
|
|
245
255
|
</body>
|
|
246
|
-
|
|
247
256
|
</html>
|