aframe-babia-components 1.3.3 → 1.3.4
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/visualizers/babia-boats.js +24 -16
- package/dist/aframe-babia-components.js +8 -6
- package/dist/aframe-babia-components.min.js +1 -1
- package/dist/aframe-babia-components.min.js.map +1 -1
- package/docs/APIs/CHARTS.md +1 -2
- package/docs/RELEASE_NOTES.md +5 -0
- package/examples/boats/boats2/data.json +34 -2
- package/examples/boats/boats2/index.html +1 -1
- package/package.json +1 -1
package/docs/APIs/CHARTS.md
CHANGED
|
@@ -317,8 +317,7 @@ This component shows a city in boats.
|
|
|
317
317
|
| separation | Separation of the buildings by a numeric factor | number | 0.25 |
|
|
318
318
|
| legend_lookat | Element that the legend will follow in terms of rotation | string | `[camera]` |
|
|
319
319
|
| legend_scale | Scale for the legend | number | 1 |
|
|
320
|
-
| legend_text
|
|
321
|
-
| legend_text | Template for the text shown in legends. Supports dynamic placeholders to display field names and values. Use `\n` to insert new lines. <br><br>**Supported placeholders:**<br>• `{name}` – Name of the element.<br>• `{height}` – Value of the metric defined by the `height` field.<br>• `{area}` – Value of the metric defined by the `area` field.<br>• `{width}` – Value of the metric defined by the `width` field.<br>• `{depth}` – Value of the metric defined by the `depth` field.<br>• `{color}` – Value of the metric defined by the `color` field.<br>• `{fheight}` – Name of the field used for `height` (e.g. `loc`).<br>• `{farea}` – Name of the field used for `area`.<br>• `{fwidth}` – Name of the field used for `width`.<br>• `{fdepth}` – Name of the field used for `depth`.<br>• `{fcolor}` – Name of the field used for `color`.<br><br>**Tip:** When used on quarters (i.e. elements with children), only `{name}` is shown regardless of the template. | string | `{name}\n{fheight} (height): {height}\n{farea} (area): {area}\n{fwidth} (width): {width}\n{fdepth} (depth): {depth}\n{fcolor}: {color}` |
|
|
320
|
+
| legend_text | Template for the text shown in legends. Supports dynamic placeholders to display field names and values. Use `\n` to insert new lines. <br><br>**Supported placeholders:**<br>• `{name}` – Name of the element.<br>• `{height}`, `{area}`, `{width}`, `{depth}`, `{color}` – Metric values based on fields defined in the component.<br>• `{fheight}`, `{farea}`, `{fwidth}`, `{fdepth}`, `{fcolor}` – Names of the fields used for each metric.<br>• `{any_field}` – Any other field present in the raw data can also be shown dynamically (e.g. `{loc}`, `{cc}`, `{author}`...).<br><br>**Tip:** When used on quarters (elements with children), only `{name}` is shown regardless of the template. | string | `{name}\n{fheight} (height): {height}\n{farea} (area): {area}\n{fwidth} (width): {width}\n{fdepth} (depth): {depth}\n{fcolor}: {color}` |
|
|
322
321
|
| legendsAsChildren | Set the legends as children of buildings and quarters | boolean | false |
|
|
323
322
|
| legendsAsChildrenHeight | Height of the legends when they are children. | number | 3 |
|
|
324
323
|
| metricsInfoId | Id of the HTML entity where the metrics information (max, min and avg) will be displayed | string | - |
|
package/docs/RELEASE_NOTES.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[
|
|
1
|
+
[
|
|
2
2
|
{
|
|
3
3
|
"id": "/barrio",
|
|
4
4
|
"children": [
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
"id": "/barrio/block1",
|
|
7
7
|
"width": "3",
|
|
8
8
|
"height": "1",
|
|
9
|
+
"testfield": "20",
|
|
9
10
|
"depth": "3"
|
|
10
11
|
},
|
|
11
12
|
{
|
|
@@ -15,12 +16,14 @@
|
|
|
15
16
|
"id": "/barrio/subarrio/block1",
|
|
16
17
|
"width": "5",
|
|
17
18
|
"height": "2",
|
|
19
|
+
"testfield": "20",
|
|
18
20
|
"depth": "5"
|
|
19
21
|
},
|
|
20
22
|
{
|
|
21
23
|
"id": "/barrio/subarrio/block2",
|
|
22
24
|
"width": "3",
|
|
23
25
|
"height": "1",
|
|
26
|
+
"testfield": "20",
|
|
24
27
|
"depth": "3"
|
|
25
28
|
}
|
|
26
29
|
]
|
|
@@ -34,6 +37,7 @@
|
|
|
34
37
|
"id": "/barrio2/block1",
|
|
35
38
|
"width": "3",
|
|
36
39
|
"height": "1",
|
|
40
|
+
"testfield": "20",
|
|
37
41
|
"depth": "3"
|
|
38
42
|
},
|
|
39
43
|
{
|
|
@@ -43,18 +47,21 @@
|
|
|
43
47
|
"id": "/barrio2/subarrio/block1",
|
|
44
48
|
"width": "5",
|
|
45
49
|
"height": "2",
|
|
50
|
+
"testfield": "20",
|
|
46
51
|
"depth": "5"
|
|
47
52
|
},
|
|
48
53
|
{
|
|
49
54
|
"id": "/barrio2/subarrio/block2",
|
|
50
55
|
"width": "3",
|
|
51
56
|
"height": "1",
|
|
57
|
+
"testfield": "20",
|
|
52
58
|
"depth": "3"
|
|
53
59
|
},
|
|
54
60
|
{
|
|
55
61
|
"id": "/barrio2/subarrio/block3",
|
|
56
62
|
"width": "1",
|
|
57
63
|
"height": "5",
|
|
64
|
+
"testfield": "20",
|
|
58
65
|
"depth": "1"
|
|
59
66
|
}
|
|
60
67
|
]
|
|
@@ -63,6 +70,7 @@
|
|
|
63
70
|
"id": "/barrio2/block2",
|
|
64
71
|
"width": "2",
|
|
65
72
|
"height": "3",
|
|
73
|
+
"testfield": "20",
|
|
66
74
|
"depth": "2"
|
|
67
75
|
}
|
|
68
76
|
]
|
|
@@ -74,12 +82,14 @@
|
|
|
74
82
|
"id": "/barrio3/block1",
|
|
75
83
|
"width": "2",
|
|
76
84
|
"height": "1",
|
|
85
|
+
"testfield": "20",
|
|
77
86
|
"depth": "2"
|
|
78
87
|
},
|
|
79
88
|
{
|
|
80
89
|
"id": "/barrio2/block2",
|
|
81
90
|
"width": "2",
|
|
82
91
|
"height": "3",
|
|
92
|
+
"testfield": "20",
|
|
83
93
|
"depth": "2"
|
|
84
94
|
},
|
|
85
95
|
{
|
|
@@ -89,12 +99,14 @@
|
|
|
89
99
|
"id": "/barrio3/subarrio/block2",
|
|
90
100
|
"width": "3",
|
|
91
101
|
"height": "1",
|
|
102
|
+
"testfield": "20",
|
|
92
103
|
"depth": "3"
|
|
93
104
|
},
|
|
94
105
|
{
|
|
95
106
|
"id": "/barrio3/subarrio/block3",
|
|
96
107
|
"width": "1",
|
|
97
108
|
"height": "5",
|
|
109
|
+
"testfield": "20",
|
|
98
110
|
"depth": "1"
|
|
99
111
|
}
|
|
100
112
|
]
|
|
@@ -105,31 +117,35 @@
|
|
|
105
117
|
"id": "001",
|
|
106
118
|
"width": "5",
|
|
107
119
|
"height": "1",
|
|
120
|
+
"testfield": "20",
|
|
108
121
|
"depth": "5"
|
|
109
122
|
},
|
|
110
123
|
{
|
|
111
124
|
"id": "003",
|
|
112
125
|
"width": "5",
|
|
113
126
|
"height": "1",
|
|
127
|
+
"testfield": "20",
|
|
114
128
|
"depth": "5"
|
|
115
129
|
},
|
|
116
130
|
{
|
|
117
131
|
"id": "004",
|
|
118
132
|
"width": "2",
|
|
119
133
|
"height": "1",
|
|
134
|
+
"testfield": "20",
|
|
120
135
|
"depth": "2"
|
|
121
136
|
},
|
|
122
137
|
{
|
|
123
138
|
"id": "005",
|
|
124
139
|
"width": "3",
|
|
125
140
|
"height": "1",
|
|
141
|
+
"testfield": "20",
|
|
126
142
|
"depth": "3"
|
|
127
143
|
},
|
|
128
|
-
|
|
129
144
|
{
|
|
130
145
|
"id": "006",
|
|
131
146
|
"width": "3",
|
|
132
147
|
"height": "1",
|
|
148
|
+
"testfield": "20",
|
|
133
149
|
"depth": "3"
|
|
134
150
|
},
|
|
135
151
|
{
|
|
@@ -139,6 +155,7 @@
|
|
|
139
155
|
"id": "/barrio4/block1",
|
|
140
156
|
"width": "3",
|
|
141
157
|
"height": "1",
|
|
158
|
+
"testfield": "20",
|
|
142
159
|
"depth": "3"
|
|
143
160
|
},
|
|
144
161
|
{
|
|
@@ -148,12 +165,14 @@
|
|
|
148
165
|
"id": "/barrio4/subarrio/block1",
|
|
149
166
|
"width": "5",
|
|
150
167
|
"height": "2",
|
|
168
|
+
"testfield": "20",
|
|
151
169
|
"depth": "5"
|
|
152
170
|
},
|
|
153
171
|
{
|
|
154
172
|
"id": "/barrio4/subarrio/block2",
|
|
155
173
|
"width": "3",
|
|
156
174
|
"height": "1",
|
|
175
|
+
"testfield": "20",
|
|
157
176
|
"depth": "3"
|
|
158
177
|
}
|
|
159
178
|
]
|
|
@@ -164,78 +183,91 @@
|
|
|
164
183
|
"id": "001",
|
|
165
184
|
"width": "5",
|
|
166
185
|
"height": "1",
|
|
186
|
+
"testfield": "20",
|
|
167
187
|
"depth": "5"
|
|
168
188
|
},
|
|
169
189
|
{
|
|
170
190
|
"id": "002",
|
|
171
191
|
"width": "3",
|
|
172
192
|
"height": "1",
|
|
193
|
+
"testfield": "20",
|
|
173
194
|
"depth": "3"
|
|
174
195
|
},
|
|
175
196
|
{
|
|
176
197
|
"id": "003",
|
|
177
198
|
"width": "5",
|
|
178
199
|
"height": "1",
|
|
200
|
+
"testfield": "20",
|
|
179
201
|
"depth": "5"
|
|
180
202
|
},
|
|
181
203
|
{
|
|
182
204
|
"id": "004",
|
|
183
205
|
"width": "5",
|
|
184
206
|
"height": "1",
|
|
207
|
+
"testfield": "20",
|
|
185
208
|
"depth": "5"
|
|
186
209
|
},
|
|
187
210
|
{
|
|
188
211
|
"id": "005",
|
|
189
212
|
"width": "3",
|
|
190
213
|
"height": "1",
|
|
214
|
+
"testfield": "20",
|
|
191
215
|
"depth": "3"
|
|
192
216
|
},
|
|
193
217
|
{
|
|
194
218
|
"id": "006",
|
|
195
219
|
"width": "3",
|
|
196
220
|
"height": "1",
|
|
221
|
+
"testfield": "20",
|
|
197
222
|
"depth": "3"
|
|
198
223
|
},
|
|
199
224
|
{
|
|
200
225
|
"id": "001",
|
|
201
226
|
"width": "5",
|
|
202
227
|
"height": "1",
|
|
228
|
+
"testfield": "20",
|
|
203
229
|
"depth": "5"
|
|
204
230
|
},
|
|
205
231
|
{
|
|
206
232
|
"id": "002",
|
|
207
233
|
"width": "3",
|
|
208
234
|
"height": "1",
|
|
235
|
+
"testfield": "20",
|
|
209
236
|
"depth": "3"
|
|
210
237
|
},
|
|
211
238
|
{
|
|
212
239
|
"id": "003",
|
|
213
240
|
"width": "5",
|
|
214
241
|
"height": "1",
|
|
242
|
+
"testfield": "20",
|
|
215
243
|
"depth": "5"
|
|
216
244
|
},
|
|
217
245
|
{
|
|
218
246
|
"id": "004",
|
|
219
247
|
"width": "5",
|
|
220
248
|
"height": "1",
|
|
249
|
+
"testfield": "20",
|
|
221
250
|
"depth": "5"
|
|
222
251
|
},
|
|
223
252
|
{
|
|
224
253
|
"id": "005",
|
|
225
254
|
"width": "3",
|
|
226
255
|
"height": "1",
|
|
256
|
+
"testfield": "20",
|
|
227
257
|
"depth": "3"
|
|
228
258
|
},
|
|
229
259
|
{
|
|
230
260
|
"id": "006",
|
|
231
261
|
"width": "3",
|
|
232
262
|
"height": "1",
|
|
263
|
+
"testfield": "20",
|
|
233
264
|
"depth": "3"
|
|
234
265
|
},
|
|
235
266
|
{
|
|
236
267
|
"id": "001",
|
|
237
268
|
"width": "5",
|
|
238
269
|
"height": "1",
|
|
270
|
+
"testfield": "20",
|
|
239
271
|
"depth": "5"
|
|
240
272
|
}
|
|
241
273
|
]
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<a-scene environment="preset: yavapai" renderer="antialias: true">
|
|
15
15
|
|
|
16
16
|
<a-entity id="queriertest" babia-queryjson="url: data.json;"></a-entity>
|
|
17
|
-
<a-entity babia-boats="from: queriertest; field: id; separation: 0.1; legend_text: {name} --> {height}" position="0 2 20"></a-entity>
|
|
17
|
+
<a-entity babia-boats="from: queriertest; field: id; separation: 0.1; legend_text: {name} --> {height} {testfield}" position="0 2 20"></a-entity>
|
|
18
18
|
|
|
19
19
|
<a-entity movement-controls="fly: true" position="-6 10 25" rotation="-50 -40 0">
|
|
20
20
|
<a-entity camera look-controls></a-entity>
|