@giro3d/piero 25.10.0-beta.10

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 (245) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +134 -0
  3. package/dist/Components.cjs.js +2605 -0
  4. package/dist/Components.es.js +43490 -0
  5. package/dist/assets/ParserWorker-Bd30oD5I.js +5 -0
  6. package/dist/assets/style.css +9 -0
  7. package/dist/basedecoder.cjs.js +1 -0
  8. package/dist/basedecoder.es.js +88 -0
  9. package/dist/decoder.cjs.js +1 -0
  10. package/dist/decoder.es.js +9 -0
  11. package/dist/deflate.cjs.js +1 -0
  12. package/dist/deflate.es.js +10 -0
  13. package/dist/index.cjs.js +93 -0
  14. package/dist/index.d.ts +2 -0
  15. package/dist/index.es.js +65240 -0
  16. package/dist/jpeg.cjs.js +1 -0
  17. package/dist/jpeg.es.js +514 -0
  18. package/dist/lerc.cjs.js +1 -0
  19. package/dist/lerc.es.js +1027 -0
  20. package/dist/lzw.cjs.js +1 -0
  21. package/dist/lzw.es.js +84 -0
  22. package/dist/modules.cjs.js +2973 -0
  23. package/dist/modules.d.ts +2 -0
  24. package/dist/modules.es.js +87571 -0
  25. package/dist/packbits.cjs.js +1 -0
  26. package/dist/packbits.es.js +24 -0
  27. package/dist/pako.esm.cjs.js +1 -0
  28. package/dist/pako.esm.es.js +1053 -0
  29. package/dist/piero_logo.png +0 -0
  30. package/dist/piero_logo_compact.png +0 -0
  31. package/dist/raw.cjs.js +1 -0
  32. package/dist/raw.es.js +9 -0
  33. package/dist/sponsors/bpi_france.png +0 -0
  34. package/dist/sponsors/france_2030.png +0 -0
  35. package/dist/sponsors/france_relance.png +0 -0
  36. package/dist/sponsors/oslandia.png +0 -0
  37. package/dist/sponsors/ue_next_generation.png +0 -0
  38. package/dist/src/App.vue.d.ts +6 -0
  39. package/dist/src/api/BookmarkApi.d.ts +6 -0
  40. package/dist/src/api/DatasetApi.d.ts +61 -0
  41. package/dist/src/api/ViewApi.d.ts +4 -0
  42. package/dist/src/api/index.d.ts +4 -0
  43. package/dist/src/components/AlertToast.vue.d.ts +4 -0
  44. package/dist/src/components/AttributeGroup.vue.d.ts +7 -0
  45. package/dist/src/components/AttributeItem.vue.d.ts +6 -0
  46. package/dist/src/components/AttributePanel.vue.d.ts +14 -0
  47. package/dist/src/components/ColorFragment.vue.d.ts +6 -0
  48. package/dist/src/components/Configuration.d.ts +14 -0
  49. package/dist/src/components/CoordinateFragment.vue.d.ts +10 -0
  50. package/dist/src/components/DropdownView.vue.d.ts +13 -0
  51. package/dist/src/components/LinkFragment.vue.d.ts +10 -0
  52. package/dist/src/components/LoadingScreen.vue.d.ts +2 -0
  53. package/dist/src/components/MainView.vue.d.ts +5 -0
  54. package/dist/src/components/MinimapView.vue.d.ts +4 -0
  55. package/dist/src/components/ModalOverlay.vue.d.ts +17 -0
  56. package/dist/src/components/NavigationButtons.vue.d.ts +2 -0
  57. package/dist/src/components/OpacitySlider.vue.d.ts +10 -0
  58. package/dist/src/components/PanelContainer.vue.d.ts +10 -0
  59. package/dist/src/components/ProgressBar.vue.d.ts +14 -0
  60. package/dist/src/components/SearchOverlay.vue.d.ts +8 -0
  61. package/dist/src/components/SpinnerControl.vue.d.ts +2 -0
  62. package/dist/src/components/StatusBar.vue.d.ts +10 -0
  63. package/dist/src/components/SwitchToggle.vue.d.ts +17 -0
  64. package/dist/src/components/VisibilityControl.vue.d.ts +9 -0
  65. package/dist/src/components/atoms/ButtonArea.vue.d.ts +9 -0
  66. package/dist/src/components/atoms/ButtonWithIcon.vue.d.ts +11 -0
  67. package/dist/src/components/atoms/CompactList.vue.d.ts +9 -0
  68. package/dist/src/components/atoms/Icon.vue.d.ts +6 -0
  69. package/dist/src/components/atoms/IconList.vue.d.ts +9 -0
  70. package/dist/src/components/atoms/IconListButton.vue.d.ts +10 -0
  71. package/dist/src/components/atoms/ImportButton.vue.d.ts +13 -0
  72. package/dist/src/components/atoms/ListLabel.vue.d.ts +5 -0
  73. package/dist/src/components/atoms/ListLabelButton.vue.d.ts +11 -0
  74. package/dist/src/components/atoms/SectionCollapsible.vue.d.ts +20 -0
  75. package/dist/src/components/charts/BarChart.vue.d.ts +4 -0
  76. package/dist/src/components/charts/DoughnutChart.vue.d.ts +4 -0
  77. package/dist/src/components/panels/AboutPanel.vue.d.ts +2 -0
  78. package/dist/src/components/panels/AnalysisPanel.vue.d.ts +2 -0
  79. package/dist/src/components/panels/AnnotationItem.vue.d.ts +21 -0
  80. package/dist/src/components/panels/AnnotationPanel.vue.d.ts +2 -0
  81. package/dist/src/components/panels/BasemapItem.vue.d.ts +17 -0
  82. package/dist/src/components/panels/BookmarkItem.vue.d.ts +16 -0
  83. package/dist/src/components/panels/BookmarkPanel.vue.d.ts +2 -0
  84. package/dist/src/components/panels/DatagroupItem.vue.d.ts +18 -0
  85. package/dist/src/components/panels/DatasetItem.vue.d.ts +18 -0
  86. package/dist/src/components/panels/DatasetOrGroupItem.vue.d.ts +18 -0
  87. package/dist/src/components/panels/DatasetPanel.vue.d.ts +2 -0
  88. package/dist/src/components/panels/EmptyIndicator.vue.d.ts +6 -0
  89. package/dist/src/components/panels/LoadingIndicator.vue.d.ts +6 -0
  90. package/dist/src/components/panels/MeasurementItem.vue.d.ts +17 -0
  91. package/dist/src/components/panels/MeasurementPanel.vue.d.ts +2 -0
  92. package/dist/src/components/panels/OverlayItem.vue.d.ts +19 -0
  93. package/dist/src/components/panels/ShareBookmarkModal.vue.d.ts +5 -0
  94. package/dist/src/components/panels/analysis/ClippingBox.vue.d.ts +2 -0
  95. package/dist/src/components/panels/analysis/CrossSection.vue.d.ts +2 -0
  96. package/dist/src/components/panels/analysis/FloodingPlane.vue.d.ts +2 -0
  97. package/dist/src/components/panels/analysis/Statistics.vue.d.ts +2 -0
  98. package/dist/src/components/panels/analysis/ToolWrapper.vue.d.ts +20 -0
  99. package/dist/src/components/toolbar/ToolBar.vue.d.ts +9 -0
  100. package/dist/src/components/toolbar/ToolbarButton.vue.d.ts +12 -0
  101. package/dist/src/config-loader.d.ts +7 -0
  102. package/dist/src/constants.d.ts +7 -0
  103. package/dist/src/context.d.ts +35 -0
  104. package/dist/src/createPieroApp.d.ts +31 -0
  105. package/dist/src/events.d.ts +30 -0
  106. package/dist/src/giro3d/CameraControlsInspector.d.ts +17 -0
  107. package/dist/src/giro3d/EntityBuilder.d.ts +21 -0
  108. package/dist/src/giro3d/Graticule.d.ts +20 -0
  109. package/dist/src/giro3d/Grid.d.ts +11 -0
  110. package/dist/src/giro3d/LayerBuilder.d.ts +46 -0
  111. package/dist/src/giro3d/Measure3D.d.ts +19 -0
  112. package/dist/src/giro3d/Plane.d.ts +11 -0
  113. package/dist/src/giro3d/Skybox.d.ts +6 -0
  114. package/dist/src/giro3d/entities/FeatureCollectionEntity.d.ts +41 -0
  115. package/dist/src/giro3d/entities/PointCloudEntity.d.ts +45 -0
  116. package/dist/src/giro3d/entities/TiledPointCloudEntity.d.ts +13 -0
  117. package/dist/src/giro3d/entities/Tiles3dEntity.d.ts +11 -0
  118. package/dist/src/giro3d/entities/VectorLabelsEntity.d.ts +48 -0
  119. package/dist/src/giro3d/entities/VectorMeshEntity.d.ts +97 -0
  120. package/dist/src/giro3d/entities/VectorShapeEntity.d.ts +8 -0
  121. package/dist/src/giro3d/entities/flatPointCloud.d.ts +2 -0
  122. package/dist/src/giro3d/entities/tiledIfc.d.ts +2 -0
  123. package/dist/src/giro3d/entities/vector.d.ts +2 -0
  124. package/dist/src/giro3d/sources/GeopackageSource.d.ts +20 -0
  125. package/dist/src/giro3d/sources/ShapefileSource.d.ts +20 -0
  126. package/dist/src/giro3d/sources/mixins.d.ts +60 -0
  127. package/dist/src/index.d.ts +17 -0
  128. package/dist/src/loaders/csv.d.ts +3 -0
  129. package/dist/src/loaders/las.d.ts +3 -0
  130. package/dist/src/loaders/loader.d.ts +29 -0
  131. package/dist/src/loaders/loader.test.d.ts +1 -0
  132. package/dist/src/loaders/userData.d.ts +8 -0
  133. package/dist/src/loaders/vector.d.ts +4 -0
  134. package/dist/src/module.d.ts +11 -0
  135. package/dist/src/modules/CityJSONLoader.d.ts +10 -0
  136. package/dist/src/modules/IFCLoader.d.ts +9 -0
  137. package/dist/src/modules/PLYLoader.d.ts +9 -0
  138. package/dist/src/modules/PotreeLoader.d.ts +9 -0
  139. package/dist/src/modules/Tour.d.ts +17 -0
  140. package/dist/src/modules/cityjson/CityJSONEntity.d.ts +79 -0
  141. package/dist/src/modules/cityjson/CityJSONEntityInspector.d.ts +8 -0
  142. package/dist/src/modules/ifc/IfcEntity.d.ts +87 -0
  143. package/dist/src/modules/ifc/IfcEntityInspector.d.ts +7 -0
  144. package/dist/src/modules/ifc/IfcPropertyView.vue.d.ts +6 -0
  145. package/dist/src/modules/ifc/IfcSubtree.vue.d.ts +7 -0
  146. package/dist/src/modules/index.d.ts +6 -0
  147. package/dist/src/modules/ply/PlyEntity.d.ts +33 -0
  148. package/dist/src/providers/Alticoding.d.ts +32 -0
  149. package/dist/src/providers/BanProvider.d.ts +11 -0
  150. package/dist/src/providers/Geocoding.d.ts +7 -0
  151. package/dist/src/providers/IgnProvider.d.ts +11 -0
  152. package/dist/src/services/AnalysisManager.d.ts +10 -0
  153. package/dist/src/services/AnnotationManager.d.ts +48 -0
  154. package/dist/src/services/CameraController.d.ts +99 -0
  155. package/dist/src/services/DatasetManager.d.ts +27 -0
  156. package/dist/src/services/Giro3DManager.d.ts +42 -0
  157. package/dist/src/services/Highlighter.d.ts +11 -0
  158. package/dist/src/services/LayerManager.d.ts +37 -0
  159. package/dist/src/services/MeasureTool.d.ts +13 -0
  160. package/dist/src/services/MeasurementManager.d.ts +31 -0
  161. package/dist/src/services/MinimapController.d.ts +19 -0
  162. package/dist/src/services/Picker.d.ts +53 -0
  163. package/dist/src/services/analysis/ClippingBoxManager.d.ts +41 -0
  164. package/dist/src/services/analysis/CrossSectionManager.d.ts +9 -0
  165. package/dist/src/services/analysis/FloodingPlaneManager.d.ts +11 -0
  166. package/dist/src/stores/analysis.d.ts +1571 -0
  167. package/dist/src/stores/annotations.d.ts +60 -0
  168. package/dist/src/stores/bookmarks.d.ts +21 -0
  169. package/dist/src/stores/camera.d.ts +287 -0
  170. package/dist/src/stores/datasets.d.ts +49 -0
  171. package/dist/src/stores/giro3d.d.ts +45 -0
  172. package/dist/src/stores/layers.d.ts +40 -0
  173. package/dist/src/stores/measurement.d.ts +45 -0
  174. package/dist/src/stores/modules.d.ts +11 -0
  175. package/dist/src/stores/notifications.d.ts +8 -0
  176. package/dist/src/stores/statistics.d.ts +8 -0
  177. package/dist/src/types/Annotation.d.ts +35 -0
  178. package/dist/src/types/AnnotationMode.d.ts +7 -0
  179. package/dist/src/types/BaseLayer.d.ts +30 -0
  180. package/dist/src/types/Bookmark.d.ts +19 -0
  181. package/dist/src/types/CameraPosition.d.ts +7 -0
  182. package/dist/src/types/Configuration.d.ts +94 -0
  183. package/dist/src/types/Dataset.d.ts +78 -0
  184. package/dist/src/types/Feature.d.ts +13 -0
  185. package/dist/src/types/FloodingPlane.d.ts +14 -0
  186. package/dist/src/types/IFCTypes.d.ts +5 -0
  187. package/dist/src/types/LayerObject.d.ts +20 -0
  188. package/dist/src/types/Measure.d.ts +20 -0
  189. package/dist/src/types/MeasurementMode.d.ts +7 -0
  190. package/dist/src/types/Named.d.ts +5 -0
  191. package/dist/src/types/NavigationMode.d.ts +2 -0
  192. package/dist/src/types/Notification.d.ts +8 -0
  193. package/dist/src/types/OLGeometry.d.ts +1 -0
  194. package/dist/src/types/Overlay.d.ts +24 -0
  195. package/dist/src/types/VectorStyle.d.ts +31 -0
  196. package/dist/src/types/Viewbox.d.ts +7 -0
  197. package/dist/src/types/configuration/analysis.d.ts +26 -0
  198. package/dist/src/types/configuration/bookmark.d.ts +16 -0
  199. package/dist/src/types/configuration/camera.d.ts +19 -0
  200. package/dist/src/types/configuration/color.d.ts +18 -0
  201. package/dist/src/types/configuration/datasets/cityjson.d.ts +9 -0
  202. package/dist/src/types/configuration/datasets/core.d.ts +49 -0
  203. package/dist/src/types/configuration/datasets/featureCollection.d.ts +6 -0
  204. package/dist/src/types/configuration/datasets/ifc.d.ts +10 -0
  205. package/dist/src/types/configuration/datasets/index.d.ts +27 -0
  206. package/dist/src/types/configuration/datasets/layer.d.ts +43 -0
  207. package/dist/src/types/configuration/datasets/ply.d.ts +10 -0
  208. package/dist/src/types/configuration/datasets/pointCloud.d.ts +12 -0
  209. package/dist/src/types/configuration/datasets/potreePointCloud.d.ts +10 -0
  210. package/dist/src/types/configuration/datasets/tiledIfc.d.ts +9 -0
  211. package/dist/src/types/configuration/datasets/tiledPointCloud.d.ts +9 -0
  212. package/dist/src/types/configuration/datasets/vector.d.ts +34 -0
  213. package/dist/src/types/configuration/features.d.ts +2 -0
  214. package/dist/src/types/configuration/geographic.d.ts +51 -0
  215. package/dist/src/types/configuration/layers/core.d.ts +50 -0
  216. package/dist/src/types/configuration/layers/index.d.ts +49 -0
  217. package/dist/src/types/configuration/sources/bingMaps.d.ts +5 -0
  218. package/dist/src/types/configuration/sources/core/baseConfig.d.ts +70 -0
  219. package/dist/src/types/configuration/sources/core/tiled.d.ts +19 -0
  220. package/dist/src/types/configuration/sources/core/vector.d.ts +13 -0
  221. package/dist/src/types/configuration/sources/core/vectorTile.d.ts +8 -0
  222. package/dist/src/types/configuration/sources/customVector.d.ts +7 -0
  223. package/dist/src/types/configuration/sources/customVectorTile.d.ts +8 -0
  224. package/dist/src/types/configuration/sources/geojson.d.ts +5 -0
  225. package/dist/src/types/configuration/sources/geotiff.d.ts +8 -0
  226. package/dist/src/types/configuration/sources/gpx.d.ts +5 -0
  227. package/dist/src/types/configuration/sources/kml.d.ts +5 -0
  228. package/dist/src/types/configuration/sources/mvt.d.ts +10 -0
  229. package/dist/src/types/configuration/sources/osm.d.ts +5 -0
  230. package/dist/src/types/configuration/sources/stadiaMaps.d.ts +5 -0
  231. package/dist/src/types/configuration/sources/wms.d.ts +15 -0
  232. package/dist/src/types/configuration/sources/wmts.d.ts +15 -0
  233. package/dist/src/types/configuration/sources/xyz.d.ts +9 -0
  234. package/dist/src/types/utilities.d.ts +5 -0
  235. package/dist/src/utils/Components.d.ts +8 -0
  236. package/dist/src/utils/Configuration.d.ts +15 -0
  237. package/dist/src/utils/Download.d.ts +11 -0
  238. package/dist/src/utils/Fetcher.d.ts +77 -0
  239. package/dist/src/utils/Measure.d.ts +7 -0
  240. package/dist/src/utils/OLFeatures.d.ts +57 -0
  241. package/dist/src/utils/Projections.d.ts +10 -0
  242. package/dist/src/utils/Types.d.ts +11 -0
  243. package/dist/webimage.cjs.js +1 -0
  244. package/dist/webimage.es.js +19 -0
  245. package/package.json +100 -0
@@ -0,0 +1,30 @@
1
+ import { default as LayerObject } from './LayerObject';
2
+ import { BasemapLayerSourceConfig, LayerConfig, LayerType } from './configuration/layers';
3
+ import { default as ColorLayer } from '@giro3d/giro3d/core/layer/ColorLayer';
4
+ import { default as ElevationLayer } from '@giro3d/giro3d/core/layer/ElevationLayer';
5
+ import { default as MaskLayer } from '@giro3d/giro3d/core/layer/MaskLayer';
6
+ import { EventDispatcher } from '../../../../node_modules/three';
7
+ export type BasemapLayer = ElevationLayer | ColorLayer | MaskLayer;
8
+ export type BaseLayerOptions<TLayerType extends LayerConfig> = Omit<TLayerType, 'type' | 'name' | 'source'>;
9
+ export interface BaseLayer extends EventDispatcher {
10
+ name: string;
11
+ type: LayerType;
12
+ source: BasemapLayerSourceConfig;
13
+ uuid: string;
14
+ options: BaseLayerOptions<LayerConfig>;
15
+ get isLoading(): boolean;
16
+ set isLoading(v: boolean);
17
+ get visible(): boolean;
18
+ set visible(v: boolean);
19
+ get opacity(): number;
20
+ set opacity(v: number);
21
+ }
22
+ export declare class BaseLayerObject extends LayerObject implements BaseLayer {
23
+ private _loading;
24
+ readonly type: LayerType;
25
+ readonly source: BasemapLayerSourceConfig;
26
+ readonly options: BaseLayerOptions<LayerConfig>;
27
+ constructor({ type, name, source, ...options }: LayerConfig);
28
+ get isLoading(): boolean;
29
+ set isLoading(v: boolean);
30
+ }
@@ -0,0 +1,19 @@
1
+ import { EventDispatcher } from '../../../../node_modules/three';
2
+ import { default as CameraPosition } from './CameraPosition';
3
+ export type SerializedBookmark = {
4
+ title: string;
5
+ url: string;
6
+ };
7
+ export type BookmarkEventMap = {
8
+ delete: {};
9
+ goto: {};
10
+ };
11
+ export default class Bookmark extends EventDispatcher<BookmarkEventMap> {
12
+ readonly name: string;
13
+ readonly camera: CameraPosition;
14
+ constructor(name: string, camera: CameraPosition);
15
+ delete(): void;
16
+ goTo(): void;
17
+ getUrl(): URL;
18
+ static new(name: string, urlString: string): Bookmark;
19
+ }
@@ -0,0 +1,7 @@
1
+ import { Vector3 } from '../../../../node_modules/three';
2
+ export default class CameraPosition {
3
+ readonly camera: Vector3;
4
+ readonly target: Vector3;
5
+ readonly focalOffset: Vector3;
6
+ constructor(camera: Vector3, target: Vector3, focalOffset: Vector3);
7
+ }
@@ -0,0 +1,94 @@
1
+ import { AnalysisConfig } from './configuration/analysis';
2
+ import { BookmarkConfig } from './configuration/bookmark';
3
+ import { CameraConfig, CameraConfigDeprecated } from './configuration/camera';
4
+ import { ColorMapConfig } from './configuration/color';
5
+ import { ExperimentalFeatures } from './configuration/features';
6
+ import { CRS, GeoExtent, GeoVec2 } from './configuration/geographic';
7
+ import { LayerConfig, OverlayConfig, OverlayRasterConfigDeprecated, OverlayVectorConfigDeprecated, OverlayVectorTileConfigDeprecated } from './configuration/layers';
8
+ import { MapConstructorOptions } from '@giro3d/giro3d/entities/Map';
9
+ import { DatasetOrGroupConfig } from './configuration/datasets';
10
+ import { VectorDatasetRendering } from './configuration/datasets/vector';
11
+ /**
12
+ * Extent configuration
13
+ *
14
+ * @deprecated Use {@link BasemapConfig.extent} field instead. Will be removed in release v24.10.
15
+ */
16
+ export interface ExtentConfigWithCenter {
17
+ /**
18
+ * Center of the map.
19
+ *
20
+ * @deprecated Use {@link BasemapConfig.extent} field instead. Will be removed in release v24.10.
21
+ */
22
+ center?: GeoVec2 | [number, number];
23
+ /**
24
+ * Size of the map in CRS units.
25
+ *
26
+ * @deprecated Use {@link BasemapConfig.extent} field instead. Will be removed in release v24.10.
27
+ */
28
+ size?: [number, number];
29
+ }
30
+ /** Basemap configuration */
31
+ export interface BasemapConfig extends ExtentConfigWithCenter, Pick<MapConstructorOptions, 'lighting' | 'contourLines' | 'graticule' | 'colorimetry' | 'side' | 'terrain' | 'backgroundColor' | 'backgroundOpacity' | 'showOutline' | 'elevationRange'> {
32
+ /** Extent configuration */
33
+ extent?: GeoExtent;
34
+ /**
35
+ * Color map configuration for Elevation layer, used when it's the only layer displayed
36
+ */
37
+ colormap: ColorMapConfig;
38
+ /**
39
+ * Layers
40
+ *
41
+ * Layers define how the 3D map is displayed:
42
+ * - The elevation layer defines how the map is rendered in 3D,
43
+ * - Color layers define how the map appears, they are typically imagery or plan.
44
+ *
45
+ * There should be exactly one elevation layer and one or several color layers.
46
+ */
47
+ layers: LayerConfig[];
48
+ }
49
+ /** Piero configuration */
50
+ export interface Configuration {
51
+ /** Custom CRS definitions */
52
+ crs_definitions?: Record<CRS, string>;
53
+ /**
54
+ * The default CRS to be used in the view
55
+ *
56
+ * Requires the CRS to be geocentric.
57
+ * Requires the CRS to be registered.
58
+ */
59
+ default_crs: CRS;
60
+ /** Experimental features to switch on */
61
+ enabled_features?: ExperimentalFeatures[];
62
+ /** Camera configuration */
63
+ camera: CameraConfig | CameraConfigDeprecated;
64
+ /** Basemap configuration */
65
+ basemap: BasemapConfig;
66
+ /** Pointcloud display configuration */
67
+ pointcloud: ColorMapConfig;
68
+ /** Analysis tools configuration */
69
+ analysis: AnalysisConfig;
70
+ /**
71
+ * Array of datasets to display
72
+ *
73
+ * Datasets define the 3D data displayed in the app.
74
+ *
75
+ * Datasets can be organized in groups; some parameters are then inherited to their children.
76
+ *
77
+ * Some dataset types support loading multiple URLs into one dataset. For these types, you can set an array of URLs for the `url` field.
78
+ */
79
+ datasets: DatasetOrGroupConfig[];
80
+ /**
81
+ * When importing vector datasets, pick how to render them.
82
+ * @defaultValue mesh
83
+ */
84
+ importedVectorDatasetRendering?: VectorDatasetRendering | 'overlay';
85
+ /**
86
+ * Array of overlays to display on the 2.5D map - can be empty
87
+ *
88
+ * Overlays define data that are merged into the 2.5D map.
89
+ * These are typically vector data or rasters with transparent backgrounds.
90
+ */
91
+ overlays: (OverlayConfig | OverlayVectorConfigDeprecated | OverlayVectorTileConfigDeprecated | OverlayRasterConfigDeprecated)[];
92
+ /** Array of bookmarks - can be empty */
93
+ bookmarks: BookmarkConfig[];
94
+ }
@@ -0,0 +1,78 @@
1
+ import { default as ColorLayer } from '@giro3d/giro3d/core/layer/ColorLayer';
2
+ import { default as ElevationLayer } from '@giro3d/giro3d/core/layer/ElevationLayer';
3
+ import { default as MaskLayer } from '@giro3d/giro3d/core/layer/MaskLayer';
4
+ import { EventDispatcher } from '../../../../node_modules/three';
5
+ import { DatagroupConfig, DatasetConfig, DatasetOrGroupConfig, DatasetType } from './configuration/datasets';
6
+ import { DatasetCascadingConfig, OnObjectPreloaded } from './configuration/datasets/core';
7
+ export type DatasetOrGroupType = DatasetType | 'group';
8
+ export type DatasetLayer = ColorLayer | MaskLayer | ElevationLayer;
9
+ export type DatasetEventMap = {
10
+ visible: {};
11
+ opacity: {};
12
+ delete: {};
13
+ isPreloading: {};
14
+ isPreloaded: {};
15
+ };
16
+ export type DatasetGroupEventMap = DatasetEventMap & {};
17
+ export declare abstract class DatasetBase<TConfig extends DatasetOrGroupConfig, TEventMap extends DatasetEventMap = DatasetEventMap> extends EventDispatcher<TEventMap & DatasetEventMap> {
18
+ readonly type: TConfig['type'];
19
+ readonly uuid: string;
20
+ readonly name: string;
21
+ readonly onObjectPreloaded?: OnObjectPreloaded;
22
+ protected _parent: Datagroup | null;
23
+ protected _visible: boolean;
24
+ protected _opacity: number;
25
+ protected _isPreloading: boolean;
26
+ protected _isPreloaded: boolean;
27
+ readonly config: TConfig;
28
+ constructor(config: TConfig);
29
+ get parent(): Datagroup | null;
30
+ set parent(v: Datagroup | null);
31
+ get isPreloading(): boolean;
32
+ set isPreloading(v: boolean);
33
+ get isPreloaded(): boolean;
34
+ set isPreloaded(v: boolean);
35
+ get visible(): boolean;
36
+ set visible(v: boolean);
37
+ get opacity(): number;
38
+ set opacity(v: number);
39
+ delete(): void;
40
+ /**
41
+ * Executes the callback on this object and all descendants.
42
+ * @param callback - Callback to execute
43
+ */
44
+ abstract traverse(callback: (dataset: DatasetOrGroup) => void): void;
45
+ /** Gets the leafs Dataset from this object */
46
+ abstract leafs(): Dataset[];
47
+ /**
48
+ * Gets the value of a property from this object or its ancestors.
49
+ * @param propertyName - Name of the property
50
+ * @returns Value
51
+ */
52
+ get<K extends keyof DatasetCascadingConfig>(propertyName: K): DatasetCascadingConfig[K] | undefined;
53
+ }
54
+ /** Dataset item */
55
+ export declare class Dataset extends DatasetBase<DatasetConfig, DatasetEventMap> {
56
+ constructor(conf: DatasetConfig);
57
+ traverse(callback: (dataset: DatasetOrGroup) => void): void;
58
+ leafs(): Dataset[];
59
+ }
60
+ /** Datagroup item */
61
+ export declare class Datagroup extends DatasetBase<DatagroupConfig, DatasetGroupEventMap> {
62
+ protected _children: DatasetOrGroup[];
63
+ constructor(conf: DatagroupConfig);
64
+ get children(): DatasetOrGroup[];
65
+ set children(items: DatasetOrGroup[]);
66
+ traverse(callback: (dataset: DatasetOrGroup) => void): void;
67
+ leafs(): Dataset[];
68
+ static isGroup: (obj: unknown) => obj is Datagroup;
69
+ }
70
+ /**
71
+ * Creates a hierarchy of DatasetOrGroup from an array of configuration.
72
+ * @param datasets - Datasets
73
+ * @param parent - Parent datagroup, if any
74
+ * @returns Hierarchy of DatasetOrGroup
75
+ */
76
+ export declare function parseDatasetConfig(datasets: DatasetOrGroupConfig[], parent?: Datagroup): DatasetOrGroup[];
77
+ /** Dataset or group item */
78
+ export type DatasetOrGroup = Dataset | Datagroup;
@@ -0,0 +1,13 @@
1
+ import { Vector3 } from '../../../../node_modules/three';
2
+ export interface Attribute {
3
+ key: string;
4
+ value: unknown;
5
+ }
6
+ export type AttributesGroups = Map<string, Attribute[]>;
7
+ export default class Feature {
8
+ readonly name: string;
9
+ readonly attributes: AttributesGroups;
10
+ readonly parent: string;
11
+ readonly point: Vector3;
12
+ constructor(name: string, parent: string, attributes: AttributesGroups, point: Vector3);
13
+ }
@@ -0,0 +1,14 @@
1
+ import { Mesh, MeshBasicMaterial, PlaneGeometry } from '../../../../node_modules/three';
2
+ export default class FloodingPlane {
3
+ geometry: PlaneGeometry;
4
+ material: MeshBasicMaterial;
5
+ object3D: Mesh<PlaneGeometry, MeshBasicMaterial>;
6
+ private _height;
7
+ constructor();
8
+ dispose(): void;
9
+ set height(z: number);
10
+ setPosition(x: number, y: number, z: number, width: number, height: number): void;
11
+ get height(): number;
12
+ set visible(v: boolean);
13
+ get visible(): boolean;
14
+ }
@@ -0,0 +1,5 @@
1
+ export interface IfcSpatialStructureElement {
2
+ expressID: number;
3
+ type: string;
4
+ children: never[];
5
+ }
@@ -0,0 +1,20 @@
1
+ import { EventDispatcher } from '../../../../node_modules/three';
2
+ type LayerObjectEventMap = {
3
+ visible: {};
4
+ opacity: {};
5
+ delete: {};
6
+ isLoading: {};
7
+ };
8
+ export default abstract class LayerObject extends EventDispatcher<LayerObjectEventMap> {
9
+ readonly uuid: string;
10
+ private _visible;
11
+ private _opacity;
12
+ readonly name: string;
13
+ constructor(name: string);
14
+ get visible(): boolean;
15
+ set visible(v: boolean);
16
+ get opacity(): number;
17
+ set opacity(v: number);
18
+ delete(): void;
19
+ }
20
+ export {};
@@ -0,0 +1,20 @@
1
+ import { default as Measure3D } from '../giro3d/Measure3D';
2
+ import { EventDispatcher } from '../../../../node_modules/three';
3
+ type MeasureEventMap = {
4
+ visible: {};
5
+ };
6
+ export default class Measure extends EventDispatcher<MeasureEventMap> {
7
+ readonly uuid: string;
8
+ readonly title: string;
9
+ private _visible;
10
+ private _object;
11
+ properties: object;
12
+ constructor(title: string, object: Measure3D, properties?: object);
13
+ get visible(): boolean;
14
+ set visible(v: boolean);
15
+ get object(): Measure3D;
16
+ set object(obj: Measure3D);
17
+ toGeoJSON(): import('geojson').Feature<import('geojson').Geometry, import('geojson').GeoJsonProperties>;
18
+ static toCollection(measures: Measure[]): GeoJSON.FeatureCollection;
19
+ }
20
+ export {};
@@ -0,0 +1,7 @@
1
+ import { default as Named } from './Named';
2
+ type MeasurementMode = 'laser';
3
+ type MeasurementNamed = Named & {
4
+ value: MeasurementMode;
5
+ };
6
+ export declare const measurementModes: MeasurementNamed[];
7
+ export default MeasurementMode;
@@ -0,0 +1,5 @@
1
+ export default interface Named {
2
+ value?: string;
3
+ name: string;
4
+ description?: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ type NavigationMode = 'first-person' | 'orbit' | 'position-on-map' | 'disabled';
2
+ export default NavigationMode;
@@ -0,0 +1,8 @@
1
+ export type NotificationLevel = 'info' | 'warning' | 'error' | 'success';
2
+ export default class Notification {
3
+ readonly title: string;
4
+ readonly text: string;
5
+ readonly level: NotificationLevel;
6
+ constructor(title: string, text: string, level?: NotificationLevel);
7
+ static empty(): Notification;
8
+ }
@@ -0,0 +1 @@
1
+ export type OLGeometry = 'Point' | 'LineString' | 'LinearRing' | 'Polygon' | 'MultiPoint' | 'MultiLineString' | 'MultiPolygon' | 'GeometryCollection' | 'Circle';
@@ -0,0 +1,24 @@
1
+ import { default as LayerObject } from './LayerObject';
2
+ import { OverlayConfig, OverlaySourceConfig } from './configuration/layers';
3
+ import { EventDispatcher } from '../../../../node_modules/three';
4
+ export type OverlayOptions = Omit<OverlayConfig, 'name' | 'source'>;
5
+ export interface Overlay extends EventDispatcher {
6
+ name: string;
7
+ source: OverlaySourceConfig;
8
+ uuid: string;
9
+ options: OverlayOptions;
10
+ get isLoading(): boolean;
11
+ set isLoading(v: boolean);
12
+ get visible(): boolean;
13
+ set visible(v: boolean);
14
+ get opacity(): number;
15
+ set opacity(v: number);
16
+ }
17
+ export declare class OverlayObject extends LayerObject implements Overlay {
18
+ private _loading;
19
+ readonly source: OverlaySourceConfig;
20
+ readonly options: OverlayOptions;
21
+ constructor({ name, source, ...options }: OverlayConfig);
22
+ get isLoading(): boolean;
23
+ set isLoading(v: boolean);
24
+ }
@@ -0,0 +1,31 @@
1
+ import { Style } from 'ol/style';
2
+ import { StyleFunction } from 'ol/style/Style';
3
+ /** Static vector style */
4
+ export interface StaticVectorStyle {
5
+ /** Fill style (for polygons) */
6
+ fill?: FillStyle;
7
+ /** Stroke style (for lines and polygons) */
8
+ stroke?: StrokeStyle;
9
+ /** Point style (for points) */
10
+ point?: PointStyle;
11
+ }
12
+ export type DynamicStyleId = string;
13
+ export type DynamicStyleCollection = Record<DynamicStyleId, Style | StyleFunction>;
14
+ /**
15
+ * Vector style.
16
+ *
17
+ * Either an entry of the [Style configuration](../style.ts), or a static configuration
18
+ */
19
+ export type VectorStyle = StaticVectorStyle | DynamicStyleId | 'default';
20
+ export interface FillStyle {
21
+ color: string;
22
+ }
23
+ export interface StrokeStyle {
24
+ color: string;
25
+ width: number;
26
+ }
27
+ export interface PointStyle {
28
+ radius: number;
29
+ stroke: StrokeStyle;
30
+ fill: FillStyle;
31
+ }
@@ -0,0 +1,7 @@
1
+ import { Vector3, BufferGeometry, LineBasicMaterial, LineSegments } from '../../../../node_modules/three';
2
+ export default class Viewbox {
3
+ geometry: BufferGeometry;
4
+ object3D: LineSegments<BufferGeometry, LineBasicMaterial>;
5
+ constructor();
6
+ setCorners(ul: Vector3, ur: Vector3, lr: Vector3, ll: Vector3): void;
7
+ }
@@ -0,0 +1,26 @@
1
+ import { GeoVec2, GeoVec3, Vec3 } from './geographic';
2
+ export interface AnalysisConfig {
3
+ /** Cross section configuration */
4
+ cross_section: {
5
+ /** Default pivot point */
6
+ pivot: GeoVec2;
7
+ /** Default orientation in degrees of the cross section plane */
8
+ orientation: number;
9
+ };
10
+ /** Clipping box configuration */
11
+ clipping_box: {
12
+ /** Default center of the clipping box */
13
+ center: GeoVec3;
14
+ /** Default size of the clipping box */
15
+ size: Vec3;
16
+ /** Default settings for floor presets */
17
+ floor_preset: {
18
+ /** Altitude of the ground of floor 0 */
19
+ altitude: number;
20
+ /** Height of a floor */
21
+ size: number;
22
+ /** Default floor number */
23
+ floor: number;
24
+ };
25
+ };
26
+ }
@@ -0,0 +1,16 @@
1
+ import { Vec3 } from './geographic';
2
+ /**
3
+ * Bookmark configuration.
4
+ *
5
+ * The easiest way to define a bookmark is actually to set it in the app, export it and copy the values from the JSON file.
6
+ */
7
+ export interface BookmarkConfig {
8
+ /** Name of the bookmark displayed in the UI */
9
+ title: string;
10
+ /** 3D position of the camera, in `default_crs` */
11
+ position: Vec3;
12
+ /** 3D position of the camera target, in `default_crs` */
13
+ target: Vec3;
14
+ /** Focal offset of the camera */
15
+ focalOffset: Vec3;
16
+ }
@@ -0,0 +1,19 @@
1
+ import { GeoVec2, GeoVec3 } from './geographic';
2
+ /**
3
+ * Deprecated camera configuration
4
+ *
5
+ * @deprecated - Use CameraConfig instead. Will be removed in release v24.7.
6
+ */
7
+ export interface CameraConfigDeprecated {
8
+ /** Initial camera position */
9
+ position: GeoVec2 | [number, number];
10
+ /** Initial camera altitude */
11
+ altitude: number;
12
+ }
13
+ /** Camera configuration */
14
+ export interface CameraConfig {
15
+ /** Initial camera position */
16
+ position: GeoVec3;
17
+ /** Initial camera target - if not provided, will use the center of the extent */
18
+ lookAt?: GeoVec3;
19
+ }
@@ -0,0 +1,18 @@
1
+ import { default as ColorMapMode } from '@giro3d/giro3d/core/ColorMapMode';
2
+ /**
3
+ * Color ramp name, as supported by [chroma.js](https://gka.github.io/chroma.js/#chroma-brewer)
4
+ */
5
+ export type ColorRamp = string;
6
+ /**
7
+ * Color map configuration for Elevation layer, used when it's the only layer displayed
8
+ */
9
+ export interface ColorMapConfig {
10
+ /** Value mapped to the start of the color ramp */
11
+ min: number;
12
+ /** Value mapped to the end of the color ramp */
13
+ max: number;
14
+ /** Color ramp */
15
+ ramp: ColorRamp;
16
+ /** Color map mode */
17
+ mode?: ColorMapMode;
18
+ }
@@ -0,0 +1,9 @@
1
+ import { DataProjectionMixin, UrlOrDataMixin } from '../../../giro3d/sources/mixins';
2
+ import { DatasetConfigBase, DatasetConfigMaskingMixin } from './core';
3
+ /** CityJSON source configuration */
4
+ export interface CityJSONDatasetSourceConfig extends UrlOrDataMixin, DataProjectionMixin {
5
+ }
6
+ /** CityJSON dataset configuration */
7
+ export interface CityJSONDatasetConfig extends DatasetConfigBase<'cityjson'>, DatasetConfigMaskingMixin {
8
+ source: CityJSONDatasetSourceConfig;
9
+ }
@@ -0,0 +1,49 @@
1
+ import { DatasetOrGroup } from '../../Dataset';
2
+ import { LayerType } from '../layers';
3
+ import { SourceConfigElevationMixin, SourceConfigLocationMixin, SourceConfigProjectionMixin } from '../sources/core/baseConfig';
4
+ import { default as Entity3D } from '@giro3d/giro3d/entities/Entity3D';
5
+ /**
6
+ * Callback which is called when the dataset is preloaded into the app.
7
+ *
8
+ * This can be useful for post-processing your data (transformation, rotation, etc.).
9
+ *
10
+ * @param dataset - Dataset created
11
+ * @param entity - Giro3D entity created
12
+ */
13
+ export type OnObjectPreloaded = (dataset: DatasetOrGroup, entity: Entity3D) => void;
14
+ /** Base configuration for all dataset sources */
15
+ export interface DatasetSourceConfigBase<TDatasetType extends string> {
16
+ /** Type of dataset */
17
+ type: TDatasetType;
18
+ }
19
+ /** Base configuration for all datasets */
20
+ export interface DatasetConfigBase<TDatasetType extends string> {
21
+ /** Type of dataset */
22
+ type: TDatasetType;
23
+ /** Name of the dataset, as displayed in the UI */
24
+ name: string;
25
+ /**
26
+ * Loads the dataset by default when opening the app
27
+ * @defaultValue false
28
+ */
29
+ visible?: boolean;
30
+ /**
31
+ * Default opacity (between 0 and 1; 0: transparent, 1: opaque)
32
+ * @defaultValue 1
33
+ */
34
+ opacity?: number;
35
+ /** Callback which is called when the dataset is preloaded into the app */
36
+ onObjectPreloaded?: OnObjectPreloaded;
37
+ }
38
+ /** Mixin configuration for datasets that support masking the basemap */
39
+ export interface DatasetConfigMaskingMixin {
40
+ /** Indicates whether this dataset can mask the basemap */
41
+ canMaskBasemap?: boolean;
42
+ /** Indicates whether this dataset is by default masking the basemap when loaded */
43
+ isMaskingBasemap?: boolean;
44
+ }
45
+ /** Giro3D layer types support for datasets */
46
+ export type DatasetLayerType = Exclude<LayerType, 'elevation'>;
47
+ /** Configuration that can be set on groups and cascade to children */
48
+ export interface DatasetCascadingConfig extends SourceConfigProjectionMixin, SourceConfigLocationMixin, SourceConfigElevationMixin {
49
+ }
@@ -0,0 +1,6 @@
1
+ import { FeatureCollectionEntityOptions } from '../../../giro3d/entities/FeatureCollectionEntity';
2
+ import { DatasetConfigBase } from './core';
3
+ /** Buildings dataset configuration */
4
+ export interface FeatureCollectionDatasetConfig extends DatasetConfigBase<'featureCollection'> {
5
+ source: FeatureCollectionEntityOptions['source'];
6
+ }
@@ -0,0 +1,10 @@
1
+ import { UrlOrDataMixin } from '../../../giro3d/sources/mixins';
2
+ import { SourceConfigLocationMixin } from '../sources/core/baseConfig';
3
+ import { DatasetConfigBase, DatasetConfigMaskingMixin } from './core';
4
+ /** IFC source configuration */
5
+ export interface IFCDatasetSourceConfig extends UrlOrDataMixin, SourceConfigLocationMixin {
6
+ }
7
+ /** IFC dataset configuration */
8
+ export interface IFCDatasetConfig extends DatasetConfigBase<'ifc'>, DatasetConfigMaskingMixin {
9
+ source: IFCDatasetSourceConfig;
10
+ }
@@ -0,0 +1,27 @@
1
+ import { CityJSONDatasetConfig } from './cityjson';
2
+ import { DatasetCascadingConfig, DatasetConfigBase, DatasetConfigMaskingMixin } from './core';
3
+ import { FeatureCollectionDatasetConfig } from './featureCollection';
4
+ import { IFCDatasetConfig } from './ifc';
5
+ import { ColorLayerDatasetConfig, ElevationLayerDatasetConfig, MaskLayerDatasetConfig } from './layer';
6
+ import { PLYDatasetConfig } from './ply';
7
+ import { PointCloudDatasetConfig } from './pointCloud';
8
+ import { PotreePointCloudDatasetConfig } from './potreePointCloud';
9
+ import { TiledIfcDatasetConfig } from './tiledIfc';
10
+ import { TiledPointCloudDatasetConfig } from './tiledPointCloud';
11
+ import { VectorLabelsDatasetConfig, VectorMeshDatasetConfig, VectorShapeDatasetConfig } from './vector';
12
+ export type DatasetAsMeshConfig = CityJSONDatasetConfig | PointCloudDatasetConfig | FeatureCollectionDatasetConfig | IFCDatasetConfig | PLYDatasetConfig | PointCloudDatasetConfig | PotreePointCloudDatasetConfig | TiledIfcDatasetConfig | TiledPointCloudDatasetConfig | VectorLabelsDatasetConfig | VectorMeshDatasetConfig | VectorShapeDatasetConfig;
13
+ export type DatasetAsLayerConfig = ColorLayerDatasetConfig | ElevationLayerDatasetConfig | MaskLayerDatasetConfig;
14
+ /** All supported datasets */
15
+ export type DatasetConfig = DatasetAsMeshConfig | DatasetAsLayerConfig;
16
+ export type DatasetConfigImportable = Extract<DatasetConfig, CityJSONDatasetConfig | PointCloudDatasetConfig | IFCDatasetConfig | VectorMeshDatasetConfig | VectorShapeDatasetConfig | VectorLabelsDatasetConfig | ColorLayerDatasetConfig>;
17
+ /** List of all dataset types */
18
+ export type DatasetType = DatasetConfig['type'];
19
+ /** Configuration for a group of datasets */
20
+ export interface DatagroupConfig extends DatasetConfigBase<'group'>, DatasetCascadingConfig, DatasetConfigMaskingMixin {
21
+ /** Datasets contained in this group */
22
+ children: DatasetOrGroupConfig[];
23
+ }
24
+ /** Configuration for dataset hierarchy */
25
+ export type DatasetOrGroupConfig = DatasetConfig | DatagroupConfig;
26
+ /** List of dataset types that can be imported into the app */
27
+ export type DatasetTypeImportable = DatasetConfigImportable['type'];
@@ -0,0 +1,43 @@
1
+ import { ColorMapConfig } from '../color';
2
+ import { GeoExtent } from '../geographic';
3
+ import { ColorLayerOptions } from '@giro3d/giro3d/core/layer/ColorLayer';
4
+ import { ElevationLayerOptions } from '@giro3d/giro3d/core/layer/ElevationLayer';
5
+ import { Mode as InterpretationMode, InterpretationOptions } from '@giro3d/giro3d/core/layer/Interpretation';
6
+ import { LayerOptions } from '@giro3d/giro3d/core/layer/Layer';
7
+ import { MaskLayerOptions } from '@giro3d/giro3d/core/layer/MaskLayer';
8
+ import { LayerSourceConfig } from '../layers';
9
+ import { DatasetConfigBase } from './core';
10
+ /** Mixin configuration for layer options */
11
+ export interface LayerConfigMixin extends Pick<LayerOptions, 'showTileBorders' | 'showEmptyTextures' | 'noDataOptions' | 'preloadImages' | 'resolutionFactor'> {
12
+ /** Restrict the extent of the data */
13
+ extent?: GeoExtent;
14
+ /** Interpretation mode of the data */
15
+ interpretation?: InterpretationOptions & {
16
+ mode: InterpretationMode;
17
+ };
18
+ /** Color map for displaying the layer */
19
+ colorMap?: ColorMapConfig;
20
+ /** Background color of the layer */
21
+ backgroundColor?: string;
22
+ }
23
+ /** Mixin configuration for color layer options */
24
+ export interface ColorLayerConfigMixin extends Pick<ColorLayerOptions, 'elevationRange' | 'opacity' | 'minFilter' | 'magFilter'> {
25
+ }
26
+ /** Mixin configuration for elevation layer options */
27
+ export interface ElevationLayerConfigMixin extends Pick<ElevationLayerOptions, 'minmax'> {
28
+ }
29
+ /** Mixin configuration for mask layer options */
30
+ export interface MaskLayerConfigMixin extends Pick<MaskLayerOptions, 'maskMode'> {
31
+ }
32
+ export interface LayerDatasetConfigBase<TDatasetType extends string> extends DatasetConfigBase<TDatasetType>, LayerConfigMixin {
33
+ source: LayerSourceConfig;
34
+ }
35
+ /** Color layer configuration */
36
+ export interface ColorLayerDatasetConfig extends LayerDatasetConfigBase<'colorLayer'>, ColorLayerConfigMixin {
37
+ }
38
+ /** Elevation layer configuration */
39
+ export interface ElevationLayerDatasetConfig extends LayerDatasetConfigBase<'elevationLayer'>, ElevationLayerConfigMixin {
40
+ }
41
+ /** Mask layer configuration */
42
+ export interface MaskLayerDatasetConfig extends LayerDatasetConfigBase<'maskLayer'>, MaskLayerConfigMixin {
43
+ }