@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,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module main
|
|
3
|
+
*/
|
|
4
|
+
export * from './components/Annotations';
|
|
5
|
+
export * from './components/CameraTargetMarker/CameraTargetMarker';
|
|
6
|
+
export * from './components/Distance';
|
|
7
|
+
export * from './components/EventEmitter';
|
|
8
|
+
export * from './components/Grids';
|
|
9
|
+
export * from './components/Highlighter';
|
|
10
|
+
export * from './components/Html';
|
|
11
|
+
export * from './components/ObservableGroup/ObservableGroup';
|
|
12
|
+
export * from './components/SDFTest/SDFTest';
|
|
13
|
+
export * from './components/Surfaces';
|
|
14
|
+
export * from './components/Symbol';
|
|
15
|
+
export * from './components/UtmArea';
|
|
16
|
+
export * from './components/Wellbores/BasicTrajectory';
|
|
17
|
+
export * from './components/Wellbores/Casings';
|
|
18
|
+
export * from './components/Wellbores/CompletionTools';
|
|
19
|
+
export * from './components/Wellbores/DepthMarkers';
|
|
20
|
+
export * from './components/Wellbores/FormationMarkers';
|
|
21
|
+
export * from './components/Wellbores/Perforations';
|
|
22
|
+
export * from './components/Wellbores/Perimeter';
|
|
23
|
+
export * from './components/Wellbores/Shoes';
|
|
24
|
+
export * from './components/Wellbores/TubeTrajectory';
|
|
25
|
+
export * from './components/Wellbores/Wellbore';
|
|
26
|
+
export * from './components/Wellbores/WellboreBounds';
|
|
27
|
+
export * from './components/Wellbores/WellboreFormationColumn';
|
|
28
|
+
export * from './components/Wellbores/WellboreLabel';
|
|
29
|
+
export * from './components/Wellbores/WellboreRibbon';
|
|
30
|
+
export * from './components/Wellbores/WellboreSeismicSection';
|
|
31
|
+
export * from './components/Wellbores/Wells';
|
|
32
|
+
export * from './contexts/DataContext';
|
|
33
|
+
export * from './contexts/DataContextProvider';
|
|
34
|
+
export * from './contexts/GeneratorsContext';
|
|
35
|
+
export * from './contexts/GeneratorsContextProvider';
|
|
36
|
+
export * from './contexts/GlyphsContext';
|
|
37
|
+
export * from './contexts/GlyphsContextProvider';
|
|
38
|
+
export * from './events/camera-events';
|
|
39
|
+
export * from './events/depth-events';
|
|
40
|
+
export * from './events/interaction-events';
|
|
41
|
+
export * from './events/wellbore-events';
|
|
42
|
+
export * from './hooks/useData';
|
|
43
|
+
export * from './hooks/useGenerator';
|
|
44
|
+
export * from './hooks/useWellboreContext';
|
|
45
|
+
export * from './layers/layers';
|
|
46
|
+
export * from './rendering';
|
|
47
|
+
export * from './common/color-ramps';
|
|
48
|
+
export * from './common/types';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Camera, Material, Mesh, RawShaderMaterial, Texture, WebGLRenderer, WebGLRenderTarget } from 'three';
|
|
2
|
+
export declare class FullscreenRenderer {
|
|
3
|
+
camera: Camera;
|
|
4
|
+
mesh: Mesh;
|
|
5
|
+
copyMaterial: RawShaderMaterial;
|
|
6
|
+
constructor();
|
|
7
|
+
renderMaterial(renderer: WebGLRenderer, buffer: WebGLRenderTarget | null, material: Material): void;
|
|
8
|
+
renderTexture(renderer: WebGLRenderer, buffer: WebGLRenderTarget | null, texture: Texture, opacity?: number): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Camera, MeshBasicMaterial, Scene, WebGLRenderer, WebGLRenderTarget } from 'three';
|
|
2
|
+
export declare abstract class Pass {
|
|
3
|
+
writeToScreen: boolean;
|
|
4
|
+
abstract render(renderer: WebGLRenderer, buffer: WebGLRenderbuffer): void;
|
|
5
|
+
}
|
|
6
|
+
export declare class RenderPass extends Pass {
|
|
7
|
+
private scene;
|
|
8
|
+
private camera;
|
|
9
|
+
constructor(scene: Scene, camera: Camera);
|
|
10
|
+
render(renderer: WebGLRenderer, buffer: WebGLRenderTarget): void;
|
|
11
|
+
}
|
|
12
|
+
export declare class OutputPass extends Pass {
|
|
13
|
+
material: MeshBasicMaterial;
|
|
14
|
+
constructor();
|
|
15
|
+
render(renderer: WebGLRenderer, buffer: WebGLRenderTarget): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { KeyType, Store } from './Store';
|
|
2
|
+
/**
|
|
3
|
+
* Used internally by DataLoader class
|
|
4
|
+
*/
|
|
5
|
+
export type BatchQueueEntry = {
|
|
6
|
+
key: KeyType;
|
|
7
|
+
promise: Promise<any>;
|
|
8
|
+
_resolve: ((value?: any) => void) | null;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Loader Config
|
|
12
|
+
*/
|
|
13
|
+
export type LoaderConfig = {
|
|
14
|
+
preloaded?: boolean;
|
|
15
|
+
batched?: boolean;
|
|
16
|
+
batchSize?: number;
|
|
17
|
+
batchMaxDelay?: number;
|
|
18
|
+
noCache?: boolean;
|
|
19
|
+
transform?: (record: any) => any;
|
|
20
|
+
init?: <T>(...args: any[]) => Promise<[KeyType, T][]>;
|
|
21
|
+
load?: <T>(id: KeyType, args?: any) => Promise<T | null>;
|
|
22
|
+
batchLoad?: <T>(...args: any[]) => Promise<[KeyType, T][]>;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* This is a helper class that may be used to simplify implementation
|
|
26
|
+
* of the Store interface. The Store may be implemented as you wish, as
|
|
27
|
+
* long as it adapts to the interface, but this class can be useful for
|
|
28
|
+
* managing loading on demand, caching, preloading and more.
|
|
29
|
+
*
|
|
30
|
+
* You would typically build your store to hold a loader instance per
|
|
31
|
+
* data type. See the implementation of the MockStore for example usage.
|
|
32
|
+
*
|
|
33
|
+
* The DataLoader has the following features:
|
|
34
|
+
* - optional caching of data
|
|
35
|
+
* - preload complete data set or on-demand loading of data (single record or batched)
|
|
36
|
+
* - promise sharing of multiple requests for the same data record
|
|
37
|
+
*/
|
|
38
|
+
export declare class DataLoader {
|
|
39
|
+
store: Store;
|
|
40
|
+
config: LoaderConfig;
|
|
41
|
+
cached: Map<KeyType, unknown>;
|
|
42
|
+
private _activeLoaders;
|
|
43
|
+
private _batchqueue;
|
|
44
|
+
private _flushScheduled;
|
|
45
|
+
constructor(store: Store, config?: LoaderConfig);
|
|
46
|
+
init(...args: any[]): Promise<boolean>;
|
|
47
|
+
all<T>(): Promise<T[] | null>;
|
|
48
|
+
_enqueueRequest(key: KeyType): Promise<any>;
|
|
49
|
+
_processBatch(batch: BatchQueueEntry[]): Promise<null | undefined>;
|
|
50
|
+
_processBatchQueue(): Promise<void>;
|
|
51
|
+
get<T>(key: KeyType, args?: any): Promise<T | null>;
|
|
52
|
+
set<T>(key: KeyType, value: T): void;
|
|
53
|
+
clear(): void;
|
|
54
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReadonlyStore } from '../data/Store';
|
|
2
|
+
export type RegistryConfig = {
|
|
3
|
+
concurrentStoreCalls?: number;
|
|
4
|
+
};
|
|
5
|
+
export type GeneratorFunction = (this: ReadonlyStore, ...args: any[]) => Promise<any>;
|
|
6
|
+
export declare class GeneratorRegistry {
|
|
7
|
+
protected store: ReadonlyStore | null;
|
|
8
|
+
protected config: RegistryConfig;
|
|
9
|
+
protected generators: Map<string, GeneratorFunction>;
|
|
10
|
+
constructor(config?: RegistryConfig, store?: ReadonlyStore);
|
|
11
|
+
add(key: string, generator: GeneratorFunction): void;
|
|
12
|
+
setStore(store: ReadonlyStore): void;
|
|
13
|
+
connectRemoteStore(port: MessagePort): Promise<void>;
|
|
14
|
+
invoke<T>(key: string, ...args: any[]): Promise<T>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type KeyType = string | number;
|
|
2
|
+
/**
|
|
3
|
+
* This interface includes the methods which are required in a data store
|
|
4
|
+
* implementation.
|
|
5
|
+
*
|
|
6
|
+
* It expects data to be organized as dictionaries of
|
|
7
|
+
* data sets and data records, where data set refers to a specific data type
|
|
8
|
+
* (i.e. 'wellbore-headers') and records to a specific item in the set
|
|
9
|
+
* indexed by a key (i.e. wellbore id)
|
|
10
|
+
*
|
|
11
|
+
* get: retrieve a single record from the specified data set with the specified key
|
|
12
|
+
* all: retrieve all records from the specified data set
|
|
13
|
+
* query: retrieve all records from the specified data set matching the query partial values
|
|
14
|
+
* set: set a single record into the specified data set with the specified key
|
|
15
|
+
*
|
|
16
|
+
* Example of using query to retrieve all wellbore headers for a specific well:
|
|
17
|
+
* @example
|
|
18
|
+
* const wellbores = await mystore.query<WellboreHeader>('wellbore-headers', { well: 'NO 16/2' })
|
|
19
|
+
*/
|
|
20
|
+
export interface Store {
|
|
21
|
+
get: <T>(dataType: string, key: KeyType, args?: any) => Promise<T | null>;
|
|
22
|
+
set: <T>(dataType: string, key: KeyType, value: T) => Promise<boolean>;
|
|
23
|
+
all: <T>(dataType: string) => Promise<T[] | null>;
|
|
24
|
+
query: <T>(dataType: string, query: Partial<T>) => Promise<T[]>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Read-only version of the Store interface. Omitting the set method.
|
|
28
|
+
*/
|
|
29
|
+
export type ReadonlyStore = Pick<Store, 'get' | 'all' | 'query'>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReadonlyStore } from '../Store';
|
|
2
|
+
import { Formation, FormationMarker, MergedFormationInterval } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Get the formations for a wellbore filtered by strat column and optionally truncated by fromMsl
|
|
5
|
+
*/
|
|
6
|
+
export declare function getWellboreFormations(wellboreId: string, stratColumnId: string, store: ReadonlyStore, fromMsl?: number): Promise<Formation[]>;
|
|
7
|
+
/**
|
|
8
|
+
* Merges stratigraphy formations from multiple stratigraphy unit levels into a single column,
|
|
9
|
+
* where the highest level takes presidence over lower levels.
|
|
10
|
+
*
|
|
11
|
+
* The intervals will be processed in-order; in other words, how the intervals are sorted.
|
|
12
|
+
* We sort first by descending level (higher levels take presidence over lower levels), then by
|
|
13
|
+
* entry depth (processing top-down) and finally by descending update date.
|
|
14
|
+
*
|
|
15
|
+
* The last sorting criteria is used to ensure consistant behaviour for the edge-cases where formation intervals
|
|
16
|
+
* overlaps within the same strat unit level.
|
|
17
|
+
*/
|
|
18
|
+
export declare function mergeFormationIntervals(formationIntervals: Formation[]): MergedFormationInterval[];
|
|
19
|
+
/**
|
|
20
|
+
* Identify surface entry points, where the highest level strat unit has precedence:
|
|
21
|
+
* - Sort intervals by ascending entry depth and descending stratigraphy unit level
|
|
22
|
+
* - Pick only the first formation of a depth, ignoring any following formations with the same depth as the previous formation
|
|
23
|
+
*/
|
|
24
|
+
export declare function getFormationMarkers(intervals: Formation[]): FormationMarker[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { WellboreHeader } from '../types/WellboreHeader';
|
|
2
|
+
/**
|
|
3
|
+
* Caluclate the segments top for a single well
|
|
4
|
+
* @param dictionary dictionary of wellbore headers indexed by wellbore name
|
|
5
|
+
* @param included array of wellbore headers that should be included
|
|
6
|
+
* @param selected id of selected wellbore if applicable (will be processed first => sequence = 0)
|
|
7
|
+
* @returns dictionary of segment tops in MD Msl indexed by wellbore id
|
|
8
|
+
*/
|
|
9
|
+
export declare function calculateWellSegments(dictionary: Record<string, WellboreHeader>, included: WellboreHeader[], selected?: string): Record<string, [number, number]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type DepthReferencePoint = 'RT' | 'MSL';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type FormationBoundary = {
|
|
2
|
+
mdMsl: number;
|
|
3
|
+
tvdMsl?: number;
|
|
4
|
+
properties?: Record<string, any>;
|
|
5
|
+
};
|
|
6
|
+
export type Formation = {
|
|
7
|
+
wellboreId: string;
|
|
8
|
+
stratColumnId: string;
|
|
9
|
+
entry: FormationBoundary;
|
|
10
|
+
exit: FormationBoundary;
|
|
11
|
+
name: string;
|
|
12
|
+
type?: string;
|
|
13
|
+
level: number;
|
|
14
|
+
color: string;
|
|
15
|
+
properties?: Record<string, any>;
|
|
16
|
+
};
|
|
17
|
+
export type MergedFormationInterval = {
|
|
18
|
+
mdMslFrom: number;
|
|
19
|
+
mdMslTo: number;
|
|
20
|
+
name: string;
|
|
21
|
+
level: number;
|
|
22
|
+
color: string;
|
|
23
|
+
properties?: Record<string, any>;
|
|
24
|
+
};
|
|
25
|
+
export type FormationMarker = {
|
|
26
|
+
name: string;
|
|
27
|
+
color: string;
|
|
28
|
+
mdMsl: number;
|
|
29
|
+
tvdMsl?: number;
|
|
30
|
+
type: 'top' | 'base';
|
|
31
|
+
level: number;
|
|
32
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Position log are expected to be a strided array of values including:
|
|
3
|
+
* - dx: UTM easting offset relative to the head position
|
|
4
|
+
* - dy: The TVD depth relative to mean sea level (Msl)
|
|
5
|
+
* - dz: UTM northing offset relative to the head position
|
|
6
|
+
* - md: Measured depth relative to mean sea level (Msl)
|
|
7
|
+
*
|
|
8
|
+
* The stride is then 4 values per log entry:
|
|
9
|
+
* [dx0, dy0, dz0, md0, dx1, dy1, dz1, md1, ..., dx(n - 1), dy(n-1), dz(n-1), md(n-1)]
|
|
10
|
+
*
|
|
11
|
+
* The measured top is then positionlog[3]
|
|
12
|
+
* The measured bottom is then positionlog[positionlog.length - 1]
|
|
13
|
+
*
|
|
14
|
+
* The position log is represented in this way for optimimalization reasons.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
export type PositionLog = Float32Array;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type StratColumnUnit = {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
unitType: string;
|
|
5
|
+
level: number;
|
|
6
|
+
top: string;
|
|
7
|
+
base: string;
|
|
8
|
+
topAge: number;
|
|
9
|
+
baseAge: number;
|
|
10
|
+
color: string;
|
|
11
|
+
parent: string | null;
|
|
12
|
+
};
|
|
13
|
+
export type StratColumn = {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
type: string;
|
|
17
|
+
units: StratColumnUnit[];
|
|
18
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type SurfaceMeta = {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
projection: string;
|
|
6
|
+
min: number;
|
|
7
|
+
max: number;
|
|
8
|
+
displayMin: number;
|
|
9
|
+
displayMax: number;
|
|
10
|
+
color: string;
|
|
11
|
+
visualization: string;
|
|
12
|
+
header: {
|
|
13
|
+
ny: number;
|
|
14
|
+
xori: number;
|
|
15
|
+
xmax: number;
|
|
16
|
+
yori: number;
|
|
17
|
+
ymax: number;
|
|
18
|
+
xinc: number;
|
|
19
|
+
yinc: number;
|
|
20
|
+
nx: number;
|
|
21
|
+
rot: number;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type SurfaceValues = Float32Array;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type WellboreHeader = {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
well: string;
|
|
5
|
+
depthReferenceElevation: number;
|
|
6
|
+
kickoffDepthMsl: number | null;
|
|
7
|
+
parent: string | null;
|
|
8
|
+
drilled: Date | null;
|
|
9
|
+
easting: number;
|
|
10
|
+
northing: number;
|
|
11
|
+
depthMdMsl: number;
|
|
12
|
+
waterDepth: number | null;
|
|
13
|
+
status: string;
|
|
14
|
+
properties?: Record<string, any>;
|
|
15
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './Casing';
|
|
2
|
+
export * from './CompletionTool';
|
|
3
|
+
export * from './DepthReferencePoint';
|
|
4
|
+
export * from './Formation';
|
|
5
|
+
export * from './PerforationInterval';
|
|
6
|
+
export * from './Pick';
|
|
7
|
+
export * from './PositionLog';
|
|
8
|
+
export * from './StratColumn';
|
|
9
|
+
export * from './SurfaceMeta';
|
|
10
|
+
export * from './Symbol';
|
|
11
|
+
export * from './WellboreHeader';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Vec3 } from '../../types/common';
|
|
2
|
+
/**
|
|
3
|
+
* Interface for interpolating points on a 3d curve
|
|
4
|
+
*/
|
|
5
|
+
export interface Curve3D {
|
|
6
|
+
getPointAt: (pos: number) => Vec3;
|
|
7
|
+
getPoints: (nSamples: number, from?: number, to?: number) => Vec3[];
|
|
8
|
+
getTangentAt: (pos: number) => Vec3;
|
|
9
|
+
getNormalAt: (pos: number) => Vec3;
|
|
10
|
+
getBoundingBox: (from?: number, to?: number) => {
|
|
11
|
+
min: Vec3;
|
|
12
|
+
max: Vec3;
|
|
13
|
+
};
|
|
14
|
+
nearest: (point: Vec3) => {
|
|
15
|
+
position: number;
|
|
16
|
+
point: Vec3;
|
|
17
|
+
distance: number;
|
|
18
|
+
};
|
|
19
|
+
length: number;
|
|
20
|
+
closed: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Returns an implementation of `SplineCurve` using `CurveInterpolator`
|
|
24
|
+
**/
|
|
25
|
+
export declare function getSplineCurve(points: Vec3[], closed?: boolean): Curve3D | null;
|
|
26
|
+
export type FrenetFrame = {
|
|
27
|
+
curvePosition: number;
|
|
28
|
+
position: Vec3;
|
|
29
|
+
tangent: Vec3;
|
|
30
|
+
normal: Vec3;
|
|
31
|
+
binormal: Vec3;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Calculate a stable and balanced set of Frenet Frames for a curve at the
|
|
35
|
+
* specified positions.
|
|
36
|
+
*/
|
|
37
|
+
export declare function calculateFrenetFrames(curve: Curve3D, curvePositions: number[]): FrenetFrame[];
|
|
38
|
+
/**
|
|
39
|
+
* Get a set of positions along a curve according to a number of segments per meter,
|
|
40
|
+
* optionally simplified/optimized by specifying a simplification threshold.
|
|
41
|
+
*
|
|
42
|
+
* To get a sub section, use the from and/or to parameters.
|
|
43
|
+
*
|
|
44
|
+
* @remarks segments per meter is always calculated from the start of the curve to ensure alingment when optimizing the number of vertices
|
|
45
|
+
*/
|
|
46
|
+
export declare function getCurvePositions(curve: Curve3D, from?: number, to?: number, segmentsPerMeter?: number, simplificationThreshold?: number): number[];
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { BufferGeometry } from 'three';
|
|
2
|
+
import { Tuplet } from '../../types/common';
|
|
3
|
+
import { Curve3D } from './curve-3d';
|
|
4
|
+
export type RadiusModifier = {
|
|
5
|
+
type: 'linear' | 'stepped';
|
|
6
|
+
steps: Tuplet<number>[];
|
|
7
|
+
};
|
|
8
|
+
export type AttributeOptions = {
|
|
9
|
+
computeNormals?: boolean;
|
|
10
|
+
computeUvs?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type TubeGeometryOptions = AttributeOptions & {
|
|
13
|
+
radialSegments?: number;
|
|
14
|
+
from?: number;
|
|
15
|
+
to?: number;
|
|
16
|
+
startCap?: boolean;
|
|
17
|
+
endCap?: boolean;
|
|
18
|
+
radius?: number;
|
|
19
|
+
segmentsPerMeter?: number;
|
|
20
|
+
radiusModifier?: RadiusModifier;
|
|
21
|
+
simplificationThreshold?: number;
|
|
22
|
+
computeLengths?: boolean;
|
|
23
|
+
computeRelativeLengths?: boolean;
|
|
24
|
+
computeCurveNormals?: boolean;
|
|
25
|
+
computeCurveTangents?: boolean;
|
|
26
|
+
computeCurveBinormals?: boolean;
|
|
27
|
+
innerRadius?: number;
|
|
28
|
+
thickness?: number;
|
|
29
|
+
addGroups?: boolean;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Generates a fully customized tube geometry extruded from a curve.
|
|
33
|
+
*/
|
|
34
|
+
export declare function createTubeGeometry(curve: Curve3D, options?: TubeGeometryOptions): BufferGeometry<import('three').NormalBufferAttributes, import('three').BufferGeometryEventMap>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modified version of Mapbox Delatin library: https://github.com/mapbox/delatin
|
|
3
|
+
* Copyright (c) 2019, Michael Fogleman, Vladimir Agafonkin
|
|
4
|
+
*/
|
|
5
|
+
export declare class Delatin {
|
|
6
|
+
data: Float32Array;
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
coords: number[];
|
|
10
|
+
triangles: number[];
|
|
11
|
+
nullValue: number;
|
|
12
|
+
private _queue;
|
|
13
|
+
private _queueIndices;
|
|
14
|
+
private _errors;
|
|
15
|
+
private _halfedges;
|
|
16
|
+
private _candidates;
|
|
17
|
+
private _invalidPoints;
|
|
18
|
+
private _rms;
|
|
19
|
+
private _pending;
|
|
20
|
+
private _pendingLen;
|
|
21
|
+
private _rmsSum;
|
|
22
|
+
constructor(data: Float32Array, width: number, nullValue?: number);
|
|
23
|
+
run(maxError?: number): void;
|
|
24
|
+
removeInvalidTriangles(): void;
|
|
25
|
+
refine(): void;
|
|
26
|
+
getMaxError(): number;
|
|
27
|
+
getRMSD(): number;
|
|
28
|
+
heightAt(x: number, y: number): number;
|
|
29
|
+
private _findCandidate;
|
|
30
|
+
private _step;
|
|
31
|
+
private _addPoint;
|
|
32
|
+
private _addTriangle;
|
|
33
|
+
private _flush;
|
|
34
|
+
private _legalize;
|
|
35
|
+
private _handleCollinear;
|
|
36
|
+
private _queuePush;
|
|
37
|
+
private _queuePop;
|
|
38
|
+
private _queuePopBack;
|
|
39
|
+
private _queueRemove;
|
|
40
|
+
private _queueLess;
|
|
41
|
+
private _queueSwap;
|
|
42
|
+
private _queueUp;
|
|
43
|
+
private _queueDown;
|
|
44
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { BufferGeometry, TypedArray } from 'three';
|
|
2
|
+
export type BufferAttributeDrawRange = {
|
|
3
|
+
start: number;
|
|
4
|
+
count: number;
|
|
5
|
+
};
|
|
6
|
+
export type BufferAttributeGroups = (BufferAttributeDrawRange & {
|
|
7
|
+
materialIndex?: number | undefined;
|
|
8
|
+
})[];
|
|
9
|
+
export type BufferAttributeLike = {
|
|
10
|
+
array: TypedArray;
|
|
11
|
+
itemSize: number;
|
|
12
|
+
};
|
|
13
|
+
export type BufferGeometryLike = {
|
|
14
|
+
[index: string]: any;
|
|
15
|
+
drawRange?: BufferAttributeDrawRange | undefined;
|
|
16
|
+
groups?: BufferAttributeGroups | undefined;
|
|
17
|
+
attributes: Record<string, BufferAttributeLike>;
|
|
18
|
+
index?: ArrayBufferLike | undefined;
|
|
19
|
+
userData?: any;
|
|
20
|
+
};
|
|
21
|
+
export type PackedBufferAttribute = {
|
|
22
|
+
buffer: ArrayBufferLike;
|
|
23
|
+
attributeType: string;
|
|
24
|
+
itemSize: number;
|
|
25
|
+
};
|
|
26
|
+
export type PackedAttributes = Record<string, PackedBufferAttribute>;
|
|
27
|
+
export type PackedBufferGeometry = {
|
|
28
|
+
drawRange: BufferAttributeDrawRange;
|
|
29
|
+
groups: BufferAttributeGroups;
|
|
30
|
+
attributes: PackedAttributes;
|
|
31
|
+
index: ArrayBufferLike | undefined;
|
|
32
|
+
indexType: string | undefined;
|
|
33
|
+
userData?: any;
|
|
34
|
+
};
|
|
35
|
+
export type PackedBufferGeometryCollection = Record<string, PackedBufferGeometry>;
|
|
36
|
+
export declare function getTypedArrayType(array: ArrayBufferLike | TypedArray): "Int8Array" | "Float32Array" | "Uint8Array" | "Int16Array" | "Uint16Array" | "Int32Array" | "Uint32Array" | "Float64Array";
|
|
37
|
+
export declare function getTypedArrayFromBuffer(buffer: ArrayBufferLike, type: string): Float32Array<ArrayBufferLike> | Int8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike> | Float64Array<ArrayBufferLike>;
|
|
38
|
+
export declare function packAttribute(typedArray: TypedArray, itemSize?: number): PackedBufferAttribute;
|
|
39
|
+
export declare function packBufferGeometryLike(geometry: BufferGeometryLike): [PackedBufferGeometry, ArrayBufferLike[]];
|
|
40
|
+
export declare function packBufferGeometry(bufferGeometry: BufferGeometry): [PackedBufferGeometry, ArrayBufferLike[]];
|
|
41
|
+
export declare function packBufferGeometries(bufferGeometries: BufferGeometry[]): {
|
|
42
|
+
data: PackedBufferGeometryCollection;
|
|
43
|
+
transferrables: ArrayBufferLike[];
|
|
44
|
+
};
|
|
45
|
+
export declare function unpackBufferGeometry(packed: PackedBufferGeometry): BufferGeometry<import('three').NormalBufferAttributes, import('three').BufferGeometryEventMap>;
|
|
46
|
+
export declare function unpackBufferGeometries(data: PackedBufferGeometryCollection): Record<string, BufferGeometry<import('three').NormalBufferAttributes, import('three').BufferGeometryEventMap>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Triangulate an elevation grid using Delaunay triangulation
|
|
3
|
+
*/
|
|
4
|
+
export declare function triangulateGridDelaunay(grid: Float32Array, columns: number, scaleX?: number, scaleY?: number, nullValue?: number, maxError?: number): {
|
|
5
|
+
positions: Float32Array<ArrayBuffer>;
|
|
6
|
+
uvs: Float32Array<ArrayBuffer>;
|
|
7
|
+
indices: Uint32Array<ArrayBuffer>;
|
|
8
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Triangulates a heightmap using marching-squares algorithm.
|
|
3
|
+
* This creates a dense polygon count so it's recommended to use
|
|
4
|
+
* {@link triangulateGridDelaunay} instead!
|
|
5
|
+
*/
|
|
6
|
+
export type TriangleVertex = {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
z: number;
|
|
10
|
+
edge: TriangleEdge | null;
|
|
11
|
+
};
|
|
12
|
+
export type TriangleEdge = {
|
|
13
|
+
index: number;
|
|
14
|
+
tail: number;
|
|
15
|
+
head: number;
|
|
16
|
+
twin: TriangleEdge | null;
|
|
17
|
+
prev: TriangleEdge | null;
|
|
18
|
+
next: TriangleEdge | null;
|
|
19
|
+
};
|
|
20
|
+
export interface GridValueTransformFunc {
|
|
21
|
+
(v: number): number | null;
|
|
22
|
+
}
|
|
23
|
+
export declare function triangulateGrid(grid: Float32Array, columns: number, scaleX?: number, scaleY?: number, transformValue?: GridValueTransformFunc): {
|
|
24
|
+
vertices: TriangleVertex[];
|
|
25
|
+
indices: number[];
|
|
26
|
+
uvs: number[];
|
|
27
|
+
edges: TriangleEdge[];
|
|
28
|
+
};
|