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.
Files changed (101) hide show
  1. package/components/filters/babia-treebuilder.js +17 -12
  2. package/components/others/babia-camera.js +52 -40
  3. package/components/others/babia-experiment.js +457 -0
  4. package/components/others/babia-poster.js +383 -0
  5. package/components/others/babia-task.js +247 -0
  6. package/components/others/babia-ui.js +312 -147
  7. package/components/others/common.js +36 -5
  8. package/components/visualizers/babia-boats.js +708 -87
  9. package/components/visualizers/babia-network.js +268 -212
  10. package/dist/aframe-babia-components.js +20590 -18317
  11. package/dist/aframe-babia-components.min.js +3 -3
  12. package/dist/aframe-babia-components.min.js.map +1 -1
  13. package/docs/APIs/CHARTS.md +233 -207
  14. package/docs/APIs/OTHERS.md +143 -56
  15. package/docs/RELEASE_NOTES.md +5 -0
  16. package/docs/Tutorials/how_to_prepare_an_experiment.md +148 -0
  17. package/examples/assets/palettes/bluetored.jpg +0 -0
  18. package/examples/assets/textures/360-panorama.jpg +0 -0
  19. package/examples/assets/textures/floor-texture.jpg +0 -0
  20. package/examples/assets/textures/metalic-texture.jpg +0 -0
  21. package/examples/boats/boats_dependency/dependencieslist_cloudinary.json +1 -0
  22. package/examples/boats/boats_dependency/dependencieslist_express.json +4376 -0
  23. package/examples/boats/boats_dependency/dependencieslist_filestash.json +39533 -0
  24. package/examples/boats/boats_dependency/dependencieslist_ghdesktop.json +127660 -0
  25. package/examples/boats/boats_dependency/dependencieslist_karma.json +1 -0
  26. package/examples/boats/boats_dependency/dependencieslist_pm2.json +13726 -0
  27. package/examples/boats/boats_dependency/dependencieslist_portainer.json +41818 -0
  28. package/examples/boats/boats_dependency/dependencieslist_sh.json +5194 -0
  29. package/examples/boats/boats_dependency/experiment.html +277 -0
  30. package/examples/boats/boats_dependency/index.html +300 -0
  31. package/examples/boats/boats_dependency/index_gradient.html +209 -0
  32. package/examples/boats/boats_dependency/index_normalcity.html +207 -0
  33. package/examples/boats/boats_dependency/index_quarter_levels_01.html +213 -0
  34. package/examples/boats/boats_dependency/index_quarter_levels_02.html +213 -0
  35. package/examples/boats/boats_dependency/index_quarter_levels_03.html +213 -0
  36. package/examples/boats/boats_dependency/index_quarter_levels_querystring.html +243 -0
  37. package/examples/boats/boats_dependency/index_tree.html +211 -0
  38. package/examples/boats/boats_dependency/index_tree_gradient.html +212 -0
  39. package/examples/boats/boats_dependency/index_tree_wireframe.html +243 -0
  40. package/examples/charts/network_chart/network_chart.html +10 -2
  41. package/examples/charts/pie/index.html +3 -4
  42. package/examples/codecityjs/perceval2021/index.html +1 -1
  43. package/examples/codecityjs/projects_analysis/argouml_landscape.html +1 -1
  44. package/examples/codecityjs/projects_analysis/argouml_numfuns.html +3 -3
  45. package/examples/codecityjs/projects_analysis/argouml_table.html +1 -1
  46. package/examples/codecityjs/projects_analysis/argouml_tokens.html +1 -1
  47. package/examples/codecityjs/projects_analysis/experiment_interface.html +1 -1
  48. package/examples/codecityjs/projects_analysis/experiment_interface_task5.html +1 -1
  49. package/examples/codecityjs/projects_analysis/experiment_interface_vr_2021.html +1 -1
  50. package/examples/codecityjs/projects_analysis/experiment_interface_vr_task5.html +1 -1
  51. package/examples/codecityjs/projects_analysis/perceval_landscape.html +1 -1
  52. package/examples/codecityjs/projects_analysis/perceval_table.html +1 -1
  53. package/examples/dashboard/chaoss-dashboards.html +1 -1
  54. package/examples/dashboard/chaoss-issues.html +1 -1
  55. package/examples/dashboard/chaoss-pr.html +1 -1
  56. package/examples/dashboard/range.html +1 -1
  57. package/examples/dashboard/template.html +1 -1
  58. package/examples/experiment/city.html +352 -0
  59. package/examples/experiment/index.html +527 -0
  60. package/examples/experiment/pie.html +90 -0
  61. package/examples/experiment/sample-3s.mp3 +0 -0
  62. package/examples/experiment/sample.mp4 +0 -0
  63. package/examples/experiment/staticdata/80-percent-open-time-issues2.json +1 -0
  64. package/examples/experiment/staticdata/80-percent-open-time-pr.json +1 -0
  65. package/examples/experiment/staticdata/issues-by-organization.json +1 -0
  66. package/examples/experiment/staticdata/issues.json +1 -0
  67. package/examples/experiment/staticdata/jetuml_code_data.json +1 -0
  68. package/examples/experiment/staticdata/median-open-time-issues.json +1 -0
  69. package/examples/experiment/staticdata/median-open-time-pr.json +1 -0
  70. package/examples/experiment/staticdata/organizations-issues.json +1 -0
  71. package/examples/experiment/staticdata/organizations-pr.json +1 -0
  72. package/examples/experiment/staticdata/projects-issues.json +1 -0
  73. package/examples/experiment/staticdata/projects-pr.json +1 -0
  74. package/examples/experiment/staticdata/pull-requests-by-organization.json +1 -0
  75. package/examples/experiment/staticdata/pull-requests.json +1 -0
  76. package/examples/experiment/staticdata/repositories-issues-asignees.json +1 -0
  77. package/examples/experiment/staticdata/repositories-issues-avgdays.json +1 -0
  78. package/examples/experiment/staticdata/repositories-issues-count.json +1 -0
  79. package/examples/experiment/staticdata/repositories-issues-submitters.json +1 -0
  80. package/examples/experiment/staticdata/repositories-pr-asignees.json +1 -0
  81. package/examples/experiment/staticdata/repositories-pr-avgdays.json +1 -0
  82. package/examples/experiment/staticdata/repositories-pr-count.json +1 -0
  83. package/examples/experiment/staticdata/repositories-pr-submitters.json +1 -0
  84. package/examples/experiment/staticdata/status-issues.json +1 -0
  85. package/examples/experiment/staticdata/status-pr.json +1 -0
  86. package/examples/experiment/staticdata/submitter-issues-avgdays.json +1 -0
  87. package/examples/experiment/staticdata/submitter-issues-count.json +1 -0
  88. package/examples/experiment/staticdata/submitter-issues-repo.json +1 -0
  89. package/examples/experiment/staticdata/submitter-pr-avgdays.json +1 -0
  90. package/examples/experiment/staticdata/submitter-pr-count.json +1 -0
  91. package/examples/experiment/staticdata/submitter-pr-repo.json +1 -0
  92. package/examples/experiment/staticdata/submitters-issues.json +1 -0
  93. package/examples/experiment/staticdata/submitters-pr.json +1 -0
  94. package/examples/multi_boats/jetuml_evolution_experiment.html +1 -1
  95. package/index.js +23 -9
  96. package/package.json +1 -1
  97. package/examples/charts_querier/network_chart_querier/data.json +0 -123
  98. package/examples/charts_querier/network_chart_querier/links.json +0 -13
  99. package/examples/charts_querier/network_chart_querier/network_chart_querier.html +0 -68
  100. package/examples/charts_querier/network_chart_querier/network_chart_querier_nodes_links.html +0 -74
  101. package/examples/charts_querier/network_chart_querier/nodes.json +0 -12
@@ -16,9 +16,18 @@ This component lets us select the data and the metrics that we want to show in t
16
16
 
17
17
  #### API
18
18
 
19
- | Property | Description | Type | Default value |
20
- | -------- | ----------- | ---- | ----- |
21
- | target | ID of the visualizer that will manage | string | - |
19
+ | Property | Description | Type | Default value |
20
+ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------ | ------------- |
21
+ | target | ID of the visualizer that will manage | string | - |
22
+ | hideRows | Array of the rows that want to be hidden | array | - |
23
+ | hideFields | Array of the fields that want to be hidden | array | - |
24
+ | showOnly | Array of the fields that only want to show, format **property:field**, example: **babia-ui="showOnly: height:field, color:otherfield"** | array | - |
25
+ | maxPerRow | Max items per row, if more, a breakline will be added | number | 5 |
26
+ | linesSeparation | Distance between lines of the UI | number | 0.3 |
27
+ | customQuerierLabel | Custom label of the first row when there are more than one querier | string | Data |
28
+ | customAttributeSwitch | Atrributes to remove/add to the targer. Format **attr:value**, example: **babia-ui="customAttributeSwitch: wireframe:true, color:blue"** | array | - |
29
+ | customAttributeLabel | Custom label for the attributes to represent in the customAttributeSwitch row. Format **attr:label**, example: **babia-ui="customAttributeSwitch: trasnparency20byBuildingField:Transparency, wireframeByBuildingField:Wireframe"** | array | - |
30
+
22
31
 
23
32
  ```html
24
33
  <a-entity babia-ui = 'target: visualizerid'></a-entity>
@@ -33,7 +42,7 @@ The look-at component defines the behavior for an entity to dynamically rotate o
33
42
  #### API
34
43
 
35
44
  | Type | Description |
36
- |----------|-----------------------------------------------------------------------------------------------------------------------------------------------|
45
+ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
37
46
  | selector | A query selector indicating another entity to track. If the other entity is moving then the `look-at` component will track the moving entity. |
38
47
  | vec3 | An XYZ coordinate. The entity will face towards a static position. |
39
48
  ```html
@@ -51,10 +60,10 @@ To work needs to indicate it inside the selector
51
60
  ```
52
61
  #### API
53
62
 
54
- | Property | Description | Type | Default value |
55
- | -------- | ----------- | ---- | ----- |
56
- | direction | Direction of the time evolution (`forward` or `rewind`). If is empty or it gets a different value, it behaves like `forward`. **Important:** Do not set this value manually, it will be updated with the direction value of the selector via notiBuffer. | string | `forward`
57
- | state | State of the time evolution (`play` or `pause`). If is empty or it gets a different value, it behaves like `play`. **Important:** Do not set this value manually, it will be updated with the state value of the selector via notiBuffer | string | `play`
63
+ | Property | Description | Type | Default value |
64
+ | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ------------- |
65
+ | direction | Direction of the time evolution (`forward` or `rewind`). If is empty or it gets a different value, it behaves like `forward`. **Important:** Do not set this value manually, it will be updated with the direction value of the selector via notiBuffer. | string | `forward` |
66
+ | state | State of the time evolution (`play` or `pause`). If is empty or it gets a different value, it behaves like `play`. **Important:** Do not set this value manually, it will be updated with the state value of the selector via notiBuffer | string | `play` |
58
67
 
59
68
  ### babia-axis components
60
69
 
@@ -66,17 +75,17 @@ This component adds a x axis to the graph.
66
75
 
67
76
  #### API
68
77
 
69
- | Property | Description | Type | Default value |
70
- | -------- | ----------- | ---- | ----- |
71
- | labels | List of labels to show | array | - |
72
- | ticks | Points where labels are added in the axis | array | - |
73
- | length | Length of the axis | number | - |
74
- | color | Color for axis and labels | color | #000 |
75
- | palette | Color palette for axis and labels:`blues` `bussiness` `sunset`. [See more](CHARTS.md)) **Important**: If the value is not **None**, it will disable `color` attribute. | string | ' ' |
76
- | animation | Animates the axis if true | boolean | true |
77
- | dur | Duration of animation | number | 2000 |
78
- | align | Sets the position of the labels related to the axis. It accepts the values **right**, **left**, **front** and **behind**| string | front |
79
- | name | Metric name to show on title label. | string | - |
78
+ | Property | Description | Type | Default value |
79
+ | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------------- |
80
+ | labels | List of labels to show | array | - |
81
+ | ticks | Points where labels are added in the axis | array | - |
82
+ | length | Length of the axis | number | - |
83
+ | color | Color for axis and labels | color | #000 |
84
+ | palette | Color palette for axis and labels:`blues` `bussiness` `sunset`. [See more](CHARTS.md)) **Important**: If the value is not **None**, it will disable `color` attribute. | string | ' ' |
85
+ | animation | Animates the axis if true | boolean | true |
86
+ | dur | Duration of animation | number | 2000 |
87
+ | align | Sets the position of the labels related to the axis. It accepts the values **right**, **left**, **front** and **behind** | string | front |
88
+ | name | Metric name to show on title label. | string | - |
80
89
 
81
90
  ```html
82
91
  <a-entity babia-axis-x = 'labels: countries, ticks: calculatedTicks, length: 10, palette: ubuntu,
@@ -90,16 +99,16 @@ This component adds a y axis to the graph.
90
99
 
91
100
  #### API
92
101
 
93
- | Property | Description | Type | Default value |
94
- | -------- | ----------- | ---- | ----- |
95
- | maxValue | Maximum value that this axis will show | number | - |
96
- | length | Length of the axis | number | - |
97
- | minSteps | Minimum number of steps | number | 6 |
98
- | color | Color for axis and labels | color | #000 |
99
- | animation | Animates the axis if true | boolean | true |
100
- | dur | Duration of animation | number | 2000 |
101
- | align | Sets the position of the labels related to the axis. It accepts the values **right**, **left**, **front** and **behind**| string | front |
102
- | name | Metric name to show on title label. | string | - |
102
+ | Property | Description | Type | Default value |
103
+ | --------- | ------------------------------------------------------------------------------------------------------------------------ | ------- | ------------- |
104
+ | maxValue | Maximum value that this axis will show | number | - |
105
+ | length | Length of the axis | number | - |
106
+ | minSteps | Minimum number of steps | number | 6 |
107
+ | color | Color for axis and labels | color | #000 |
108
+ | animation | Animates the axis if true | boolean | true |
109
+ | dur | Duration of animation | number | 2000 |
110
+ | align | Sets the position of the labels related to the axis. It accepts the values **right**, **left**, **front** and **behind** | string | front |
111
+ | name | Metric name to show on title label. | string | - |
103
112
 
104
113
  ```html
105
114
  <a-entity babia-axis-y = 'maxValue: 250, length: 10, color: #fff,
@@ -112,17 +121,17 @@ This component adds a z axis to the graph.
112
121
 
113
122
  #### API
114
123
 
115
- | Property | Description | Type | Default value |
116
- | -------- | ----------- | ---- | ----- |
117
- | labels | List of labels to show | array | - |
118
- | ticks | Points where labels are added in the axis | array | - |
119
- | length | Length of the axis | number | - |
120
- | color | Color for axis and labels | color | #000 |
121
- | palette | Color palette for axis and labels. **Important**: If the value is not **None**, it will disable `color` attribute. | string | ' ' |
122
- | animation | Animates the axis if true | boolean | true |
123
- | dur | Duration of animation | number | 2000 |
124
- | align | Sets the position of the labels related to the axis. It accepts the values **right**, **left**, **front** and **behind**| string | front |
125
- | name | Metric name to show on title label. | string | - |
124
+ | Property | Description | Type | Default value |
125
+ | --------- | ------------------------------------------------------------------------------------------------------------------------ | ------- | ------------- |
126
+ | labels | List of labels to show | array | - |
127
+ | ticks | Points where labels are added in the axis | array | - |
128
+ | length | Length of the axis | number | - |
129
+ | color | Color for axis and labels | color | #000 |
130
+ | palette | Color palette for axis and labels. **Important**: If the value is not **None**, it will disable `color` attribute. | string | ' ' |
131
+ | animation | Animates the axis if true | boolean | true |
132
+ | dur | Duration of animation | number | 2000 |
133
+ | align | Sets the position of the labels related to the axis. It accepts the values **right**, **left**, **front** and **behind** | string | front |
134
+ | name | Metric name to show on title label. | string | - |
126
135
 
127
136
  ```html
128
137
  <a-entity babia-axis-z = 'labels: continents, ticks: calculatedTicks, length: 10, palette: pearl,
@@ -131,23 +140,23 @@ This component adds a z axis to the graph.
131
140
 
132
141
  #### **babia-camera component**
133
142
 
134
- This component replaces A-frame camera and cursor components and inserts oculus controllers.
143
+ This component built the needed things related to the camera for changing between VR and On-Screen, it adds cursor components and inserts oculus controllers.
135
144
 
136
145
  #### API
137
146
 
138
- | Property | Description | Type | Default value |
139
- | -------- | ----------- | ---- | ----- |
140
- | raycasterMouse | Objects the raycaster can interact with | string | .babiaxraycasterclass |
141
- | raycasterHand | Objects the raycaster can interact with | string | .babiaxraycasterclass |
142
- | tipsOpened | Displays tips about hand controllers | boolean | true |
143
- | triggerRLabel | Action label for this button | string | Click |
144
- | triggerLLabel | Action label for this button | string | Teleport |
145
- | gridRLabel | Action label for this button | string | Open/Close Tips |
146
- | grigLLabel | Action label for this button | string | Stop Audio |
147
- | teleportCollision | Selector of the meshes used to check the collisions | string | .environmentGround |
147
+ | Property | Description | Type | Default value |
148
+ | ----------------- | --------------------------------------------------- | ------- | --------------------- |
149
+ | raycasterMouse | Objects the raycaster can interact with | string | .babiaxraycasterclass |
150
+ | raycasterHand | Objects the raycaster can interact with | string | .babiaxraycasterclass |
151
+ | tipsOpened | Displays tips about hand controllers | boolean | true |
152
+ | triggerRLabel | Action label for this button | string | Click |
153
+ | triggerLLabel | Action label for this button | string | Teleport |
154
+ | gridRLabel | Action label for this button | string | Open/Close Tips |
155
+ | grigLLabel | Action label for this button | string | Stop Audio |
156
+ | teleportCollision | Selector of the meshes used to check the collisions | string | .environmentGround |
148
157
 
149
158
  ```html
150
- <a-entity id="head" babia-camera="raycasterMouse: .babiaxraycasterclass, #audio_button; raycasterHand: .babiaxraycasterclass, #audio_button" look-controls wasd-controls="fly: false"></a-entity>
159
+ <a-entity id="head" camera babia-camera="raycasterMouse: .babiaxraycasterclass, #audio_button; raycasterHand: .babiaxraycasterclass, #audio_button" look-controls wasd-controls="fly: false"></a-entity>
151
160
  ```
152
161
 
153
162
  #### **babia-range-selector component**
@@ -156,11 +165,89 @@ This component uses the queryes component in order to change the time range in t
156
165
 
157
166
  #### API
158
167
 
159
- | Property | Description | Type | Default value |
160
- | -------- | ----------- | ---- | ----- |
161
- | defaultRange | Default time range in the list, options: `Last 5 years, Last 2 years, Last 1 year, Last 6 months, Last 90 days, Last 60 days, Last 30 days, Last 7 days, Last 24 hours, Last 12 hours, Last 4 hours, Last 1 hour, Last 30 minutes, Last 15 minutes` | string | `Last 1 year` |
168
+ | Property | Description | Type | Default value |
169
+ | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ------------- |
170
+ | defaultRange | Default time range in the list, options: `Last 5 years, Last 2 years, Last 1 year, Last 6 months, Last 90 days, Last 60 days, Last 30 days, Last 7 days, Last 24 hours, Last 12 hours, Last 4 hours, Last 1 hour, Last 30 minutes, Last 15 minutes` | string | `Last 1 year` |
162
171
 
163
172
  ```html
164
173
  <!-- UI -->
165
174
  <a-entity id="interface" babia-range-selector position="3.376 1.072 -3.073" rotation="0 -90 0" scale="0.132 0.132 0.132"></a-entity>
166
- ```
175
+ ```
176
+
177
+
178
+ #### **babia-poster component**
179
+
180
+ **This component is a soft fork of aframe-dialog-component**: https://github.com/editvr/aframe-dialog-popup-component#readme
181
+
182
+ | Property | Description | Default Value |
183
+ | ---------------- | ---------------------------- | ---------------------------- |
184
+ | title | String containing title. | New Dialog |
185
+ | titleColor | Text color of title. | black |
186
+ | titleFont | Title font. | mozillavr |
187
+ | titleWrapCount | Title entity wrap count. | 24 |
188
+ | body | String containing body. | This dialog has no body yet. |
189
+ | bodyColor | Text color of body. | black |
190
+ | bodyFont | Body font. | mozillavr |
191
+ | bodyWrapCount | Body entity wrap count. | 30 |
192
+ | openOn | Open/Close event. | click |
193
+ | active | Turn dialog on/off. | true |
194
+ | openIconImage | Icon image for open button. | None |
195
+ | openIconRadius | Radius for open icon. | 0.3 |
196
+ | openIconColor | Color for open icon. | white |
197
+ | closeIconImage | Icon image for open button. | None |
198
+ | closeIconRadius | Radius for close icon. | 0.3 |
199
+ | closeIconColor | Color for close icon. | white |
200
+ | image | Path to Dialog hero image. | None |
201
+ | imageWidth | Dialog hero image width. | 2 |
202
+ | imageHeight | Dialog hero image height. | 2 |
203
+ | dialogBoxWidth | Dialog box width. | 4 |
204
+ | dialogBoxHeight | Dialog box height. | 4 |
205
+ | dialogBoxColor | Dialog box background color. | white |
206
+ | dialogBoxPadding | Dialog box padding. | 0.2 |
207
+
208
+ #### **babia-experiment component**
209
+
210
+ **We recomment to follow [this tutorial](../Tutorials/how_to_prepare_an_experiment.md) for using this component**
211
+
212
+ | Property | Description | Type | Default value |
213
+ | ------------------------ | ---------------------------------------------------------------------------- | ------------ | ------------------ |
214
+ | taskTitle | Title of the task poster | string | Default task title |
215
+ | taskDescription | Description of the task poster | string | Default task text |
216
+ | openTaskImg | Img of the popup icon of the task poster | string | - |
217
+ | closeTaskImg | Img of the popup icon of the task poster (for closing) | string | - |
218
+ | timeLimitEnding | If the experiment last a defined time | boolean | false |
219
+ | timeLimitTime | Time that the user has for conducting the experiment | seconds | 300 |
220
+ | forceFinishWhenTimeLimit | Force experiment finish when time hiding the charts and downloading the data | boolean | false |
221
+ | finishButton | Button to finish the experiment | boolean | true |
222
+ | recordDelta | Time delta for recording the position and rotation of the camera | milliseconds | 3000 |
223
+ | recordAudio | Record audio of the participant with the microphone | boolean | true |
224
+ | taskAudio | If the task is defined by an audio | boolean | false |
225
+ | taskAudioUrl | URL of the mp3 audio for defining the task | string | - |
226
+ | taskVideo | If the task is defined by an video | boolean | false |
227
+ | taskVideoId | ID of the asset with the video for defining the task | string | - |
228
+ | taskVideoWidth | Width of the video panel | boolean | 3 |
229
+ | taskVideoWidth | Height of the video panel | boolean | 1.75 |
230
+ | lookat | What everything created by this component will follow in rotation | string | `[camera]` |
231
+
232
+
233
+
234
+ #### **babia-task component**
235
+
236
+ **We recomment to follow [this tutorial](../Tutorials/how_to_prepare_an_experiment.md) for using this component**
237
+
238
+ **This component only works when using the babia-experiment component, as a child**
239
+
240
+ | Property | Description | Type | Default value |
241
+ | --------------- | ------------------------------------------------------------------------------------ | ------- | ------------------ |
242
+ | taskTitle | Title of the task poster | string | Default task title |
243
+ | taskDescription | Description of the task poster | string | Default task text |
244
+ | openTaskImg | Img of the popup icon of the task poster | string | - |
245
+ | closeTaskImg | Img of the popup icon of the task poster (for closing) | string | - |
246
+ | taskAudio | If the task is defined by an audio | boolean | false |
247
+ | taskAudioUrl | URL of the mp3 audio for defining the task | string | - |
248
+ | taskVideo | If the task is defined by an video | boolean | false |
249
+ | taskVideoId | ID of the asset with the video for defining the task | string | - |
250
+ | taskVideoWidth | Width of the video panel | boolean | 3 |
251
+ | taskVideoWidth | Height of the video panel | boolean | 1.75 |
252
+ | offsetX | Offset in the X axis for positioning the task (useful when more than one babia-task) | number | 0 |
253
+ | lookat | What everything created by this component will follow in rotation | string | `[camera]` |
@@ -4,6 +4,11 @@ This doc gathers all the information about the releases made by the Springs/Mile
4
4
 
5
5
  ## Release notes
6
6
 
7
+ ### NPM 1.2.6 version
8
+
9
+ Added `babia-experiment` and eveything related to the experiments feature.
10
+
11
+
7
12
  ### NPM 1.2.5 version
8
13
 
9
14
  #### Colors palettes
@@ -0,0 +1,148 @@
1
+ ---
2
+ linktitle: "how_to_debug"
3
+ date: 2022-10-05T12:40:05+02:00
4
+ title: How to prepare an experiment environment
5
+ draft: false
6
+ categories: [ "Tutorials", "Documentation" ]
7
+ tags: ["api", "debug", "launch", "VR", "guide"]
8
+ ---
9
+
10
+ # How to prepare an experiment environment
11
+
12
+ BabiaXR allows you to conduct experiment with any kind of data or any kind of scene created with A-Frame, just using one of the components. This allows you to compare your scene easily between VR and On-Screen. This guide will show you how to prepare the scene step by step for creating the environment for the experiment.
13
+
14
+ ## 1. Create your Scene
15
+
16
+ First of all, you have to define the scene and build it, in BabiaXR you have a complete set of components and tutorials for creating scenes with different visualizations.
17
+
18
+ ## 2. Using the `babia-experiment` component
19
+
20
+ Once the scene for conducting the experiment is defined, next step is to add an entity as the parent of the scene, following this structure:
21
+
22
+ ```html
23
+ ...
24
+ <a-scene>
25
+ <a-assets>
26
+ <!-- Your assets here -->
27
+ </a-assets>
28
+
29
+ <a-entity babia-experiment>
30
+ <!-- Your scene here -->
31
+ </a-entity>
32
+ </a-scene>
33
+ ...
34
+ ```
35
+
36
+ Every chart under the `babia-experiment` will be hidden by default, so the participant cannot see the charts until he clicks on the "Start!" button.
37
+
38
+ Now, let's configure the experiment following the requirements.
39
+
40
+ ## 3. Define tasks
41
+
42
+ ### 3.1 More than one task experiment
43
+
44
+ If the exepriment to conduct consist in more than one task, you have to use the `babia-task` experiment in an isolated entity as direct **children** form the entity where the `babia-experiment` component is defined. Those entities **must have an unique identifier**. Specifically following this structure:
45
+
46
+ ```html
47
+ ...
48
+ <a-scene>
49
+ <a-assets>
50
+ <!-- Your assets here -->
51
+ </a-assets>
52
+
53
+ <a-entity babia-experiment>
54
+ <a-entity id="task1" babia-task></a-entity>
55
+ <a-entity id="task2" babia-task></a-entity>
56
+ ...
57
+ <a-entity id="taskN" babia-task></a-entity>
58
+ <!-- Your scene here -->
59
+ </a-entity>
60
+ </a-scene>
61
+ ...
62
+ ```
63
+
64
+ By default the tasks will show in the same position, so you need to use the attribue `offsetX` for positioning the tasks with offset in the X axis. [Link to the docs](../APIs/OTHERS.md) for more info about the attributes.
65
+
66
+ ### 3.2 One task experiment
67
+
68
+ You can use just the `babia-experiment` component if the experiment to conduct consist in just one task. Nothing more to add.
69
+
70
+ ## 4. Define tasks types
71
+
72
+ There are three ways to show the information/description of the task/tasks to perform the experiment, using a Poster, an Audio or a Video. The attributes described here work with the `babia-experiment` and `babia-task` component.
73
+
74
+ [Link to the docs](../APIs/OTHERS.md) for more info about the attributes.
75
+
76
+ ### 4.1 Texts tasks in a poster
77
+
78
+ Attributes to define:
79
+
80
+ - `taskTitle`: Defines the title of the task
81
+ - `taskDescription`: Defines the description of the task
82
+ - `openTaskImg`: Defines the img of the popup icon of the task poster
83
+ - `closeTaskImg`: Defines the img of the popup icon of the task poster (for closing)
84
+
85
+ Example:
86
+
87
+ ![Imgur](https://imgur.com/rDlGJXP.png)
88
+
89
+
90
+ ### 4.2 Audio description tasks
91
+
92
+ Attributes to define:
93
+
94
+ - `taskAudio`: If the task is defined by an audio, must be set at "true"
95
+ - `taskAudioUrl`: URL of the mp3 audio for defining the task
96
+
97
+ Example:
98
+
99
+ ![Example](https://imgur.com/COSYjY5.gif)
100
+
101
+ ### 4.3 Video description tasks
102
+
103
+ **Important**: The video must be loaded as an A-Frame asset.
104
+
105
+ Attributes to define:
106
+
107
+ - `taskVideo`: If the task is defined by a video, must be set at "true"
108
+ - `taskVideoId`: ID of the asset with the video for defining the task
109
+
110
+ Example:
111
+
112
+ ![Example](https://imgur.com/ve3SPnF.gif)
113
+
114
+
115
+ ## 5. Record answers and position
116
+
117
+ By default, during the experiment, the scene will record the position of the camera and the rotation in order to check if the answers provided fit with the movements of the participants. This information is stored each `recordDelta`, as an attribute of `babia-experiment` defined by default in 3000 milliseconds.
118
+
119
+ For recording the audio, the attribute `recordAudio` is set at true for recording the microphone of the device in order to get the answers outloud. In our experience, making VR experiments introduces a big deal for recording the answers of the participants, since in VR the input options as a keyboard are not fully explored yet. So we decide to use the voice and record the answers using the microphone.
120
+
121
+
122
+ ## 6. Define the end of the experiment
123
+
124
+ There are two ways of finishing the experiment:
125
+
126
+ ### 6.1 Clicking on the finish button
127
+
128
+ By default, the attribute `finishButton` is set at true, so when the user clicks on the start button and the experiment begins, a button called "Finish!" appears, when the users clicks on it, the experiment finishs and the recordings are downloaded.
129
+
130
+ ![Example](https://imgur.com/6FTPWbs.gif)
131
+
132
+
133
+ ### 6.2 Defining a time limit
134
+
135
+ Using the `timeLimitEnding` flag, set at true, we can define a time limit for the experiment. The `timeLimitTime` attribute, in seconds, is the maximum time that the participant will have for conducting the tasks.
136
+
137
+ By default, when the time limit is reached, there will be an alert prompt notifiying the user that the time is done, but the charts will keep visible until the participant clicks on the Finish button. But if you want to force the user to finish the experiment, the `forceFinishWhenTimeLimit` attribute, set at true, will add the feature of hiding the charts and downloading the recorded data once the time limit is reached, forcing the user to finish.
138
+
139
+ ## Others
140
+
141
+ ### Feedback and Demographics surveys
142
+
143
+ Feedback and demographics can be defined as tasks, or maybe the experimenter wants to do it outside the scene, so using `babia-task` you can choose between adding them to the scene or not
144
+
145
+
146
+ ### Useful other documentation
147
+
148
+ [Docs of the `babia experiment` and `babia-task`](../APIs/OTHERS.md) APIs with all the attributes, default values and descriptions.