@giro3d/piero 1.0.0-beta.0

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 (220) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +134 -0
  3. package/dist/Components.cjs.js +2 -0
  4. package/dist/Components.cjs.js.map +1 -0
  5. package/dist/Components.es.js +608 -0
  6. package/dist/Components.es.js.map +1 -0
  7. package/dist/assets/piero.css +9 -0
  8. package/dist/index.cjs.js +9 -0
  9. package/dist/index.cjs.js.map +1 -0
  10. package/dist/index.d.ts +2 -0
  11. package/dist/index.es.js +6971 -0
  12. package/dist/index.es.js.map +1 -0
  13. package/dist/modules.cjs.js +2 -0
  14. package/dist/modules.cjs.js.map +1 -0
  15. package/dist/modules.d.ts +2 -0
  16. package/dist/modules.es.js +856 -0
  17. package/dist/modules.es.js.map +1 -0
  18. package/dist/src/App.vue.d.ts +6 -0
  19. package/dist/src/api/BookmarkApi.d.ts +6 -0
  20. package/dist/src/api/DatasetApi.d.ts +61 -0
  21. package/dist/src/api/ViewApi.d.ts +4 -0
  22. package/dist/src/api/index.d.ts +4 -0
  23. package/dist/src/components/AlertToast.vue.d.ts +4 -0
  24. package/dist/src/components/AttributeGroup.vue.d.ts +7 -0
  25. package/dist/src/components/AttributeItem.vue.d.ts +6 -0
  26. package/dist/src/components/AttributePanel.vue.d.ts +14 -0
  27. package/dist/src/components/ColorFragment.vue.d.ts +6 -0
  28. package/dist/src/components/Configuration.d.ts +14 -0
  29. package/dist/src/components/CoordinateFragment.vue.d.ts +10 -0
  30. package/dist/src/components/DropdownView.vue.d.ts +13 -0
  31. package/dist/src/components/LinkFragment.vue.d.ts +10 -0
  32. package/dist/src/components/LoadingScreen.vue.d.ts +2 -0
  33. package/dist/src/components/MainView.vue.d.ts +5 -0
  34. package/dist/src/components/MinimapView.vue.d.ts +4 -0
  35. package/dist/src/components/ModalOverlay.vue.d.ts +25 -0
  36. package/dist/src/components/NavigationButtons.vue.d.ts +2 -0
  37. package/dist/src/components/OpacitySlider.vue.d.ts +10 -0
  38. package/dist/src/components/PanelContainer.vue.d.ts +10 -0
  39. package/dist/src/components/ProgressBar.vue.d.ts +14 -0
  40. package/dist/src/components/SearchOverlay.vue.d.ts +8 -0
  41. package/dist/src/components/SpinnerControl.vue.d.ts +2 -0
  42. package/dist/src/components/StatusBar.vue.d.ts +10 -0
  43. package/dist/src/components/SwitchToggle.vue.d.ts +25 -0
  44. package/dist/src/components/VisibilityControl.vue.d.ts +9 -0
  45. package/dist/src/components/atoms/ButtonArea.vue.d.ts +17 -0
  46. package/dist/src/components/atoms/ButtonWithIcon.vue.d.ts +11 -0
  47. package/dist/src/components/atoms/CompactList.vue.d.ts +17 -0
  48. package/dist/src/components/atoms/Icon.vue.d.ts +6 -0
  49. package/dist/src/components/atoms/IconList.vue.d.ts +17 -0
  50. package/dist/src/components/atoms/IconListButton.vue.d.ts +10 -0
  51. package/dist/src/components/atoms/ImportButton.vue.d.ts +13 -0
  52. package/dist/src/components/atoms/ListLabel.vue.d.ts +5 -0
  53. package/dist/src/components/atoms/ListLabelButton.vue.d.ts +11 -0
  54. package/dist/src/components/atoms/SectionCollapsible.vue.d.ts +30 -0
  55. package/dist/src/components/charts/BarChart.vue.d.ts +4 -0
  56. package/dist/src/components/charts/DoughnutChart.vue.d.ts +4 -0
  57. package/dist/src/components/panels/AboutPanel.vue.d.ts +2 -0
  58. package/dist/src/components/panels/AnalysisPanel.vue.d.ts +2 -0
  59. package/dist/src/components/panels/AnnotationItem.vue.d.ts +21 -0
  60. package/dist/src/components/panels/AnnotationPanel.vue.d.ts +2 -0
  61. package/dist/src/components/panels/BasemapItem.vue.d.ts +17 -0
  62. package/dist/src/components/panels/BookmarkItem.vue.d.ts +16 -0
  63. package/dist/src/components/panels/BookmarkPanel.vue.d.ts +2 -0
  64. package/dist/src/components/panels/DatagroupItem.vue.d.ts +18 -0
  65. package/dist/src/components/panels/DatasetItem.vue.d.ts +18 -0
  66. package/dist/src/components/panels/DatasetOrGroupItem.vue.d.ts +18 -0
  67. package/dist/src/components/panels/DatasetPanel.vue.d.ts +2 -0
  68. package/dist/src/components/panels/EmptyIndicator.vue.d.ts +6 -0
  69. package/dist/src/components/panels/LoadingIndicator.vue.d.ts +6 -0
  70. package/dist/src/components/panels/MeasurementItem.vue.d.ts +17 -0
  71. package/dist/src/components/panels/MeasurementPanel.vue.d.ts +2 -0
  72. package/dist/src/components/panels/OverlayItem.vue.d.ts +19 -0
  73. package/dist/src/components/panels/ShareBookmarkModal.vue.d.ts +5 -0
  74. package/dist/src/components/panels/analysis/ClippingBox.vue.d.ts +2 -0
  75. package/dist/src/components/panels/analysis/CrossSection.vue.d.ts +2 -0
  76. package/dist/src/components/panels/analysis/FloodingPlane.vue.d.ts +2 -0
  77. package/dist/src/components/panels/analysis/Statistics.vue.d.ts +2 -0
  78. package/dist/src/components/panels/analysis/ToolWrapper.vue.d.ts +28 -0
  79. package/dist/src/components/toolbar/ToolBar.vue.d.ts +9 -0
  80. package/dist/src/components/toolbar/ToolbarButton.vue.d.ts +12 -0
  81. package/dist/src/config-loader.d.ts +7 -0
  82. package/dist/src/constants.d.ts +7 -0
  83. package/dist/src/context.d.ts +35 -0
  84. package/dist/src/createPieroApp.d.ts +31 -0
  85. package/dist/src/events.d.ts +30 -0
  86. package/dist/src/giro3d/CameraControlsInspector.d.ts +17 -0
  87. package/dist/src/giro3d/EntityBuilder.d.ts +21 -0
  88. package/dist/src/giro3d/Graticule.d.ts +20 -0
  89. package/dist/src/giro3d/Grid.d.ts +11 -0
  90. package/dist/src/giro3d/LayerBuilder.d.ts +46 -0
  91. package/dist/src/giro3d/Measure3D.d.ts +20 -0
  92. package/dist/src/giro3d/Plane.d.ts +11 -0
  93. package/dist/src/giro3d/Skybox.d.ts +6 -0
  94. package/dist/src/giro3d/entities/FeatureCollectionEntity.d.ts +41 -0
  95. package/dist/src/giro3d/entities/PointCloudEntity.d.ts +45 -0
  96. package/dist/src/giro3d/entities/TiledPointCloudEntity.d.ts +13 -0
  97. package/dist/src/giro3d/entities/Tiles3dEntity.d.ts +11 -0
  98. package/dist/src/giro3d/entities/VectorLabelsEntity.d.ts +48 -0
  99. package/dist/src/giro3d/entities/VectorMeshEntity.d.ts +97 -0
  100. package/dist/src/giro3d/entities/VectorShapeEntity.d.ts +8 -0
  101. package/dist/src/giro3d/entities/flatPointCloud.d.ts +2 -0
  102. package/dist/src/giro3d/entities/tiledIfc.d.ts +2 -0
  103. package/dist/src/giro3d/entities/vector.d.ts +2 -0
  104. package/dist/src/giro3d/sources/GeopackageSource.d.ts +20 -0
  105. package/dist/src/giro3d/sources/ShapefileSource.d.ts +20 -0
  106. package/dist/src/giro3d/sources/mixins.d.ts +60 -0
  107. package/dist/src/index.d.ts +17 -0
  108. package/dist/src/loaders/csv.d.ts +3 -0
  109. package/dist/src/loaders/las.d.ts +3 -0
  110. package/dist/src/loaders/loader.d.ts +29 -0
  111. package/dist/src/loaders/loader.test.d.ts +1 -0
  112. package/dist/src/loaders/userData.d.ts +8 -0
  113. package/dist/src/loaders/vector.d.ts +4 -0
  114. package/dist/src/module.d.ts +11 -0
  115. package/dist/src/modules/IFCLoader.d.ts +9 -0
  116. package/dist/src/modules/PLYLoader.d.ts +9 -0
  117. package/dist/src/modules/PotreeLoader.d.ts +9 -0
  118. package/dist/src/modules/Tour.d.ts +17 -0
  119. package/dist/src/modules/ifc/IfcEntity.d.ts +84 -0
  120. package/dist/src/modules/ifc/IfcEntityInspector.d.ts +7 -0
  121. package/dist/src/modules/ifc/IfcPropertyView.vue.d.ts +6 -0
  122. package/dist/src/modules/ifc/IfcSubtree.vue.d.ts +7 -0
  123. package/dist/src/modules/index.d.ts +5 -0
  124. package/dist/src/modules/ply/PlyEntity.d.ts +33 -0
  125. package/dist/src/providers/Alticoding.d.ts +32 -0
  126. package/dist/src/providers/BanProvider.d.ts +11 -0
  127. package/dist/src/providers/Geocoding.d.ts +7 -0
  128. package/dist/src/providers/IgnProvider.d.ts +11 -0
  129. package/dist/src/services/AnalysisManager.d.ts +10 -0
  130. package/dist/src/services/AnnotationManager.d.ts +48 -0
  131. package/dist/src/services/CameraController.d.ts +99 -0
  132. package/dist/src/services/DatasetManager.d.ts +27 -0
  133. package/dist/src/services/Giro3DManager.d.ts +42 -0
  134. package/dist/src/services/Highlighter.d.ts +11 -0
  135. package/dist/src/services/LayerManager.d.ts +37 -0
  136. package/dist/src/services/MeasureTool.d.ts +13 -0
  137. package/dist/src/services/MeasurementManager.d.ts +31 -0
  138. package/dist/src/services/MinimapController.d.ts +19 -0
  139. package/dist/src/services/Picker.d.ts +53 -0
  140. package/dist/src/services/analysis/ClippingBoxManager.d.ts +41 -0
  141. package/dist/src/services/analysis/CrossSectionManager.d.ts +9 -0
  142. package/dist/src/services/analysis/FloodingPlaneManager.d.ts +11 -0
  143. package/dist/src/stores/analysis.d.ts +1571 -0
  144. package/dist/src/stores/annotations.d.ts +60 -0
  145. package/dist/src/stores/bookmarks.d.ts +21 -0
  146. package/dist/src/stores/camera.d.ts +39 -0
  147. package/dist/src/stores/datasets.d.ts +49 -0
  148. package/dist/src/stores/giro3d.d.ts +45 -0
  149. package/dist/src/stores/layers.d.ts +40 -0
  150. package/dist/src/stores/measurement.d.ts +45 -0
  151. package/dist/src/stores/modules.d.ts +11 -0
  152. package/dist/src/stores/notifications.d.ts +8 -0
  153. package/dist/src/stores/statistics.d.ts +8 -0
  154. package/dist/src/types/Annotation.d.ts +35 -0
  155. package/dist/src/types/AnnotationMode.d.ts +7 -0
  156. package/dist/src/types/BaseLayer.d.ts +30 -0
  157. package/dist/src/types/Bookmark.d.ts +19 -0
  158. package/dist/src/types/CameraPosition.d.ts +7 -0
  159. package/dist/src/types/Configuration.d.ts +106 -0
  160. package/dist/src/types/Dataset.d.ts +78 -0
  161. package/dist/src/types/Feature.d.ts +13 -0
  162. package/dist/src/types/FloodingPlane.d.ts +14 -0
  163. package/dist/src/types/IFCTypes.d.ts +5 -0
  164. package/dist/src/types/LayerObject.d.ts +20 -0
  165. package/dist/src/types/Measure.d.ts +20 -0
  166. package/dist/src/types/MeasurementMode.d.ts +7 -0
  167. package/dist/src/types/Named.d.ts +5 -0
  168. package/dist/src/types/NavigationMode.d.ts +2 -0
  169. package/dist/src/types/Notification.d.ts +8 -0
  170. package/dist/src/types/OLGeometry.d.ts +1 -0
  171. package/dist/src/types/Overlay.d.ts +24 -0
  172. package/dist/src/types/VectorStyle.d.ts +31 -0
  173. package/dist/src/types/Viewbox.d.ts +7 -0
  174. package/dist/src/types/configuration/analysis.d.ts +26 -0
  175. package/dist/src/types/configuration/bookmark.d.ts +16 -0
  176. package/dist/src/types/configuration/camera.d.ts +19 -0
  177. package/dist/src/types/configuration/color.d.ts +18 -0
  178. package/dist/src/types/configuration/datasets/cityjson.d.ts +9 -0
  179. package/dist/src/types/configuration/datasets/core.d.ts +49 -0
  180. package/dist/src/types/configuration/datasets/featureCollection.d.ts +6 -0
  181. package/dist/src/types/configuration/datasets/ifc.d.ts +10 -0
  182. package/dist/src/types/configuration/datasets/index.d.ts +27 -0
  183. package/dist/src/types/configuration/datasets/layer.d.ts +43 -0
  184. package/dist/src/types/configuration/datasets/ply.d.ts +10 -0
  185. package/dist/src/types/configuration/datasets/pointCloud.d.ts +12 -0
  186. package/dist/src/types/configuration/datasets/potreePointCloud.d.ts +10 -0
  187. package/dist/src/types/configuration/datasets/tiledIfc.d.ts +9 -0
  188. package/dist/src/types/configuration/datasets/tiledPointCloud.d.ts +9 -0
  189. package/dist/src/types/configuration/datasets/vector.d.ts +34 -0
  190. package/dist/src/types/configuration/features.d.ts +2 -0
  191. package/dist/src/types/configuration/geographic.d.ts +51 -0
  192. package/dist/src/types/configuration/layers/core.d.ts +50 -0
  193. package/dist/src/types/configuration/layers/index.d.ts +51 -0
  194. package/dist/src/types/configuration/sources/bingMaps.d.ts +5 -0
  195. package/dist/src/types/configuration/sources/core/baseConfig.d.ts +70 -0
  196. package/dist/src/types/configuration/sources/core/tiled.d.ts +19 -0
  197. package/dist/src/types/configuration/sources/core/vector.d.ts +13 -0
  198. package/dist/src/types/configuration/sources/core/vectorTile.d.ts +8 -0
  199. package/dist/src/types/configuration/sources/customVector.d.ts +7 -0
  200. package/dist/src/types/configuration/sources/customVectorTile.d.ts +8 -0
  201. package/dist/src/types/configuration/sources/geojson.d.ts +5 -0
  202. package/dist/src/types/configuration/sources/geotiff.d.ts +8 -0
  203. package/dist/src/types/configuration/sources/gpx.d.ts +5 -0
  204. package/dist/src/types/configuration/sources/kml.d.ts +5 -0
  205. package/dist/src/types/configuration/sources/mvt.d.ts +10 -0
  206. package/dist/src/types/configuration/sources/osm.d.ts +5 -0
  207. package/dist/src/types/configuration/sources/stadiaMaps.d.ts +5 -0
  208. package/dist/src/types/configuration/sources/wms.d.ts +15 -0
  209. package/dist/src/types/configuration/sources/wmts.d.ts +15 -0
  210. package/dist/src/types/configuration/sources/xyz.d.ts +9 -0
  211. package/dist/src/types/utilities.d.ts +5 -0
  212. package/dist/src/utils/Components.d.ts +8 -0
  213. package/dist/src/utils/Configuration.d.ts +15 -0
  214. package/dist/src/utils/Download.d.ts +11 -0
  215. package/dist/src/utils/Fetcher.d.ts +77 -0
  216. package/dist/src/utils/Measure.d.ts +7 -0
  217. package/dist/src/utils/OLFeatures.d.ts +57 -0
  218. package/dist/src/utils/Projections.d.ts +10 -0
  219. package/dist/src/utils/Types.d.ts +11 -0
  220. package/package.json +103 -0
@@ -0,0 +1,856 @@
1
+ var K = Object.defineProperty;
2
+ var X = (c, a, t) => a in c ? K(c, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[a] = t;
3
+ var d = (c, a, t) => X(c, typeof a != "symbol" ? a + "" : a, t);
4
+ import tt from "/builds/giro3d/piero/node_modules/@giro3d/giro3d/gui/EntityPanel.js";
5
+ import { Components as et, SimpleScene as st, SimpleRenderer as ot, SimpleCamera as nt, SimpleRaycaster as it, IfcPropertiesUtils as b, FragmentBoundingBox as at, FragmentManager as rt, FragmentClassifier as ct, FragmentIfcLoader as lt, toCompositeID as ut, IfcCategoryMap as dt } from "/builds/giro3d/piero/node_modules/openbim-components/index.js";
6
+ import { i as P, F as E, f as D, u as ht, e as mt, I as A, r as M, s as ft, _ as Y, j as pt, t as gt, y as U, h as yt } from "./Components.es.js";
7
+ import V from "/builds/giro3d/piero/node_modules/@giro3d/giro3d/entities/Entity3D.js";
8
+ import { Group as W, Vector3 as bt, MeshBasicMaterial as z, Matrix4 as wt, MathUtils as _t, MeshLambertMaterial as It, DoubleSide as Ct, Mesh as xt, Color as vt } from "/builds/giro3d/piero/node_modules/three";
9
+ import St from "/builds/giro3d/piero/node_modules/@giro3d/giro3d/gui/EntityInspector.js";
10
+ import { defineComponent as G, ref as Pt, resolveComponent as Et, createElementBlock as _, openBlock as y, createElementVNode as F, createCommentVNode as L, createBlock as Tt, createVNode as w, normalizeClass as R, toDisplayString as Ft, withCtx as j, unref as O, Fragment as $, renderList as q } from "/builds/giro3d/piero/node_modules/vue/dist/vue.runtime.esm-bundler.js";
11
+ import { PLYLoader as kt } from "/builds/giro3d/piero/node_modules/three/examples/jsm/loaders/PLYLoader.js";
12
+ import Bt from "/builds/giro3d/piero/node_modules/@giro3d/giro3d/entities/PointCloud.js";
13
+ import Mt from "/builds/giro3d/piero/node_modules/@giro3d/giro3d/sources/PotreeSource.js";
14
+ import g from "/builds/giro3d/piero/node_modules/shepherd.js/dist/js/shepherd.esm.js";
15
+ const x = new wt(), Lt = {
16
+ bbox: new z({
17
+ color: "#FFFF00",
18
+ depthTest: !0,
19
+ opacity: 0.2,
20
+ transparent: !0
21
+ }),
22
+ selection: new z({
23
+ color: "#FF0000",
24
+ depthTest: !1,
25
+ opacity: 0.6,
26
+ transparent: !0
27
+ })
28
+ }, Ot = 4186316022, Nt = 781010003, Dt = 2655215786, At = 3242617779, zt = 919958153, Rt = 1307041759, H = 1451395588, Q = 1883228015, jt = [H, Q], Yt = [
29
+ Ot,
30
+ Nt,
31
+ Dt,
32
+ At,
33
+ zt,
34
+ Rt
35
+ ], J = (c) => P(c) && c.isIFCPickResult, v = class v extends V {
36
+ constructor(t) {
37
+ super(new W());
38
+ d(this, "isIfcEntity", !0);
39
+ d(this, "isPickableFeatures", !0);
40
+ d(this, "type", "IfcEntity");
41
+ d(this, "_classificationCache");
42
+ d(this, "_components");
43
+ d(this, "_fragmentBoundingBox");
44
+ d(this, "_fragmentClassifier");
45
+ d(this, "_fragmentManager");
46
+ d(this, "_ifcSelection");
47
+ // Currently selected fragments
48
+ d(this, "_indexMap");
49
+ // Properties relationships
50
+ d(this, "_model");
51
+ d(this, "_source");
52
+ this._source = t, this._components = new et(), this._components.ui.enabled = !1, this._components.scene = new st(this._components), this._components.renderer = new ot(
53
+ this._components,
54
+ document.createElement("div")
55
+ ), this._components.camera = new nt(this._components), this._components.raycaster = new it(this._components), this._components.init(), this._ifcSelection = { bbox: {}, selection: {} }, this._indexMap = {}, this._classificationCache = null, this._fragmentBoundingBox = null;
56
+ }
57
+ clearHighlight(t = "selection") {
58
+ for (const e of Object.keys(this._ifcSelection[t])) {
59
+ const s = this._fragmentManager.list[e], o = s == null ? void 0 : s.fragments[t];
60
+ o != null && o.mesh.removeFromParent();
61
+ }
62
+ this.notifyChange(this), this._ifcSelection[t] = {};
63
+ }
64
+ getBoundingBoxById(t) {
65
+ this.clearHighlight("bbox"), this.highlightById(t, "bbox");
66
+ const e = this._fragmentBoundingBox;
67
+ if (e === null)
68
+ throw new Error("Must call initClassification before getBoundingBoxById");
69
+ const s = this._fragmentManager;
70
+ e.reset();
71
+ const o = this._ifcSelection.bbox;
72
+ if (!Object.keys(o).length)
73
+ return;
74
+ for (const u of Object.keys(o)) {
75
+ const f = s.list[u].fragments.bbox;
76
+ e.addMesh(f.mesh);
77
+ }
78
+ const n = e.get(), { y: r, z: l } = n.min, { y: h, z: i } = n.max;
79
+ return n.min.y = -i, n.max.y = -l, n.min.z = r, n.max.z = h, n.translate(this._model.position), this.clearHighlight("bbox"), n;
80
+ }
81
+ getClassification() {
82
+ if (this._classificationCache === null)
83
+ throw new Error("Must call initClassification before getClassification");
84
+ return this._classificationCache;
85
+ }
86
+ getProperties(t) {
87
+ const e = [], s = this._model.properties;
88
+ if (!s)
89
+ return [];
90
+ for (const o of this._indexMap[t]) {
91
+ const n = s[o];
92
+ if (n == null)
93
+ continue;
94
+ const { name: r } = b.getEntityName(s, o);
95
+ if (r !== null) {
96
+ if (n.type === H) {
97
+ const l = b.getPsetProps(s, o);
98
+ if (l !== null)
99
+ for (const h of l) {
100
+ if (s[h] == null)
101
+ continue;
102
+ const u = this.getProperty(h);
103
+ u !== null && e.push({
104
+ parentName: r,
105
+ ...u
106
+ });
107
+ }
108
+ } else if (n.type === Q) {
109
+ const l = b.getQsetQuantities(
110
+ s,
111
+ o
112
+ );
113
+ if (l !== null)
114
+ for (const h of l) {
115
+ const { key: i } = b.getQuantityValue(
116
+ s,
117
+ h
118
+ );
119
+ if (i === null)
120
+ continue;
121
+ const u = this.getProperty(h);
122
+ u !== null && e.push({
123
+ parentName: r,
124
+ ...u
125
+ });
126
+ }
127
+ }
128
+ }
129
+ }
130
+ return e;
131
+ }
132
+ getProperty(t) {
133
+ const e = this._model.properties;
134
+ if (e === void 0)
135
+ return null;
136
+ const { name: s } = b.getEntityName(e, t);
137
+ if (s === null)
138
+ return null;
139
+ const { value: o } = b.getQuantityValue(e, t);
140
+ return { name: s, value: o };
141
+ }
142
+ highlight(t, e, s) {
143
+ this._ifcSelection[t][e.uuid] = /* @__PURE__ */ new Set();
144
+ const o = parseInt(s, 10);
145
+ this._ifcSelection[t][e.uuid].add(s), this.addComposites(t, e, o), this.regenerate(t, e.uuid);
146
+ const n = e.fragment.group;
147
+ if (n) {
148
+ const r = n.data[o][0];
149
+ for (let l = 0; l < r.length; l++) {
150
+ const h = r[l], i = n.keyFragments[h], u = this._fragmentManager.list[i];
151
+ i in this._ifcSelection[t] || (this._ifcSelection[t][i] = /* @__PURE__ */ new Set()), this._ifcSelection[t][i].add(s), this.addComposites(t, u.mesh, o), this.regenerate(t, i);
152
+ }
153
+ }
154
+ this.notifyChange(this);
155
+ }
156
+ highlightById(t, e = "selection") {
157
+ for (const s of Object.keys(t)) {
158
+ s in this._ifcSelection[e] || (this._ifcSelection[e][s] = /* @__PURE__ */ new Set());
159
+ const o = this._fragmentManager.list[s], n = /* @__PURE__ */ new Set();
160
+ for (const r of t[s])
161
+ this._ifcSelection[e][s].add(r), n.add(parseInt(r, 10));
162
+ for (const r of n)
163
+ this.addComposites(e, o.mesh, r);
164
+ this.regenerate(e, s);
165
+ }
166
+ this.notifyChange(this);
167
+ }
168
+ pick(t, e) {
169
+ return super.pick(t, e).map((s) => ({
170
+ ...s,
171
+ entity: this,
172
+ features: s.features,
173
+ isIFCPickResult: !0,
174
+ object: s.object
175
+ }));
176
+ }
177
+ pickFeaturesFrom(t) {
178
+ var s, o, n;
179
+ const e = t.object;
180
+ if (e.fragment != null && t.instanceId != null && t.face) {
181
+ const r = e.fragment.getVertexBlockID(e.geometry, t.face.a), l = (s = e.fragment.getItemID(t.instanceId, r)) == null ? void 0 : s.replace(/\..*/, "");
182
+ if (l && ((n = (o = e.fragment.group) == null ? void 0 : o.properties) == null ? void 0 : n[l]) != null) {
183
+ const i = e.fragment.group.properties[l], m = [{ ifcProperties: this.getProperties(l), itemProperties: i }];
184
+ return t.features = m, m;
185
+ }
186
+ }
187
+ return [];
188
+ }
189
+ async initClassification() {
190
+ this._classificationCache = await this.regenerateClassification([
191
+ "storeys",
192
+ "entities"
193
+ /* ENTITY */
194
+ ]), this._classificationCache.length === 0 && (this._classificationCache = await this.regenerateClassification([
195
+ "entities"
196
+ /* ENTITY */
197
+ ])), this._fragmentBoundingBox = await this._components.tools.get(at);
198
+ }
199
+ async preprocess() {
200
+ const t = await E.fetchArrayBuffer(this._source.url);
201
+ this._fragmentManager = await this._components.tools.get(rt), this._fragmentClassifier = await this._components.tools.get(ct);
202
+ const e = new lt(this._components);
203
+ e.settings.webIfc.COORDINATE_TO_ORIGIN = !0, e.settings.webIfc.OPTIMIZE_PROFILES = !0;
204
+ const s = new Uint8Array(t);
205
+ this._model = await e.load(s, this._source.name), this._model.rotateX(Math.PI / 2);
206
+ const o = new bt();
207
+ if (this._source.at)
208
+ this._source.at.toVector3(o), this._model.position.copy(o);
209
+ else {
210
+ const r = this._model.coordinationMatrix.clone().invert();
211
+ o.applyMatrix4(r), this._model.position.set(o.x, -o.z, o.y);
212
+ }
213
+ this._model.updateWorldMatrix(!0, !0), this._model.updateMatrix(), this._model.updateMatrixWorld(!0), this.initializeEntityIndexes(), this._fragmentClassifier.byStorey(this._model), this._fragmentClassifier.byEntity(this._model), await this.initClassification(), this.object3d.add(this._model), this.onObjectCreated(this._model);
214
+ const n = E.getContext(this._source.url);
215
+ D(this, { filename: n.filename }), this.notifyChange(this.object3d);
216
+ }
217
+ addComposites(t, e, s) {
218
+ this.addHighlightToFragment(t, e.fragment);
219
+ const o = e.fragment.composites[s];
220
+ if (o)
221
+ for (let n = 1; n < o; n++) {
222
+ const r = ut(s, n);
223
+ this._ifcSelection[t][e.uuid].add(r);
224
+ }
225
+ }
226
+ addHighlightToFragment(t, e) {
227
+ if (!(t in e.fragments)) {
228
+ const s = e.addFragment(t, [Lt[t]]);
229
+ e.blocks.count > 1 && (s.setInstance(0, {
230
+ ids: Array.from(e.ids),
231
+ transform: x
232
+ }), s.blocks.setVisibility(!1)), this._model.add(s.mesh), s.mesh.renderOrder = 30, s.mesh.frustumCulled = !1, s.mesh.name = t, s.mesh.updateMatrixWorld(!0);
233
+ }
234
+ }
235
+ initializeEntityIndexes() {
236
+ this._indexMap = {};
237
+ const t = this._model.properties;
238
+ if (t !== void 0)
239
+ for (const e of Yt)
240
+ b.getRelationMap(t, e, (s, o) => {
241
+ const n = t[s];
242
+ jt.includes(n.type) || this.setEntityIndex(s);
243
+ for (const r of o)
244
+ this.setEntityIndex(r).add(s);
245
+ });
246
+ }
247
+ regenerate(t, e) {
248
+ this.updateFragmentFill(t, e);
249
+ }
250
+ async regenerateClassification(t, e = {}) {
251
+ const s = this._fragmentClassifier.get(), o = [], n = t[0], r = s[n];
252
+ if (n == null || r == null)
253
+ return o;
254
+ for (const l of Object.keys(r)) {
255
+ const h = { ...e, [n]: [l] }, i = await this._fragmentClassifier.find(h);
256
+ if (Object.keys(i).length > 0) {
257
+ const f = n[0].toUpperCase() + n.slice(1), p = await this.regenerateClassification(
258
+ t.slice(1),
259
+ h
260
+ );
261
+ o.push({ children: p, fragments: i, name: l, treeItemName: f });
262
+ }
263
+ }
264
+ return o;
265
+ }
266
+ setEntityIndex(t) {
267
+ return t in this._indexMap || (this._indexMap[t] = /* @__PURE__ */ new Set()), this._indexMap[t];
268
+ }
269
+ updateFragmentFill(t, e) {
270
+ const s = this._ifcSelection[t][e], o = this._fragmentManager.list[e];
271
+ if (o == null)
272
+ return;
273
+ const n = o.fragments[t];
274
+ if (n == null)
275
+ return;
276
+ const r = o.mesh.parent;
277
+ if (r == null)
278
+ return;
279
+ if (r.add(n.mesh), n.blocks.count > 1)
280
+ o.getInstance(0, x), n.setInstance(0, {
281
+ ids: Array.from(o.ids),
282
+ transform: x
283
+ }), n.blocks.setVisibility(!0, s, !0);
284
+ else {
285
+ let h = 0;
286
+ for (const i of s) {
287
+ n.mesh.count = h + 1;
288
+ const { instanceID: u } = o.getInstanceAndBlockID(i);
289
+ o.getInstance(u, x), n.setInstance(h, { ids: [i], transform: x }), h++;
290
+ }
291
+ }
292
+ }
293
+ };
294
+ d(v, "isIFCEntity", (t) => P(t) && t.isIfcEntity), d(v, "isIFCPickResult", (t) => P(t) && v.isIFCEntity(t.entity));
295
+ let N = v;
296
+ class Ut extends St {
297
+ constructor(a, t, e) {
298
+ super(a, t, e, { visibility: !0 });
299
+ }
300
+ }
301
+ const Vt = { class: "d-flex" }, Wt = ["title"], Gt = ["id"], $t = { class: "list-unstyled border-start" }, qt = /* @__PURE__ */ G({
302
+ __name: "IfcSubtree",
303
+ props: {
304
+ classificationElement: {},
305
+ ifcEntity: {}
306
+ },
307
+ setup(c) {
308
+ const a = c, t = _t.generateUUID(), e = `#${t}`, s = Pt(!1), o = ht(), n = mt();
309
+ function r() {
310
+ const i = a.ifcEntity.getBoundingBoxById(a.classificationElement.fragments);
311
+ i && !i.isEmpty() && (n.setClippingBox(i), n.enableClippingBox(!0));
312
+ }
313
+ function l() {
314
+ s.value = !0, a.ifcEntity.clearHighlight(), a.ifcEntity.highlightById(a.classificationElement.fragments), setTimeout(() => s.value = !1, 2e3);
315
+ }
316
+ function h() {
317
+ const i = a.ifcEntity.getBoundingBoxById(a.classificationElement.fragments);
318
+ i && !i.isEmpty() && o.lookTopDownAt(i);
319
+ }
320
+ return (i, u) => {
321
+ const m = Et("IfcSubtree", !0);
322
+ return y(), _("div", null, [
323
+ F("div", Vt, [
324
+ F("span", {
325
+ class: R([
326
+ "border rounded px-1 py-0 fw-normal",
327
+ s.value ? "text-danger border-danger" : "text-secondary border-secondary"
328
+ ]),
329
+ title: i.classificationElement.treeItemName
330
+ }, Ft(i.classificationElement.treeItemName), 11, Wt),
331
+ i.classificationElement.children.length > 0 ? (y(), Tt(A, { key: 0 }, {
332
+ default: j(() => [
333
+ w(M, {
334
+ title: "Expand group",
335
+ icon: "bi-chevron-down",
336
+ "data-bs-toggle": "collapse",
337
+ "data-bs-target": e,
338
+ "aria-controls": O(t),
339
+ "aria-expanded": "true"
340
+ }, null, 8, ["aria-controls"])
341
+ ]),
342
+ _: 1
343
+ })) : L("", !0),
344
+ w(ft, {
345
+ class: R(["label", s.value ? "text-danger-emphasis" : "text-muted"]),
346
+ text: i.classificationElement.name,
347
+ title: `Zoom to ${i.classificationElement.name}`,
348
+ onClick: h
349
+ }, null, 8, ["class", "text", "title"]),
350
+ w(A, { class: "ms-1" }, {
351
+ default: j(() => [
352
+ w(M, {
353
+ title: "Highlight",
354
+ icon: "bi-highlighter",
355
+ onClick: l
356
+ }),
357
+ w(M, {
358
+ title: "Clip to",
359
+ icon: "bi-bounding-box",
360
+ onClick: r
361
+ })
362
+ ]),
363
+ _: 1
364
+ })
365
+ ]),
366
+ i.classificationElement.children.length > 0 ? (y(), _("div", {
367
+ key: 0,
368
+ id: O(t),
369
+ class: "collapse show"
370
+ }, [
371
+ F("ul", $t, [
372
+ (y(!0), _($, null, q(i.classificationElement.children, (f, p) => (y(), _("li", { key: p }, [
373
+ w(m, {
374
+ "ifc-entity": a.ifcEntity,
375
+ "classification-element": f
376
+ }, null, 8, ["ifc-entity", "classification-element"])
377
+ ]))), 128))
378
+ ])
379
+ ], 8, Gt)) : L("", !0)
380
+ ]);
381
+ };
382
+ }
383
+ }), Ht = /* @__PURE__ */ Y(qt, [["__scopeId", "data-v-c2ab888d"]]), Qt = { key: 0 }, Jt = /* @__PURE__ */ G({
384
+ __name: "IfcPropertyView",
385
+ props: {
386
+ dataset: {}
387
+ },
388
+ setup(c) {
389
+ const a = pt(), t = c, e = gt(t.dataset, "isPreloaded");
390
+ function s() {
391
+ const n = o();
392
+ return n == null ? null : n.getClassification();
393
+ }
394
+ function o() {
395
+ const n = a.getEntity(t.dataset);
396
+ return n ?? null;
397
+ }
398
+ return (n, r) => O(e) ? (y(), _("div", Qt, [
399
+ F("ul", null, [
400
+ (y(!0), _($, null, q(s(), (l, h) => (y(), _("li", { key: h }, [
401
+ w(Ht, {
402
+ "ifc-entity": o(),
403
+ "classification-element": l
404
+ }, null, 8, ["ifc-entity", "classification-element"])
405
+ ]))), 128))
406
+ ])
407
+ ])) : L("", !0);
408
+ }
409
+ }), Zt = /* @__PURE__ */ Y(Jt, [["__scopeId", "data-v-d2d82ae7"]]), Kt = (c) => {
410
+ if (J(c)) {
411
+ const a = c.object;
412
+ if (a.fragment != null && c.face && c.instanceId != null) {
413
+ const t = a.fragment.getVertexBlockID(a.geometry, c.face.a), e = a.fragment.getItemID(c.instanceId, t).replace(/\..*/, "");
414
+ return c.entity.highlight("selection", a, e), () => c.entity.clearHighlight();
415
+ }
416
+ }
417
+ return null;
418
+ }, Xt = (c) => ({
419
+ name: c.filename,
420
+ source: {
421
+ url: c.file
422
+ },
423
+ type: "ifc",
424
+ visible: !0
425
+ }), te = (c, a) => {
426
+ var l, h, i, u, m, f, p, I, C;
427
+ if (!J(c))
428
+ return;
429
+ const t = (l = c.features) == null ? void 0 : l.at(0);
430
+ if (!t)
431
+ return;
432
+ a.has("IFC") || a.set("IFC", []);
433
+ const e = a.get("IFC"), { ifcProperties: s, itemProperties: o } = t, n = "NULL", r = ((h = o.Name) == null ? void 0 : h.value) ?? n;
434
+ e.push({
435
+ key: "Site",
436
+ value: ((u = (i = c.entity.object3d.userData) == null ? void 0 : i.dataset) == null ? void 0 : u.name) ?? n
437
+ }), e.push({
438
+ key: "IFCType",
439
+ value: dt[o.type] ?? n
440
+ }), e.push({ key: "Name", value: r }), e.push({ key: "ID", value: o.expressID }), e.push({ key: "GlobalId", value: ((m = o.GlobalId) == null ? void 0 : m.value) ?? n }), ((f = o.Description) == null ? void 0 : f.value) != null && e.push({ key: "Description", value: o.Description.value }), ((p = o.PredefinedType) == null ? void 0 : p.value) != null && e.push({ key: "PredefinedType", value: o.PredefinedType.value }), ((I = o.ObjectType) == null ? void 0 : I.value) != null && e.push({ key: "ObjectType", value: o.ObjectType.value });
441
+ for (const { name: T, parentName: B, value: Z } of s)
442
+ a.has(B) || a.set(B, []), (C = a.get(B)) == null || C.push({ key: T, value: Z });
443
+ }, ee = (c) => {
444
+ const a = c.dataset, t = a.config, e = U(t.source.position ?? a.get("position")), s = new N({
445
+ ...t.source,
446
+ at: e,
447
+ name: a.name
448
+ });
449
+ return Promise.resolve(s);
450
+ };
451
+ class be {
452
+ constructor() {
453
+ d(this, "name", "IFC");
454
+ }
455
+ async initialize(a) {
456
+ a.datasets.registerDatasetType("ifc", {
457
+ attributeExtractor: te,
458
+ entityBuilder: ee,
459
+ fileExtensions: ["ifc"],
460
+ highlight: Kt,
461
+ icon: "bi-building",
462
+ loader: Xt,
463
+ name: "IFC",
464
+ propertyView: Zt
465
+ }), tt.registerInspector("IfcEntity", Ut), await E.fetch("web-ifc.wasm").catch((t) => {
466
+ console.warn("Could not load web-ifc.wasm", t);
467
+ });
468
+ }
469
+ }
470
+ const S = class S extends xt {
471
+ constructor() {
472
+ super(...arguments);
473
+ d(this, "isPickableFeatures", !0);
474
+ d(this, "isPlyMesh", !0);
475
+ }
476
+ pickFeaturesFrom(t) {
477
+ if (this.geometry.hasAttribute("color") && t.face) {
478
+ const e = this.geometry.getAttribute("color").array, s = t.face, n = [{ color: new vt(
479
+ e[s.a * 3],
480
+ e[s.a * 3 + 1],
481
+ e[s.a * 3 + 2]
482
+ ) }];
483
+ return t.features = n, n;
484
+ }
485
+ return [];
486
+ }
487
+ };
488
+ d(S, "isPlyMesh", (t) => P(t) && t.isPlyMesh), d(S, "isPlyPickResult", (t) => P(t) && S.isPlyMesh(t == null ? void 0 : t.object));
489
+ let k = S;
490
+ class se extends V {
491
+ constructor(t) {
492
+ super(new W());
493
+ d(this, "isPlyEntity", !0);
494
+ d(this, "source");
495
+ this.source = t;
496
+ }
497
+ async preprocess() {
498
+ const t = await E.fetchArrayBuffer(this.source.url), e = this.source.at.as(this.source.featureProjection).toVector3(), o = new kt().parse(t), n = new It({
499
+ side: Ct
500
+ });
501
+ o.hasAttribute("color") && (n.vertexColors = !0), o.computeVertexNormals();
502
+ const r = new k(o, n);
503
+ r.name = "plyModel", o.computeBoundingBox(), r.position.copy(e), r.updateWorldMatrix(!0, !0), this.object3d.add(r), this.onObjectCreated(r);
504
+ const l = E.getContext(this.source.url);
505
+ D(this, { filename: l.filename }), this.notifyChange(this.object3d);
506
+ }
507
+ }
508
+ const oe = (c) => {
509
+ const { dataset: a, instance: t } = c, e = a.config, s = U(e.source.position ?? a.get("position")), o = new se({
510
+ ...e.source,
511
+ at: s,
512
+ featureProjection: t.referenceCrs
513
+ });
514
+ return Promise.resolve(o);
515
+ }, ne = (c, a) => {
516
+ var s;
517
+ if (!k.isPlyPickResult(c))
518
+ return;
519
+ const t = (s = c.features) == null ? void 0 : s.at(0);
520
+ if (!t)
521
+ return;
522
+ a.has("PLY") || a.set("PLY", []), a.get("PLY").push({ key: "Color", value: t.color });
523
+ };
524
+ class we {
525
+ constructor() {
526
+ d(this, "name", "PLY");
527
+ }
528
+ initialize(a) {
529
+ a.datasets.registerDatasetType("ply", {
530
+ attributeExtractor: ne,
531
+ entityBuilder: oe,
532
+ icon: "bi-file-earmark-binary",
533
+ name: "PLY"
534
+ });
535
+ }
536
+ }
537
+ const ie = (c) => {
538
+ const a = c.dataset.config, t = new Bt({
539
+ source: new Mt({ url: `${a.source.url}/${a.source.filename}` })
540
+ });
541
+ return D(t, {
542
+ filename: a.source.url
543
+ }), Promise.resolve(t);
544
+ };
545
+ class _e {
546
+ constructor() {
547
+ d(this, "name", "Potree");
548
+ }
549
+ initialize(a) {
550
+ a.datasets.registerDatasetType("potree", {
551
+ entityBuilder: ie,
552
+ icon: "fg-multipoint",
553
+ name: "Potree Point Cloud"
554
+ });
555
+ }
556
+ }
557
+ class Ie {
558
+ constructor() {
559
+ d(this, "name", "Tour");
560
+ d(this, "_camera", null);
561
+ d(this, "_cameraCallback", null);
562
+ d(this, "_context", null);
563
+ d(this, "_tours", null);
564
+ }
565
+ initialize(a) {
566
+ this._context = a, a.events.addEventListener("ready", this.start.bind(this));
567
+ }
568
+ buildTours() {
569
+ const a = this._camera, t = new g.Tour({
570
+ tourName: "main",
571
+ useModalOverlay: !0
572
+ }), e = new g.Tour({
573
+ tourName: "navigating",
574
+ useModalOverlay: !0
575
+ }), s = new g.Tour({
576
+ tourName: "analyzing",
577
+ useModalOverlay: !0
578
+ }), o = [
579
+ { action: () => {
580
+ var i;
581
+ return (i = g.activeTour) == null ? void 0 : i.next();
582
+ }, text: "Next" },
583
+ { action: () => {
584
+ var i;
585
+ return (i = g.activeTour) == null ? void 0 : i.cancel();
586
+ }, secondary: !0, text: "Exit" }
587
+ ], n = () => {
588
+ var C, T;
589
+ const i = (C = g.activeTour) == null ? void 0 : C.getCurrentStep(), u = i == null ? void 0 : i.getElement(), m = u == null ? void 0 : u.querySelector(".shepherd-text"), f = (T = g.activeTour) == null ? void 0 : T.steps;
590
+ if (i == null || u == null || m == null || f == null)
591
+ return;
592
+ const p = document.createElement("div");
593
+ p.className = "progress mt-3", p.setAttribute("role", "progressbar"), p.style.height = "2px";
594
+ const I = document.createElement("div");
595
+ I.className = "progress-bar bg-success", I.style.width = `${100 * (f.indexOf(i) / f.length)}%`, p.appendChild(I), m.appendChild(p);
596
+ }, r = async (i, u) => new Promise((m) => {
597
+ const f = document.getElementById(i);
598
+ if (f && !f.classList.contains("active") && f.click(), document.querySelector(u))
599
+ return m(document.querySelector(u));
600
+ const p = new MutationObserver(() => {
601
+ document.querySelector(u) && (p.disconnect(), m(document.querySelector(u)));
602
+ });
603
+ p.observe(document.body, {
604
+ childList: !0,
605
+ subtree: !0
606
+ });
607
+ });
608
+ t.addStep({
609
+ buttons: [
610
+ {
611
+ action: () => {
612
+ var i;
613
+ (i = g.activeTour) == null || i.complete(), e.show(0);
614
+ },
615
+ text: "Navigating"
616
+ },
617
+ {
618
+ action: () => {
619
+ var i;
620
+ (i = g.activeTour) == null || i.complete(), s.show(0);
621
+ },
622
+ text: "Analyzing data"
623
+ },
624
+ {
625
+ action: () => {
626
+ var i;
627
+ return (i = g.activeTour) == null ? void 0 : i.cancel();
628
+ },
629
+ secondary: !0,
630
+ text: "Exit"
631
+ }
632
+ ],
633
+ cancelIcon: { enabled: !0, label: "Exit tutorial" },
634
+ id: "example-step",
635
+ text: "<p>Welcome to <strong>Piero</strong>, the Giro3D application.<br/>We can guide you through the different features.</p>",
636
+ title: "Welcome!",
637
+ when: {
638
+ show: n
639
+ }
640
+ }), e.addStep({
641
+ attachTo: {
642
+ element: "#main-view",
643
+ on: "bottom"
644
+ },
645
+ buttons: o,
646
+ id: "view",
647
+ text: "<p>This is the <b>main view</b>.</p><p>Giro3D natively supports a broad range of data sources, from 2D raster and vector data, to 3D point clouds and tilesets.</p><p>Piero adds support for CityJSON and IFC files.</p>",
648
+ when: {
649
+ show: n
650
+ }
651
+ }), e.addStep({
652
+ attachTo: {
653
+ element: "#main-view",
654
+ on: "bottom"
655
+ },
656
+ buttons: o,
657
+ id: "navigate",
658
+ text: '<p>This application integrates <a href="https://github.com/yomotsu/camera-controls">camera-controls</a>, a camera control for three.js.</p><p><b>Click</b> to move the camera. <b>Right-click</b> to rotate around a point. <b>Scroll</b> to zoom in or out.</p>',
659
+ when: {
660
+ hide: () => {
661
+ this._cameraCallback && a.removeEventListener("interaction-end", this._cameraCallback), this._cameraCallback = null;
662
+ },
663
+ show: () => {
664
+ let i = 0;
665
+ this._cameraCallback = () => {
666
+ var u;
667
+ i += 1, i > 2 && ((u = g.activeTour) == null || u.next());
668
+ }, a.addEventListener("interaction-end", this._cameraCallback), n();
669
+ }
670
+ }
671
+ }), e.addStep({
672
+ attachTo: {
673
+ element: "#toolbar",
674
+ on: "right"
675
+ },
676
+ beforeShowPromise: () => r("toolbar-datasets", "#datasets-drop-zone"),
677
+ buttons: o,
678
+ id: "toolbar-layers",
679
+ text: "<p>Giro3D supports multiple datasets.</p><p>You can toggle datasets as you wish with the <b>Datasets</b> panel.</p>",
680
+ when: {
681
+ show: n
682
+ }
683
+ }), e.addStep({
684
+ attachTo: {
685
+ element: "#basemap-list",
686
+ on: "right"
687
+ },
688
+ beforeShowPromise: () => r("toolbar-datasets", "#datasets-drop-zone"),
689
+ buttons: o,
690
+ id: "basemaps",
691
+ text: "<p><b>Basemaps</b> are color and elevation layers that make the basic shape and aspect of the <b>Map</b>.</p>",
692
+ when: {
693
+ show: n
694
+ }
695
+ }), e.addStep({
696
+ attachTo: {
697
+ element: "#overlay-list",
698
+ on: "right"
699
+ },
700
+ beforeShowPromise: () => r("toolbar-datasets", "#datasets-drop-zone"),
701
+ buttons: o,
702
+ id: "overlays",
703
+ text: "<p><b>Overlays</b> are vector layers in various formats (WFS, GML, GeoJSON...).</p>",
704
+ when: {
705
+ show: n
706
+ }
707
+ }), e.addStep({
708
+ attachTo: {
709
+ element: "#dataset-list",
710
+ on: "right"
711
+ },
712
+ beforeShowPromise: () => r("toolbar-datasets", "#datasets-drop-zone"),
713
+ buttons: o,
714
+ id: "layers",
715
+ text: "<p>The <b>Datasets</b> panel contains all 3D objects in the scene.</><p>You can toggle their visibility and delete them.<p><p>Most objects leverage Giro3D's adaptive resolution to optimize their display.</p>",
716
+ when: {
717
+ show: n
718
+ }
719
+ }), e.addStep({
720
+ attachTo: {
721
+ element: "#datasets-drop-zone",
722
+ on: "right"
723
+ },
724
+ beforeShowPromise: () => r("toolbar-datasets", "#datasets-drop-zone"),
725
+ buttons: o,
726
+ id: "adddata",
727
+ text: "<p>You can add your own data from your computer by <b>dragging the file</b> into this page.</p><p>While you won't benefit from Giro3D's tiling mechanism, this can be a great way to quickly visualize datasets up to 100MB.</p><p>This application supports CityJSONs, IFCs, LAS/LAZs, CSV pointclouds, and simple GeoJSON features.</p>",
728
+ when: {
729
+ show: n
730
+ }
731
+ }), e.addStep({
732
+ attachTo: {
733
+ element: "#main-view",
734
+ on: "bottom"
735
+ },
736
+ buttons: o,
737
+ id: "attributes",
738
+ text: "<p>By clicking on any feature on the map, you can see its <strong>Attribute table</strong>. Clickable features display a cursor when hovered.</p>",
739
+ when: {
740
+ show: n
741
+ }
742
+ }), e.addStep({
743
+ attachTo: {
744
+ element: "#search-place-autocomplete",
745
+ on: "bottom"
746
+ },
747
+ buttons: [
748
+ {
749
+ action: () => {
750
+ var i;
751
+ (i = g.activeTour) == null || i.complete(), s.show(0);
752
+ },
753
+ text: "Analyzing data"
754
+ },
755
+ {
756
+ action: () => {
757
+ var i;
758
+ return (i = g.activeTour) == null ? void 0 : i.complete();
759
+ },
760
+ secondary: !0,
761
+ text: "Exit"
762
+ }
763
+ ],
764
+ id: "widgets",
765
+ text: "Giro3D is highly extensible. Here we added a widget to search and navigate to locations based on the French address database.",
766
+ when: {
767
+ show: n
768
+ }
769
+ }), s.addStep({
770
+ attachTo: {
771
+ element: "#annotations-fieldset",
772
+ on: "right"
773
+ },
774
+ beforeShowPromise: () => r("toolbar-annotations", "#annotations-fieldset"),
775
+ buttons: o,
776
+ id: "annotation",
777
+ text: "<p>You can <strong>annotate</strong> any data displayed using Giro3D native tools.<br>Select the <strong>geometry</strong> of your annotation, and <strong>click</strong> on the scene to add points. <strong>Right-click</strong> to end the shape.</p>",
778
+ when: {
779
+ show: n
780
+ }
781
+ }), s.addStep({
782
+ attachTo: {
783
+ element: "#annotations-fieldset",
784
+ on: "right"
785
+ },
786
+ beforeShowPromise: () => r("toolbar-annotations", "#annotations-fieldset"),
787
+ buttons: o,
788
+ id: "annotations",
789
+ text: "You can download your annotations as GeoJSON files. You can also upload your own by dragging them into this panel.",
790
+ when: {
791
+ show: n
792
+ }
793
+ }), yt("measurements") && s.addStep({
794
+ attachTo: {
795
+ element: "#panel-container",
796
+ on: "right"
797
+ },
798
+ beforeShowPromise: () => r("toolbar-measures", "#measures-fieldset"),
799
+ buttons: o,
800
+ id: "measurements",
801
+ text: "You can add <strong>measurements</strong> to easily get distances betwween objects.<br>Once started, moving the mouse will display the measure. <strong>Click</strong> to save the measurement. <strong>Right-click</strong> to end.",
802
+ when: {
803
+ show: n
804
+ }
805
+ }), s.addStep({
806
+ attachTo: {
807
+ element: "#panel-container",
808
+ on: "right"
809
+ },
810
+ beforeShowPromise: () => r("toolbar-analysis", "#panel-container .card"),
811
+ buttons: [{ action: () => {
812
+ var i;
813
+ return (i = g.activeTour) == null ? void 0 : i.complete();
814
+ }, text: "Done!" }],
815
+ id: "analysis",
816
+ text: "In the <strong>Analysis</strong> panel you'll find some advanced analysis tools.",
817
+ when: {
818
+ show: n
819
+ }
820
+ });
821
+ const l = () => {
822
+ const i = new URL(document.URL);
823
+ i.searchParams.delete("tourStep"), i.searchParams.set("tour", "none"), window.history.replaceState({}, "", i.toString());
824
+ }, h = (i) => {
825
+ const u = new URL(document.URL);
826
+ let m = "main";
827
+ i.tour.id.startsWith("navigating") ? m = "navigating" : i.tour.id.startsWith("analyzing") && (m = "analyzing"), u.searchParams.set("tour", m), u.searchParams.set("tourStep", i.step.id), window.history.replaceState({}, "", u.toString());
828
+ };
829
+ return t.on("cancel", l), t.on("complete", l), t.on("show", h), e.on("cancel", l), e.on("complete", l), e.on("show", h), s.on("cancel", l), s.on("complete", l), s.on("show", h), { analyzingTour: s, mainTour: t, navigatingTour: e };
830
+ }
831
+ getTours() {
832
+ return this._tours || (this._tours = this.buildTours()), this._tours;
833
+ }
834
+ restart() {
835
+ const { mainTour: a } = this.getTours();
836
+ a.show(0);
837
+ }
838
+ start() {
839
+ if (!this._context)
840
+ throw new Error("module is not initialized");
841
+ const { analyzingTour: a, mainTour: t, navigatingTour: e } = this.getTours();
842
+ this._camera = this._context.view.getCameraController();
843
+ const s = new URL(document.URL), o = s.searchParams.get("tour") ?? "main";
844
+ if (o !== "none") {
845
+ const n = s.searchParams.get("tourStep") ?? 0;
846
+ o === "navigating" ? e.show(n) : o === "analyzing" ? a.show(n) : t.show(n);
847
+ }
848
+ }
849
+ }
850
+ export {
851
+ be as IFCLoader,
852
+ we as PLYLoader,
853
+ _e as PotreeLoader,
854
+ Ie as Tour
855
+ };
856
+ //# sourceMappingURL=modules.es.js.map