@giro3d/piero 1.0.0-beta.2 → 1.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Components.cjs.js +2 -2
- package/dist/Components.cjs.js.map +1 -1
- package/dist/Components.es.js +23 -25
- package/dist/Components.es.js.map +1 -1
- package/dist/assets/piero.css +2 -2
- package/dist/index.cjs.js +5 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +2845 -2935
- package/dist/index.es.js.map +1 -1
- package/dist/modules.cjs.js +2 -2
- package/dist/modules.cjs.js.map +1 -1
- package/dist/modules.es.js +937 -753
- package/dist/modules.es.js.map +1 -1
- package/dist/src/api/SearchApi.d.ts +34 -0
- package/dist/src/api/WidgetApi.d.ts +17 -0
- package/dist/src/api/index.d.ts +2 -1
- package/dist/src/components/SearchOverlay.vue.d.ts +4 -5
- package/dist/src/context.d.ts +10 -0
- package/dist/src/events.d.ts +7 -1
- package/dist/src/modules/OpenLayersMinimap.d.ts +7 -0
- package/dist/src/modules/PostProcessEntities.d.ts +16 -0
- package/dist/src/modules/geocoding/CoordinatesSearch.d.ts +7 -0
- package/dist/src/modules/geocoding/FrenchBanGeocoder.d.ts +10 -0
- package/dist/src/modules/index.d.ts +5 -1
- package/dist/src/modules/minimap/OpenLayersMinimapComponent.vue.d.ts +8 -0
- package/dist/src/stores/giro3d.d.ts +1 -7
- package/dist/src/stores/search.d.ts +12 -0
- package/dist/src/stores/widgets.d.ts +12 -0
- package/package.json +2 -2
- package/dist/src/components/MinimapView.vue.d.ts +0 -4
- package/dist/src/providers/BanProvider.d.ts +0 -11
- package/dist/src/providers/Geocoding.d.ts +0 -7
- package/dist/src/services/MinimapController.d.ts +0 -19
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { default as Coordinates } from '@giro3d/giro3d/core/geographic/Coordinates';
|
|
2
|
+
import { SearchStore } from '../stores/search';
|
|
3
|
+
export interface LocationSearchResult extends SearchResult {
|
|
4
|
+
coordinates: Coordinates;
|
|
5
|
+
}
|
|
6
|
+
export interface SearchApi {
|
|
7
|
+
registerProvider(provider: SearchProvider): void;
|
|
8
|
+
}
|
|
9
|
+
export interface SearchProvider<T extends SearchResult = SearchResult> {
|
|
10
|
+
/**
|
|
11
|
+
* The name of the provider, as displayed in the search results.
|
|
12
|
+
*/
|
|
13
|
+
name: string;
|
|
14
|
+
/**
|
|
15
|
+
* Executes a search for the specified query string.
|
|
16
|
+
*/
|
|
17
|
+
search(query: string): Promise<T[]>;
|
|
18
|
+
}
|
|
19
|
+
export interface SearchResult {
|
|
20
|
+
/**
|
|
21
|
+
* The label to display in the search results.
|
|
22
|
+
*/
|
|
23
|
+
label: string;
|
|
24
|
+
/**
|
|
25
|
+
* The search provider used to perform the search.
|
|
26
|
+
*/
|
|
27
|
+
provider: SearchProvider;
|
|
28
|
+
}
|
|
29
|
+
export declare class SearchApiImpl implements SearchApi {
|
|
30
|
+
private readonly searchStore;
|
|
31
|
+
constructor(searchStore: SearchStore);
|
|
32
|
+
registerProvider(provider: SearchProvider): void;
|
|
33
|
+
}
|
|
34
|
+
export declare function isLocationSearchResult(result: SearchResult): result is LocationSearchResult;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { PieroContext } from '../context';
|
|
3
|
+
import { WidgetStore } from '../stores/widgets';
|
|
4
|
+
export interface Widget {
|
|
5
|
+
component: Component<{
|
|
6
|
+
context: PieroContext;
|
|
7
|
+
}>;
|
|
8
|
+
id: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class WidgetApiImpl implements WidgetApi {
|
|
11
|
+
private readonly store;
|
|
12
|
+
constructor(store: WidgetStore);
|
|
13
|
+
addWidget(widget: Widget): void;
|
|
14
|
+
}
|
|
15
|
+
export default interface WidgetApi {
|
|
16
|
+
addWidget(widget: Widget): void;
|
|
17
|
+
}
|
package/dist/src/api/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as BookmarkApi } from './BookmarkApi';
|
|
2
2
|
import { default as DatasetApi, DatasetActionRegistrationParams, DatasetRegistrationParams } from './DatasetApi';
|
|
3
|
+
import { SearchApi, SearchProvider, SearchResult } from './SearchApi';
|
|
3
4
|
import { default as ViewApi } from './ViewApi';
|
|
4
|
-
export { BookmarkApi, DatasetActionRegistrationParams, DatasetApi, DatasetRegistrationParams, ViewApi, };
|
|
5
|
+
export { BookmarkApi, DatasetActionRegistrationParams, DatasetApi, DatasetRegistrationParams, SearchApi, SearchProvider, SearchResult, ViewApi, };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import { SearchResult } from '../api';
|
|
1
2
|
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
2
|
-
|
|
3
|
+
resultSelected: (value: SearchResult) => any;
|
|
3
4
|
}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
-
|
|
5
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
6
|
-
inputField: HTMLInputElement;
|
|
7
|
-
}, HTMLDivElement>;
|
|
5
|
+
onResultSelected?: ((value: SearchResult) => any) | undefined;
|
|
6
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
8
7
|
export default _default;
|
package/dist/src/context.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { EventDispatcher } from '../../../node_modules/three';
|
|
2
|
+
import { SearchApi } from './api';
|
|
2
3
|
import { default as AnalysisApi } from './api/AnalysisApi';
|
|
3
4
|
import { default as BookmarkApi } from './api/BookmarkApi';
|
|
4
5
|
import { default as DatasetApi } from './api/DatasetApi';
|
|
5
6
|
import { default as NotificationApi } from './api/NotificationApi';
|
|
6
7
|
import { default as ViewApi } from './api/ViewApi';
|
|
8
|
+
import { default as WidgetApi } from './api/WidgetApi';
|
|
7
9
|
import { PieroEvents } from './events';
|
|
8
10
|
import { Configuration } from './types/Configuration';
|
|
9
11
|
/**
|
|
@@ -35,8 +37,16 @@ export interface PieroContext {
|
|
|
35
37
|
* Notification related functions.
|
|
36
38
|
*/
|
|
37
39
|
notifications: NotificationApi;
|
|
40
|
+
/**
|
|
41
|
+
* Search related functions.
|
|
42
|
+
*/
|
|
43
|
+
search: SearchApi;
|
|
38
44
|
/**
|
|
39
45
|
* 3D View related functions.
|
|
40
46
|
*/
|
|
41
47
|
view: ViewApi;
|
|
48
|
+
/**
|
|
49
|
+
* Widget API.
|
|
50
|
+
*/
|
|
51
|
+
widgets: WidgetApi;
|
|
42
52
|
}
|
package/dist/src/events.d.ts
CHANGED
|
@@ -20,11 +20,17 @@ export type PayloadEvent<T> = {
|
|
|
20
20
|
* An event with no argument.
|
|
21
21
|
*/
|
|
22
22
|
export type PieroEmptyEvent = unknown;
|
|
23
|
-
export type PieroEvents = BookmarkEvents & DatasetEvents & PieroGlobalEvents;
|
|
23
|
+
export type PieroEvents = BookmarkEvents & DatasetEvents & PieroGlobalEvents & ViewEvents;
|
|
24
24
|
export interface PieroGlobalEvents {
|
|
25
25
|
/**
|
|
26
26
|
* Raised when the application has finished loading.
|
|
27
27
|
*/
|
|
28
28
|
ready: PieroEmptyEvent;
|
|
29
29
|
}
|
|
30
|
+
export interface ViewEvents {
|
|
31
|
+
/**
|
|
32
|
+
* Raised when the main view has been updated.
|
|
33
|
+
*/
|
|
34
|
+
updated: PieroEmptyEvent;
|
|
35
|
+
}
|
|
30
36
|
export declare const GLOBAL_EVENT_DISPATCHER: EventDispatcher<PieroEvents>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as Instance } from '@giro3d/giro3d/core/Instance';
|
|
2
|
+
import { default as Entity3D } from '@giro3d/giro3d/entities/Entity3D';
|
|
3
|
+
import { PieroContext } from '../context';
|
|
4
|
+
import { Module } from '../module';
|
|
5
|
+
export type PostProcessing = (entity: Entity3D, context: {
|
|
6
|
+
instance: Instance;
|
|
7
|
+
}) => void;
|
|
8
|
+
export default class PostProcessEntities implements Module {
|
|
9
|
+
readonly id = "builtin-post-process-entities";
|
|
10
|
+
readonly name = "Post-process 3D Tiles";
|
|
11
|
+
private readonly _alreadyProcessedEntities;
|
|
12
|
+
private readonly _processings;
|
|
13
|
+
initialize(context: PieroContext): Promise<void> | void;
|
|
14
|
+
private processEntities;
|
|
15
|
+
private processEntity;
|
|
16
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PieroContext } from '../../context';
|
|
2
|
+
import { Module } from '../../module';
|
|
3
|
+
export default class CoordinatesSearch implements Module {
|
|
4
|
+
readonly id = "builtin-coordinates-search";
|
|
5
|
+
readonly name = "Coordinates search";
|
|
6
|
+
initialize(context: PieroContext): Promise<void> | void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PieroContext } from '../../context';
|
|
2
|
+
import { Module } from '../../module';
|
|
3
|
+
/**
|
|
4
|
+
* Provides geocoding capabilities from the french address database.
|
|
5
|
+
*/
|
|
6
|
+
export default class FrenchBanGeocoder implements Module {
|
|
7
|
+
readonly id = "builtin-geocoding-ban";
|
|
8
|
+
readonly name = "Base adresse nationale";
|
|
9
|
+
initialize(context: PieroContext): Promise<void> | void;
|
|
10
|
+
}
|
|
@@ -2,8 +2,12 @@ import { default as ClippingBoxAnalysis } from './ClippingBoxAnalysis';
|
|
|
2
2
|
import { default as CrossSectionAnalysis } from './CrossSectionAnalysis';
|
|
3
3
|
import { default as DownloadDataset } from './DownloadDataset';
|
|
4
4
|
import { default as FloodingPlaneAnalysis } from './FloodingPlaneAnalysis';
|
|
5
|
+
import { default as CoordinatesSearch } from './geocoding/CoordinatesSearch';
|
|
6
|
+
import { default as FrenchBanGeocoder } from './geocoding/FrenchBanGeocoder';
|
|
5
7
|
import { default as IFCLoader } from './IFCLoader';
|
|
8
|
+
import { default as OpenLayersMinimap } from './OpenLayersMinimap';
|
|
6
9
|
import { default as PLYLoader } from './PLYLoader';
|
|
10
|
+
import { default as PostProcessEntities } from './PostProcessEntities';
|
|
7
11
|
import { default as PotreeLoader } from './PotreeLoader';
|
|
8
12
|
import { default as Tour } from './Tour';
|
|
9
|
-
export { ClippingBoxAnalysis, CrossSectionAnalysis, DownloadDataset, FloodingPlaneAnalysis, IFCLoader, PLYLoader, PotreeLoader, Tour, };
|
|
13
|
+
export { ClippingBoxAnalysis, CoordinatesSearch, CrossSectionAnalysis, DownloadDataset, FloodingPlaneAnalysis, FrenchBanGeocoder, IFCLoader, OpenLayersMinimap, PLYLoader, PostProcessEntities, PotreeLoader, Tour, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PieroContext } from '../../context';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
context: PieroContext;
|
|
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, {
|
|
6
|
+
target: HTMLDivElement;
|
|
7
|
+
}, HTMLDivElement>;
|
|
8
|
+
export default _default;
|
|
@@ -11,11 +11,9 @@ export declare const useGiro3dStore: import('pinia').StoreDefinition<"giro3d", P
|
|
|
11
11
|
getDefaultCameraPosition: () => Coordinates;
|
|
12
12
|
getInspector: () => Inspector | null;
|
|
13
13
|
getMainView: () => Instance | null;
|
|
14
|
-
getMinimapView: () => Instance | null;
|
|
15
14
|
notifyChange: () => void;
|
|
16
15
|
setInspector: (i: Inspector | null) => void;
|
|
17
16
|
setMainView: (instance: Instance | null) => void;
|
|
18
|
-
setMinimapView: (instance: Instance | null) => void;
|
|
19
17
|
}, never>, Pick<{
|
|
20
18
|
getCRS: () => string;
|
|
21
19
|
getDefaultBasemapExtent: () => Extent;
|
|
@@ -24,11 +22,9 @@ export declare const useGiro3dStore: import('pinia').StoreDefinition<"giro3d", P
|
|
|
24
22
|
getDefaultCameraPosition: () => Coordinates;
|
|
25
23
|
getInspector: () => Inspector | null;
|
|
26
24
|
getMainView: () => Instance | null;
|
|
27
|
-
getMinimapView: () => Instance | null;
|
|
28
25
|
notifyChange: () => void;
|
|
29
26
|
setInspector: (i: Inspector | null) => void;
|
|
30
27
|
setMainView: (instance: Instance | null) => void;
|
|
31
|
-
setMinimapView: (instance: Instance | null) => void;
|
|
32
28
|
}, never>, Pick<{
|
|
33
29
|
getCRS: () => string;
|
|
34
30
|
getDefaultBasemapExtent: () => Extent;
|
|
@@ -37,9 +33,7 @@ export declare const useGiro3dStore: import('pinia').StoreDefinition<"giro3d", P
|
|
|
37
33
|
getDefaultCameraPosition: () => Coordinates;
|
|
38
34
|
getInspector: () => Inspector | null;
|
|
39
35
|
getMainView: () => Instance | null;
|
|
40
|
-
getMinimapView: () => Instance | null;
|
|
41
36
|
notifyChange: () => void;
|
|
42
37
|
setInspector: (i: Inspector | null) => void;
|
|
43
38
|
setMainView: (instance: Instance | null) => void;
|
|
44
|
-
|
|
45
|
-
}, "getCRS" | "getDefaultBasemapExtent" | "getDefaultBasemapOptions" | "getDefaultCameraLookAt" | "getDefaultCameraPosition" | "getInspector" | "getMainView" | "getMinimapView" | "notifyChange" | "setInspector" | "setMainView" | "setMinimapView">>;
|
|
39
|
+
}, "getCRS" | "getDefaultBasemapExtent" | "getDefaultBasemapOptions" | "getDefaultCameraLookAt" | "getDefaultCameraPosition" | "getInspector" | "getMainView" | "notifyChange" | "setInspector" | "setMainView">>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SearchProvider } from '../api/SearchApi';
|
|
2
|
+
export declare const useSearchStore: import('pinia').StoreDefinition<"search", Pick<{
|
|
3
|
+
getProviders: () => SearchProvider[];
|
|
4
|
+
registerProvider: (provider: SearchProvider) => void;
|
|
5
|
+
}, never>, Pick<{
|
|
6
|
+
getProviders: () => SearchProvider[];
|
|
7
|
+
registerProvider: (provider: SearchProvider) => void;
|
|
8
|
+
}, never>, Pick<{
|
|
9
|
+
getProviders: () => SearchProvider[];
|
|
10
|
+
registerProvider: (provider: SearchProvider) => void;
|
|
11
|
+
}, "getProviders" | "registerProvider">>;
|
|
12
|
+
export type SearchStore = ReturnType<typeof useSearchStore>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Widget } from '../api/WidgetApi';
|
|
2
|
+
export declare const useWidgetStore: import('pinia').StoreDefinition<"widgets", Pick<{
|
|
3
|
+
addWidget: (widget: Widget) => void;
|
|
4
|
+
getWidgets: () => Widget[];
|
|
5
|
+
}, never>, Pick<{
|
|
6
|
+
addWidget: (widget: Widget) => void;
|
|
7
|
+
getWidgets: () => Widget[];
|
|
8
|
+
}, never>, Pick<{
|
|
9
|
+
addWidget: (widget: Widget) => void;
|
|
10
|
+
getWidgets: () => Widget[];
|
|
11
|
+
}, "addWidget" | "getWidgets">>;
|
|
12
|
+
export type WidgetStore = ReturnType<typeof useWidgetStore>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@giro3d/piero",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.3",
|
|
5
5
|
"description": "A web application for 3D geospatial data visualization, powered by Giro3D",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"front-end",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@loaders.gl/las": "^4.1.1",
|
|
82
82
|
"@loaders.gl/shapefile": "^4.1.1",
|
|
83
83
|
"@popperjs/core": "^2.11.8",
|
|
84
|
-
"@
|
|
84
|
+
"@trevoreyre/autocomplete-vue": "^3.0.3",
|
|
85
85
|
"bootstrap": "^5.3.3",
|
|
86
86
|
"bootstrap-icons": "^1.11.3",
|
|
87
87
|
"camera-controls": "^2.10.1",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
2
|
-
target: HTMLDivElement;
|
|
3
|
-
}, HTMLDivElement>;
|
|
4
|
-
export default _default;
|
|
@@ -1,11 +0,0 @@
|
|
|
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;
|
|
@@ -1,19 +0,0 @@
|
|
|
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
|
-
}
|