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
|
@@ -37,7 +37,7 @@ AFRAME.registerComponent('babia-treebuilder', {
|
|
|
37
37
|
/**
|
|
38
38
|
* Called once when component is attached. Generally for initial setup.
|
|
39
39
|
*/
|
|
40
|
-
init: function () {
|
|
40
|
+
init: function () {
|
|
41
41
|
this.notiBuffer = new NotiBuffer();
|
|
42
42
|
},
|
|
43
43
|
|
|
@@ -45,24 +45,24 @@ AFRAME.registerComponent('babia-treebuilder', {
|
|
|
45
45
|
* Called when component is attached and when component data changes.
|
|
46
46
|
* Generally modifies the entity based on the data.
|
|
47
47
|
*/
|
|
48
|
-
update: function (oldData){
|
|
48
|
+
update: function (oldData) {
|
|
49
49
|
let data = this.data;
|
|
50
50
|
let el = this.el;
|
|
51
51
|
|
|
52
|
-
if (data.data && (oldData.data !== data.data || data.field !== oldData.field || data.split_by !== oldData.split_by)){
|
|
52
|
+
if (data.data && (oldData.data !== data.data || data.field !== oldData.field || data.split_by !== oldData.split_by)) {
|
|
53
53
|
let _data = parseJson(data.data);
|
|
54
|
-
this.processData(_data);
|
|
55
|
-
} else if ((data.from !== oldData.from || data.field !== oldData.field || data.split_by !== oldData.split_by)){
|
|
54
|
+
this.processData(_data);
|
|
55
|
+
} else if ((data.from !== oldData.from || data.field !== oldData.field || data.split_by !== oldData.split_by)) {
|
|
56
56
|
// Unregister from old notiBuffer
|
|
57
|
-
if(this.prodComponent) {
|
|
57
|
+
if (this.prodComponent) {
|
|
58
58
|
this.prodComponent.notiBuffer.unregister(this.notiBufferId)
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
// Register for the new one
|
|
62
62
|
// (It will also invoke processData once if there is already data)
|
|
63
63
|
this.prodComponent = findProdComponent(data, el, "babia-treebuilder")
|
|
64
|
-
if (this.prodComponent.notiBuffer){
|
|
65
|
-
|
|
64
|
+
if (this.prodComponent.notiBuffer) {
|
|
65
|
+
this.notiBufferId = this.prodComponent.notiBuffer.register(this.processData.bind(this))
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
},
|
|
@@ -78,10 +78,10 @@ AFRAME.registerComponent('babia-treebuilder', {
|
|
|
78
78
|
for (let j = 0; j < path.length; j++) {
|
|
79
79
|
// Check if starts with the split char
|
|
80
80
|
if (!path[j]) { continue }
|
|
81
|
-
|
|
81
|
+
|
|
82
82
|
let part = path[j];
|
|
83
83
|
let existingPath = findWhere(currentLevel, 'name', part);
|
|
84
|
-
|
|
84
|
+
|
|
85
85
|
if (existingPath) {
|
|
86
86
|
currentLevel = existingPath.children;
|
|
87
87
|
} else {
|
|
@@ -91,8 +91,13 @@ AFRAME.registerComponent('babia-treebuilder', {
|
|
|
91
91
|
} else {
|
|
92
92
|
newPart['children'] = []
|
|
93
93
|
}
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
let findUid = paths[i][data.field].split(data.split_by + part + data.split_by)
|
|
95
|
+
// No pop if it is a building beacuse it breaks
|
|
96
|
+
if (findUid.length > 1) {
|
|
97
|
+
let rest = findUid.pop()
|
|
98
|
+
}
|
|
99
|
+
newPart['uid'] = findUid.join(data.split_by + part + data.split_by) + data.split_by + part
|
|
100
|
+
newPart['name'] = part
|
|
96
101
|
currentLevel.push(newPart);
|
|
97
102
|
currentLevel = newPart.children;
|
|
98
103
|
}
|
|
@@ -6,62 +6,73 @@ if (typeof AFRAME === 'undefined') {
|
|
|
6
6
|
|
|
7
7
|
AFRAME.registerComponent('babia-camera', {
|
|
8
8
|
schema: {
|
|
9
|
-
raycasterMouse: { type: 'string', default: '.babiaxraycasterclass'},
|
|
10
|
-
raycasterHand: {type: 'string', default: '.babiaxraycasterclass'},
|
|
11
|
-
tipsOpened: { type: 'boolean', default: true},
|
|
12
|
-
gripRLabel: {type: 'string', default: 'Open/Close \nTips'},
|
|
13
|
-
gripLLabel: {type: 'string', default: 'Stop Audio'},
|
|
14
|
-
triggerRLabel: {type: 'string', default: 'Click'},
|
|
15
|
-
triggerLLabel: {type: 'string', default: 'Teleport' },
|
|
16
|
-
teleportCollisions: {type: 'string', default: '.environmentGround'}
|
|
9
|
+
raycasterMouse: { type: 'string', default: '.babiaxraycasterclass' },
|
|
10
|
+
raycasterHand: { type: 'string', default: '.babiaxraycasterclass' },
|
|
11
|
+
tipsOpened: { type: 'boolean', default: true },
|
|
12
|
+
gripRLabel: { type: 'string', default: 'Open/Close \nTips' },
|
|
13
|
+
gripLLabel: { type: 'string', default: 'Stop Audio' },
|
|
14
|
+
triggerRLabel: { type: 'string', default: 'Click' },
|
|
15
|
+
triggerLLabel: { type: 'string', default: 'Teleport' },
|
|
16
|
+
teleportCollisions: { type: 'string', default: '.environmentGround' }
|
|
17
17
|
},
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Set if component needs multiple instancing.
|
|
21
21
|
*/
|
|
22
22
|
multiple: false,
|
|
23
|
-
|
|
23
|
+
|
|
24
24
|
/**
|
|
25
25
|
* Initial creation and setting of the mesh.
|
|
26
26
|
*/
|
|
27
|
-
init: function () {},
|
|
27
|
+
init: function () { },
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Called when component is attached and when component data changes.
|
|
31
31
|
* Generally modifies the entity based on the data.
|
|
32
32
|
*/
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
if(this.data != this.oldData){
|
|
34
|
+
update: function (oldData) {
|
|
35
|
+
if (this.data != this.oldData) {
|
|
36
|
+
// Delete if exists
|
|
37
|
+
if (this.cursor || this.leftHand || this.rightHand) {
|
|
38
|
+
this.el.parentElement.removeChild(this.cursor)
|
|
39
|
+
this.el.parentElement.removeChild(this.leftHand)
|
|
40
|
+
this.el.parentElement.removeChild(this.rightHand)
|
|
41
|
+
this.cursor = undefined
|
|
42
|
+
this.leftHand = undefined
|
|
43
|
+
this.rightHand = undefined
|
|
44
|
+
}
|
|
36
45
|
// Add camera
|
|
37
|
-
this.el.
|
|
46
|
+
// if (!this.el.getAttribute('camera')) {
|
|
47
|
+
// //this.el.setAttribute('camera', '');
|
|
48
|
+
// }
|
|
38
49
|
// Add mouse
|
|
39
50
|
this.addCursor();
|
|
40
51
|
// OCULUS CASE
|
|
41
52
|
this.setOculusConnected();
|
|
42
53
|
}
|
|
43
|
-
|
|
54
|
+
},
|
|
44
55
|
|
|
45
|
-
addCursor: function(){
|
|
56
|
+
addCursor: function () {
|
|
46
57
|
this.cursor = document.createElement('a-entity');
|
|
47
58
|
this.cursor.id = 'cursor';
|
|
48
|
-
this.cursor.setAttribute('cursor', {rayOrigin: 'mouse'});
|
|
59
|
+
this.cursor.setAttribute('cursor', { rayOrigin: 'mouse' });
|
|
49
60
|
this.cursor.setAttribute('raycaster', {
|
|
50
61
|
objects: this.data.raycasterMouse,
|
|
51
62
|
})
|
|
52
63
|
this.el.parentElement.append(this.cursor);
|
|
53
64
|
},
|
|
54
65
|
|
|
55
|
-
createTip: function(id, config, position){
|
|
66
|
+
createTip: function (id, config, position) {
|
|
56
67
|
let entity = document.createElement('a-entity');
|
|
57
68
|
entity.id = id;
|
|
58
69
|
entity.classList.add('tips');
|
|
59
70
|
entity.setAttribute('tooltip', config);
|
|
60
71
|
entity.setAttribute('position', position);
|
|
61
|
-
return entity
|
|
72
|
+
return entity;
|
|
62
73
|
},
|
|
63
74
|
|
|
64
|
-
setOculusConnected: function(){
|
|
75
|
+
setOculusConnected: function () {
|
|
65
76
|
let self = this;
|
|
66
77
|
self.tooltips = [];
|
|
67
78
|
/**
|
|
@@ -70,21 +81,21 @@ AFRAME.registerComponent('babia-camera', {
|
|
|
70
81
|
*/
|
|
71
82
|
self.leftHand = document.createElement('a-entity');
|
|
72
83
|
self.leftHand.id = 'babia-leftHand';
|
|
73
|
-
self.leftHand.setAttribute('oculus-touch-controls', {hand: 'left'});
|
|
84
|
+
self.leftHand.setAttribute('oculus-touch-controls', { hand: 'left' });
|
|
74
85
|
self.el.parentElement.append(self.leftHand);
|
|
75
86
|
self.rightHand = document.createElement('a-entity');
|
|
76
87
|
self.rightHand.id = 'babia-rightHand';
|
|
77
|
-
self.rightHand.setAttribute('oculus-touch-controls', {hand: 'right'});
|
|
88
|
+
self.rightHand.setAttribute('oculus-touch-controls', { hand: 'right' });
|
|
78
89
|
self.el.parentElement.append(self.rightHand);
|
|
79
90
|
|
|
80
91
|
document.addEventListener('controllerconnected', (event) => {
|
|
81
92
|
// Update height of the view
|
|
82
93
|
let parentPos = self.el.parentElement.object3D.position;
|
|
83
|
-
self.el.parentElement.setAttribute('position', {x: parentPos.x, y: 0, z: parentPos.z});
|
|
94
|
+
self.el.parentElement.setAttribute('position', { x: parentPos.x, y: 0, z: parentPos.z });
|
|
84
95
|
|
|
85
96
|
// Add hand controllers
|
|
86
97
|
/** LEFT HAND (with teleport) */
|
|
87
|
-
if(event.target.id === 'babia-leftHand'){
|
|
98
|
+
if (event.target.id === 'babia-leftHand') {
|
|
88
99
|
self.leftHand.setAttribute('teleport-controls', {
|
|
89
100
|
cameraRig: `#${self.el.parentElement.id}`,
|
|
90
101
|
teleportOrigin: `#${self.el.id}`,
|
|
@@ -101,12 +112,12 @@ AFRAME.registerComponent('babia-camera', {
|
|
|
101
112
|
text: self.data.triggerLLabel,
|
|
102
113
|
width: 0.07,
|
|
103
114
|
height: 0.03,
|
|
104
|
-
targetPosition: '0.002 -0.02 -0.014',
|
|
115
|
+
targetPosition: '0.002 -0.02 -0.014',
|
|
105
116
|
lineHorizontalAlign: 'right',
|
|
106
117
|
rotation: '-90 0 0',
|
|
107
118
|
src: tooltip.default,
|
|
108
119
|
};
|
|
109
|
-
tipTriggerLpos = {x: -0.09, y: -0.04, z: -0.08};
|
|
120
|
+
tipTriggerLpos = { x: -0.09, y: -0.04, z: -0.08 };
|
|
110
121
|
self.tipTriggerL = this.createTip('babia-tooltip_trigger_L', tipTriggerLconfig, tipTriggerLpos);
|
|
111
122
|
self.leftHand.append(self.tipTriggerL);
|
|
112
123
|
self.tooltips.push(self.tipTriggerL);
|
|
@@ -114,64 +125,65 @@ AFRAME.registerComponent('babia-camera', {
|
|
|
114
125
|
tipGripLconfig = {
|
|
115
126
|
text: self.data.gripLLabel,
|
|
116
127
|
width: 0.08,
|
|
117
|
-
height: 0.04,
|
|
128
|
+
height: 0.04,
|
|
118
129
|
targetPosition: '0.006 -0.008 0.033',
|
|
119
130
|
rotation: '-90 0 0',
|
|
120
131
|
src: tooltip.default,
|
|
121
132
|
};
|
|
122
|
-
tipGripLpos = {x: 0.085, y: -0.01, z: 0.07};
|
|
133
|
+
tipGripLpos = { x: 0.085, y: -0.01, z: 0.07 };
|
|
123
134
|
self.tipGripL = this.createTip('babia-tooltip_grip_L', tipGripLconfig, tipGripLpos);
|
|
124
|
-
self.leftHand.append(self.tipGripL);
|
|
125
|
-
self.tooltips.push(self.tipGripL);
|
|
135
|
+
self.leftHand.append(self.tipGripL);
|
|
136
|
+
self.tooltips.push(self.tipGripL);
|
|
126
137
|
}
|
|
127
138
|
|
|
128
139
|
/** RIGHT HAND (with laser raycaster) */
|
|
129
|
-
if(event.target.id === 'babia-rightHand'){
|
|
130
|
-
self.rightHand.setAttribute('laser-controls', {hand: 'right'});
|
|
140
|
+
if (event.target.id === 'babia-rightHand') {
|
|
141
|
+
self.rightHand.setAttribute('laser-controls', { hand: 'right' });
|
|
131
142
|
self.rightHand.setAttribute('raycaster', {
|
|
132
143
|
objects: this.data.raycasterHand,
|
|
144
|
+
lineOpacity: 1,
|
|
133
145
|
});
|
|
134
146
|
/** TIP TRIGGER R */
|
|
135
147
|
tipTriggerRconfig = {
|
|
136
148
|
text: self.data.triggerRLabel,
|
|
137
149
|
width: 0.07,
|
|
138
150
|
height: 0.03,
|
|
139
|
-
targetPosition: '0.005 -0.02 -0.014',
|
|
151
|
+
targetPosition: '0.005 -0.02 -0.014',
|
|
140
152
|
lineHorizontalAlign: 'left',
|
|
141
153
|
rotation: '-90 0 0',
|
|
142
154
|
src: tooltip.default,
|
|
143
155
|
};
|
|
144
|
-
tipTriggerRpos = {x: -0.09, y: -0.04, z: -0.08};
|
|
156
|
+
tipTriggerRpos = { x: -0.09, y: -0.04, z: -0.08 };
|
|
145
157
|
self.tipTriggerR = this.createTip('babia-tooltip_trigger_R', tipTriggerRconfig, tipTriggerRpos);
|
|
146
158
|
self.rightHand.append(self.tipTriggerR);
|
|
147
|
-
self.tooltips.push(self.tipTriggerR);
|
|
159
|
+
self.tooltips.push(self.tipTriggerR);
|
|
148
160
|
/** TIP GRIP L */
|
|
149
161
|
tipGripRconfig = {
|
|
150
162
|
text: self.data.gripRLabel,
|
|
151
163
|
width: 0.08,
|
|
152
|
-
height: 0.04,
|
|
164
|
+
height: 0.04,
|
|
153
165
|
targetPosition: '0.006 -0.008 0.033',
|
|
154
166
|
lineHorizontalAlign: 'right',
|
|
155
167
|
rotation: '-90 0 0',
|
|
156
168
|
src: tooltip.default,
|
|
157
169
|
};
|
|
158
|
-
tipGripRpos = {x: -0.085, y: -0.01, z: 0.07};
|
|
170
|
+
tipGripRpos = { x: -0.085, y: -0.01, z: 0.07 };
|
|
159
171
|
self.tipGripR = this.createTip('babia-tooltip_grip_R', tipGripRconfig, tipGripRpos);
|
|
160
172
|
self.rightHand.append(self.tipGripR);
|
|
161
|
-
self.tooltips.push(self.tipGripR);
|
|
173
|
+
self.tooltips.push(self.tipGripR);
|
|
162
174
|
}
|
|
163
175
|
|
|
164
176
|
this.tipsController();
|
|
165
|
-
if (this.data.networkedAudio){
|
|
177
|
+
if (this.data.networkedAudio) {
|
|
166
178
|
this.setAudioController();
|
|
167
179
|
}
|
|
168
180
|
});
|
|
169
181
|
},
|
|
170
182
|
|
|
171
|
-
tipsController: function (){
|
|
183
|
+
tipsController: function () {
|
|
172
184
|
let self = this;
|
|
173
185
|
this.tipsOpened = self.data.tipsOpened;
|
|
174
|
-
if (!self.tipsOpened){
|
|
186
|
+
if (!self.tipsOpened) {
|
|
175
187
|
self.tooltips.forEach(tip => {
|
|
176
188
|
tip.setAttribute('visible', false);
|
|
177
189
|
});
|