@equinor/esv-intersection 2.2.0 → 3.0.0-beta.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/dist/components/axis.d.ts +1 -1
- package/dist/constants.d.ts +6 -3
- package/dist/control/IntersectionReferenceSystem.d.ts +20 -5
- package/dist/control/LayerManager.d.ts +6 -6
- package/dist/control/MainController.d.ts +5 -5
- package/dist/control/ZoomPanHandler.d.ts +4 -2
- package/dist/control/index.d.ts +3 -3
- package/dist/control/interfaces.d.ts +10 -10
- package/dist/control/overlay.d.ts +6 -6
- package/dist/datautils/index.d.ts +3 -3
- package/dist/datautils/interfaces.d.ts +8 -2
- package/dist/datautils/picks.d.ts +70 -6
- package/dist/datautils/schematicShapeGenerator.d.ts +54 -0
- package/dist/datautils/seismicimage.d.ts +14 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.js +343 -364
- package/dist/interfaces.d.ts +21 -121
- package/dist/layers/CalloutCanvasLayer.d.ts +14 -5
- package/dist/layers/CustomDisplayObjects/ComplexRope.d.ts +22 -0
- package/dist/layers/CustomDisplayObjects/ComplexRopeGeometry.d.ts +27 -0
- package/dist/layers/CustomDisplayObjects/FixedWidthSimpleRope.d.ts +20 -0
- package/dist/layers/CustomDisplayObjects/FixedWidthSimpleRopeGeometry.d.ts +26 -0
- package/dist/layers/CustomDisplayObjects/UniformTextureStretchRope.d.ts +17 -0
- package/dist/layers/CustomDisplayObjects/UniformTextureStretchRopeGeometry.d.ts +24 -0
- package/dist/layers/GeomodelCanvasLayer.d.ts +15 -14
- package/dist/layers/GeomodelLabelsLayer.d.ts +24 -12
- package/dist/layers/GeomodelLayerV2.d.ts +5 -6
- package/dist/layers/GridLayer.d.ts +17 -5
- package/dist/layers/ImageCanvasLayer.d.ts +15 -4
- package/dist/layers/SchematicLayer.d.ts +91 -0
- package/dist/layers/SeismicCanvasLayer.d.ts +13 -2
- package/dist/layers/WellborePathLayer.d.ts +11 -4
- package/dist/layers/base/CanvasLayer.d.ts +5 -5
- package/dist/layers/base/HTMLLayer.d.ts +2 -2
- package/dist/layers/base/Layer.d.ts +35 -15
- package/dist/layers/base/PixiLayer.d.ts +18 -13
- package/dist/layers/base/SVGLayer.d.ts +2 -2
- package/dist/layers/base/index.d.ts +2 -2
- package/dist/layers/index.d.ts +9 -12
- package/dist/layers/schematicInterfaces.d.ts +169 -0
- package/package.json +7 -5
- package/dist/datautils/wellboreItemShapeGenerator.d.ts +0 -22
- package/dist/layers/CasingLayer.d.ts +0 -21
- package/dist/layers/CementLayer.d.ts +0 -14
- package/dist/layers/CompletionLayer.d.ts +0 -20
- package/dist/layers/GeomodelLayer.d.ts +0 -7
- package/dist/layers/HoleSizeLayer.d.ts +0 -11
- package/dist/layers/WellboreBaseComponentLayer.d.ts +0 -26
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { SVGLayer } from './base/SVGLayer';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { OnUpdateEvent, OnRescaleEvent } from '../interfaces';
|
|
3
|
+
import { LayerOptions } from '..';
|
|
4
|
+
export interface WellborepathLayerOptions<T extends [number, number][]> extends LayerOptions<T> {
|
|
5
|
+
stroke: string;
|
|
6
|
+
strokeWidth: string;
|
|
7
|
+
curveType?: string;
|
|
8
|
+
tension?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare class WellborepathLayer<T extends [number, number][]> extends SVGLayer<T> {
|
|
4
11
|
rescaleEvent: OnRescaleEvent;
|
|
5
|
-
constructor(id?: string, options?: WellborepathLayerOptions);
|
|
6
|
-
onUpdate(event: OnUpdateEvent): void;
|
|
12
|
+
constructor(id?: string, options?: WellborepathLayerOptions<T>);
|
|
13
|
+
onUpdate(event: OnUpdateEvent<T>): void;
|
|
7
14
|
onRescale(event: OnRescaleEvent): void;
|
|
8
15
|
render(): void;
|
|
9
16
|
private renderWellborePath;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Layer } from './Layer';
|
|
2
2
|
import { OnMountEvent, OnUpdateEvent, OnResizeEvent, OnRescaleEvent } from '../../interfaces';
|
|
3
|
-
export declare abstract class CanvasLayer extends Layer {
|
|
3
|
+
export declare abstract class CanvasLayer<T> extends Layer<T> {
|
|
4
4
|
ctx: CanvasRenderingContext2D;
|
|
5
5
|
elm: HTMLElement;
|
|
6
6
|
canvas: HTMLCanvasElement;
|
|
7
|
-
onOpacityChanged(
|
|
8
|
-
onOrderChanged(
|
|
9
|
-
onInteractivityChanged(
|
|
7
|
+
onOpacityChanged(_opacity: number): void;
|
|
8
|
+
onOrderChanged(_order: number): void;
|
|
9
|
+
onInteractivityChanged(_interactive: boolean): void;
|
|
10
10
|
setVisibility(visible: boolean): void;
|
|
11
11
|
updateStyle(visible?: boolean): void;
|
|
12
12
|
onMount(event: OnMountEvent): void;
|
|
13
13
|
onUnmount(): void;
|
|
14
14
|
onResize(event: OnResizeEvent): void;
|
|
15
|
-
onUpdate(event: OnUpdateEvent): void;
|
|
15
|
+
onUpdate(event: OnUpdateEvent<T>): void;
|
|
16
16
|
resetTransform(): void;
|
|
17
17
|
setTransform(event: OnRescaleEvent): void;
|
|
18
18
|
clearCanvas(): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Selection } from 'd3-selection';
|
|
2
2
|
import { Layer } from './Layer';
|
|
3
3
|
import { OnMountEvent, OnResizeEvent } from '../../interfaces';
|
|
4
|
-
export declare abstract class HTMLLayer extends Layer {
|
|
5
|
-
elm: Selection<HTMLElement,
|
|
4
|
+
export declare abstract class HTMLLayer<T> extends Layer<T> {
|
|
5
|
+
elm: Selection<HTMLElement, unknown, null, undefined>;
|
|
6
6
|
onMount(event: OnMountEvent): void;
|
|
7
7
|
onUnmount(): void;
|
|
8
8
|
onResize(event: OnResizeEvent): void;
|
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnMountEvent, OnUnmountEvent, OnUpdateEvent, OnRescaleEvent, OnResizeEvent } from '../../interfaces';
|
|
2
2
|
import { IntersectionReferenceSystem } from '../../control';
|
|
3
|
-
export
|
|
3
|
+
export interface LayerOptions<T> {
|
|
4
|
+
order?: number;
|
|
5
|
+
layerOpacity?: number;
|
|
6
|
+
referenceSystem?: IntersectionReferenceSystem;
|
|
7
|
+
data?: T;
|
|
8
|
+
interactive?: boolean;
|
|
9
|
+
onMount?(event: OnMountEvent, layer: Layer<T>): void;
|
|
10
|
+
onUnmount?(event: OnUnmountEvent, layer: Layer<T>): void;
|
|
11
|
+
onUpdate?(event: OnUpdateEvent<T>, layer: Layer<T>): void;
|
|
12
|
+
onRescale?(event: OnRescaleEvent, layer: Layer<T>): void;
|
|
13
|
+
onResize?(event: OnResizeEvent, layer: Layer<T>): void;
|
|
14
|
+
}
|
|
15
|
+
export declare abstract class Layer<T> {
|
|
4
16
|
private _id;
|
|
5
17
|
private _order;
|
|
6
|
-
protected _options: LayerOptions
|
|
18
|
+
protected _options: LayerOptions<T>;
|
|
7
19
|
private loading;
|
|
8
20
|
private _element?;
|
|
9
21
|
private _opacity;
|
|
@@ -11,11 +23,11 @@ export declare abstract class Layer {
|
|
|
11
23
|
private _data?;
|
|
12
24
|
private _visible;
|
|
13
25
|
private _interactive;
|
|
14
|
-
constructor(id?: string, options?: LayerOptions);
|
|
26
|
+
constructor(id?: string, options?: LayerOptions<T>);
|
|
15
27
|
get id(): string;
|
|
16
28
|
get element(): HTMLElement;
|
|
17
|
-
get options(): LayerOptions
|
|
18
|
-
set options(options: LayerOptions);
|
|
29
|
+
get options(): LayerOptions<T>;
|
|
30
|
+
set options(options: LayerOptions<T>);
|
|
19
31
|
set isLoading(loading: boolean);
|
|
20
32
|
get isLoading(): boolean;
|
|
21
33
|
set opacity(opacity: number);
|
|
@@ -26,24 +38,32 @@ export declare abstract class Layer {
|
|
|
26
38
|
get interactive(): boolean;
|
|
27
39
|
get referenceSystem(): IntersectionReferenceSystem;
|
|
28
40
|
set referenceSystem(referenceSystem: IntersectionReferenceSystem);
|
|
29
|
-
get data():
|
|
30
|
-
set data(data:
|
|
41
|
+
get data(): T;
|
|
42
|
+
set data(data: T);
|
|
31
43
|
get isVisible(): boolean;
|
|
32
|
-
getData():
|
|
33
|
-
setData(data:
|
|
44
|
+
getData(): T;
|
|
45
|
+
setData(data: T): void;
|
|
34
46
|
/**
|
|
35
47
|
* Clears data and (optionally) the reference system
|
|
36
48
|
* @param includeReferenceSystem - (optional) if true also removes reference system, default is true
|
|
37
49
|
*/
|
|
38
50
|
clearData(includeReferenceSystem?: boolean): void;
|
|
39
|
-
setVisibility(visible: boolean): void;
|
|
51
|
+
setVisibility(visible: boolean, _layerId?: string): void;
|
|
40
52
|
onMount(event: OnMountEvent): void;
|
|
41
53
|
onUnmount(event?: OnUnmountEvent): void;
|
|
42
54
|
onResize(event: OnResizeEvent): void;
|
|
43
|
-
onUpdate(event: OnUpdateEvent): void;
|
|
55
|
+
onUpdate(event: OnUpdateEvent<T>): void;
|
|
44
56
|
onRescale(event: OnRescaleEvent): void;
|
|
45
57
|
optionsRescale(event: OnRescaleEvent): void;
|
|
46
|
-
onOpacityChanged(opacity: number): void;
|
|
47
|
-
onOrderChanged(order: number): void;
|
|
48
|
-
onInteractivityChanged(interactive: boolean): void;
|
|
58
|
+
abstract onOpacityChanged(opacity: number): void;
|
|
59
|
+
abstract onOrderChanged(order: number): void;
|
|
60
|
+
abstract onInteractivityChanged(interactive: boolean): void;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* Some layers might be built up of several internal layers that should individually be visibility-togglable.
|
|
64
|
+
* Reasons for having multiple internal layers might be tightly related data between layers or need for sharing render context
|
|
65
|
+
*
|
|
66
|
+
* @returns list of internal layer ids
|
|
67
|
+
*/
|
|
68
|
+
getInternalLayerIds(): string[];
|
|
49
69
|
}
|
|
@@ -1,27 +1,32 @@
|
|
|
1
|
-
import { AbstractRenderer, Container, IRendererOptionsAuto, RENDERER_TYPE } from 'pixi.js';
|
|
2
|
-
import { Layer } from './Layer';
|
|
3
|
-
import { OnMountEvent, OnRescaleEvent, OnResizeEvent, OnUnmountEvent
|
|
1
|
+
import { AbstractRenderer, Application, Container, DisplayObject, IRendererOptionsAuto, RENDERER_TYPE } from 'pixi.js';
|
|
2
|
+
import { Layer, LayerOptions } from './Layer';
|
|
3
|
+
import { OnMountEvent, OnRescaleEvent, OnResizeEvent, OnUnmountEvent } from '../../interfaces';
|
|
4
4
|
export declare class PixiRenderApplication {
|
|
5
5
|
stage: Container;
|
|
6
6
|
renderer: AbstractRenderer;
|
|
7
|
-
constructor(pixiRenderOptions
|
|
7
|
+
constructor(pixiRenderOptions?: IRendererOptionsAuto);
|
|
8
8
|
destroy(): void;
|
|
9
9
|
get view(): HTMLCanvasElement;
|
|
10
10
|
render(): void;
|
|
11
11
|
}
|
|
12
|
-
export declare abstract class PixiLayer extends Layer {
|
|
13
|
-
|
|
14
|
-
ctx
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
export declare abstract class PixiLayer<T> extends Layer<T> {
|
|
13
|
+
private pixiViewContainer;
|
|
14
|
+
private ctx;
|
|
15
|
+
private container;
|
|
16
|
+
constructor(ctx: Application | PixiRenderApplication, id?: string, options?: LayerOptions<T>);
|
|
17
17
|
render(): void;
|
|
18
|
+
addChild(child: DisplayObject): void;
|
|
19
|
+
clearLayer(): void;
|
|
20
|
+
onMount(event: OnMountEvent): void;
|
|
18
21
|
onUnmount(event?: OnUnmountEvent): void;
|
|
19
22
|
onResize(event: OnResizeEvent): void;
|
|
20
23
|
onRescale(event: OnRescaleEvent): void;
|
|
24
|
+
protected setContainerPosition(x?: number, y?: number): void;
|
|
25
|
+
protected setContainerScale(x?: number, y?: number): void;
|
|
21
26
|
updateStyle(visible?: boolean): void;
|
|
22
|
-
setVisibility(visible: boolean): void;
|
|
23
|
-
onOpacityChanged(
|
|
24
|
-
onOrderChanged(
|
|
25
|
-
onInteractivityChanged(
|
|
27
|
+
setVisibility(visible: boolean, layerId?: string): void;
|
|
28
|
+
onOpacityChanged(_opacity: number): void;
|
|
29
|
+
onOrderChanged(_order: number): void;
|
|
30
|
+
onInteractivityChanged(_interactive: boolean): void;
|
|
26
31
|
renderType(): RENDERER_TYPE;
|
|
27
32
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Selection } from 'd3-selection';
|
|
2
2
|
import { Layer } from './Layer';
|
|
3
3
|
import { OnMountEvent, OnResizeEvent } from '../../interfaces';
|
|
4
|
-
export declare abstract class SVGLayer extends Layer {
|
|
5
|
-
elm: Selection<SVGElement,
|
|
4
|
+
export declare abstract class SVGLayer<T> extends Layer<T> {
|
|
5
|
+
elm: Selection<SVGElement, unknown, null, undefined>;
|
|
6
6
|
onMount(event: OnMountEvent): void;
|
|
7
7
|
onUnmount(): void;
|
|
8
8
|
onResize(event: OnResizeEvent): void;
|
package/dist/layers/index.d.ts
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
export * from './base/Layer';
|
|
2
1
|
export * from './base/CanvasLayer';
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './base/SVGLayer';
|
|
2
|
+
export * from './base/Layer';
|
|
5
3
|
export * from './base/HTMLLayer';
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
4
|
+
export * from './base/SVGLayer';
|
|
5
|
+
export * from './base/PixiLayer';
|
|
6
|
+
export * from './schematicInterfaces';
|
|
7
|
+
export * from './CalloutCanvasLayer';
|
|
8
8
|
export * from './GeomodelCanvasLayer';
|
|
9
|
-
export * from './GeomodelLayerV2';
|
|
10
9
|
export * from './GeomodelLabelsLayer';
|
|
11
|
-
export * from './
|
|
10
|
+
export * from './GeomodelLayerV2';
|
|
11
|
+
export * from './GridLayer';
|
|
12
12
|
export * from './ImageCanvasLayer';
|
|
13
|
-
export * from './
|
|
14
|
-
export * from './CasingLayer';
|
|
15
|
-
export * from './CementLayer';
|
|
13
|
+
export * from './SchematicLayer';
|
|
16
14
|
export * from './SeismicCanvasLayer';
|
|
17
|
-
export * from './
|
|
18
|
-
export * from './CompletionLayer';
|
|
15
|
+
export * from './WellborePathLayer';
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
export declare function assertNever(x: never): never;
|
|
2
|
+
export interface HoleSize {
|
|
3
|
+
kind: 'hole';
|
|
4
|
+
id: string;
|
|
5
|
+
diameter: number;
|
|
6
|
+
start: number;
|
|
7
|
+
end: number;
|
|
8
|
+
innerDiameter?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface Casing {
|
|
11
|
+
kind: 'casing';
|
|
12
|
+
id: string;
|
|
13
|
+
casingId: string;
|
|
14
|
+
diameter: number;
|
|
15
|
+
start: number;
|
|
16
|
+
end: number;
|
|
17
|
+
hasShoe: boolean;
|
|
18
|
+
innerDiameter: number;
|
|
19
|
+
}
|
|
20
|
+
interface SymbolComponent {
|
|
21
|
+
id: string;
|
|
22
|
+
diameter: number;
|
|
23
|
+
start: number;
|
|
24
|
+
end: number;
|
|
25
|
+
symbolKey: string;
|
|
26
|
+
}
|
|
27
|
+
export interface PAndASymbol extends SymbolComponent {
|
|
28
|
+
kind: 'pAndASymbol';
|
|
29
|
+
}
|
|
30
|
+
export declare const isPAndASymbol: (item: PAndA) => item is PAndASymbol;
|
|
31
|
+
export interface CementSqueeze {
|
|
32
|
+
kind: 'cementSqueeze';
|
|
33
|
+
id: string;
|
|
34
|
+
top: number;
|
|
35
|
+
bottom: number;
|
|
36
|
+
casingIds?: string[];
|
|
37
|
+
}
|
|
38
|
+
export declare const isCementSqueeze: (item: PAndA) => item is CementSqueeze;
|
|
39
|
+
export interface CementPlug {
|
|
40
|
+
kind: 'cementPlug';
|
|
41
|
+
id: string;
|
|
42
|
+
top: number;
|
|
43
|
+
bottom: number;
|
|
44
|
+
holeId?: string;
|
|
45
|
+
casingId?: string;
|
|
46
|
+
secondCasingId?: string;
|
|
47
|
+
}
|
|
48
|
+
export declare const isCementPlug: (item: PAndA) => item is CementSqueeze;
|
|
49
|
+
export declare type PAndA = PAndASymbol | CementSqueeze | CementPlug;
|
|
50
|
+
interface BaseCompletion {
|
|
51
|
+
id: string;
|
|
52
|
+
diameter: number;
|
|
53
|
+
start: number;
|
|
54
|
+
end: number;
|
|
55
|
+
}
|
|
56
|
+
export interface Screen extends BaseCompletion {
|
|
57
|
+
kind: 'screen';
|
|
58
|
+
}
|
|
59
|
+
export interface Tubing extends BaseCompletion {
|
|
60
|
+
kind: 'tubing';
|
|
61
|
+
}
|
|
62
|
+
export interface CompletionSymbol extends BaseCompletion {
|
|
63
|
+
kind: 'completionSymbol';
|
|
64
|
+
symbolKey: string;
|
|
65
|
+
}
|
|
66
|
+
export declare type Completion = Tubing | Screen | CompletionSymbol;
|
|
67
|
+
export declare const foldCompletion: <T>(fScreen: (obj: Screen) => T, fTubing: (obj: Tubing) => T, fSymbol: (obj: CompletionSymbol) => T) => (completion: Completion) => T;
|
|
68
|
+
export interface Cement {
|
|
69
|
+
kind: 'cement';
|
|
70
|
+
id: string;
|
|
71
|
+
casingIds?: string[];
|
|
72
|
+
toc: number;
|
|
73
|
+
}
|
|
74
|
+
export interface SchematicData {
|
|
75
|
+
holeSizes: HoleSize[];
|
|
76
|
+
casings: Casing[];
|
|
77
|
+
cements: Cement[];
|
|
78
|
+
completion: Completion[];
|
|
79
|
+
pAndA: PAndA[];
|
|
80
|
+
symbols: {
|
|
81
|
+
[key: string]: string;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
export interface InternalLayerOptions {
|
|
85
|
+
holeLayerId: string;
|
|
86
|
+
casingLayerId: string;
|
|
87
|
+
completionLayerId: string;
|
|
88
|
+
cementLayerId: string;
|
|
89
|
+
pAndALayerId: string;
|
|
90
|
+
}
|
|
91
|
+
export declare const defaultInternalLayerOptions: (layerId: string) => {
|
|
92
|
+
holeLayerId: string;
|
|
93
|
+
casingLayerId: string;
|
|
94
|
+
completionLayerId: string;
|
|
95
|
+
pAndALayerId: string;
|
|
96
|
+
cementLayerId: string;
|
|
97
|
+
};
|
|
98
|
+
export interface HoleOptions {
|
|
99
|
+
firstColor: string;
|
|
100
|
+
secondColor: string;
|
|
101
|
+
lineColor: string;
|
|
102
|
+
}
|
|
103
|
+
export declare const defaultHoleOptions: HoleOptions;
|
|
104
|
+
export interface CasingShoeSize {
|
|
105
|
+
width: number;
|
|
106
|
+
length: number;
|
|
107
|
+
}
|
|
108
|
+
export interface CasingOptions {
|
|
109
|
+
solidColor: string;
|
|
110
|
+
lineColor: string;
|
|
111
|
+
shoeSize: CasingShoeSize;
|
|
112
|
+
}
|
|
113
|
+
export declare const defaultCasingOptions: {
|
|
114
|
+
solidColor: string;
|
|
115
|
+
lineColor: string;
|
|
116
|
+
shoeSize: {
|
|
117
|
+
width: number;
|
|
118
|
+
length: number;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
export interface CementOptions {
|
|
122
|
+
firstColor: string;
|
|
123
|
+
secondColor: string;
|
|
124
|
+
scalingFactor: number;
|
|
125
|
+
}
|
|
126
|
+
export declare const defaultCementOptions: {
|
|
127
|
+
firstColor: string;
|
|
128
|
+
secondColor: string;
|
|
129
|
+
scalingFactor: number;
|
|
130
|
+
};
|
|
131
|
+
export interface CementSqueezeOptions {
|
|
132
|
+
firstColor: string;
|
|
133
|
+
secondColor: string;
|
|
134
|
+
scalingFactor: number;
|
|
135
|
+
}
|
|
136
|
+
export declare const defaultCementSqueezeOptions: {
|
|
137
|
+
firstColor: string;
|
|
138
|
+
secondColor: string;
|
|
139
|
+
scalingFactor: number;
|
|
140
|
+
};
|
|
141
|
+
export interface ScreenOptions {
|
|
142
|
+
scalingFactor: number;
|
|
143
|
+
lineColor: string;
|
|
144
|
+
}
|
|
145
|
+
export declare const defaultScreenOptions: {
|
|
146
|
+
scalingFactor: number;
|
|
147
|
+
lineColor: string;
|
|
148
|
+
};
|
|
149
|
+
export interface TubingOptions {
|
|
150
|
+
innerColor: string;
|
|
151
|
+
outerColor: string;
|
|
152
|
+
scalingFactor: number;
|
|
153
|
+
}
|
|
154
|
+
export declare const defaultTubingOptions: {
|
|
155
|
+
scalingFactor: number;
|
|
156
|
+
innerColor: string;
|
|
157
|
+
outerColor: string;
|
|
158
|
+
};
|
|
159
|
+
export interface CementPlugOptions {
|
|
160
|
+
firstColor: string;
|
|
161
|
+
secondColor: string;
|
|
162
|
+
scalingFactor: number;
|
|
163
|
+
}
|
|
164
|
+
export declare const defaultCementPlugOptions: {
|
|
165
|
+
firstColor: string;
|
|
166
|
+
secondColor: string;
|
|
167
|
+
scalingFactor: number;
|
|
168
|
+
};
|
|
169
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/esv-intersection",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.1",
|
|
4
4
|
"description": "Intersection component package with testing and automatic documentation.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
"build": "rollup -c",
|
|
15
15
|
"prepub": "npm run build",
|
|
16
16
|
"pub": "npm publish --access=public",
|
|
17
|
-
"
|
|
17
|
+
"prepub-beta": "npm run build",
|
|
18
|
+
"pub-beta": "npm publish --tag=beta --access=public",
|
|
19
|
+
"lint": "eslint --ext .js,.jsx,.ts,.tsx src test",
|
|
18
20
|
"test": "tsc --project tsconfig.test.json && jest",
|
|
19
21
|
"test:watch": "jest --watchAll",
|
|
20
22
|
"predocs": "rimraf docs_out",
|
|
@@ -61,8 +63,8 @@
|
|
|
61
63
|
"jest-canvas-mock": "^2.4.0",
|
|
62
64
|
"jest-environment-jsdom": "^29.0.3",
|
|
63
65
|
"mock-raf": "^1.0.1",
|
|
64
|
-
"pixi.js": "^6.5.
|
|
65
|
-
"prettier": "^2.
|
|
66
|
+
"pixi.js": "^6.5.8",
|
|
67
|
+
"prettier": "^2.7.1",
|
|
66
68
|
"rimraf": "^3.0.2",
|
|
67
69
|
"rollup": "^2.79.0",
|
|
68
70
|
"rollup-plugin-commonjs": "^10.1.0",
|
|
@@ -90,7 +92,7 @@
|
|
|
90
92
|
]
|
|
91
93
|
},
|
|
92
94
|
"peerDependencies": {
|
|
93
|
-
"pixi.js": "^6.5.
|
|
95
|
+
"pixi.js": "^6.5.8"
|
|
94
96
|
},
|
|
95
97
|
"dependencies": {
|
|
96
98
|
"@equinor/videx-math": "^1.1.0",
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Point } from 'pixi.js';
|
|
2
|
-
import { Cement, Casing, HoleSize } from '..';
|
|
3
|
-
export declare const getEndLines: (rightPath: Point[], leftPath: Point[]) => {
|
|
4
|
-
top: Point[];
|
|
5
|
-
bottom: Point[];
|
|
6
|
-
};
|
|
7
|
-
export declare const makeTubularPolygon: (rightPath: Point[], leftPath: Point[]) => Point[];
|
|
8
|
-
export declare const overlaps: (top1: number, bottom1: number, top2: number, bottom2: number) => boolean;
|
|
9
|
-
export declare const uniq: <T>(arr: T[]) => T[];
|
|
10
|
-
export declare const findIntersectingItems: (cement: Cement, bottomOfCement: number, parentCasings: Casing[], casings: Casing[], holes: HoleSize[]) => {
|
|
11
|
-
holes: HoleSize[];
|
|
12
|
-
outerCasings: Casing[];
|
|
13
|
-
};
|
|
14
|
-
export declare const cementDiameterChangeDepths: (cement: Cement, bottomOfCement: number, diameterIntervals: {
|
|
15
|
-
start: number;
|
|
16
|
-
end: number;
|
|
17
|
-
}[]) => number[];
|
|
18
|
-
export declare const calculateCementDiameter: (innerCasing: Casing[], nonAttachedCasings: Casing[], holes: HoleSize[]) => (depth: number) => {
|
|
19
|
-
md: number;
|
|
20
|
-
innerDiameter: number;
|
|
21
|
-
outerDiameter: number;
|
|
22
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Point, Texture } from 'pixi.js';
|
|
2
|
-
import { WellboreBaseComponentLayer } from './WellboreBaseComponentLayer';
|
|
3
|
-
import { CasingLayerOptions, Casing } from '..';
|
|
4
|
-
export interface CasingRenderObject {
|
|
5
|
-
pathPoints: number[][];
|
|
6
|
-
polygon: Point[];
|
|
7
|
-
leftPath: Point[];
|
|
8
|
-
rightPath: Point[];
|
|
9
|
-
radius: number;
|
|
10
|
-
diameter: number;
|
|
11
|
-
casingWallWidth: number;
|
|
12
|
-
}
|
|
13
|
-
export declare class CasingLayer extends WellboreBaseComponentLayer {
|
|
14
|
-
constructor(id?: string, options?: CasingLayerOptions);
|
|
15
|
-
preRender(): void;
|
|
16
|
-
prepareCasingRenderObject: (casing: Casing) => CasingRenderObject;
|
|
17
|
-
drawCasing: (zippedRenderObject: [Casing, CasingRenderObject]) => void;
|
|
18
|
-
drawShoe(casingEnd: number, casingRadius: number): void;
|
|
19
|
-
generateShoe: (casingEnd: number, casingRadius: number, length: number, width: number) => Point[];
|
|
20
|
-
createTexture(diameter: number): Texture;
|
|
21
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Point, Texture } from 'pixi.js';
|
|
2
|
-
import { WellboreBaseComponentLayer } from './WellboreBaseComponentLayer';
|
|
3
|
-
import { CementLayerOptions, Cement, Casing, HoleSize } from '../interfaces';
|
|
4
|
-
export interface CementShape {
|
|
5
|
-
rightPolygon: Point[];
|
|
6
|
-
leftPolygon: Point[];
|
|
7
|
-
path: Point[];
|
|
8
|
-
}
|
|
9
|
-
export declare class CementLayer extends WellboreBaseComponentLayer {
|
|
10
|
-
constructor(id?: string, options?: CementLayerOptions);
|
|
11
|
-
preRender(): void;
|
|
12
|
-
createCementShape: (cement: Cement, casings: Casing[], holes: HoleSize[]) => CementShape;
|
|
13
|
-
createTexture(): Texture;
|
|
14
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Graphics } from 'pixi.js';
|
|
2
|
-
import { PixiLayer } from './base/PixiLayer';
|
|
3
|
-
import { OnUpdateEvent } from '..';
|
|
4
|
-
import { CompletionLayerOptions, OnRescaleEvent } from '../interfaces';
|
|
5
|
-
export interface CompletionItem {
|
|
6
|
-
}
|
|
7
|
-
export declare class CompletionLayer extends PixiLayer {
|
|
8
|
-
constructor(id: string, options: CompletionLayerOptions);
|
|
9
|
-
onRescale(event: OnRescaleEvent): void;
|
|
10
|
-
onUpdate(event: OnUpdateEvent): void;
|
|
11
|
-
preRender(): void;
|
|
12
|
-
clearStage(): void;
|
|
13
|
-
getShape(type: string): Graphics;
|
|
14
|
-
getScale(type: string, length: number, width: number): {
|
|
15
|
-
scaleX: number;
|
|
16
|
-
scaleY: number;
|
|
17
|
-
};
|
|
18
|
-
generateCompletionItem(wbp: any, data: any): CompletionItem;
|
|
19
|
-
drawCompletionItem(item: any): void;
|
|
20
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Texture } from 'pixi.js';
|
|
2
|
-
import { WellboreBaseComponentLayer } from './WellboreBaseComponentLayer';
|
|
3
|
-
import { HoleSizeLayerOptions, HoleSize } from '..';
|
|
4
|
-
export declare class HoleSizeLayer extends WellboreBaseComponentLayer {
|
|
5
|
-
maxDiameter: number;
|
|
6
|
-
constructor(id?: string, options?: HoleSizeLayerOptions);
|
|
7
|
-
preRender(): void;
|
|
8
|
-
drawHoleSize: (holeObject: HoleSize) => void;
|
|
9
|
-
createTexture(diameter: number): Texture;
|
|
10
|
-
createBaseTexture(width: number, height: number): Texture;
|
|
11
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Graphics, Texture, Point } from 'pixi.js';
|
|
2
|
-
import { PixiLayer } from './base/PixiLayer';
|
|
3
|
-
import { OnUpdateEvent, OnRescaleEvent, WellComponentBaseOptions, MDPoint, OnUnmountEvent } from '../interfaces';
|
|
4
|
-
export declare abstract class WellboreBaseComponentLayer extends PixiLayer {
|
|
5
|
-
_textureCache: Texture;
|
|
6
|
-
rescaleEvent: OnRescaleEvent;
|
|
7
|
-
constructor(id?: string, options?: WellComponentBaseOptions);
|
|
8
|
-
abstract preRender(): void;
|
|
9
|
-
onUnmount(event?: OnUnmountEvent): void;
|
|
10
|
-
onUpdate(event: OnUpdateEvent): void;
|
|
11
|
-
onRescale(event: OnRescaleEvent): void;
|
|
12
|
-
clearStage(): void;
|
|
13
|
-
/**
|
|
14
|
-
* Calculate yRatio without zFactor
|
|
15
|
-
* TODO consider to move this into ZoomPanHandler
|
|
16
|
-
*/
|
|
17
|
-
yRatio(): number;
|
|
18
|
-
getMdPoint: (md: number) => MDPoint;
|
|
19
|
-
getPathForPoints: (start: number, end: number, interestPoints: number[]) => MDPoint[];
|
|
20
|
-
getZFactorScaledPathForPoints: (start: number, end: number, interestPoints: number[]) => MDPoint[];
|
|
21
|
-
drawBigPolygon: (coords: Point[], color?: number) => Graphics;
|
|
22
|
-
drawBigTexturedPolygon: (coords: Point[], t: Texture) => Graphics;
|
|
23
|
-
drawRopeWithMask(path: Point[], maskPolygon: Point[], texture: Texture): void;
|
|
24
|
-
drawRope(path: Point[], texture: Texture, tint?: number): void;
|
|
25
|
-
drawOutline(leftPath: Point[], rightPath: Point[], lineColor: number, lineWidth?: number, close?: boolean): void;
|
|
26
|
-
}
|