@equinor/videx-3d 5.1.0-beta
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/LICENSE.md +21 -0
- package/README.md +120 -0
- package/dist/chunk-BX-cez1_.js +23 -0
- package/dist/chunk-CnY6Tmof.js +358 -0
- package/dist/chunk-MFzFdEWm.js +591 -0
- package/dist/chunk-iY0wQ9Z6.js +887 -0
- package/dist/generators.js +711 -0
- package/dist/main.js +8405 -0
- package/dist/sdk.js +610 -0
- package/dist/shaderLib/color-conversion.glsl +33 -0
- package/dist/shaderLib/colors.glsl +8 -0
- package/dist/shaderLib/glyphs.glsl +78 -0
- package/dist/shaderLib/random.glsl +3 -0
- package/dist/shaderLib/remap.glsl +13 -0
- package/dist/shaderLib/render-number.glsl +74 -0
- package/dist/shaderLib/render-text.glsl +66 -0
- package/dist/shaderLib/rotation.glsl +19 -0
- package/dist/shaderLib/sdf-functions.glsl +18 -0
- package/dist/textures/normal_map.jpg +0 -0
- package/dist/types/common/color-ramps.d.ts +5 -0
- package/dist/types/common/types.d.ts +25 -0
- package/dist/types/components/Annotations/Annotations.d.ts +42 -0
- package/dist/types/components/Annotations/AnnotationsHMTL.d.ts +1 -0
- package/dist/types/components/Annotations/AnnotationsLayer.d.ts +46 -0
- package/dist/types/components/Annotations/AutoUpdate.d.ts +3 -0
- package/dist/types/components/Annotations/DefaultLabelComponent.d.ts +11 -0
- package/dist/types/components/Annotations/TestAnnotations.d.ts +12 -0
- package/dist/types/components/Annotations/annotations-renderer.d.ts +26 -0
- package/dist/types/components/Annotations/annotations-state.d.ts +88 -0
- package/dist/types/components/Annotations/helpers.d.ts +11 -0
- package/dist/types/components/Annotations/index.d.ts +8 -0
- package/dist/types/components/Annotations/types.d.ts +80 -0
- package/dist/types/components/Annotations/update-annotations.d.ts +12 -0
- package/dist/types/components/CameraTargetMarker/CameraTargetMarker.d.ts +29 -0
- package/dist/types/components/Distance/Distance.d.ts +35 -0
- package/dist/types/components/Distance/DistanceContext.d.ts +12 -0
- package/dist/types/components/Distance/index.d.ts +2 -0
- package/dist/types/components/EventEmitter/EventEmitter.d.ts +20 -0
- package/dist/types/components/EventEmitter/EventEmitterContext.d.ts +90 -0
- package/dist/types/components/EventEmitter/index.d.ts +3 -0
- package/dist/types/components/EventEmitter/picking-helper.d.ts +32 -0
- package/dist/types/components/EventEmitter/picking-material.d.ts +11 -0
- package/dist/types/components/Grids/BoxGrid/BoxGrid.d.ts +52 -0
- package/dist/types/components/Grids/Grid/Grid.d.ts +62 -0
- package/dist/types/components/Grids/Grid/GridAxesLabels.d.ts +24 -0
- package/dist/types/components/Grids/Grid/UtmGrid.d.ts +30 -0
- package/dist/types/components/Grids/Grid/grid-helpers.d.ts +2 -0
- package/dist/types/components/Grids/index.d.ts +5 -0
- package/dist/types/components/Highlighter/Highlighter.d.ts +23 -0
- package/dist/types/components/Highlighter/highlight-state.d.ts +43 -0
- package/dist/types/components/Highlighter/index.d.ts +2 -0
- package/dist/types/components/Html/DepthSelector.d.ts +1 -0
- package/dist/types/components/Html/OutputPanel/OutputPanel.d.ts +10 -0
- package/dist/types/components/Html/OutputPanel/index.d.ts +2 -0
- package/dist/types/components/Html/OutputPanel/output-panel-state.d.ts +38 -0
- package/dist/types/components/Html/Panel/Panel.d.ts +20 -0
- package/dist/types/components/Html/WellMap/ActiveTrack.d.ts +9 -0
- package/dist/types/components/Html/WellMap/DepthCursor.d.ts +8 -0
- package/dist/types/components/Html/WellMap/DepthReadout.d.ts +6 -0
- package/dist/types/components/Html/WellMap/Schematic.d.ts +15 -0
- package/dist/types/components/Html/WellMap/Track.d.ts +13 -0
- package/dist/types/components/Html/WellMap/WellMap.d.ts +47 -0
- package/dist/types/components/Html/WellMap/addons/WellMapCasingShoes.d.ts +14 -0
- package/dist/types/components/Html/WellMap/addons/WellMapCompletionIntervals.d.ts +15 -0
- package/dist/types/components/Html/WellMap/addons/WellMapFormations.d.ts +14 -0
- package/dist/types/components/Html/WellMap/addons/WellMapTvd.d.ts +14 -0
- package/dist/types/components/Html/WellMap/addons/index.d.ts +4 -0
- package/dist/types/components/Html/WellMap/index.d.ts +4 -0
- package/dist/types/components/Html/WellMap/themes.d.ts +13 -0
- package/dist/types/components/Html/WellMap/well-map-context.d.ts +34 -0
- package/dist/types/components/Html/WellMap/well-map-state.d.ts +38 -0
- package/dist/types/components/Html/index.d.ts +5 -0
- package/dist/types/components/ObservableGroup/ObservableGroup.d.ts +38 -0
- package/dist/types/components/SDFTest/SDFTest.d.ts +12 -0
- package/dist/types/components/Surfaces/Surface.d.ts +46 -0
- package/dist/types/components/Surfaces/SurfaceMaterial.d.ts +53 -0
- package/dist/types/components/Surfaces/index.d.ts +4 -0
- package/dist/types/components/Surfaces/surface-defs.d.ts +7 -0
- package/dist/types/components/Symbol/Symbol.d.ts +45 -0
- package/dist/types/components/Symbol/index.d.ts +1 -0
- package/dist/types/components/UtmArea/UtmArea.d.ts +37 -0
- package/dist/types/components/UtmArea/UtmAreaContext.d.ts +32 -0
- package/dist/types/components/UtmArea/UtmPosition.d.ts +26 -0
- package/dist/types/components/UtmArea/Wgs84Position.d.ts +26 -0
- package/dist/types/components/UtmArea/index.d.ts +4 -0
- package/dist/types/components/Wellbores/BasicTrajectory/BasicTrajectory.d.ts +27 -0
- package/dist/types/components/Wellbores/BasicTrajectory/basic-trajectory-defs.d.ts +3 -0
- package/dist/types/components/Wellbores/BasicTrajectory/index.d.ts +2 -0
- package/dist/types/components/Wellbores/Casings/CasingAnnotations/CasingAnnotations.d.ts +9 -0
- package/dist/types/components/Wellbores/Casings/CasingAnnotations/CasingLabel.d.ts +9 -0
- package/dist/types/components/Wellbores/Casings/CasingAnnotations/casing-annotations-defs.d.ts +1 -0
- package/dist/types/components/Wellbores/Casings/Casings.d.ts +42 -0
- package/dist/types/components/Wellbores/Casings/casings-defs.d.ts +6 -0
- package/dist/types/components/Wellbores/Casings/index.d.ts +5 -0
- package/dist/types/components/Wellbores/CompletionTools/CompletionAnnotations/CompletionAnnotations.d.ts +9 -0
- package/dist/types/components/Wellbores/CompletionTools/CompletionAnnotations/completion-annotations-defs.d.ts +1 -0
- package/dist/types/components/Wellbores/CompletionTools/CompletionTools.d.ts +31 -0
- package/dist/types/components/Wellbores/CompletionTools/Screen/screen-material.d.ts +8 -0
- package/dist/types/components/Wellbores/CompletionTools/completion-tools-defs.d.ts +4 -0
- package/dist/types/components/Wellbores/CompletionTools/index.d.ts +5 -0
- package/dist/types/components/Wellbores/DepthMarkers/DepthMarkerLabel.d.ts +11 -0
- package/dist/types/components/Wellbores/DepthMarkers/DepthMarkers.d.ts +27 -0
- package/dist/types/components/Wellbores/DepthMarkers/depth-markers-defs.d.ts +1 -0
- package/dist/types/components/Wellbores/DepthMarkers/index.d.ts +3 -0
- package/dist/types/components/Wellbores/FormationMarkers/FormationMarkerLabel.d.ts +10 -0
- package/dist/types/components/Wellbores/FormationMarkers/FormationMarkers.d.ts +33 -0
- package/dist/types/components/Wellbores/FormationMarkers/formation-markers-defs.d.ts +3 -0
- package/dist/types/components/Wellbores/FormationMarkers/index.d.ts +3 -0
- package/dist/types/components/Wellbores/Perforations/Perforations.d.ts +32 -0
- package/dist/types/components/Wellbores/Perforations/index.d.ts +2 -0
- package/dist/types/components/Wellbores/Perforations/perforations-defs.d.ts +3 -0
- package/dist/types/components/Wellbores/Perimeter/Perimeter.d.ts +29 -0
- package/dist/types/components/Wellbores/Perimeter/index.d.ts +2 -0
- package/dist/types/components/Wellbores/Perimeter/perimeter-defs.d.ts +3 -0
- package/dist/types/components/Wellbores/PositionMarkers/PositionMarkers.d.ts +12 -0
- package/dist/types/components/Wellbores/PositionMarkers/position-markers-defs.d.ts +3 -0
- package/dist/types/components/Wellbores/Shoes/Shoes.d.ts +34 -0
- package/dist/types/components/Wellbores/Shoes/index.d.ts +2 -0
- package/dist/types/components/Wellbores/Shoes/shoes-defs.d.ts +3 -0
- package/dist/types/components/Wellbores/TubeTrajectory/TubeTrajectory.d.ts +25 -0
- package/dist/types/components/Wellbores/TubeTrajectory/index.d.ts +2 -0
- package/dist/types/components/Wellbores/TubeTrajectory/tube-geometry-defs.d.ts +3 -0
- package/dist/types/components/Wellbores/Wellbore/Wellbore.d.ts +45 -0
- package/dist/types/components/Wellbores/Wellbore/WellboreContext.d.ts +19 -0
- package/dist/types/components/Wellbores/Wellbore/index.d.ts +2 -0
- package/dist/types/components/Wellbores/WellboreBounds/WellboreBounds.d.ts +47 -0
- package/dist/types/components/Wellbores/WellboreBounds/index.d.ts +2 -0
- package/dist/types/components/Wellbores/WellboreBounds/wellbore-bounds-defs.d.ts +1 -0
- package/dist/types/components/Wellbores/WellboreFormationColumn/WellboreFormationColumn.d.ts +30 -0
- package/dist/types/components/Wellbores/WellboreFormationColumn/index.d.ts +2 -0
- package/dist/types/components/Wellbores/WellboreFormationColumn/wellbore-formation-column-defs.d.ts +3 -0
- package/dist/types/components/Wellbores/WellboreLabel/WellboreAnnotationLabel.d.ts +10 -0
- package/dist/types/components/Wellbores/WellboreLabel/WellboreLabel.d.ts +25 -0
- package/dist/types/components/Wellbores/WellboreLabel/index.d.ts +3 -0
- package/dist/types/components/Wellbores/WellboreLabel/wellbore-label-defs.d.ts +1 -0
- package/dist/types/components/Wellbores/WellboreRibbon/WellboreRibbon.d.ts +22 -0
- package/dist/types/components/Wellbores/WellboreRibbon/WellboreRibbonContext.d.ts +16 -0
- package/dist/types/components/Wellbores/WellboreRibbon/index.d.ts +4 -0
- package/dist/types/components/Wellbores/WellboreRibbon/stripes/FormationsStripe.d.ts +30 -0
- package/dist/types/components/Wellbores/WellboreRibbon/stripes/MeasuredDepthStripe.d.ts +28 -0
- package/dist/types/components/Wellbores/WellboreSeismicSection/WellboreSeismicSection.d.ts +34 -0
- package/dist/types/components/Wellbores/WellboreSeismicSection/index.d.ts +2 -0
- package/dist/types/components/Wellbores/WellboreSeismicSection/wellbore-seismic-section-defs.d.ts +12 -0
- package/dist/types/components/Wellbores/Wells/Wells.d.ts +43 -0
- package/dist/types/components/Wellbores/Wells/index.d.ts +1 -0
- package/dist/types/contexts/DataContext.d.ts +15 -0
- package/dist/types/contexts/DataContextProvider.d.ts +33 -0
- package/dist/types/contexts/GeneratorsContext.d.ts +13 -0
- package/dist/types/contexts/GeneratorsContextProvider.d.ts +34 -0
- package/dist/types/contexts/GlyphsContext.d.ts +19 -0
- package/dist/types/contexts/GlyphsContextProvider.d.ts +29 -0
- package/dist/types/events/camera-events.d.ts +34 -0
- package/dist/types/events/depth-events.d.ts +22 -0
- package/dist/types/events/interaction-events.d.ts +7 -0
- package/dist/types/events/wellbore-events.d.ts +46 -0
- package/dist/types/generators/basic-trajectory-generator.d.ts +2 -0
- package/dist/types/generators/casing-annotations-generator.d.ts +8 -0
- package/dist/types/generators/casings-generator.d.ts +4 -0
- package/dist/types/generators/completion-annotations-generator.d.ts +7 -0
- package/dist/types/generators/completion-tools-generator.d.ts +2 -0
- package/dist/types/generators/depth-markers-generator.d.ts +3 -0
- package/dist/types/generators/formation-markers-generator.d.ts +2 -0
- package/dist/types/generators/index.d.ts +20 -0
- package/dist/types/generators/perforations-generator.d.ts +2 -0
- package/dist/types/generators/perimieter-generator.d.ts +2 -0
- package/dist/types/generators/position-markers-generator.d.ts +2 -0
- package/dist/types/generators/shoes-generator.d.ts +2 -0
- package/dist/types/generators/surface-generator.d.ts +4 -0
- package/dist/types/generators/tube-trajectory-generator.d.ts +2 -0
- package/dist/types/generators/wellbore-bounds-generator.d.ts +2 -0
- package/dist/types/generators/wellbore-formation-column-generator.d.ts +2 -0
- package/dist/types/generators/wellbore-label-generator.d.ts +7 -0
- package/dist/types/generators/wellbore-seismic-section-generator.d.ts +3 -0
- package/dist/types/hooks/useData.d.ts +25 -0
- package/dist/types/hooks/useGenerator.d.ts +43 -0
- package/dist/types/hooks/useWellboreContext.d.ts +13 -0
- package/dist/types/layers/layers.d.ts +6 -0
- package/dist/types/main.d.ts +48 -0
- package/dist/types/rendering/fullscreen-renderer.d.ts +9 -0
- package/dist/types/rendering/index.d.ts +2 -0
- package/dist/types/rendering/render-passes.d.ts +16 -0
- package/dist/types/sdk/data/DataLoader.d.ts +54 -0
- package/dist/types/sdk/data/GeneratorRegistry.d.ts +15 -0
- package/dist/types/sdk/data/Store.d.ts +29 -0
- package/dist/types/sdk/data/helpers/formations-helpers.d.ts +24 -0
- package/dist/types/sdk/data/helpers/well-helpers.d.ts +9 -0
- package/dist/types/sdk/data/types/Casing.d.ts +8 -0
- package/dist/types/sdk/data/types/CompletionTool.d.ts +11 -0
- package/dist/types/sdk/data/types/DepthReferencePoint.d.ts +1 -0
- package/dist/types/sdk/data/types/Formation.d.ts +32 -0
- package/dist/types/sdk/data/types/PerforationInterval.d.ts +9 -0
- package/dist/types/sdk/data/types/Pick.d.ts +8 -0
- package/dist/types/sdk/data/types/PositionLog.d.ts +17 -0
- package/dist/types/sdk/data/types/StratColumn.d.ts +18 -0
- package/dist/types/sdk/data/types/SurfaceMeta.d.ts +23 -0
- package/dist/types/sdk/data/types/SurfaceValues.d.ts +1 -0
- package/dist/types/sdk/data/types/Symbol.d.ts +6 -0
- package/dist/types/sdk/data/types/VerticalSlice.d.ts +9 -0
- package/dist/types/sdk/data/types/WellboreHeader.d.ts +15 -0
- package/dist/types/sdk/data/types/index.d.ts +11 -0
- package/dist/types/sdk/geometries/curve/curve-3d.d.ts +46 -0
- package/dist/types/sdk/geometries/curve/tube-geometry.d.ts +34 -0
- package/dist/types/sdk/geometries/delatin.d.ts +44 -0
- package/dist/types/sdk/geometries/fence.d.ts +3 -0
- package/dist/types/sdk/geometries/packing.d.ts +46 -0
- package/dist/types/sdk/geometries/triangulate-grid-delaunay.d.ts +8 -0
- package/dist/types/sdk/geometries/triangulate-grid.d.ts +28 -0
- package/dist/types/sdk/index.d.ts +39 -0
- package/dist/types/sdk/managers/CameraManager.d.ts +11 -0
- package/dist/types/sdk/managers/WellboreManager.d.ts +18 -0
- package/dist/types/sdk/materials/depth-material.d.ts +4 -0
- package/dist/types/sdk/materials/ribbon-material.d.ts +24 -0
- package/dist/types/sdk/materials/tube-material.d.ts +7 -0
- package/dist/types/sdk/materials/uv-material.d.ts +2 -0
- package/dist/types/sdk/projection/crs.d.ts +37 -0
- package/dist/types/sdk/types/common.d.ts +4 -0
- package/dist/types/sdk/utils/array.d.ts +0 -0
- package/dist/types/sdk/utils/colors.d.ts +2 -0
- package/dist/types/sdk/utils/conversions.d.ts +5 -0
- package/dist/types/sdk/utils/depth-reader.d.ts +5 -0
- package/dist/types/sdk/utils/elevation-map.d.ts +15 -0
- package/dist/types/sdk/utils/glyphs.d.ts +50 -0
- package/dist/types/sdk/utils/irapbin-parser.d.ts +17 -0
- package/dist/types/sdk/utils/num-array.d.ts +2 -0
- package/dist/types/sdk/utils/numbers.d.ts +5 -0
- package/dist/types/sdk/utils/packing.d.ts +1 -0
- package/dist/types/sdk/utils/scene.d.ts +2 -0
- package/dist/types/sdk/utils/segments.d.ts +4 -0
- package/dist/types/sdk/utils/strings.d.ts +2 -0
- package/dist/types/sdk/utils/trajectory.d.ts +59 -0
- package/dist/types/sdk/utils/trigonometry.d.ts +12 -0
- package/dist/types/sdk/utils/typed-2d-array.d.ts +52 -0
- package/dist/types/sdk/utils/typed-array.d.ts +2 -0
- package/dist/types/sdk/utils/vector-operations.d.ts +29 -0
- package/package.json +127 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { InstancedBufferGeometry } from 'three';
|
|
2
|
+
import { Trajectory, Vec3 } from '../../../sdk';
|
|
3
|
+
/**
|
|
4
|
+
* WellboreRibbonContext props
|
|
5
|
+
* @expand
|
|
6
|
+
*/
|
|
7
|
+
export type WellboreRibbonContextProps = {
|
|
8
|
+
trajectory: Trajectory;
|
|
9
|
+
geometry: InstancedBufferGeometry;
|
|
10
|
+
direction: Vec3;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* WellboreRibbon context
|
|
14
|
+
* @group Contexts
|
|
15
|
+
*/
|
|
16
|
+
export declare const WellboreRibbonContext: import('react').Context<WellboreRibbonContextProps | null>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Formation } from '../../../../sdk';
|
|
2
|
+
/**
|
|
3
|
+
* FormationsStripe props
|
|
4
|
+
* @expand
|
|
5
|
+
*/
|
|
6
|
+
export type FormationsStripeProps = {
|
|
7
|
+
width: number;
|
|
8
|
+
offset: number;
|
|
9
|
+
formationData: Formation[] | null;
|
|
10
|
+
level?: number;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* This is a stripe component used with the WellboreRibbon component for visualizing
|
|
14
|
+
* formations along a wellbore trajectory.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <WellboreRibbon>
|
|
18
|
+
* <FormationsStripe ... />
|
|
19
|
+
* </WellboreRibbon>
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* This is an experimental component and may be changed/removed
|
|
23
|
+
*
|
|
24
|
+
* @see [Storybook](/videx-3d/?path=/docs/components-wellbores-wellboreformationcolumn--docs)
|
|
25
|
+
* @see {@link WellboreRibbon}
|
|
26
|
+
* @see {@link WellboreRibbonContext}
|
|
27
|
+
*
|
|
28
|
+
* @group Components
|
|
29
|
+
*/
|
|
30
|
+
export declare const FormationsStripe: ({ width, offset, formationData, level, }: FormationsStripeProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MeasuredDepthStripe props
|
|
3
|
+
* @expand
|
|
4
|
+
*/
|
|
5
|
+
export type MeasuredDepthStripeProps = {
|
|
6
|
+
width: number;
|
|
7
|
+
offset: number;
|
|
8
|
+
stepSize?: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* This is a stripe component used with the WellboreRibbon component for adding a measured
|
|
12
|
+
* depth scale along a wellbore trajectory.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* <WellboreRibbon>
|
|
16
|
+
* <MeasuredDepthStripe ... />
|
|
17
|
+
* </WellboreRibbon>
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* This is an experimental component and may be changed/removed
|
|
21
|
+
*
|
|
22
|
+
* @see [Storybook](/videx-3d/?path=/docs/components-wellbores-wellboreformationcolumn--docs)
|
|
23
|
+
* @see {@link WellboreRibbon}
|
|
24
|
+
* @see {@link WellboreRibbonContext}
|
|
25
|
+
*
|
|
26
|
+
* @group Components
|
|
27
|
+
*/
|
|
28
|
+
export declare const MeasuredDepthStripe: ({ width, offset, stepSize, }: MeasuredDepthStripeProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { CommonComponentProps, PointerEvents } from '../../../main';
|
|
2
|
+
/**
|
|
3
|
+
* WellboreSeismicSection props
|
|
4
|
+
* @expand
|
|
5
|
+
*/
|
|
6
|
+
export type WellboreSeismicSectionProps = CommonComponentProps & PointerEvents & {
|
|
7
|
+
id: string;
|
|
8
|
+
opacity?: number;
|
|
9
|
+
stepSize?: number;
|
|
10
|
+
minSize?: number;
|
|
11
|
+
extension?: number;
|
|
12
|
+
rangeOffset?: number;
|
|
13
|
+
colorRampIndex?: number;
|
|
14
|
+
defaultExtensionAngle?: number;
|
|
15
|
+
priority?: number;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Renders a seismic fence along the trajectory of a wellbore.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* <WellboreSeismicSection
|
|
22
|
+
* id={wellbore.id}
|
|
23
|
+
* stepSize={3}
|
|
24
|
+
* extension={1000}
|
|
25
|
+
* minSize={1000}
|
|
26
|
+
* opacity={0.9}
|
|
27
|
+
* />
|
|
28
|
+
*
|
|
29
|
+
* @see [Storybook](/videx-3d/?path=/docs/components-wellbores-seismicsection--docs)
|
|
30
|
+
* @see {@link Wellbore}
|
|
31
|
+
*
|
|
32
|
+
* @group Components
|
|
33
|
+
*/
|
|
34
|
+
export declare const WellboreSeismicSection: ({ id, opacity, stepSize, extension, minSize, rangeOffset, colorRampIndex, defaultExtensionAngle, priority, name, userData, receiveShadow, castShadow, layers, position, renderOrder, visible, onPointerClick, onPointerEnter, onPointerLeave, onPointerMove, }: WellboreSeismicSectionProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/types/components/Wellbores/WellboreSeismicSection/wellbore-seismic-section-defs.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PackedBufferGeometry } from '../../../sdk';
|
|
2
|
+
export declare const wellboreSeismicSection = "wellboreSeismicSection";
|
|
3
|
+
export type WellboreSeismicSectionGeneratorResponse = {
|
|
4
|
+
geometry: PackedBufferGeometry;
|
|
5
|
+
data: {
|
|
6
|
+
array: Float32Array;
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
min: number;
|
|
10
|
+
max: number;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { WellboreHeader } from '../../../sdk/data/types/WellboreHeader';
|
|
3
|
+
/**
|
|
4
|
+
* Wells props
|
|
5
|
+
* @expand
|
|
6
|
+
*/
|
|
7
|
+
export type WellsProps = {
|
|
8
|
+
wellbores: WellboreHeader[];
|
|
9
|
+
included?: string[];
|
|
10
|
+
selected?: string;
|
|
11
|
+
renderWellbore?: (wellbore: WellboreHeader, startMsl: number, isSelected: boolean, isActiveWell: boolean, sequence: number, index: number) => ReactNode;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
};
|
|
14
|
+
export type WellsRefType = {
|
|
15
|
+
getHeader: (id: string) => WellboreHeader;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* The `Wells` component is used to group and manage trajectories by the well property. It will
|
|
19
|
+
* automatically calculate of top depths for each wellbore, depending on order and which wellbores are marked
|
|
20
|
+
* as being included.
|
|
21
|
+
*
|
|
22
|
+
* It simplifies rendering of `Wellbore` components through the `renderWellbore` property, which gives usesful
|
|
23
|
+
* data that can be passed to the wellbore component.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* <Wells
|
|
27
|
+
* wellbores={wellbores}
|
|
28
|
+
* included={included}
|
|
29
|
+
* selected={selected}
|
|
30
|
+
* renderWellbore={(wellbore, fromMsl, isSelected) => {
|
|
31
|
+
* return (
|
|
32
|
+
* <Wellbore id={wellbore.id} fromMsl={fromMsl} color={isSelected ? 'red' : 'white' }>
|
|
33
|
+
* {...}
|
|
34
|
+
* </Wellbore>
|
|
35
|
+
* )
|
|
36
|
+
* }}
|
|
37
|
+
* />
|
|
38
|
+
*
|
|
39
|
+
* @see [Storybook](/videx-3d/?path=/docs/components-wellbores-wells--docs)
|
|
40
|
+
*
|
|
41
|
+
* @group Components
|
|
42
|
+
*/
|
|
43
|
+
export declare const Wells: import('react').ForwardRefExoticComponent<WellsProps & import('react').RefAttributes<WellsRefType>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Wells';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Store } from '../sdk';
|
|
2
|
+
/**
|
|
3
|
+
* DataContext props
|
|
4
|
+
* @expand
|
|
5
|
+
*/
|
|
6
|
+
export type DataContextProps = {
|
|
7
|
+
isRemote: boolean;
|
|
8
|
+
connect: () => Store | null;
|
|
9
|
+
connectByMessagePort: () => Promise<MessagePort>;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Data context
|
|
13
|
+
* @group Contexts
|
|
14
|
+
*/
|
|
15
|
+
export declare const DataContext: import('react').Context<DataContextProps | null>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Remote } from 'comlink';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { Store } from '../sdk/data/Store';
|
|
4
|
+
/**
|
|
5
|
+
* DataProvider props
|
|
6
|
+
* @expand
|
|
7
|
+
*/
|
|
8
|
+
export type DataProviderProps = {
|
|
9
|
+
store: Store | Remote<Store>;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Provides sub components with the `DataContext`, which allow connecting to the
|
|
14
|
+
* `Store` implementation. You can create your own provider if needed, but it will need to
|
|
15
|
+
* provide an implementation of the `DataContext`.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* <DataProvider store={store}>
|
|
19
|
+
* { ... }
|
|
20
|
+
* </DataProvider>
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* Components should use the `useData` hook to access the store. Generator functions
|
|
24
|
+
* will have the store injected by the `GeneratorsProvider` provider component.
|
|
25
|
+
*
|
|
26
|
+
* @see {@link Store}
|
|
27
|
+
* @see {@link DataContext}
|
|
28
|
+
* @see {@link useData}
|
|
29
|
+
* @see [Data](/videx-3d/docs/documents/data.html)
|
|
30
|
+
*
|
|
31
|
+
* @group Components
|
|
32
|
+
*/
|
|
33
|
+
export declare const DataProvider: ({ store, children }: DataProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type GeneratorContextProps = {
|
|
2
|
+
invoke: <T>(key: string, priority: number, args: any[]) => Promise<T>;
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* Generators context
|
|
6
|
+
*
|
|
7
|
+
* @see {@link sdk.GeneratorRegistry}
|
|
8
|
+
* @see {@link GeneratorsProvider}
|
|
9
|
+
* @see [Generators](/videx-3d/docs/documents/generators.html)
|
|
10
|
+
*
|
|
11
|
+
* @group Contexts
|
|
12
|
+
*/
|
|
13
|
+
export declare const GeneratorsContext: import('react').Context<GeneratorContextProps | null>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Remote } from 'comlink';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { GeneratorRegistry } from '../sdk/data/GeneratorRegistry';
|
|
4
|
+
/**
|
|
5
|
+
* GeneratorsProvider props
|
|
6
|
+
* @expand
|
|
7
|
+
*/
|
|
8
|
+
export type GeneratorsProviderProps = {
|
|
9
|
+
registry: GeneratorRegistry | Remote<GeneratorRegistry>;
|
|
10
|
+
concurrency?: number;
|
|
11
|
+
signal?: AbortSignal;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Provides sub components with the `GeneratorRegistry`, which allow access to the
|
|
16
|
+
* registered _generator_ functions. You can create your own provider if needed, but it will need to
|
|
17
|
+
* provide an implementation of the `GeneratorsContext`.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <GeneratorsProvider registry={registry}>
|
|
21
|
+
* { ... }
|
|
22
|
+
* </GeneratorsProvider>
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* Components should use the `useGenerator` hook to access generator functions.
|
|
26
|
+
*
|
|
27
|
+
* @see {@link GeneratorRegistry}
|
|
28
|
+
* @see {@link GeneratorsContext}
|
|
29
|
+
* @see {@link useGenerator}
|
|
30
|
+
* @see [Generators](/videx-3d/docs/documents/generators.html)
|
|
31
|
+
*
|
|
32
|
+
* @group Components
|
|
33
|
+
*/
|
|
34
|
+
export declare const GeneratorsProvider: ({ registry, concurrency, signal, children, }: GeneratorsProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Texture, UniformsGroup } from 'three';
|
|
2
|
+
import { EncodedTextSegment, EncodedTextTexture } from '../sdk/utils/glyphs';
|
|
3
|
+
/**
|
|
4
|
+
* GlyphsContext props
|
|
5
|
+
* @expand
|
|
6
|
+
*/
|
|
7
|
+
export type GlyphsContextProps = {
|
|
8
|
+
glyphAtlas: Texture;
|
|
9
|
+
glyphsCount: number;
|
|
10
|
+
glyphData: UniformsGroup;
|
|
11
|
+
encodeText: (text: string) => EncodedTextSegment;
|
|
12
|
+
encodeTextTexture: (textSegments: string[] | string) => EncodedTextTexture;
|
|
13
|
+
dispose: () => void;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Glyphs context
|
|
17
|
+
* @group Contexts
|
|
18
|
+
*/
|
|
19
|
+
export declare const GlyphsContext: import('react').Context<GlyphsContextProps | null>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* GlyphsProvider props
|
|
4
|
+
* @expand
|
|
5
|
+
*/
|
|
6
|
+
export type GlyphsProviderProps = {
|
|
7
|
+
fontAtlasUrl: string;
|
|
8
|
+
fontConfigUrl: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Provides sub components with a GlyphsContext, which contains data and utilities needed to
|
|
12
|
+
* add text support to fragment shaders. This includes a reference to a glyph atlas texture
|
|
13
|
+
* and a supporting uniforms group, which will contain glyph config and metrics.
|
|
14
|
+
*
|
|
15
|
+
* It currently relies on a pre-generated font atlas and json config file using [msdf-bmfont-xml](https://github.com/soimy/msdf-bmfont-xml)
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* <GlyphsProvider fontAtlasUrl="OpenSans-Regular.png" fontConfigUrl="OpenSans-Regular.json">
|
|
19
|
+
* { ... }
|
|
20
|
+
* </GlyphsProvider>
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* This component should be considered experimental.
|
|
24
|
+
*
|
|
25
|
+
* @see {@link GlyphsContext}
|
|
26
|
+
*
|
|
27
|
+
* @group Components
|
|
28
|
+
*/
|
|
29
|
+
export declare const GlyphsProvider: ({ fontAtlasUrl, fontConfigUrl, children, }: PropsWithChildren<GlyphsProviderProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Vec3 } from '../sdk';
|
|
2
|
+
/**
|
|
3
|
+
* CameraSetPositionEvent name
|
|
4
|
+
*/
|
|
5
|
+
export declare const cameraSetPositionEventType: "camera-set-position";
|
|
6
|
+
/**
|
|
7
|
+
* CameraFocusAtPointEvent name
|
|
8
|
+
*/
|
|
9
|
+
export declare const cameraFocusAtPointEventType: "camera-focus-point";
|
|
10
|
+
export interface CameraFocusAtPointEventDetails {
|
|
11
|
+
point: Vec3;
|
|
12
|
+
distance?: number;
|
|
13
|
+
callback?: () => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Set the camera at the specified position
|
|
17
|
+
* @event
|
|
18
|
+
*/
|
|
19
|
+
export declare class CameraSetPositionEvent extends CustomEvent<Vec3> {
|
|
20
|
+
constructor(detail: Vec3);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Focus the camera at the specified point
|
|
24
|
+
* @event
|
|
25
|
+
*/
|
|
26
|
+
export declare class CameraFocusAtPointEvent extends CustomEvent<CameraFocusAtPointEventDetails> {
|
|
27
|
+
constructor(detail: CameraFocusAtPointEventDetails);
|
|
28
|
+
}
|
|
29
|
+
declare global {
|
|
30
|
+
interface WindowEventMap {
|
|
31
|
+
[cameraSetPositionEventType]: CameraSetPositionEvent;
|
|
32
|
+
[cameraFocusAtPointEventType]: CameraFocusAtPointEvent;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DepthReferencePoint } from '../sdk';
|
|
2
|
+
/**
|
|
3
|
+
* DepthChangedEvent name
|
|
4
|
+
*/
|
|
5
|
+
export declare const depthChangedType: "depth-changed";
|
|
6
|
+
export interface DepthChangedEventDetails {
|
|
7
|
+
depth: number;
|
|
8
|
+
referencePoint: DepthReferencePoint;
|
|
9
|
+
source: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Depth changed
|
|
13
|
+
* @event
|
|
14
|
+
*/
|
|
15
|
+
export declare class DepthChangedEvent extends CustomEvent<DepthChangedEventDetails> {
|
|
16
|
+
constructor(detail: DepthChangedEventDetails);
|
|
17
|
+
}
|
|
18
|
+
declare global {
|
|
19
|
+
interface WindowEventMap {
|
|
20
|
+
[depthChangedType]: DepthChangedEvent;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { EventEmitterCallback } from '../components/EventEmitter/EventEmitterContext';
|
|
2
|
+
export type PointerEvents = {
|
|
3
|
+
onPointerEnter?: EventEmitterCallback;
|
|
4
|
+
onPointerLeave?: EventEmitterCallback;
|
|
5
|
+
onPointerMove?: EventEmitterCallback;
|
|
6
|
+
onPointerClick?: EventEmitterCallback;
|
|
7
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Object3D } from 'three';
|
|
2
|
+
import { Vec3 } from '../sdk';
|
|
3
|
+
export declare const wellboreSelectedEventType: "wellbore-selected";
|
|
4
|
+
export declare const wellboreAddedEventType: "wellbore-added";
|
|
5
|
+
export declare const wellboreRemovedEventType: "wellbore-removed";
|
|
6
|
+
export interface WellboreAddedEventDetails {
|
|
7
|
+
id: string;
|
|
8
|
+
object: Object3D;
|
|
9
|
+
}
|
|
10
|
+
export interface WellboreRemovedEventDetails {
|
|
11
|
+
id: string;
|
|
12
|
+
}
|
|
13
|
+
export interface WellboreSelectedEventDetails {
|
|
14
|
+
id: string;
|
|
15
|
+
position?: Vec3;
|
|
16
|
+
depth?: number;
|
|
17
|
+
flyTo?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Wellbore selected event
|
|
21
|
+
* @event
|
|
22
|
+
*/
|
|
23
|
+
export declare class WellboreSelectedEvent extends CustomEvent<WellboreSelectedEventDetails> {
|
|
24
|
+
constructor(detail: WellboreSelectedEventDetails);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Wellbore added event
|
|
28
|
+
* @event
|
|
29
|
+
*/
|
|
30
|
+
export declare class WellboreAddedEvent extends CustomEvent<WellboreAddedEventDetails> {
|
|
31
|
+
constructor(detail: WellboreAddedEventDetails);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Wellbore removed event
|
|
35
|
+
* @event
|
|
36
|
+
*/
|
|
37
|
+
export declare class WellboreRemovedEvent extends CustomEvent<WellboreRemovedEventDetails> {
|
|
38
|
+
constructor(detail: WellboreRemovedEventDetails);
|
|
39
|
+
}
|
|
40
|
+
declare global {
|
|
41
|
+
interface WindowEventMap {
|
|
42
|
+
[wellboreSelectedEventType]: WellboreSelectedEvent;
|
|
43
|
+
[wellboreAddedEventType]: WellboreAddedEvent;
|
|
44
|
+
[wellboreRemovedEventType]: WellboreRemovedEvent;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { ReadonlyStore } from '../sdk';
|
|
2
|
+
export declare function generateBasicTrajectory(this: ReadonlyStore, id: string, segmentsPerMeter: number, simplificationThreshold?: number, fromMsl?: number, includeLengths?: boolean): Promise<import('../sdk').PackedBufferGeometry | null>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReadonlyStore } from '../sdk';
|
|
2
|
+
export declare function generateCasingAnnotations(this: ReadonlyStore, id: string): Promise<{
|
|
3
|
+
name: string;
|
|
4
|
+
data: Record<string, string>;
|
|
5
|
+
position: import('../sdk').Vec3;
|
|
6
|
+
direction: import('../sdk').Vec3;
|
|
7
|
+
priority: number;
|
|
8
|
+
}[] | null>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ReadonlyStore } from '../sdk';
|
|
2
|
+
export declare function generateCasings(this: ReadonlyStore, id: string, fromMsl?: number, radialSegments?: number, sizeMultiplier?: number, shoeFactor?: number, segmentsPerMeter?: number, simplificationThreshold?: number): Promise<{
|
|
3
|
+
geometry: import('../sdk').PackedBufferGeometry;
|
|
4
|
+
} | null>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { ReadonlyStore } from '../sdk';
|
|
2
|
+
export declare function generateCompletionTools(this: ReadonlyStore, id: string, fromMsl?: number, radialSegments?: number, sizeMultiplier?: number, segmentsPerMeter?: number, simplificationThreshold?: number): Promise<import('../sdk').PackedBufferGeometry | null>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { AnnotationProps } from '../components/Annotations';
|
|
2
|
+
import { DepthReferencePoint, ReadonlyStore } from '../sdk';
|
|
3
|
+
export declare function generateDepthMarkers(this: ReadonlyStore, id: string, interval: number, depthReferencePoint?: DepthReferencePoint, fromMsl?: number): Promise<AnnotationProps[] | null>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module generators
|
|
3
|
+
*/
|
|
4
|
+
export * from './basic-trajectory-generator';
|
|
5
|
+
export * from './casing-annotations-generator';
|
|
6
|
+
export * from './casings-generator';
|
|
7
|
+
export * from './completion-annotations-generator';
|
|
8
|
+
export * from './completion-tools-generator';
|
|
9
|
+
export * from './depth-markers-generator';
|
|
10
|
+
export * from './formation-markers-generator';
|
|
11
|
+
export * from './perforations-generator';
|
|
12
|
+
export * from './perimieter-generator';
|
|
13
|
+
export * from './position-markers-generator';
|
|
14
|
+
export * from './shoes-generator';
|
|
15
|
+
export * from './surface-generator';
|
|
16
|
+
export * from './tube-trajectory-generator';
|
|
17
|
+
export * from './wellbore-bounds-generator';
|
|
18
|
+
export * from './wellbore-formation-column-generator';
|
|
19
|
+
export * from './wellbore-label-generator';
|
|
20
|
+
export * from './wellbore-seismic-section-generator';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SurfaceTexturesResponse } from '../main';
|
|
2
|
+
import { PackedBufferGeometry, ReadonlyStore } from '../sdk';
|
|
3
|
+
export declare function generateSurfaceTexturesData(this: ReadonlyStore, id: string): Promise<SurfaceTexturesResponse | null>;
|
|
4
|
+
export declare function generateSurfaceGeometry(this: ReadonlyStore, id: string, maxError?: number): Promise<PackedBufferGeometry | null>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { ReadonlyStore } from '../sdk';
|
|
2
|
+
export declare function generateTubeTrajectory(this: ReadonlyStore, id: string, segmentsPerMeter: number, simplificationThreshold?: number, fromMsl?: number, radius?: number, radialSegments?: number, includeLengths?: boolean): Promise<import('../sdk').PackedBufferGeometry | null>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { PackedBufferGeometry, ReadonlyStore } from '../sdk';
|
|
2
|
+
export declare function generateWellboreFormationColumnGeometries(this: ReadonlyStore, wellboreId: string, stratColumnId: string, segmentsPerMeter: number, fromMsl?: number, units?: string[], unitTypes?: string[], startRadius?: number, formationWidth?: number, caps?: boolean, radialSegments?: number, simplificationThreshold?: number): Promise<PackedBufferGeometry | null>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReadonlyStore } from '../sdk';
|
|
2
|
+
export declare function generateWellboreLabel(this: ReadonlyStore, id: string, position: 'top' | 'center' | 'bottom', fromMsl?: number): Promise<{
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
position: import('../sdk').Vec3;
|
|
6
|
+
direction: import('../sdk').Vec3;
|
|
7
|
+
}[] | null>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { WellboreSeismicSectionGeneratorResponse } from '../components/Wellbores/WellboreSeismicSection/wellbore-seismic-section-defs';
|
|
2
|
+
import { ReadonlyStore } from '../sdk';
|
|
3
|
+
export declare function generateWellboreSeismicSection(this: ReadonlyStore, id: string, stepSize?: number, minSize?: number, extension?: number, defaultExtensionAngle?: number): Promise<WellboreSeismicSectionGeneratorResponse | null>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Store } from '../sdk/data/Store';
|
|
2
|
+
/**
|
|
3
|
+
* Access the store from the `DataProvider` within a component to retrieve data.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* const store = useData()
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* Use the store in a `useEffect` hook to retrieve the data you need and save it
|
|
10
|
+
* to a local state (if required)
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* useEffect(() => {
|
|
14
|
+
* if (store) {
|
|
15
|
+
* store.get<WellboreHeader>('wellbore-headers', id).then(response => {
|
|
16
|
+
* ... // do something with the data
|
|
17
|
+
* })
|
|
18
|
+
* }
|
|
19
|
+
* }, [store, id])
|
|
20
|
+
*
|
|
21
|
+
* @see [Data](/videx-3d/docs/documents/data.html)
|
|
22
|
+
*
|
|
23
|
+
* @group Hooks
|
|
24
|
+
*/
|
|
25
|
+
export declare const useData: () => Store | null;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Access a generator function from within a component.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* const generator = useGenerator(generatorKey)
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* The generator is an async function that process and returns data required
|
|
9
|
+
* by your components, such as geometry for a mesh.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
*
|
|
13
|
+
* const [geometry, setGeometry] = useState<BufferGeometry | null>(null)
|
|
14
|
+
*
|
|
15
|
+
* useEffect(() => {
|
|
16
|
+
* if (generator) {
|
|
17
|
+
* generator(id).then(response => {
|
|
18
|
+
* if (response) {
|
|
19
|
+
* const bufferGeometry = unpackBufferGeometry(response)
|
|
20
|
+
* setGeometry(prev => {
|
|
21
|
+
* if (prev) prev.dispose()
|
|
22
|
+
* return bufferGeometry
|
|
23
|
+
* })
|
|
24
|
+
* } else {
|
|
25
|
+
* setGeometry(null)
|
|
26
|
+
* }
|
|
27
|
+
* })
|
|
28
|
+
* }
|
|
29
|
+
* }, [generator, id])
|
|
30
|
+
*
|
|
31
|
+
* if (!geometry) return null
|
|
32
|
+
*
|
|
33
|
+
* return (
|
|
34
|
+
* <mesh geometry={geometry}>
|
|
35
|
+
* <meshBasicMaterial />
|
|
36
|
+
* </mesh>
|
|
37
|
+
* )
|
|
38
|
+
*
|
|
39
|
+
* @see [Generators](/videx-3d/docs/documents/generators.html)
|
|
40
|
+
*
|
|
41
|
+
* @group Hooks
|
|
42
|
+
*/
|
|
43
|
+
export declare const useGenerator: <T>(generator: string, priority?: number) => ((...args: any[]) => Promise<T>) | (() => Promise<null>);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { WellboreContextProps } from '../components/Wellbores/Wellbore/WellboreContext';
|
|
2
|
+
/**
|
|
3
|
+
* Get the wellbore context from a parent `Wellbore` component.
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* const { id } = useWellboreContext()
|
|
8
|
+
*
|
|
9
|
+
* @see {@link Wellbore}
|
|
10
|
+
*
|
|
11
|
+
* @group Hooks
|
|
12
|
+
*/
|
|
13
|
+
export declare const useWellboreContext: () => WellboreContextProps;
|