@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,7 @@
1
+ import { default as Instance } from '@giro3d/giro3d/core/Instance';
2
+ import { default as GUI } from 'lil-gui';
3
+ import { default as EntityInspector } from '@giro3d/giro3d/gui/EntityInspector';
4
+ import { default as IfcEntity } from './IfcEntity';
5
+ export default class IfcEntityInspector extends EntityInspector<IfcEntity> {
6
+ constructor(parentGui: GUI, instance: Instance, entity: IfcEntity);
7
+ }
@@ -0,0 +1,6 @@
1
+ import { Dataset } from '../../types/Dataset';
2
+ type __VLS_Props = {
3
+ dataset: Dataset;
4
+ };
5
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { default as IfcEntity, ClassificationItem } from './IfcEntity';
2
+ type __VLS_Props = {
3
+ classificationElement: ClassificationItem;
4
+ ifcEntity: IfcEntity;
5
+ };
6
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
7
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { default as IFCLoader } from './IFCLoader';
2
+ import { default as PLYLoader } from './PLYLoader';
3
+ import { default as PotreeLoader } from './PotreeLoader';
4
+ import { default as Tour } from './Tour';
5
+ export { IFCLoader, PLYLoader, PotreeLoader, Tour };
@@ -0,0 +1,33 @@
1
+ import { default as PickableFeatures } from '@giro3d/giro3d/core/picking/PickableFeatures';
2
+ import { default as PickResult } from '@giro3d/giro3d/core/picking/PickResult';
3
+ import { default as Entity3D } from '@giro3d/giro3d/entities/Entity3D';
4
+ import { Color, Mesh } from '../../../../../node_modules/three';
5
+ import { CoordinatesMixin, FeatureProjectionMixin, UrlOrDataMixin } from '../../giro3d/sources/mixins';
6
+ /**
7
+ * Feature returned when picking on Ply objects
8
+ */
9
+ export interface PlyFeature {
10
+ color: Color;
11
+ }
12
+ /** Parameters for creating {@link PlyEntity} */
13
+ export interface PlySource extends Required<CoordinatesMixin>, Required<FeatureProjectionMixin>, UrlOrDataMixin {
14
+ }
15
+ /**
16
+ * PLY 3D object implementing our picking
17
+ */
18
+ export declare class PlyMesh extends Mesh implements PickableFeatures<PlyFeature> {
19
+ readonly isPickableFeatures = true;
20
+ readonly isPlyMesh = true;
21
+ static isPlyMesh: (obj: unknown) => obj is PlyMesh;
22
+ static isPlyPickResult: (obj: unknown) => obj is PickResult<PlyFeature>;
23
+ pickFeaturesFrom(pickedResult: PickResult): PlyFeature[];
24
+ }
25
+ /**
26
+ * Entity for displaying a PLY file
27
+ */
28
+ export default class PlyEntity extends Entity3D {
29
+ readonly isPlyEntity = true;
30
+ readonly source: PlySource;
31
+ constructor(source: PlySource);
32
+ protected preprocess(): Promise<void>;
33
+ }
@@ -0,0 +1,32 @@
1
+ import { default as Coordinates } from '@giro3d/giro3d/core/geographic/Coordinates';
2
+ import { default as Instance } from '@giro3d/giro3d/core/Instance';
3
+ /**
4
+ * Alticoder method
5
+ */
6
+ export type Alticoder = (coordinates: Coordinates[]) => Promise<void>;
7
+ /**
8
+ * Alticoder using {@link IgnProvider}.
9
+ */
10
+ export declare const IgnAlticoder: (coordinates: Coordinates[]) => Promise<void>;
11
+ /**
12
+ * Alticoder generator using (only) the map
13
+ *
14
+ * @param instance - Giro3D instance
15
+ * @returns Alticoder
16
+ */
17
+ export declare const mapAlticoderGenerator: (instance: Instance) => Alticoder;
18
+ /**
19
+ * Alticoder generator using multiple ones
20
+ * @param alticoders - List of alticoders to use
21
+ * @param noDataValue - No data value
22
+ * @returns
23
+ */
24
+ export declare const alticoders: (alticoders: Alticoder[], noDataValue?: number) => Alticoder;
25
+ /**
26
+ * Alticoder generator using the map if fast
27
+ *
28
+ * @param instance - Giro3D instance
29
+ * @param fast - Fast alticoding
30
+ * @returns Alticoder
31
+ */
32
+ export declare const alticoderGenerator: (instance: Instance, fast: boolean, noDataValue?: number) => Alticoder;
@@ -0,0 +1,11 @@
1
+ import { GeocodingResult } from './Geocoding';
2
+ declare const _default: {
3
+ /**
4
+ * Searches for an address in the French BAN
5
+ *
6
+ * @param query - Search query
7
+ * @returns Results
8
+ */
9
+ geocode(query: string): Promise<GeocodingResult[]>;
10
+ };
11
+ export default _default;
@@ -0,0 +1,7 @@
1
+ export type GeocodingResult = {
2
+ crs: string;
3
+ label: string;
4
+ x: number;
5
+ y: number;
6
+ z: number;
7
+ };
@@ -0,0 +1,11 @@
1
+ import { default as Coordinates } from '@giro3d/giro3d/core/geographic/Coordinates';
2
+ declare const _default: {
3
+ /**
4
+ * Fetches altitudes from IGN Alti service.
5
+ * Will fill the `altitude` component of each coordinates.
6
+ *
7
+ * @param coordinates - Coordinates to fetch altitudes for
8
+ */
9
+ alticode(coordinates: Coordinates[]): Promise<void>;
10
+ };
11
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { default as Instance } from '@giro3d/giro3d/core/Instance';
2
+ import { default as LayerManager } from './LayerManager';
3
+ export default class AnalysisManager {
4
+ private readonly _clippingBoxManager;
5
+ private readonly _crossSectionManager;
6
+ private readonly _floodingPlaneManager;
7
+ private readonly _instance;
8
+ constructor(instance: Instance, layerManager: LayerManager);
9
+ dispose(): void;
10
+ }
@@ -0,0 +1,48 @@
1
+ import { default as Instance } from '@giro3d/giro3d/core/Instance';
2
+ import { default as Shape } from '@giro3d/giro3d/entities/Shape';
3
+ import { default as CameraController } from './CameraController';
4
+ import { default as Picker } from './Picker';
5
+ import { PieroShapeUserData, default as Annotation } from '../types/Annotation';
6
+ export default class AnnotationManager {
7
+ private readonly _boundExitEdition;
8
+ private readonly _boundOnEndDrag;
9
+ private readonly _boundOnKeyDown;
10
+ private readonly _boundOnStartDrag;
11
+ private readonly _boundUpdateLabels;
12
+ private readonly _drawTool;
13
+ private _editedShape;
14
+ private _editedShapePreviousPoints;
15
+ private readonly _instance;
16
+ private _isEditing;
17
+ private readonly _notificationStore;
18
+ private readonly _picker;
19
+ private readonly _shapes;
20
+ private readonly _store;
21
+ constructor(instance: Instance, camera: CameraController, picker: Picker);
22
+ dispose(): void;
23
+ pushNewAnnotation(title: string, shape: Shape<PieroShapeUserData>, properties?: object): Annotation;
24
+ private addShape;
25
+ private computeMeasurements;
26
+ private deleteAnnotation;
27
+ private draw;
28
+ private drawLine;
29
+ private drawPoint;
30
+ private drawPolygon;
31
+ private editAnnotation;
32
+ private filterPickResults;
33
+ private getCreationOptions;
34
+ private importAnnotation;
35
+ private importAnnotationFile;
36
+ private importAnnotationFiles;
37
+ private importBlob;
38
+ private importShapeFromGeoJSON;
39
+ private onKeyDown;
40
+ private pick;
41
+ private pickDefault;
42
+ private pickFeatures;
43
+ private pickMap;
44
+ private stopEdition;
45
+ private udpateLabelVisibility;
46
+ private updateDrawing;
47
+ private updateLabels;
48
+ }
@@ -0,0 +1,99 @@
1
+ import { default as Extent } from '@giro3d/giro3d/core/geographic/Extent';
2
+ import { default as Instance } from '@giro3d/giro3d/core/Instance';
3
+ import { default as Entity3D } from '@giro3d/giro3d/entities/Entity3D';
4
+ import { Object3D, Box3, EventDispatcher, Vector3 } from '../../../../node_modules/three';
5
+ import { default as CameraPosition } from '../types/CameraPosition';
6
+ import { default as Picker } from './Picker';
7
+ type CameraControllerEventMap = {
8
+ 'interaction-end': {};
9
+ 'interaction-start': {};
10
+ };
11
+ /**
12
+ * Wraps Camera-controls into Giro3D
13
+ */
14
+ declare class CameraController extends EventDispatcher<CameraControllerEventMap> {
15
+ get enabled(): boolean;
16
+ set enabled(v: boolean);
17
+ private readonly _boundOnAfterCameraUpdate;
18
+ private readonly _boundOnBeforeCameraUpdate;
19
+ private _boundOrbitControlsOnContextMenu;
20
+ private _boundOrbitControlsOnKey;
21
+ private _boundOrbitControlsOnMouseUp;
22
+ private _boundOrbitControlsOnWheel;
23
+ private _boundPositionOnMapOnClick;
24
+ private _boundPositionOnMapOnContextMenu;
25
+ private _boundPositionOnMapOnMouseMove;
26
+ private _cameraControlsInspector;
27
+ private readonly _clock;
28
+ private readonly _giro3dStore;
29
+ private readonly _instance;
30
+ private readonly _orbitControls;
31
+ private readonly _orbitHelper;
32
+ private readonly _picker;
33
+ private readonly _pickObjectsAt;
34
+ private readonly _positionOnMapHelper;
35
+ private readonly _store;
36
+ /**
37
+ * Creates new Camera-controls and bind them to Giro3D.
38
+ *
39
+ * @param instance - Giro3D instance
40
+ * @param picker - Picker
41
+ */
42
+ constructor(instance: Instance, picker: Picker);
43
+ dispose(): void;
44
+ /**
45
+ * Executes an interaction with animation.
46
+ *
47
+ * Required to call this instead of calling directly camera-controls because
48
+ * of how Giro3D mainloop works.
49
+ *
50
+ * @param callback - Interaction to execute
51
+ * @returns Resolves when interaction is done
52
+ */
53
+ executeInteraction<T = void>(callback: () => Promise<T>): Promise<T>;
54
+ getCameraPosition(target?: CameraPosition): CameraPosition;
55
+ /**
56
+ * Looks to a bounding box or Object3D.
57
+ *
58
+ * @param obj - Bounding box or Object to look at
59
+ * @param enableTransition - Enables transition
60
+ * @param options - Camera-controls' fitToBox options
61
+ * @returns Resolves when interaction is done
62
+ */
63
+ goToBox(obj: Box3 | Entity3D | Object3D, enableTransition?: boolean, options?: object): Promise<void[]>;
64
+ /**
65
+ * Sets the camera to look at a position.
66
+ *
67
+ * @param position - Position of the camera
68
+ * @param lookAt - Posiiton to look at
69
+ * @param enableTransition - Enables transition
70
+ * @returns Resolves when interaction is done
71
+ */
72
+ lookAt(position: Vector3, lookAt: Vector3, enableTransition?: boolean): Promise<void>;
73
+ lookTopDownAt(obj: Box3 | Entity3D | Object3D, enableTransition?: boolean): Promise<void>;
74
+ setCamera(pos: CameraPosition): void;
75
+ /**
76
+ * Sets initial position of camera to view an extent.
77
+ *
78
+ * @param extent - Extent to look at
79
+ * @param altitude - Altitude of camera
80
+ */
81
+ setInitialPosition(extent: Extent, altitude?: number): void;
82
+ protected getBox(obj: Box3 | Entity3D | Object3D): Box3;
83
+ private _disablePositionOnMap;
84
+ private _enablePositionOnMap;
85
+ private disposeOrbitControls;
86
+ private initializeInspector;
87
+ private initializeOrbitControls;
88
+ private onAfterCameraUpdate;
89
+ private onBeforeCameraUpdate;
90
+ private onPositionOnMapClick;
91
+ private onPositionOnMapContextMenu;
92
+ private onPositionOnMapMouseMove;
93
+ private orbitControlsOnContextMenu;
94
+ private orbitControlsOnKey;
95
+ private orbitControlsOnMouseUp;
96
+ private orbitControlsOnWheel;
97
+ private setNavigationMode;
98
+ }
99
+ export default CameraController;
@@ -0,0 +1,27 @@
1
+ import { default as Instance } from '@giro3d/giro3d/core/Instance';
2
+ import { default as LayerManager } from './LayerManager';
3
+ export default class DatasetManager {
4
+ private readonly _axisGrids;
5
+ private readonly _entities;
6
+ private readonly _instance;
7
+ private readonly _layerManager;
8
+ private readonly _masks;
9
+ private readonly _notifications;
10
+ private readonly _overlays;
11
+ private readonly _store;
12
+ constructor(instance: Instance, layerManager: LayerManager);
13
+ dispose(): void;
14
+ private createGrid;
15
+ private createMask;
16
+ private deleteDataset;
17
+ private deleteGrid;
18
+ private deleteMask;
19
+ private importFromFile;
20
+ private onDatasetPreloaded;
21
+ private onDatasetPreloadedAsLayer;
22
+ private onToggleGrid;
23
+ private onToggleMask;
24
+ private onVisibilityChanged;
25
+ private preloadDataset;
26
+ private updateDataset;
27
+ }
@@ -0,0 +1,42 @@
1
+ import { default as Instance } from '@giro3d/giro3d/core/Instance';
2
+ import { Object3D, AmbientLight, Box3, DirectionalLight, EventDispatcher } from '../../../../node_modules/three';
3
+ import { default as AnalysisManager } from './AnalysisManager';
4
+ import { default as AnnotationManager } from './AnnotationManager';
5
+ import { default as CameraController } from './CameraController';
6
+ import { default as DatasetManager } from './DatasetManager';
7
+ import { default as Highlighter } from './Highlighter';
8
+ import { default as LayerManager } from './LayerManager';
9
+ import { default as MeasurementManager } from './MeasurementManager';
10
+ import { default as Picker } from './Picker';
11
+ type Giro3DManagerEventMap = {
12
+ update: {};
13
+ };
14
+ export default class Giro3DManager extends EventDispatcher<Giro3DManagerEventMap> {
15
+ readonly ambientLight: AmbientLight;
16
+ readonly analysisManager: AnalysisManager;
17
+ readonly annotationManager: AnnotationManager;
18
+ readonly camera: CameraController;
19
+ readonly datasetManager: DatasetManager;
20
+ readonly dirLight: DirectionalLight;
21
+ readonly highlighter: Highlighter;
22
+ readonly layerManager: LayerManager;
23
+ readonly mainInstance: Instance;
24
+ readonly measurementManager: MeasurementManager;
25
+ readonly picker: Picker;
26
+ private readonly _boundOnFrameEnd;
27
+ private readonly _store;
28
+ constructor(instance: Instance);
29
+ dispose(): void;
30
+ /**
31
+ * Gets bounding box of all datasets & annotations.
32
+ *
33
+ * @returns Bounding box of all datasets.
34
+ */
35
+ getBoundingBox(): Box3;
36
+ /**
37
+ * Gets the datasets & annotations as Object3D.
38
+ */
39
+ getObjects3d(): Object3D[];
40
+ private onFrameEnd;
41
+ }
42
+ export {};
@@ -0,0 +1,11 @@
1
+ import { default as PickResult } from '@giro3d/giro3d/core/picking/PickResult';
2
+ export type ClearHighlightFn = () => void;
3
+ export type HighlightFn = (obj: PickResult) => ClearHighlightFn | null;
4
+ export declare const customHighlighters: HighlightFn[];
5
+ export default class Highlighter {
6
+ private _clearHighlight;
7
+ clear(): void;
8
+ dispose(): void;
9
+ highlightFromPick(pick: PickResult): void;
10
+ private highlightShape;
11
+ }
@@ -0,0 +1,37 @@
1
+ import { default as Extent } from '@giro3d/giro3d/core/geographic/Extent';
2
+ import { default as Instance } from '@giro3d/giro3d/core/Instance';
3
+ import { EventDispatcher } from '../../../../node_modules/three';
4
+ import { BasemapLayer } from '../types/BaseLayer';
5
+ export declare const GRID_NAME = "grid";
6
+ export declare const PLANE_NAME = "plane";
7
+ export default class LayerManager extends EventDispatcher {
8
+ get extent(): Extent;
9
+ private readonly _baseLayers;
10
+ private readonly _basemap;
11
+ private readonly _boundOnAfterCameraUpdate;
12
+ private readonly _cameraStore;
13
+ private readonly _datasetLayers;
14
+ private readonly _giro3dStore;
15
+ private readonly _grid;
16
+ private readonly _instance;
17
+ private readonly _layerStore;
18
+ private readonly _overlays;
19
+ private readonly _plane;
20
+ constructor(instance: Instance);
21
+ addDatasetLayer(layer: BasemapLayer): Promise<void>;
22
+ dispose(): void;
23
+ notify(layer: BasemapLayer): void;
24
+ removeBasemapLayer(layer: BasemapLayer): void;
25
+ setMapOpacity(opacity: number): void;
26
+ private getLayer;
27
+ private getOverlay;
28
+ private loadBasemap;
29
+ private loadOverlay;
30
+ private onAfterCameraUpdate;
31
+ private onLayerOpacityChanged;
32
+ private onLayerVisibilityChanged;
33
+ private onOverlayOpacityChanged;
34
+ private onOverlayReordered;
35
+ private onOverlayVisibilityChanged;
36
+ private updateLayerOrdering;
37
+ }
@@ -0,0 +1,13 @@
1
+ import { default as Instance } from '@giro3d/giro3d/core/Instance';
2
+ import { default as Picker } from './Picker';
3
+ import { default as Measure3D } from '../giro3d/Measure3D';
4
+ export default class MeasureTool {
5
+ private _hoverMeasurement;
6
+ private readonly _picker;
7
+ private readonly _raycaster;
8
+ constructor(picker: Picker);
9
+ clean(): void;
10
+ dispose(): void;
11
+ getLastMeasurement(): Measure3D | undefined;
12
+ measure(instance: Instance, event: MouseEvent): void;
13
+ }
@@ -0,0 +1,31 @@
1
+ import { default as Instance } from '@giro3d/giro3d/core/Instance';
2
+ import { default as CameraController } from './CameraController';
3
+ import { default as Picker } from './Picker';
4
+ import { default as Measure } from '../types/Measure';
5
+ export default class MeasurementManager {
6
+ private readonly _boundMeasure;
7
+ private readonly _boundOnEscape;
8
+ private readonly _boundPause;
9
+ private readonly _boundRestart;
10
+ private readonly _boundSaveMeasure;
11
+ private readonly _camera;
12
+ private readonly _instance;
13
+ private readonly _measureTool;
14
+ private readonly _notificationStore;
15
+ private _paused;
16
+ private readonly _store;
17
+ constructor(instance: Instance, camera: CameraController, picker: Picker);
18
+ dispose(): void;
19
+ startMeasuring(): void;
20
+ stopMeasuring(): void;
21
+ updateMeasure(measure: Measure): void;
22
+ private deleteMeasure;
23
+ private importBlob;
24
+ private importMeasure;
25
+ private importMeasureFile;
26
+ private importMeasureFiles;
27
+ private measure;
28
+ private onEscape;
29
+ private pushNewMeasure;
30
+ private saveMeasure;
31
+ }
@@ -0,0 +1,19 @@
1
+ import { default as Instance } from '@giro3d/giro3d/core/Instance';
2
+ import { Vector3 } from '../../../../node_modules/three';
3
+ export default class MinimapController {
4
+ private readonly _basemap;
5
+ private _boundUpdateViewbox;
6
+ private _mainInstance;
7
+ private readonly _minimapInstance;
8
+ private readonly _viewbox;
9
+ constructor(instance: Instance);
10
+ dispose(): void;
11
+ getCorners(): {
12
+ ll: Vector3;
13
+ lr: Vector3;
14
+ ul: Vector3;
15
+ ur: Vector3;
16
+ } | undefined;
17
+ setMainInstance(instance: Instance | null): void;
18
+ updateViewbox(): void;
19
+ }
@@ -0,0 +1,53 @@
1
+ import { default as Instance } from '@giro3d/giro3d/core/Instance';
2
+ import { PointsPickResult } from '@giro3d/giro3d/core/picking/PickPointsAt';
3
+ import { default as PickResult } from '@giro3d/giro3d/core/picking/PickResult';
4
+ import { default as Entity } from '@giro3d/giro3d/entities/Entity';
5
+ import { ShapePickResult } from '@giro3d/giro3d/entities/Shape';
6
+ import { Vector2, Object3D, Vector3 } from '../../../../node_modules/three';
7
+ import { Feature as OLFeature } from 'ol';
8
+ import { Attribute, AttributesGroups, default as Feature } from '../types/Feature';
9
+ export type AttributeExtractorFn<T extends PickResult = PickResult> = (pickResult: T, attributesGroups: AttributesGroups) => void;
10
+ export declare const customAttributeExtractors: AttributeExtractorFn[];
11
+ export default class Picker {
12
+ private readonly _analysisStore;
13
+ getFeatureFromPickedObject(pickedObject: PickResult): Feature | null;
14
+ getFirstFeatureAt(instance: Instance, e: MouseEvent, radius?: number, filterOnObjects?: (obj: Entity | Object3D) => boolean): PickResult[] | null;
15
+ getGeometryAttributes(object: Object3D, attributes: Array<Attribute>): void;
16
+ /**
17
+ * Gets the point on map or grid where the user clicked.
18
+ *
19
+ * @param e - Mouse event
20
+ * @param radius - Radius - the smaller, the faster and more precise (but
21
+ * may return nothing)
22
+ * @returns Result or null if nothing found
23
+ */
24
+ getMapAt(instance: Instance, e: MouseEvent, radius?: number): PickResult | null;
25
+ getMouseCoordinate(instance: Instance, mouse: Vector2): Vector3 | null;
26
+ /**
27
+ * Gets the closest dataset object from where the user clicked.
28
+ * Does **NOT** pick on the base map!
29
+ *
30
+ * @param e - Mouse event
31
+ * @param radius - Radius - the smaller, the faster and more precise (but
32
+ * may return nothing)
33
+ * @returns Result or null if notthing found
34
+ */
35
+ getObjectsAt(instance: Instance, e: MouseEvent | Vector2, radius?: number, filterOnObjects?: (obj: Entity | Object3D) => boolean): PickResult[] | null;
36
+ hasFeature(instance: Instance, mouse: Vector2): boolean;
37
+ pick(instance: Instance, event: MouseEvent): {
38
+ feature: Feature | null;
39
+ pickResult: PickResult;
40
+ point: Vector3;
41
+ } | null;
42
+ protected filterPick(instance: Instance, result: PickResult): boolean;
43
+ protected getAttributesFromAnnotation(pickResult: ShapePickResult, attributesGroups: AttributesGroups): void;
44
+ protected getAttributesFromEntity(entity: Entity, attributesGroups: AttributesGroups): void;
45
+ protected getAttributesFromMeasure(pickResult: PickResult, attributesGroups: AttributesGroups): void;
46
+ protected getAttributesFromObject3D(object: Object3D, attributes: Attribute[]): void;
47
+ protected getAttributesFromOLFeature(feature: OLFeature, attributesGroups: AttributesGroups): void;
48
+ protected getAttributesFromPickedObject3D(pickResult: PickResult, attributesGroups: AttributesGroups): void;
49
+ protected getAttributesFromPointCloud(pickResult: PointsPickResult, attributesGroups: AttributesGroups): void;
50
+ protected getAttributesFromUserData(userData: object, attributes: Attribute[]): void;
51
+ protected getDatasetAttributes(object: Object3D, datasetAttributes: Attribute[]): void;
52
+ protected getNameFromOLFeature(feature: OLFeature): string;
53
+ }
@@ -0,0 +1,41 @@
1
+ import { default as Instance } from '@giro3d/giro3d/core/Instance';
2
+ export default class ClippingBoxManager {
3
+ private readonly _cameraStore;
4
+ private _clippingBox;
5
+ private _clippingBoxHelper;
6
+ private _clippingBoxMesh;
7
+ private readonly _datasetStore;
8
+ private readonly _instance;
9
+ private _previousTransformControls;
10
+ private readonly _store;
11
+ private _transformControls;
12
+ private readonly _volumeHelpers;
13
+ constructor(instance: Instance);
14
+ dispose(): void;
15
+ /**
16
+ * Applies defined clipping planes to all entities.
17
+ * This is required after:
18
+ * - changing the clipping box
19
+ * - loading a new entity
20
+ */
21
+ private applyClippingPlanes;
22
+ /**
23
+ * Creates the whole clipping box and helpers if displayed
24
+ * @param center - Center of the clipping box
25
+ * @param size - Size of the clipping box
26
+ */
27
+ private createClippingBox;
28
+ /**
29
+ * Disposes of the clipping box and all helpers
30
+ */
31
+ private disposeClippingBox;
32
+ private getPlanesFromBoxSides;
33
+ /**
34
+ * Moves an existing clipping box, while keeping its size
35
+ */
36
+ private moveClippingBox;
37
+ /**
38
+ * Updates the clipping box; required when changing its size
39
+ */
40
+ private updateClippingBox;
41
+ }
@@ -0,0 +1,9 @@
1
+ import { default as Instance } from '@giro3d/giro3d/core/Instance';
2
+ export default class CrossSectionManager {
3
+ private readonly _datasetStore;
4
+ private readonly _instance;
5
+ private readonly _store;
6
+ constructor(instance: Instance);
7
+ dispose(): void;
8
+ private updateCrossSection;
9
+ }
@@ -0,0 +1,11 @@
1
+ import { default as Instance } from '@giro3d/giro3d/core/Instance';
2
+ import { default as LayerManager } from '../LayerManager';
3
+ export default class FloodingPlaneManager {
4
+ private readonly _instance;
5
+ private readonly _layerManager;
6
+ private _plane;
7
+ private readonly _store;
8
+ constructor(instance: Instance, layerManager: LayerManager);
9
+ dispose(): void;
10
+ private updatePlane;
11
+ }