@geode/opengeodeweb-front 10.44.0 → 10.44.1
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/app/components/ClippingPlanes.vue +7 -5
- package/app/components/CrsSelector.vue +2 -1
- package/app/components/ExtensionSelector.vue +8 -7
- package/app/components/FactorFilterPanel.vue +4 -4
- package/app/components/MissingFilesSelector.vue +2 -1
- package/app/components/ObjectSelector.vue +4 -3
- package/app/components/ThresholdCard.vue +6 -5
- package/app/components/ThresholdFilter.vue +11 -10
- package/app/components/TimeSeriesTargetSelector.vue +10 -7
- package/app/components/Viewer/ContextMenu/InfoCard.vue +12 -10
- package/app/components/Viewer/EdgedCurve/SpecificEdgesColoring.vue +72 -63
- package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +12 -10
- package/app/components/Viewer/Generic/Mesh/CellsColoring.vue +76 -71
- package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +8 -6
- package/app/components/Viewer/Generic/Mesh/EdgesColoring.vue +72 -63
- package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +12 -10
- package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +54 -45
- package/app/components/Viewer/Generic/Mesh/PolygonsColoring.vue +76 -73
- package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +8 -6
- package/app/components/Viewer/Generic/Mesh/PolyhedraColoring.vue +72 -67
- package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +8 -6
- package/app/components/Viewer/Generic/Model/BlocksOptions.vue +29 -21
- package/app/components/Viewer/Generic/Model/ComponentEdgesOptions.vue +8 -6
- package/app/components/Viewer/Generic/Model/ComponentPointsOptions.vue +8 -6
- package/app/components/Viewer/Generic/Model/CornerComponentOptions.vue +15 -7
- package/app/components/Viewer/Generic/Model/CornersOptions.vue +2 -1
- package/app/components/Viewer/Generic/Model/CornersTypeOptions.vue +13 -6
- package/app/components/Viewer/Generic/Model/LineComponentOptions.vue +19 -11
- package/app/components/Viewer/Generic/Model/LinesOptions.vue +2 -1
- package/app/components/Viewer/Generic/Model/LinesTypeOptions.vue +17 -10
- package/app/components/Viewer/Generic/Model/ModelEdgesCard.vue +3 -2
- package/app/components/Viewer/Generic/Model/ModelPointsCard.vue +2 -1
- package/app/components/Viewer/Generic/Model/ModelStyleCard.vue +3 -2
- package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +29 -21
- package/app/components/Viewer/ObjectTree/Base/ItemLabel.vue +2 -2
- package/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue +2 -3
- package/app/components/Viewer/Options/AttributeSelector.vue +11 -7
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +10 -13
- package/app/components/Viewer/Options/TextureItem.vue +5 -4
- package/app/components/Viewer/Options/TexturesSelector.vue +5 -8
- package/app/components/Viewer/Options/TimeStepSlider.vue +3 -1
- package/app/components/Viewer/OverlappingObjectsPicker.vue +6 -13
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +40 -38
- package/app/components/Viewer/Solid/SpecificPolyhedraColoring.vue +69 -65
- package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +8 -6
- package/app/components/Viewer/Surface/PolygonsColoring.vue +73 -71
- package/app/components/Viewer/Surface/PolygonsOptions.vue +8 -6
- package/app/composables/attribute_coloring_style.ts +17 -12
- package/app/composables/attribute_selector.ts +9 -15
- package/app/composables/batch_style.ts +25 -16
- package/app/composables/batch_style_model.ts +6 -5
- package/app/composables/clipping_planes_widget.ts +2 -5
- package/app/composables/clipping_slices.ts +2 -1
- package/app/composables/hover_highlight.ts +17 -16
- package/app/composables/live_data_item.ts +3 -2
- package/app/composables/model_attribute_style.ts +2 -1
- package/app/composables/model_menu_context.ts +3 -4
- package/app/composables/model_tree.ts +3 -2
- package/app/composables/project_manager_helpers/types.ts +10 -4
- package/app/composables/tree_filter.ts +3 -3
- package/app/composables/tree_keyboard_nav.ts +1 -6
- package/app/composables/tree_scroll.ts +2 -0
- package/app/composables/use_overlapping_picker.ts +9 -9
- package/app/stores/basemap_helpers/georeferenced.ts +1 -1
- package/app/stores/basemap_helpers/viewer.ts +2 -1
- package/app/stores/crs.ts +6 -5
- package/app/stores/data.ts +84 -69
- package/app/stores/data_helpers/collections.ts +13 -21
- package/app/stores/data_helpers/mesh.ts +19 -24
- package/app/stores/data_helpers/relations.ts +12 -12
- package/app/stores/data_style.ts +26 -20
- package/app/stores/menu.ts +17 -11
- package/app/stores/treeview.ts +28 -27
- package/app/types/attribute.ts +37 -0
- package/app/types/identifiers.ts +72 -0
- package/app/types/style.ts +13 -0
- package/app/types/texture.ts +6 -0
- package/app/types/tree.ts +17 -0
- package/app/utils/attribute_range.ts +2 -1
- package/app/utils/attributes.ts +13 -4
- package/app/utils/basemap_tree.ts +3 -5
- package/app/utils/clipping_planes.ts +6 -4
- package/app/utils/clipping_planes_scene.ts +4 -3
- package/app/utils/crs.ts +4 -1
- package/app/utils/default_styles/constants.ts +8 -1
- package/app/utils/default_styles/mesh_components.ts +21 -25
- package/app/utils/default_styles/meshes.ts +7 -22
- package/app/utils/default_styles/model_components.ts +22 -26
- package/app/utils/default_styles/models.ts +11 -13
- package/app/utils/import_workflow.ts +37 -29
- package/app/utils/legacy_data_id.ts +16 -0
- package/app/utils/slice.ts +7 -2
- package/app/utils/threshold.ts +1 -8
- package/app/utils/threshold_sources.ts +8 -5
- package/app/utils/treeview.ts +3 -2
- package/internal/database/tables/data.ts +1 -1
- package/internal/database/tables/data_style.ts +1 -1
- package/internal/database/tables/model_components.ts +1 -1
- package/internal/database/tables/model_components_relation.ts +1 -1
- package/internal/stores/data_style/attribute_default.ts +14 -0
- package/internal/stores/data_style/attribute_types.ts +59 -0
- package/internal/stores/data_style/attribute_valid.ts +16 -0
- package/internal/stores/data_style/mesh/base_style.ts +17 -15
- package/internal/stores/data_style/mesh/cells/cell.ts +64 -49
- package/internal/stores/data_style/mesh/cells/cell_attribute.ts +42 -66
- package/internal/stores/data_style/mesh/cells/cell_config.ts +59 -53
- package/internal/stores/data_style/mesh/cells/color.ts +8 -7
- package/internal/stores/data_style/mesh/cells/common.ts +16 -15
- package/internal/stores/data_style/mesh/cells/index.ts +49 -47
- package/internal/stores/data_style/mesh/cells/opacity.ts +12 -10
- package/internal/stores/data_style/mesh/cells/textures.ts +8 -7
- package/internal/stores/data_style/mesh/cells/vertex.ts +66 -50
- package/internal/stores/data_style/mesh/cells/vertex_attribute.ts +37 -67
- package/internal/stores/data_style/mesh/cells/vertex_config.ts +62 -53
- package/internal/stores/data_style/mesh/cells/visibility.ts +11 -7
- package/internal/stores/data_style/mesh/edges/color.ts +8 -7
- package/internal/stores/data_style/mesh/edges/common.ts +13 -12
- package/internal/stores/data_style/mesh/edges/edge.ts +64 -49
- package/internal/stores/data_style/mesh/edges/edge_attribute.ts +42 -66
- package/internal/stores/data_style/mesh/edges/edge_config.ts +59 -53
- package/internal/stores/data_style/mesh/edges/index.ts +49 -47
- package/internal/stores/data_style/mesh/edges/opacity.ts +12 -10
- package/internal/stores/data_style/mesh/edges/vertex.ts +66 -50
- package/internal/stores/data_style/mesh/edges/vertex_attribute.ts +37 -67
- package/internal/stores/data_style/mesh/edges/vertex_config.ts +62 -53
- package/internal/stores/data_style/mesh/edges/visibility.ts +11 -7
- package/internal/stores/data_style/mesh/edges/width.ts +9 -7
- package/internal/stores/data_style/mesh/index.ts +27 -24
- package/internal/stores/data_style/mesh/points/color.ts +8 -7
- package/internal/stores/data_style/mesh/points/common.ts +16 -14
- package/internal/stores/data_style/mesh/points/index.ts +39 -37
- package/internal/stores/data_style/mesh/points/opacity.ts +12 -10
- package/internal/stores/data_style/mesh/points/size.ts +9 -7
- package/internal/stores/data_style/mesh/points/vertex.ts +66 -50
- package/internal/stores/data_style/mesh/points/vertex_attribute.ts +37 -67
- package/internal/stores/data_style/mesh/points/vertex_config.ts +62 -53
- package/internal/stores/data_style/mesh/points/visibility.ts +8 -6
- package/internal/stores/data_style/mesh/polygons/color.ts +8 -7
- package/internal/stores/data_style/mesh/polygons/common.ts +19 -15
- package/internal/stores/data_style/mesh/polygons/index.ts +49 -50
- package/internal/stores/data_style/mesh/polygons/opacity.ts +12 -10
- package/internal/stores/data_style/mesh/polygons/polygon.ts +66 -50
- package/internal/stores/data_style/mesh/polygons/polygon_attribute.ts +37 -67
- package/internal/stores/data_style/mesh/polygons/polygon_config.ts +65 -53
- package/internal/stores/data_style/mesh/polygons/textures.ts +8 -7
- package/internal/stores/data_style/mesh/polygons/vertex.ts +66 -50
- package/internal/stores/data_style/mesh/polygons/vertex_attribute.ts +37 -67
- package/internal/stores/data_style/mesh/polygons/vertex_config.ts +65 -53
- package/internal/stores/data_style/mesh/polygons/visibility.ts +12 -7
- package/internal/stores/data_style/mesh/polyhedra/color.ts +13 -9
- package/internal/stores/data_style/mesh/polyhedra/common.ts +13 -12
- package/internal/stores/data_style/mesh/polyhedra/index.ts +51 -51
- package/internal/stores/data_style/mesh/polyhedra/opacity.ts +12 -10
- package/internal/stores/data_style/mesh/polyhedra/polyhedron.ts +59 -53
- package/internal/stores/data_style/mesh/polyhedra/polyhedron_attribute.ts +46 -69
- package/internal/stores/data_style/mesh/polyhedra/polyhedron_config.ts +65 -55
- package/internal/stores/data_style/mesh/polyhedra/vertex.ts +66 -50
- package/internal/stores/data_style/mesh/polyhedra/vertex_attribute.ts +37 -67
- package/internal/stores/data_style/mesh/polyhedra/vertex_config.ts +65 -53
- package/internal/stores/data_style/mesh/polyhedra/visibility.ts +12 -7
- package/internal/stores/data_style/model/blocks/apply_coloring.ts +11 -12
- package/internal/stores/data_style/model/blocks/color.ts +25 -26
- package/internal/stores/data_style/model/blocks/coloring_groups.ts +5 -9
- package/internal/stores/data_style/model/blocks/common.ts +26 -22
- package/internal/stores/data_style/model/blocks/index.ts +8 -7
- package/internal/stores/data_style/model/blocks/polyhedron.ts +114 -135
- package/internal/stores/data_style/model/blocks/vertex.ts +110 -132
- package/internal/stores/data_style/model/blocks/visibility.ts +11 -9
- package/internal/stores/data_style/model/color.ts +55 -41
- package/internal/stores/data_style/model/common.ts +16 -14
- package/internal/stores/data_style/model/component_style.ts +0 -16
- package/internal/stores/data_style/model/corners/color.ts +21 -19
- package/internal/stores/data_style/model/corners/common.ts +26 -22
- package/internal/stores/data_style/model/corners/index.ts +21 -24
- package/internal/stores/data_style/model/corners/vertex.ts +103 -122
- package/internal/stores/data_style/model/corners/visibility.ts +11 -9
- package/internal/stores/data_style/model/edges/common.ts +7 -6
- package/internal/stores/data_style/model/edges/component.ts +63 -55
- package/internal/stores/data_style/model/edges/visibility.ts +24 -16
- package/internal/stores/data_style/model/edges/width.ts +10 -8
- package/internal/stores/data_style/model/index.ts +7 -6
- package/internal/stores/data_style/model/lines/apply_coloring.ts +11 -9
- package/internal/stores/data_style/model/lines/color.ts +25 -23
- package/internal/stores/data_style/model/lines/coloring_groups.ts +5 -9
- package/internal/stores/data_style/model/lines/common.ts +29 -21
- package/internal/stores/data_style/model/lines/edge.ts +109 -128
- package/internal/stores/data_style/model/lines/index.ts +8 -7
- package/internal/stores/data_style/model/lines/vertex.ts +109 -128
- package/internal/stores/data_style/model/lines/visibility.ts +11 -9
- package/internal/stores/data_style/model/points/common.ts +7 -6
- package/internal/stores/data_style/model/points/component.ts +62 -54
- package/internal/stores/data_style/model/points/index.ts +12 -7
- package/internal/stores/data_style/model/points/size.ts +10 -8
- package/internal/stores/data_style/model/points/visibility.ts +13 -8
- package/internal/stores/data_style/model/selection.ts +6 -11
- package/internal/stores/data_style/model/surfaces/apply_coloring.ts +11 -15
- package/internal/stores/data_style/model/surfaces/color.ts +31 -23
- package/internal/stores/data_style/model/surfaces/coloring_groups.ts +5 -9
- package/internal/stores/data_style/model/surfaces/common.ts +26 -22
- package/internal/stores/data_style/model/surfaces/index.ts +8 -7
- package/internal/stores/data_style/model/surfaces/polygon.ts +113 -138
- package/internal/stores/data_style/model/surfaces/vertex.ts +117 -133
- package/internal/stores/data_style/model/surfaces/visibility.ts +11 -9
- package/internal/stores/data_style/model/visibility.ts +18 -16
- package/internal/stores/data_style/model/visibility_dispatch.ts +4 -4
- package/internal/stores/data_style/state.ts +7 -6
- package/internal/stores/data_style/state_shared.ts +11 -10
- package/internal/stores/data_style/time_step.ts +21 -15
- package/internal/stores/data_style/types.ts +4 -3
- package/internal/stores/hybrid_viewer/camera.ts +11 -6
- package/internal/stores/hybrid_viewer/filters.ts +16 -14
- package/internal/stores/hybrid_viewer/highlight.ts +6 -5
- package/internal/stores/hybrid_viewer/scene.ts +20 -18
- package/internal/stores/hybrid_viewer/vtk_types.ts +2 -2
- package/internal/utils/api_fetch.ts +1 -1
- package/internal/utils/upload_file.ts +1 -7
- package/package.json +1 -1
- package/shared/utils/fetch_raw.ts +7 -8
|
@@ -1,80 +1,50 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AttributeColorMap,
|
|
3
|
+
AttributeItem,
|
|
4
|
+
AttributeName,
|
|
5
|
+
AttributeRange,
|
|
6
|
+
AttributeRangeMaximum,
|
|
7
|
+
AttributeRangeMinimum,
|
|
8
|
+
AttributeTimeStep,
|
|
9
|
+
} from "@ogw_front/types/attribute";
|
|
10
|
+
import type {
|
|
11
|
+
AttributeStoredConfig,
|
|
12
|
+
ValidAttributeInput,
|
|
13
|
+
} from "@ogw_internal/stores/data_style/attribute_types";
|
|
14
|
+
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
1
15
|
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
2
16
|
|
|
3
|
-
interface AttributeStoredConfig {
|
|
4
|
-
minimum: number | undefined;
|
|
5
|
-
maximum: number | undefined;
|
|
6
|
-
colorMap: string | undefined;
|
|
7
|
-
no_data_color: RGBAColor;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface AttributeState {
|
|
11
|
-
name?: string;
|
|
12
|
-
item?: number;
|
|
13
|
-
storedConfigs?: Record<string, { lastItem: number } & Record<string, AttributeStoredConfig>>;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
interface AttributeInput {
|
|
17
|
-
name: string | undefined;
|
|
18
|
-
item: number | undefined;
|
|
19
|
-
minimum: number | undefined;
|
|
20
|
-
maximum: number | undefined;
|
|
21
|
-
colorMap: string | undefined;
|
|
22
|
-
no_data_color?: RGBAColor;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
interface ValidAttributeInput {
|
|
26
|
-
name: string;
|
|
27
|
-
item: number;
|
|
28
|
-
minimum: number;
|
|
29
|
-
maximum: number;
|
|
30
|
-
colorMap: string;
|
|
31
|
-
no_data_color?: RGBAColor;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function isMeshPolygonsPolygonAttributeValid(input: AttributeInput): input is ValidAttributeInput {
|
|
35
|
-
return (
|
|
36
|
-
input.name !== undefined &&
|
|
37
|
-
input.item !== undefined &&
|
|
38
|
-
input.minimum !== undefined &&
|
|
39
|
-
input.maximum !== undefined &&
|
|
40
|
-
input.colorMap !== undefined
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
17
|
interface UseMeshPolygonsPolygonAttributeStyleReturn {
|
|
45
|
-
meshPolygonsPolygonAttributeName: (
|
|
46
|
-
meshPolygonsPolygonAttributeItem: (
|
|
47
|
-
meshPolygonsPolygonAttributeRange: (
|
|
48
|
-
meshPolygonsPolygonAttributeTimeStep: (
|
|
49
|
-
setMeshPolygonsPolygonAttributeTimeStep: (
|
|
50
|
-
|
|
18
|
+
meshPolygonsPolygonAttributeName: (meshId: MeshId) => AttributeName | undefined;
|
|
19
|
+
meshPolygonsPolygonAttributeItem: (meshId: MeshId) => AttributeItem;
|
|
20
|
+
meshPolygonsPolygonAttributeRange: (meshId: MeshId) => AttributeRange;
|
|
21
|
+
meshPolygonsPolygonAttributeTimeStep: (meshId: MeshId) => AttributeTimeStep | undefined;
|
|
22
|
+
setMeshPolygonsPolygonAttributeTimeStep: (
|
|
23
|
+
meshId: MeshId,
|
|
24
|
+
timeStep: AttributeTimeStep,
|
|
25
|
+
) => Promise<unknown>;
|
|
26
|
+
meshPolygonsPolygonAttributeColorMap: (meshId: MeshId) => AttributeColorMap | undefined;
|
|
51
27
|
meshPolygonsPolygonAttributeStoredConfig: (
|
|
52
|
-
|
|
53
|
-
name:
|
|
54
|
-
item:
|
|
28
|
+
meshId: MeshId,
|
|
29
|
+
name: AttributeName | undefined,
|
|
30
|
+
item: AttributeItem | undefined,
|
|
55
31
|
) => AttributeStoredConfig;
|
|
56
|
-
setMeshPolygonsPolygonAttribute: (
|
|
57
|
-
setMeshPolygonsPolygonAttributeName: (
|
|
58
|
-
setMeshPolygonsPolygonAttributeItem: (
|
|
32
|
+
setMeshPolygonsPolygonAttribute: (meshId: MeshId, input: ValidAttributeInput) => Promise<unknown>;
|
|
33
|
+
setMeshPolygonsPolygonAttributeName: (meshId: MeshId, name: AttributeName) => Promise<unknown>;
|
|
34
|
+
setMeshPolygonsPolygonAttributeItem: (meshId: MeshId, item: AttributeItem) => Promise<unknown>;
|
|
59
35
|
setMeshPolygonsPolygonAttributeRange: (
|
|
60
|
-
|
|
61
|
-
minimum:
|
|
62
|
-
maximum:
|
|
36
|
+
meshId: MeshId,
|
|
37
|
+
minimum: AttributeRangeMinimum,
|
|
38
|
+
maximum: AttributeRangeMaximum,
|
|
63
39
|
) => Promise<unknown>;
|
|
64
40
|
setMeshPolygonsPolygonAttributeColorMap: (
|
|
65
|
-
|
|
66
|
-
colorMap:
|
|
41
|
+
meshId: MeshId,
|
|
42
|
+
colorMap: AttributeColorMap | undefined,
|
|
67
43
|
) => Promise<unknown>;
|
|
68
|
-
meshPolygonsPolygonAttributeNoDataColor: (
|
|
44
|
+
meshPolygonsPolygonAttributeNoDataColor: (meshId: MeshId) => RGBAColor;
|
|
69
45
|
setMeshPolygonsPolygonAttributeNoDataColor: (
|
|
70
|
-
|
|
46
|
+
meshId: MeshId,
|
|
71
47
|
no_data_color: RGBAColor,
|
|
72
48
|
) => Promise<unknown>;
|
|
73
49
|
}
|
|
74
|
-
export {
|
|
75
|
-
export type {
|
|
76
|
-
AttributeStoredConfig,
|
|
77
|
-
AttributeState,
|
|
78
|
-
ValidAttributeInput,
|
|
79
|
-
UseMeshPolygonsPolygonAttributeStyleReturn,
|
|
80
|
-
};
|
|
50
|
+
export type { UseMeshPolygonsPolygonAttributeStyleReturn };
|
|
@@ -1,69 +1,81 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type {
|
|
2
|
+
AttributeColorMap,
|
|
3
|
+
AttributeItem,
|
|
4
|
+
AttributeName,
|
|
5
|
+
AttributeRange,
|
|
6
|
+
} from "@ogw_front/types/attribute";
|
|
7
|
+
import type {
|
|
8
|
+
AttributeState,
|
|
9
|
+
AttributeStoredConfig,
|
|
10
|
+
} from "@ogw_internal/stores/data_style/attribute_types";
|
|
11
|
+
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
12
|
+
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
13
|
+
import { defaultAttributeStoredConfig } from "@ogw_internal/stores/data_style/attribute_default";
|
|
3
14
|
|
|
4
15
|
// Local imports
|
|
5
16
|
import { useMeshPolygonsCommonStyle } from "./common";
|
|
6
17
|
|
|
7
18
|
interface UseMeshPolygonsPolygonAttributeConfigReturn {
|
|
8
|
-
meshPolygonsPolygonAttribute: (
|
|
9
|
-
meshPolygonsPolygonAttributeName: (
|
|
10
|
-
meshPolygonsPolygonAttributeLastItem: (
|
|
11
|
-
meshPolygonsPolygonAttributeItem: (
|
|
19
|
+
meshPolygonsPolygonAttribute: (meshId: MeshId) => AttributeState;
|
|
20
|
+
meshPolygonsPolygonAttributeName: (meshId: MeshId) => AttributeName | undefined;
|
|
21
|
+
meshPolygonsPolygonAttributeLastItem: (meshId: MeshId, name: AttributeName | undefined) => number;
|
|
22
|
+
meshPolygonsPolygonAttributeItem: (meshId: MeshId) => AttributeItem;
|
|
12
23
|
meshPolygonsPolygonAttributeStoredConfig: (
|
|
13
|
-
|
|
14
|
-
name:
|
|
15
|
-
item:
|
|
24
|
+
meshId: MeshId,
|
|
25
|
+
name: AttributeName | undefined,
|
|
26
|
+
item: AttributeItem | undefined,
|
|
16
27
|
) => AttributeStoredConfig;
|
|
17
28
|
}
|
|
18
29
|
|
|
19
30
|
interface UseMeshPolygonsPolygonAttributeConfigWriterReturn {
|
|
20
|
-
mutateMeshPolygonsPolygonStyle: (
|
|
31
|
+
mutateMeshPolygonsPolygonStyle: (
|
|
32
|
+
meshId: MeshId,
|
|
33
|
+
values: Record<string, unknown>,
|
|
34
|
+
) => Promise<string>;
|
|
21
35
|
setMeshPolygonsPolygonAttributeStoredConfig: (
|
|
22
|
-
|
|
23
|
-
name:
|
|
24
|
-
item:
|
|
36
|
+
meshId: MeshId,
|
|
37
|
+
name: AttributeName | undefined,
|
|
38
|
+
item: AttributeItem | undefined,
|
|
25
39
|
config: Partial<AttributeStoredConfig>,
|
|
26
40
|
) => Promise<string>;
|
|
27
41
|
}
|
|
28
42
|
|
|
29
43
|
function useMeshPolygonsPolygonAttributeConfig(): UseMeshPolygonsPolygonAttributeConfigReturn {
|
|
30
44
|
const meshPolygonsCommonStyle = useMeshPolygonsCommonStyle();
|
|
31
|
-
function meshPolygonsPolygonAttribute(
|
|
45
|
+
function meshPolygonsPolygonAttribute(meshId: MeshId): AttributeState {
|
|
32
46
|
// oxlint-disable-next-line no-unsafe-type-assertion -- coloring.polygon shape is defined by the data style schema.
|
|
33
|
-
return meshPolygonsCommonStyle.meshPolygonsColoring(
|
|
47
|
+
return meshPolygonsCommonStyle.meshPolygonsColoring(meshId).polygon as AttributeState;
|
|
34
48
|
}
|
|
35
49
|
function meshPolygonsPolygonAttributeStoredConfig(
|
|
36
|
-
|
|
37
|
-
name:
|
|
38
|
-
item:
|
|
50
|
+
meshId: MeshId,
|
|
51
|
+
name: AttributeName | undefined,
|
|
52
|
+
item: AttributeItem | undefined,
|
|
39
53
|
): AttributeStoredConfig {
|
|
40
|
-
const { storedConfigs } = meshPolygonsPolygonAttribute(
|
|
54
|
+
const { storedConfigs } = meshPolygonsPolygonAttribute(meshId);
|
|
41
55
|
const nameConfig = name === undefined ? undefined : storedConfigs?.[name];
|
|
42
56
|
const itemConfig = item === undefined ? undefined : nameConfig?.[item];
|
|
43
57
|
if (itemConfig !== undefined) {
|
|
44
58
|
return itemConfig;
|
|
45
59
|
}
|
|
46
|
-
return
|
|
47
|
-
minimum: undefined,
|
|
48
|
-
maximum: undefined,
|
|
49
|
-
colorMap: undefined,
|
|
50
|
-
no_data_color: DEFAULT_NO_DATA_COLOR,
|
|
51
|
-
};
|
|
60
|
+
return defaultAttributeStoredConfig();
|
|
52
61
|
}
|
|
53
|
-
function meshPolygonsPolygonAttributeName(
|
|
54
|
-
return meshPolygonsPolygonAttribute(
|
|
62
|
+
function meshPolygonsPolygonAttributeName(meshId: MeshId): AttributeName | undefined {
|
|
63
|
+
return meshPolygonsPolygonAttribute(meshId).name;
|
|
55
64
|
}
|
|
56
|
-
function meshPolygonsPolygonAttributeLastItem(
|
|
57
|
-
|
|
65
|
+
function meshPolygonsPolygonAttributeLastItem(
|
|
66
|
+
meshId: MeshId,
|
|
67
|
+
name: AttributeName | undefined,
|
|
68
|
+
): number {
|
|
69
|
+
const { storedConfigs } = meshPolygonsPolygonAttribute(meshId);
|
|
58
70
|
const nameConfig = name === undefined ? undefined : storedConfigs?.[name];
|
|
59
71
|
if (nameConfig !== undefined) {
|
|
60
72
|
return nameConfig.lastItem;
|
|
61
73
|
}
|
|
62
74
|
return 0;
|
|
63
75
|
}
|
|
64
|
-
function meshPolygonsPolygonAttributeItem(
|
|
65
|
-
const { item, name } = meshPolygonsPolygonAttribute(
|
|
66
|
-
return item ?? meshPolygonsPolygonAttributeLastItem(
|
|
76
|
+
function meshPolygonsPolygonAttributeItem(meshId: MeshId): AttributeItem {
|
|
77
|
+
const { item, name } = meshPolygonsPolygonAttribute(meshId);
|
|
78
|
+
return item ?? meshPolygonsPolygonAttributeLastItem(meshId, name);
|
|
67
79
|
}
|
|
68
80
|
return {
|
|
69
81
|
meshPolygonsPolygonAttribute,
|
|
@@ -75,9 +87,9 @@ function useMeshPolygonsPolygonAttributeConfig(): UseMeshPolygonsPolygonAttribut
|
|
|
75
87
|
}
|
|
76
88
|
|
|
77
89
|
interface UseMeshPolygonsPolygonAttributeConfigValuesReturn {
|
|
78
|
-
meshPolygonsPolygonAttributeRange: (
|
|
79
|
-
meshPolygonsPolygonAttributeColorMap: (
|
|
80
|
-
meshPolygonsPolygonAttributeNoDataColor: (
|
|
90
|
+
meshPolygonsPolygonAttributeRange: (meshId: MeshId) => AttributeRange;
|
|
91
|
+
meshPolygonsPolygonAttributeColorMap: (meshId: MeshId) => AttributeColorMap | undefined;
|
|
92
|
+
meshPolygonsPolygonAttributeNoDataColor: (meshId: MeshId) => RGBAColor;
|
|
81
93
|
}
|
|
82
94
|
|
|
83
95
|
function useMeshPolygonsPolygonAttributeConfigValues(): UseMeshPolygonsPolygonAttributeConfigValuesReturn {
|
|
@@ -86,22 +98,22 @@ function useMeshPolygonsPolygonAttributeConfigValues(): UseMeshPolygonsPolygonAt
|
|
|
86
98
|
meshPolygonsPolygonAttributeItem,
|
|
87
99
|
meshPolygonsPolygonAttributeStoredConfig,
|
|
88
100
|
} = useMeshPolygonsPolygonAttributeConfig();
|
|
89
|
-
function meshPolygonsPolygonAttributeRange(
|
|
90
|
-
const name = meshPolygonsPolygonAttributeName(
|
|
91
|
-
const item = meshPolygonsPolygonAttributeItem(
|
|
92
|
-
const storedConfig = meshPolygonsPolygonAttributeStoredConfig(
|
|
101
|
+
function meshPolygonsPolygonAttributeRange(meshId: MeshId): AttributeRange {
|
|
102
|
+
const name = meshPolygonsPolygonAttributeName(meshId);
|
|
103
|
+
const item = meshPolygonsPolygonAttributeItem(meshId);
|
|
104
|
+
const storedConfig = meshPolygonsPolygonAttributeStoredConfig(meshId, name, item);
|
|
93
105
|
return [storedConfig.minimum, storedConfig.maximum];
|
|
94
106
|
}
|
|
95
|
-
function meshPolygonsPolygonAttributeColorMap(
|
|
96
|
-
const name = meshPolygonsPolygonAttributeName(
|
|
97
|
-
const item = meshPolygonsPolygonAttributeItem(
|
|
98
|
-
const storedConfig = meshPolygonsPolygonAttributeStoredConfig(
|
|
107
|
+
function meshPolygonsPolygonAttributeColorMap(meshId: MeshId): AttributeColorMap | undefined {
|
|
108
|
+
const name = meshPolygonsPolygonAttributeName(meshId);
|
|
109
|
+
const item = meshPolygonsPolygonAttributeItem(meshId);
|
|
110
|
+
const storedConfig = meshPolygonsPolygonAttributeStoredConfig(meshId, name, item);
|
|
99
111
|
return storedConfig.colorMap;
|
|
100
112
|
}
|
|
101
|
-
function meshPolygonsPolygonAttributeNoDataColor(
|
|
102
|
-
const name = meshPolygonsPolygonAttributeName(
|
|
103
|
-
const item = meshPolygonsPolygonAttributeItem(
|
|
104
|
-
const storedConfig = meshPolygonsPolygonAttributeStoredConfig(
|
|
113
|
+
function meshPolygonsPolygonAttributeNoDataColor(meshId: MeshId): RGBAColor {
|
|
114
|
+
const name = meshPolygonsPolygonAttributeName(meshId);
|
|
115
|
+
const item = meshPolygonsPolygonAttributeItem(meshId);
|
|
116
|
+
const storedConfig = meshPolygonsPolygonAttributeStoredConfig(meshId, name, item);
|
|
105
117
|
return storedConfig.no_data_color;
|
|
106
118
|
}
|
|
107
119
|
return {
|
|
@@ -114,19 +126,19 @@ function useMeshPolygonsPolygonAttributeConfigValues(): UseMeshPolygonsPolygonAt
|
|
|
114
126
|
function useMeshPolygonsPolygonAttributeConfigWriter(): UseMeshPolygonsPolygonAttributeConfigWriterReturn {
|
|
115
127
|
const meshPolygonsCommonStyle = useMeshPolygonsCommonStyle();
|
|
116
128
|
async function mutateMeshPolygonsPolygonStyle(
|
|
117
|
-
|
|
129
|
+
meshId: MeshId,
|
|
118
130
|
values: Record<string, unknown>,
|
|
119
131
|
): Promise<string> {
|
|
120
|
-
const result = await meshPolygonsCommonStyle.mutateMeshPolygonsPolygonStyle(
|
|
132
|
+
const result = await meshPolygonsCommonStyle.mutateMeshPolygonsPolygonStyle(meshId, values);
|
|
121
133
|
return result;
|
|
122
134
|
}
|
|
123
135
|
async function setMeshPolygonsPolygonAttributeStoredConfig(
|
|
124
|
-
|
|
125
|
-
name:
|
|
126
|
-
item:
|
|
136
|
+
meshId: MeshId,
|
|
137
|
+
name: AttributeName | undefined,
|
|
138
|
+
item: AttributeItem | undefined,
|
|
127
139
|
config: Partial<AttributeStoredConfig>,
|
|
128
140
|
): Promise<string> {
|
|
129
|
-
const result = await mutateMeshPolygonsPolygonStyle(
|
|
141
|
+
const result = await mutateMeshPolygonsPolygonStyle(meshId, {
|
|
130
142
|
storedConfigs: {
|
|
131
143
|
[name ?? ""]: {
|
|
132
144
|
lastItem: item,
|
|
@@ -4,6 +4,7 @@ import viewer_schemas, {
|
|
|
4
4
|
} from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
|
|
5
5
|
|
|
6
6
|
// Local imports
|
|
7
|
+
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
7
8
|
import { useMeshPolygonsCommonStyle } from "./common";
|
|
8
9
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
9
10
|
|
|
@@ -11,26 +12,26 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
|
11
12
|
const schema = viewer_schemas.opengeodeweb_viewer.mesh.apply_textures;
|
|
12
13
|
|
|
13
14
|
export function useMeshPolygonsTexturesStyle(): {
|
|
14
|
-
meshPolygonsTextures: (
|
|
15
|
+
meshPolygonsTextures: (meshId: MeshId) => MeshApplyTexturesParams["textures"] | undefined;
|
|
15
16
|
setMeshPolygonsTextures: (
|
|
16
|
-
|
|
17
|
+
meshId: MeshId,
|
|
17
18
|
textures: MeshApplyTexturesParams["textures"],
|
|
18
19
|
) => Promise<unknown>;
|
|
19
20
|
} {
|
|
20
21
|
const viewerStore = useViewerStore();
|
|
21
22
|
const meshPolygonsCommonStyle = useMeshPolygonsCommonStyle();
|
|
22
23
|
|
|
23
|
-
function meshPolygonsTextures(
|
|
24
|
+
function meshPolygonsTextures(meshId: MeshId): MeshApplyTexturesParams["textures"] | undefined {
|
|
24
25
|
// oxlint-disable-next-line no-unsafe-type-assertion -- textures shape is defined by the data style schema.
|
|
25
|
-
return meshPolygonsCommonStyle.meshPolygonsColoring(
|
|
26
|
+
return meshPolygonsCommonStyle.meshPolygonsColoring(meshId).textures as
|
|
26
27
|
| MeshApplyTexturesParams["textures"]
|
|
27
28
|
| undefined;
|
|
28
29
|
}
|
|
29
30
|
async function setMeshPolygonsTextures(
|
|
30
|
-
|
|
31
|
+
meshId: MeshId,
|
|
31
32
|
textures: MeshApplyTexturesParams["textures"],
|
|
32
33
|
): Promise<unknown> {
|
|
33
|
-
const params = { id, textures };
|
|
34
|
+
const params = { id: meshId, textures };
|
|
34
35
|
const result = await viewerStore.request(
|
|
35
36
|
{
|
|
36
37
|
schema,
|
|
@@ -38,7 +39,7 @@ export function useMeshPolygonsTexturesStyle(): {
|
|
|
38
39
|
},
|
|
39
40
|
{
|
|
40
41
|
response_function: async () => {
|
|
41
|
-
const mutateResult = await meshPolygonsCommonStyle.mutateMeshPolygonsStyle(
|
|
42
|
+
const mutateResult = await meshPolygonsCommonStyle.mutateMeshPolygonsStyle(meshId, {
|
|
42
43
|
coloring: { textures },
|
|
43
44
|
});
|
|
44
45
|
return mutateResult;
|
|
@@ -1,19 +1,26 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AttributeColorMap,
|
|
3
|
+
AttributeItem,
|
|
4
|
+
AttributeName,
|
|
5
|
+
AttributeRangeMaximum,
|
|
6
|
+
AttributeRangeMinimum,
|
|
7
|
+
AttributeTimeStep,
|
|
8
|
+
} from "@ogw_front/types/attribute";
|
|
1
9
|
import { DEFAULT_NO_DATA_COLOR, type RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
10
|
+
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
11
|
+
import type { ValidAttributeInput } from "@ogw_internal/stores/data_style/attribute_types";
|
|
12
|
+
import { isAttributeValid } from "@ogw_internal/stores/data_style/attribute_valid";
|
|
2
13
|
// Third party imports
|
|
3
14
|
import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
|
|
4
15
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
|
|
5
16
|
|
|
6
17
|
// Local imports
|
|
7
|
-
import {
|
|
8
|
-
type UseMeshPolygonsVertexAttributeStyleReturn,
|
|
9
|
-
type ValidAttributeInput,
|
|
10
|
-
isMeshPolygonsVertexAttributeValid,
|
|
11
|
-
} from "./vertex_attribute";
|
|
12
18
|
import {
|
|
13
19
|
useMeshPolygonsVertexAttributeConfig,
|
|
14
20
|
useMeshPolygonsVertexAttributeConfigValues,
|
|
15
21
|
useMeshPolygonsVertexAttributeConfigWriter,
|
|
16
22
|
} from "./vertex_config";
|
|
23
|
+
import type { UseMeshPolygonsVertexAttributeStyleReturn } from "./vertex_attribute";
|
|
17
24
|
import { getRGBPointsFromPreset } from "@ogw_front/utils/colormap";
|
|
18
25
|
import { useAttributeTimeStepStyle } from "@ogw_internal/stores/data_style/time_step";
|
|
19
26
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
@@ -41,11 +48,15 @@ function useMeshPolygonsVertexAttributeStyle(): UseMeshPolygonsVertexAttributeSt
|
|
|
41
48
|
} = useMeshPolygonsVertexAttributeConfigValues();
|
|
42
49
|
const { mutateMeshPolygonsVertexStyle, setMeshPolygonsVertexAttributeStoredConfig } =
|
|
43
50
|
useMeshPolygonsVertexAttributeConfigWriter();
|
|
44
|
-
function meshPolygonsVertexAttributeTimeStep(
|
|
45
|
-
return attributeTimeStep(
|
|
51
|
+
function meshPolygonsVertexAttributeTimeStep(meshId: MeshId): AttributeTimeStep | undefined {
|
|
52
|
+
return attributeTimeStep(
|
|
53
|
+
meshId,
|
|
54
|
+
attributeNamesSchema.$id,
|
|
55
|
+
meshPolygonsVertexAttribute(meshId).name,
|
|
56
|
+
);
|
|
46
57
|
}
|
|
47
58
|
async function setMeshPolygonsVertexAttribute(
|
|
48
|
-
|
|
59
|
+
meshId: MeshId,
|
|
49
60
|
{
|
|
50
61
|
name,
|
|
51
62
|
item,
|
|
@@ -55,11 +66,11 @@ function useMeshPolygonsVertexAttributeStyle(): UseMeshPolygonsVertexAttributeSt
|
|
|
55
66
|
no_data_color = DEFAULT_NO_DATA_COLOR,
|
|
56
67
|
}: ValidAttributeInput,
|
|
57
68
|
): Promise<unknown> {
|
|
58
|
-
await mutateMeshPolygonsVertexStyle(
|
|
69
|
+
await mutateMeshPolygonsVertexStyle(meshId, {
|
|
59
70
|
name,
|
|
60
71
|
item,
|
|
61
72
|
});
|
|
62
|
-
await setMeshPolygonsVertexAttributeStoredConfig(
|
|
73
|
+
await setMeshPolygonsVertexAttributeStoredConfig(meshId, name, item, {
|
|
63
74
|
minimum,
|
|
64
75
|
maximum,
|
|
65
76
|
colorMap,
|
|
@@ -68,8 +79,8 @@ function useMeshPolygonsVertexAttributeStyle(): UseMeshPolygonsVertexAttributeSt
|
|
|
68
79
|
const points = [...getRGBPointsFromPreset(colorMap)];
|
|
69
80
|
const schema = meshPolygonsVertexAttributeSchemas.attribute;
|
|
70
81
|
const params = {
|
|
71
|
-
id,
|
|
72
|
-
name: seriesArrayName(
|
|
82
|
+
id: meshId,
|
|
83
|
+
name: seriesArrayName(meshId, attributeNamesSchema.$id, name),
|
|
73
84
|
item,
|
|
74
85
|
points,
|
|
75
86
|
minimum,
|
|
@@ -81,10 +92,10 @@ function useMeshPolygonsVertexAttributeStyle(): UseMeshPolygonsVertexAttributeSt
|
|
|
81
92
|
params,
|
|
82
93
|
});
|
|
83
94
|
}
|
|
84
|
-
async function applyVertexAttribute(
|
|
85
|
-
const name = meshPolygonsVertexAttributeName(
|
|
86
|
-
const item = meshPolygonsVertexAttributeItem(
|
|
87
|
-
const storedConfig = meshPolygonsVertexAttributeStoredConfig(
|
|
95
|
+
async function applyVertexAttribute(meshId: MeshId): Promise<unknown> {
|
|
96
|
+
const name = meshPolygonsVertexAttributeName(meshId);
|
|
97
|
+
const item = meshPolygonsVertexAttributeItem(meshId);
|
|
98
|
+
const storedConfig = meshPolygonsVertexAttributeStoredConfig(meshId, name, item);
|
|
88
99
|
const attribute = {
|
|
89
100
|
name,
|
|
90
101
|
item,
|
|
@@ -93,73 +104,79 @@ function useMeshPolygonsVertexAttributeStyle(): UseMeshPolygonsVertexAttributeSt
|
|
|
93
104
|
colorMap: storedConfig.colorMap,
|
|
94
105
|
no_data_color: storedConfig.no_data_color,
|
|
95
106
|
};
|
|
96
|
-
if (
|
|
97
|
-
const result = await setMeshPolygonsVertexAttribute(
|
|
107
|
+
if (isAttributeValid(attribute)) {
|
|
108
|
+
const result = await setMeshPolygonsVertexAttribute(meshId, attribute);
|
|
98
109
|
return result;
|
|
99
110
|
}
|
|
100
111
|
return undefined;
|
|
101
112
|
}
|
|
102
|
-
async function setMeshPolygonsVertexAttributeName(
|
|
103
|
-
|
|
104
|
-
|
|
113
|
+
async function setMeshPolygonsVertexAttributeName(
|
|
114
|
+
meshId: MeshId,
|
|
115
|
+
name: AttributeName,
|
|
116
|
+
): Promise<unknown> {
|
|
117
|
+
const item = meshPolygonsVertexAttributeLastItem(meshId, name);
|
|
118
|
+
await mutateMeshPolygonsVertexStyle(meshId, {
|
|
105
119
|
name,
|
|
106
120
|
item,
|
|
107
121
|
});
|
|
108
|
-
return applyVertexAttribute(
|
|
122
|
+
return applyVertexAttribute(meshId);
|
|
109
123
|
}
|
|
110
|
-
async function setMeshPolygonsVertexAttributeItem(
|
|
111
|
-
|
|
124
|
+
async function setMeshPolygonsVertexAttributeItem(
|
|
125
|
+
meshId: MeshId,
|
|
126
|
+
item: AttributeItem,
|
|
127
|
+
): Promise<unknown> {
|
|
128
|
+
await mutateMeshPolygonsVertexStyle(meshId, {
|
|
112
129
|
item,
|
|
113
130
|
});
|
|
114
|
-
return applyVertexAttribute(
|
|
131
|
+
return applyVertexAttribute(meshId);
|
|
115
132
|
}
|
|
116
133
|
async function setMeshPolygonsVertexAttributeTimeStep(
|
|
117
|
-
|
|
118
|
-
timeStep:
|
|
134
|
+
meshId: MeshId,
|
|
135
|
+
timeStep: AttributeTimeStep,
|
|
119
136
|
): Promise<unknown> {
|
|
120
|
-
const name = meshPolygonsVertexAttributeName(
|
|
137
|
+
const name = meshPolygonsVertexAttributeName(meshId);
|
|
121
138
|
if (name === undefined) {
|
|
122
139
|
return undefined;
|
|
123
140
|
}
|
|
124
|
-
await setAttributeTimeStep(
|
|
125
|
-
return applyVertexAttribute(
|
|
141
|
+
await setAttributeTimeStep(meshId, attributeNamesSchema.$id, name, timeStep);
|
|
142
|
+
return applyVertexAttribute(meshId);
|
|
126
143
|
}
|
|
127
144
|
async function setMeshPolygonsVertexAttributeRange(
|
|
128
|
-
|
|
129
|
-
minimum:
|
|
130
|
-
maximum:
|
|
145
|
+
meshId: MeshId,
|
|
146
|
+
minimum: AttributeRangeMinimum,
|
|
147
|
+
maximum: AttributeRangeMaximum,
|
|
131
148
|
): Promise<unknown> {
|
|
132
|
-
const name = meshPolygonsVertexAttributeName(
|
|
133
|
-
const item = meshPolygonsVertexAttributeItem(
|
|
134
|
-
await setMeshPolygonsVertexAttributeStoredConfig(
|
|
149
|
+
const name = meshPolygonsVertexAttributeName(meshId);
|
|
150
|
+
const item = meshPolygonsVertexAttributeItem(meshId);
|
|
151
|
+
await setMeshPolygonsVertexAttributeStoredConfig(meshId, name, item, {
|
|
135
152
|
minimum,
|
|
136
153
|
maximum,
|
|
137
154
|
});
|
|
138
|
-
return applyVertexAttribute(
|
|
155
|
+
return applyVertexAttribute(meshId);
|
|
139
156
|
}
|
|
140
157
|
async function setMeshPolygonsVertexAttributeColorMap(
|
|
141
|
-
|
|
142
|
-
colorMap:
|
|
158
|
+
meshId: MeshId,
|
|
159
|
+
colorMap: AttributeColorMap | undefined,
|
|
143
160
|
): Promise<unknown> {
|
|
144
|
-
const name = meshPolygonsVertexAttributeName(
|
|
145
|
-
const item = meshPolygonsVertexAttributeItem(
|
|
146
|
-
await setMeshPolygonsVertexAttributeStoredConfig(
|
|
161
|
+
const name = meshPolygonsVertexAttributeName(meshId);
|
|
162
|
+
const item = meshPolygonsVertexAttributeItem(meshId);
|
|
163
|
+
await setMeshPolygonsVertexAttributeStoredConfig(meshId, name, item, {
|
|
147
164
|
colorMap,
|
|
148
165
|
});
|
|
149
|
-
return applyVertexAttribute(
|
|
166
|
+
return applyVertexAttribute(meshId);
|
|
150
167
|
}
|
|
151
168
|
async function setMeshPolygonsVertexAttributeNoDataColor(
|
|
152
|
-
|
|
169
|
+
meshId: MeshId,
|
|
153
170
|
no_data_color: RGBAColor,
|
|
154
171
|
): Promise<unknown> {
|
|
155
|
-
const name = meshPolygonsVertexAttributeName(
|
|
156
|
-
const item = meshPolygonsVertexAttributeItem(
|
|
157
|
-
const storedConfig = meshPolygonsVertexAttributeStoredConfig(
|
|
158
|
-
await setMeshPolygonsVertexAttributeStoredConfig(
|
|
172
|
+
const name = meshPolygonsVertexAttributeName(meshId);
|
|
173
|
+
const item = meshPolygonsVertexAttributeItem(meshId);
|
|
174
|
+
const storedConfig = meshPolygonsVertexAttributeStoredConfig(meshId, name, item);
|
|
175
|
+
await setMeshPolygonsVertexAttributeStoredConfig(meshId, name, item, {
|
|
159
176
|
...storedConfig,
|
|
160
177
|
no_data_color,
|
|
161
178
|
});
|
|
162
|
-
return applyVertexAttribute(
|
|
179
|
+
return applyVertexAttribute(meshId);
|
|
163
180
|
}
|
|
164
181
|
return {
|
|
165
182
|
meshPolygonsVertexAttributeName,
|
|
@@ -179,4 +196,3 @@ function useMeshPolygonsVertexAttributeStyle(): UseMeshPolygonsVertexAttributeSt
|
|
|
179
196
|
};
|
|
180
197
|
}
|
|
181
198
|
export { useMeshPolygonsVertexAttributeStyle };
|
|
182
|
-
export { isMeshPolygonsVertexAttributeValid } from "./vertex_attribute";
|