aframe-babia-components 1.3.1 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/visualizers/babia-boats.js +345 -165
- package/dist/aframe-babia-components.js +302 -128
- package/dist/aframe-babia-components.min.js +1 -1
- package/dist/aframe-babia-components.min.js.map +1 -1
- package/docs/APIs/CHARTS.md +2 -0
- package/docs/RELEASE_NOTES.md +8 -0
- package/examples/boats/boats2/index.html +1 -1
- package/examples/boats/boats_diagonal/diagonal.json +5 -0
- package/examples/boats/boats_diagonal/index.html +53 -0
- package/package.json +1 -1
package/docs/APIs/CHARTS.md
CHANGED
|
@@ -317,6 +317,8 @@ 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 | Template for the text shown in legends. Supports placeholders like `{name}`, `{height}`, `{fheight}`, `{color}`, `{fcolor}`, etc. Use `\n` to create new lines. | string | `{name}\n{fheight}: {height}\n{farea}: {area}\n{fwidth}: {width}\n{fdepth}: {depth}\n{fcolor}: {color}` |
|
|
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
322
|
| legendsAsChildren | Set the legends as children of buildings and quarters | boolean | false |
|
|
321
323
|
| legendsAsChildrenHeight | Height of the legends when they are children. | number | 3 |
|
|
322
324
|
| metricsInfoId | Id of the HTML entity where the metrics information (max, min and avg) will be displayed | string | - |
|
package/docs/RELEASE_NOTES.md
CHANGED
|
@@ -4,6 +4,14 @@ This doc gathers all the information about the releases made by the Sprints/Mile
|
|
|
4
4
|
|
|
5
5
|
## Release notes
|
|
6
6
|
|
|
7
|
+
### NPM 1.3.3 version
|
|
8
|
+
|
|
9
|
+
Added some refactor
|
|
10
|
+
|
|
11
|
+
### NPM 1.3.3 version
|
|
12
|
+
|
|
13
|
+
`babia-boats` accepts custom legends through the `legend_text` attribute.
|
|
14
|
+
|
|
7
15
|
### NPM 1.3.1 version
|
|
8
16
|
|
|
9
17
|
`babia-boats` fixed attribute `building_separation` that wasn't working well. Now the parameter is called `separation` because it affects also quarters.
|
|
@@ -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" position="0 2 20"></a-entity>
|
|
17
|
+
<a-entity babia-boats="from: queriertest; field: id; separation: 0.1; legend_text: {name} --> {height}" 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>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<title>Babia Boats (elements in diagonal example)</title>
|
|
6
|
+
<script src="https://aframe.io/releases/1.5.0/aframe.min.js"></script>
|
|
7
|
+
<script src="https://cdn.jsdelivr.net/gh/c-frame/aframe-extras@7.4.0/dist/aframe-extras.min.js"></script>
|
|
8
|
+
<!-- <script src="./aframe-babia-components.min.js"></script> -->
|
|
9
|
+
<!-- <script
|
|
10
|
+
src="https://gl.githack.com/babiaxr/aframe-babia-components/-/raw/refactor/dist/aframe-babia-components.min.js">
|
|
11
|
+
</script> -->
|
|
12
|
+
<script src="../../../dist/aframe-babia-components.js"></script>
|
|
13
|
+
</head>
|
|
14
|
+
|
|
15
|
+
<body>
|
|
16
|
+
<a-scene renderer="antialias: true" background="color: #c9f4f9"
|
|
17
|
+
stl-exporter>
|
|
18
|
+
|
|
19
|
+
<a-entity id="querier" babia-queryjson="url: ./diagonal.json;"></a-entity>
|
|
20
|
+
|
|
21
|
+
<a-entity id="tree"
|
|
22
|
+
babia-treebuilder="field: title; split_by: /; from: querier;
|
|
23
|
+
build_root: true">
|
|
24
|
+
</a-entity>
|
|
25
|
+
|
|
26
|
+
<!-- Boats Visualizer -->
|
|
27
|
+
<a-entity animation="property: rotation; to: 0 0 0; loop: true;
|
|
28
|
+
easing: linear; dur: 60000"
|
|
29
|
+
id="biblio"
|
|
30
|
+
babia-boats="from: tree; area: area; height: cites;
|
|
31
|
+
legendsAsChildren: true; legendsAsChildrenHeight: 5;
|
|
32
|
+
zone_elevation: 1; maxBuildingHeight: 5;
|
|
33
|
+
hideQuarterBoxLegend: true;
|
|
34
|
+
highlightQuarterByClick: true;
|
|
35
|
+
legend_lookat: [camera]"
|
|
36
|
+
position="0 0.1 0" sound="src: #music; loop: true">
|
|
37
|
+
</a-entity>
|
|
38
|
+
|
|
39
|
+
<a-entity light="type: ambient; color: #BBB; intensity: 0.2"></a-entity>
|
|
40
|
+
<a-entity light="type: directional; color: #FFF; intensity: 0.6"
|
|
41
|
+
position="-0.5 1 1"></a-entity>
|
|
42
|
+
|
|
43
|
+
<a-entity movement-controls="fly: true" position="0 4 6" rotation="-45 0 0">
|
|
44
|
+
<a-entity id="head" camera babia-camera="raycasterMouse: .babiaxraycasterclass;
|
|
45
|
+
raycasterHand: .babiaxraycasterclass; teleportCollision: #floorRoom" look-controls
|
|
46
|
+
wasd-controls="fly: true; acceleration: 10">
|
|
47
|
+
<a-entity></a-entity>
|
|
48
|
+
</a-entity>
|
|
49
|
+
</a-entity>
|
|
50
|
+
</a-scene>
|
|
51
|
+
|
|
52
|
+
</body>
|
|
53
|
+
</html>
|