@equinor/esv-intersection 3.0.0-beta.6 → 3.0.0

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.
Files changed (73) hide show
  1. package/README.md +11 -16
  2. package/dist/components/axis.d.ts +47 -47
  3. package/dist/components/index.d.ts +1 -1
  4. package/dist/constants.d.ts +11 -11
  5. package/dist/control/ExtendedCurveInterpolator.d.ts +58 -58
  6. package/dist/control/IntersectionReferenceSystem.d.ts +96 -96
  7. package/dist/control/LayerManager.d.ts +76 -76
  8. package/dist/control/MainController.d.ts +154 -154
  9. package/dist/control/ZoomPanHandler.d.ts +158 -158
  10. package/dist/control/index.d.ts +5 -5
  11. package/dist/control/interfaces.d.ts +37 -37
  12. package/dist/control/overlay.d.ts +20 -20
  13. package/dist/datautils/colortable.d.ts +1 -1
  14. package/dist/datautils/findsample.d.ts +2 -2
  15. package/dist/datautils/index.d.ts +6 -6
  16. package/dist/datautils/interfaces.d.ts +63 -63
  17. package/dist/datautils/picks.d.ts +74 -74
  18. package/dist/datautils/schematicShapeGenerator.d.ts +59 -61
  19. package/dist/datautils/seismicimage.d.ts +45 -45
  20. package/dist/datautils/surfacedata.d.ts +10 -10
  21. package/dist/datautils/trajectory.d.ts +14 -14
  22. package/dist/index.cjs +15 -0
  23. package/dist/index.cjs.map +1 -0
  24. package/dist/index.d.ts +6 -6
  25. package/dist/index.mjs +7944 -0
  26. package/dist/index.mjs.map +1 -0
  27. package/dist/index.umd.js +15 -1
  28. package/dist/index.umd.js.map +1 -0
  29. package/dist/interfaces.d.ts +86 -86
  30. package/dist/layers/CalloutCanvasLayer.d.ts +60 -60
  31. package/dist/layers/CustomDisplayObjects/ComplexRope.d.ts +22 -22
  32. package/dist/layers/CustomDisplayObjects/ComplexRopeGeometry.d.ts +27 -27
  33. package/dist/layers/CustomDisplayObjects/FixedWidthSimpleRope.d.ts +20 -20
  34. package/dist/layers/CustomDisplayObjects/FixedWidthSimpleRopeGeometry.d.ts +26 -26
  35. package/dist/layers/CustomDisplayObjects/UniformTextureStretchRope.d.ts +17 -17
  36. package/dist/layers/CustomDisplayObjects/UniformTextureStretchRopeGeometry.d.ts +24 -24
  37. package/dist/layers/GeomodelCanvasLayer.d.ts +28 -28
  38. package/dist/layers/GeomodelLabelsLayer.d.ts +49 -49
  39. package/dist/layers/GeomodelLayerV2.d.ts +12 -12
  40. package/dist/layers/GridLayer.d.ts +29 -29
  41. package/dist/layers/ImageCanvasLayer.d.ts +20 -20
  42. package/dist/layers/ReferenceLineLayer.d.ts +29 -29
  43. package/dist/layers/SchematicLayer.d.ts +113 -114
  44. package/dist/layers/SeismicCanvasLayer.d.ts +18 -18
  45. package/dist/layers/WellborePathLayer.d.ts +17 -17
  46. package/dist/layers/base/CanvasLayer.d.ts +19 -19
  47. package/dist/layers/base/HTMLLayer.d.ts +13 -13
  48. package/dist/layers/base/Layer.d.ts +69 -69
  49. package/dist/layers/base/PixiLayer.d.ts +32 -32
  50. package/dist/layers/base/SVGLayer.d.ts +13 -13
  51. package/dist/layers/base/index.d.ts +5 -5
  52. package/dist/layers/index.d.ts +16 -16
  53. package/dist/layers/schematicInterfaces.d.ts +208 -208
  54. package/dist/tubing1.svg +3 -0
  55. package/dist/tubing2.svg +6 -0
  56. package/dist/tubing3.svg +12 -0
  57. package/dist/utils/arc-length.d.ts +23 -23
  58. package/dist/utils/binary-search.d.ts +8 -8
  59. package/dist/utils/color.d.ts +5 -5
  60. package/dist/utils/index.d.ts +1 -1
  61. package/dist/utils/root-finder.d.ts +34 -34
  62. package/dist/utils/text.d.ts +14 -14
  63. package/dist/utils/vectorUtils.d.ts +15 -15
  64. package/dist/vendor/pixi-dashed-line/index.d.ts +57 -0
  65. package/package.json +30 -55
  66. package/src/datautils/schematicShapeGenerator.ts +2 -8
  67. package/src/layers/SchematicLayer.ts +12 -37
  68. package/src/layers/base/PixiLayer.ts +4 -4
  69. package/src/vendor/pixi-dashed-line/index.ts +394 -0
  70. package/dist/datautils/camelcase.d.ts +0 -5
  71. package/dist/index.esm.js +0 -1
  72. package/dist/index.js +0 -1
  73. package/src/datautils/camelcase.ts +0 -28
@@ -1,208 +1,208 @@
1
- export declare function assertNever(x: never): never;
2
- /**
3
- * The closure type of the outline
4
- */
5
- export type OutlineClosure = 'None' | 'TopAndBottom' | 'Top' | 'Bottom';
6
- export interface HoleSize {
7
- kind: 'hole';
8
- id: string;
9
- diameter: number;
10
- start: number;
11
- end: number;
12
- }
13
- export interface CasingWindow {
14
- id: string;
15
- start: number;
16
- end: number;
17
- }
18
- export interface Casing {
19
- kind: 'casing';
20
- id: string;
21
- diameter: number;
22
- start: number;
23
- end: number;
24
- hasShoe: boolean;
25
- innerDiameter: number;
26
- windows?: CasingWindow[];
27
- }
28
- interface SymbolComponent {
29
- id: string;
30
- diameter: number;
31
- start: number;
32
- end: number;
33
- symbolKey: string;
34
- }
35
- export interface PAndASymbol extends SymbolComponent {
36
- kind: 'pAndASymbol';
37
- }
38
- export declare const isPAndASymbol: (item: PAndA) => item is PAndASymbol;
39
- export interface CementSqueeze {
40
- kind: 'cementSqueeze';
41
- id: string;
42
- start: number;
43
- end: number;
44
- /**
45
- * Referenced Casing and Completion ids
46
- */
47
- referenceIds: string[];
48
- }
49
- export declare const isCementSqueeze: (item: PAndA) => item is CementSqueeze;
50
- export interface CementPlug {
51
- kind: 'cementPlug';
52
- id: string;
53
- start: number;
54
- end: number;
55
- /**
56
- * Referenced Casing, Completion ids
57
- */
58
- referenceIds: string[];
59
- }
60
- export declare const isCementPlug: (item: PAndA) => item is CementSqueeze;
61
- export type PAndA = PAndASymbol | CementSqueeze | CementPlug;
62
- interface BaseCompletion {
63
- id: string;
64
- diameter: number;
65
- start: number;
66
- end: number;
67
- }
68
- export interface Screen extends BaseCompletion {
69
- kind: 'screen';
70
- }
71
- export interface Tubing extends BaseCompletion {
72
- kind: 'tubing';
73
- }
74
- export interface CompletionSymbol extends BaseCompletion {
75
- kind: 'completionSymbol';
76
- symbolKey: string;
77
- }
78
- export type Completion = Tubing | Screen | CompletionSymbol;
79
- export declare const foldCompletion: <T>(fScreen: (obj: Screen) => T, fTubing: (obj: Tubing) => T, fSymbol: (obj: CompletionSymbol) => T) => (completion: Completion) => T;
80
- export interface Cement {
81
- kind: 'cement';
82
- id: string;
83
- /**
84
- * Referenced Casing and Completion ids
85
- */
86
- referenceIds: string[];
87
- toc: number;
88
- }
89
- /**
90
- * 'Open hole' and 'Open hole screen' are not included as they are not visualized and also not included in the ruleset
91
- */
92
- export type PerforationSubKind = 'Perforation' | 'Open hole gravel pack' | 'Open hole frac pack' | 'Cased hole frac pack' | 'Cased hole gravel pack' | 'Cased hole fracturation';
93
- export interface Perforation {
94
- kind: 'perforation';
95
- subKind: PerforationSubKind;
96
- id: string;
97
- start: number;
98
- end: number;
99
- /**
100
- * is the perforation open or sealed?
101
- */
102
- isOpen: boolean;
103
- }
104
- export declare const foldPerforationSubKind: <T>(options: {
105
- Perforation: (kind: 'Perforation') => T;
106
- OpenHoleGravelPack: (kind: 'Open hole gravel pack') => T;
107
- OpenHoleFracPack: (kind: 'Open hole frac pack') => T;
108
- CasedHoleGravelPack: (kind: 'Cased hole gravel pack') => T;
109
- CasedHoleFracPack: (kind: 'Cased hole frac pack') => T;
110
- CasedHoleFracturation: (kind: 'Cased hole fracturation') => T;
111
- }, subKind: PerforationSubKind) => T;
112
- export declare const shouldPerforationStartAtHoleDiameter: (perf: Perforation) => boolean;
113
- export declare const shouldPerforationStartAtCasingDiameter: (perf: Perforation) => boolean;
114
- export declare const hasPacking: (perf: Perforation) => boolean;
115
- export declare function hasFracLines(perf: Perforation): boolean;
116
- export declare function hasSpikes(perf: Perforation): boolean;
117
- export declare function isSubkindCasedHoleGravelPack(perf: Perforation): boolean;
118
- export declare function isSubKindPerforation(perf: Perforation): boolean;
119
- export declare function isSubKindCasedHoleFracPack(perf: Perforation): boolean;
120
- export declare function isOpenHoleFracPack(perf: Perforation): boolean;
121
- export declare const intersect: (a: Perforation, b: Perforation) => boolean;
122
- export interface SchematicData {
123
- holeSizes: HoleSize[];
124
- casings: Casing[];
125
- cements: Cement[];
126
- completion: Completion[];
127
- pAndA: PAndA[];
128
- symbols: {
129
- [key: string]: string;
130
- };
131
- perforations: Perforation[];
132
- }
133
- export interface InternalLayerOptions {
134
- holeLayerId: string;
135
- casingLayerId: string;
136
- completionLayerId: string;
137
- cementLayerId: string;
138
- pAndALayerId: string;
139
- perforationLayerId: string;
140
- }
141
- export declare const defaultInternalLayerOptions: (layerId: string) => InternalLayerOptions;
142
- export interface HoleOptions {
143
- firstColor: string;
144
- secondColor: string;
145
- lineColor: string;
146
- }
147
- export declare const defaultHoleOptions: HoleOptions;
148
- export interface CasingShoeSize {
149
- width: number;
150
- length: number;
151
- }
152
- export interface WindowOptions {
153
- dashColor: string;
154
- dashLength: number;
155
- spaceLength: number;
156
- }
157
- export interface CasingOptions {
158
- solidColor: string;
159
- lineColor: string;
160
- shoeSize: CasingShoeSize;
161
- windowOptions: WindowOptions;
162
- }
163
- export declare const defaultCasingOptions: CasingOptions;
164
- export interface PerforationOptions {
165
- stroke: string;
166
- yellow: string;
167
- grey: string;
168
- red: string;
169
- outline: string;
170
- transparent: string;
171
- spikeWidth: number;
172
- spikeLength: number;
173
- packingOpacity: number;
174
- fracLineLength: number;
175
- fracLineCurve: number;
176
- scalingFactor: number;
177
- }
178
- export declare const defaultPerforationOptions: PerforationOptions;
179
- export interface CementOptions {
180
- firstColor: string;
181
- secondColor: string;
182
- scalingFactor: number;
183
- }
184
- export declare const defaultCementOptions: CementOptions;
185
- export interface CementSqueezeOptions {
186
- firstColor: string;
187
- secondColor: string;
188
- scalingFactor: number;
189
- }
190
- export declare const defaultCementSqueezeOptions: CementSqueezeOptions;
191
- export interface ScreenOptions {
192
- scalingFactor: number;
193
- lineColor: string;
194
- }
195
- export declare const defaultScreenOptions: ScreenOptions;
196
- export interface TubingOptions {
197
- innerColor: string;
198
- outerColor: string;
199
- scalingFactor: number;
200
- }
201
- export declare const defaultTubingOptions: TubingOptions;
202
- export interface CementPlugOptions {
203
- firstColor: string;
204
- secondColor: string;
205
- scalingFactor: number;
206
- }
207
- export declare const defaultCementPlugOptions: CementPlugOptions;
208
- export {};
1
+ export declare function assertNever(x: never): never;
2
+ /**
3
+ * The closure type of the outline
4
+ */
5
+ export declare type OutlineClosure = 'None' | 'TopAndBottom' | 'Top' | 'Bottom';
6
+ export interface HoleSize {
7
+ kind: 'hole';
8
+ id: string;
9
+ diameter: number;
10
+ start: number;
11
+ end: number;
12
+ }
13
+ export interface CasingWindow {
14
+ id: string;
15
+ start: number;
16
+ end: number;
17
+ }
18
+ export interface Casing {
19
+ kind: 'casing';
20
+ id: string;
21
+ diameter: number;
22
+ start: number;
23
+ end: number;
24
+ hasShoe: boolean;
25
+ innerDiameter: number;
26
+ windows?: CasingWindow[];
27
+ }
28
+ interface SymbolComponent {
29
+ id: string;
30
+ diameter: number;
31
+ start: number;
32
+ end: number;
33
+ symbolKey: string;
34
+ }
35
+ export interface PAndASymbol extends SymbolComponent {
36
+ kind: 'pAndASymbol';
37
+ }
38
+ export declare const isPAndASymbol: (item: PAndA) => item is PAndASymbol;
39
+ export interface CementSqueeze {
40
+ kind: 'cementSqueeze';
41
+ id: string;
42
+ start: number;
43
+ end: number;
44
+ /**
45
+ * Referenced Casing and Completion ids
46
+ */
47
+ referenceIds: string[];
48
+ }
49
+ export declare const isCementSqueeze: (item: PAndA) => item is CementSqueeze;
50
+ export interface CementPlug {
51
+ kind: 'cementPlug';
52
+ id: string;
53
+ start: number;
54
+ end: number;
55
+ /**
56
+ * Referenced Casing, Completion ids
57
+ */
58
+ referenceIds: string[];
59
+ }
60
+ export declare const isCementPlug: (item: PAndA) => item is CementSqueeze;
61
+ export declare type PAndA = PAndASymbol | CementSqueeze | CementPlug;
62
+ interface BaseCompletion {
63
+ id: string;
64
+ diameter: number;
65
+ start: number;
66
+ end: number;
67
+ }
68
+ export interface Screen extends BaseCompletion {
69
+ kind: 'screen';
70
+ }
71
+ export interface Tubing extends BaseCompletion {
72
+ kind: 'tubing';
73
+ }
74
+ export interface CompletionSymbol extends BaseCompletion {
75
+ kind: 'completionSymbol';
76
+ symbolKey: string;
77
+ }
78
+ export declare type Completion = Tubing | Screen | CompletionSymbol;
79
+ export declare const foldCompletion: <T>(fScreen: (obj: Screen) => T, fTubing: (obj: Tubing) => T, fSymbol: (obj: CompletionSymbol) => T) => (completion: Completion) => T;
80
+ export interface Cement {
81
+ kind: 'cement';
82
+ id: string;
83
+ /**
84
+ * Referenced Casing and Completion ids
85
+ */
86
+ referenceIds: string[];
87
+ toc: number;
88
+ }
89
+ /**
90
+ * 'Open hole' and 'Open hole screen' are not included as they are not visualized and also not included in the ruleset
91
+ */
92
+ export declare type PerforationSubKind = 'Perforation' | 'Open hole gravel pack' | 'Open hole frac pack' | 'Cased hole frac pack' | 'Cased hole gravel pack' | 'Cased hole fracturation';
93
+ export interface Perforation {
94
+ kind: 'perforation';
95
+ subKind: PerforationSubKind;
96
+ id: string;
97
+ start: number;
98
+ end: number;
99
+ /**
100
+ * is the perforation open or sealed?
101
+ */
102
+ isOpen: boolean;
103
+ }
104
+ export declare const foldPerforationSubKind: <T>(options: {
105
+ Perforation: (kind: 'Perforation') => T;
106
+ OpenHoleGravelPack: (kind: 'Open hole gravel pack') => T;
107
+ OpenHoleFracPack: (kind: 'Open hole frac pack') => T;
108
+ CasedHoleGravelPack: (kind: 'Cased hole gravel pack') => T;
109
+ CasedHoleFracPack: (kind: 'Cased hole frac pack') => T;
110
+ CasedHoleFracturation: (kind: 'Cased hole fracturation') => T;
111
+ }, subKind: PerforationSubKind) => T;
112
+ export declare const shouldPerforationStartAtHoleDiameter: (perf: Perforation) => boolean;
113
+ export declare const shouldPerforationStartAtCasingDiameter: (perf: Perforation) => boolean;
114
+ export declare const hasPacking: (perf: Perforation) => boolean;
115
+ export declare function hasFracLines(perf: Perforation): boolean;
116
+ export declare function hasSpikes(perf: Perforation): boolean;
117
+ export declare function isSubkindCasedHoleGravelPack(perf: Perforation): boolean;
118
+ export declare function isSubKindPerforation(perf: Perforation): boolean;
119
+ export declare function isSubKindCasedHoleFracPack(perf: Perforation): boolean;
120
+ export declare function isOpenHoleFracPack(perf: Perforation): boolean;
121
+ export declare const intersect: (a: Perforation, b: Perforation) => boolean;
122
+ export interface SchematicData {
123
+ holeSizes: HoleSize[];
124
+ casings: Casing[];
125
+ cements: Cement[];
126
+ completion: Completion[];
127
+ pAndA: PAndA[];
128
+ symbols: {
129
+ [key: string]: string;
130
+ };
131
+ perforations: Perforation[];
132
+ }
133
+ export interface InternalLayerOptions {
134
+ holeLayerId: string;
135
+ casingLayerId: string;
136
+ completionLayerId: string;
137
+ cementLayerId: string;
138
+ pAndALayerId: string;
139
+ perforationLayerId: string;
140
+ }
141
+ export declare const defaultInternalLayerOptions: (layerId: string) => InternalLayerOptions;
142
+ export interface HoleOptions {
143
+ firstColor: string;
144
+ secondColor: string;
145
+ lineColor: string;
146
+ }
147
+ export declare const defaultHoleOptions: HoleOptions;
148
+ export interface CasingShoeSize {
149
+ width: number;
150
+ length: number;
151
+ }
152
+ export interface WindowOptions {
153
+ dashColor: string;
154
+ dashLength: number;
155
+ spaceLength: number;
156
+ }
157
+ export interface CasingOptions {
158
+ solidColor: string;
159
+ lineColor: string;
160
+ shoeSize: CasingShoeSize;
161
+ windowOptions: WindowOptions;
162
+ }
163
+ export declare const defaultCasingOptions: CasingOptions;
164
+ export interface PerforationOptions {
165
+ stroke: string;
166
+ yellow: string;
167
+ grey: string;
168
+ red: string;
169
+ outline: string;
170
+ transparent: string;
171
+ spikeWidth: number;
172
+ spikeLength: number;
173
+ packingOpacity: number;
174
+ fracLineLength: number;
175
+ fracLineCurve: number;
176
+ scalingFactor: number;
177
+ }
178
+ export declare const defaultPerforationOptions: PerforationOptions;
179
+ export interface CementOptions {
180
+ firstColor: string;
181
+ secondColor: string;
182
+ scalingFactor: number;
183
+ }
184
+ export declare const defaultCementOptions: CementOptions;
185
+ export interface CementSqueezeOptions {
186
+ firstColor: string;
187
+ secondColor: string;
188
+ scalingFactor: number;
189
+ }
190
+ export declare const defaultCementSqueezeOptions: CementSqueezeOptions;
191
+ export interface ScreenOptions {
192
+ scalingFactor: number;
193
+ lineColor: string;
194
+ }
195
+ export declare const defaultScreenOptions: ScreenOptions;
196
+ export interface TubingOptions {
197
+ innerColor: string;
198
+ outerColor: string;
199
+ scalingFactor: number;
200
+ }
201
+ export declare const defaultTubingOptions: TubingOptions;
202
+ export interface CementPlugOptions {
203
+ firstColor: string;
204
+ secondColor: string;
205
+ scalingFactor: number;
206
+ }
207
+ export declare const defaultCementPlugOptions: CementPlugOptions;
208
+ export {};
@@ -0,0 +1,3 @@
1
+ <svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M10 0H90V100H10V0Z" fill="#D9D9D9"/>
3
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M10 0H90V100H10V0Z" fill="#D9D9D9"/>
3
+ <path d="M0 25H10V75H0V25Z" fill="#B5B2B2"/>
4
+ <path d="M45 25H55V75H45V25Z" fill="#B5B2B2"/>
5
+ <path d="M90 25H100V75H90V25Z" fill="#B5B2B2"/>
6
+ </svg>
@@ -0,0 +1,12 @@
1
+ <svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M10 0H90V100H10V0Z" fill="#D9D9D9"/>
3
+ <path d="M0 25H10V75H0V25Z" fill="#B5B2B2"/>
4
+ <path d="M45 25H55V75H45V25Z" fill="#B5B2B2"/>
5
+ <path d="M25 65H30V80H25V65Z" fill="#313131"/>
6
+ <path d="M25 42H30V57H25V42Z" fill="#313131"/>
7
+ <path d="M25 21H30V36H25V21Z" fill="#313131"/>
8
+ <path d="M70 64H75V79H70V64Z" fill="#313131"/>
9
+ <path d="M70 41H75V56H70V41Z" fill="#313131"/>
10
+ <path d="M70 20H75V35H70V20Z" fill="#313131"/>
11
+ <path d="M90 25H100V75H90V25Z" fill="#B5B2B2"/>
12
+ </svg>
@@ -1,23 +1,23 @@
1
- import { Vector } from 'curve-interpolator/dist/src/interfaces';
2
- type fx = (n: number) => Vector;
3
- export declare class ArcLength {
4
- /**
5
- * Calculate using an adaptive bisect method
6
- * @param {Number} func Curve function returning [x,y]
7
- * @param {Number} minLimit Min limit
8
- * @param {Number} maxLimit Max limit
9
- * @param {Number} tolerance Result tolerance
10
- * @param {Number} minDepth Min recursive depth before accepting solution
11
- * @param {Number} maxDepth Max recursive depth
12
- */
13
- static bisect(func: fx, minLimit?: number, maxLimit?: number, tolerance?: number, minDepth?: number, maxDepth?: number): number;
14
- /**
15
- * Calculate using trapezoid method
16
- * @param {Number} func Curve function returning [x,y]
17
- * @param {Number} minLimit Min limit
18
- * @param {Number} maxLimit Max limit
19
- * @param {Number} segments Number of segments
20
- */
21
- static trapezoid(func: fx, minLimit?: number, maxLimit?: number, segments?: number): number;
22
- }
23
- export {};
1
+ import { Vector } from 'curve-interpolator/dist/src/interfaces';
2
+ declare type fx = (n: number) => Vector;
3
+ export declare class ArcLength {
4
+ /**
5
+ * Calculate using an adaptive bisect method
6
+ * @param {Number} func Curve function returning [x,y]
7
+ * @param {Number} minLimit Min limit
8
+ * @param {Number} maxLimit Max limit
9
+ * @param {Number} tolerance Result tolerance
10
+ * @param {Number} minDepth Min recursive depth before accepting solution
11
+ * @param {Number} maxDepth Max recursive depth
12
+ */
13
+ static bisect(func: fx, minLimit?: number, maxLimit?: number, tolerance?: number, minDepth?: number, maxDepth?: number): number;
14
+ /**
15
+ * Calculate using trapezoid method
16
+ * @param {Number} func Curve function returning [x,y]
17
+ * @param {Number} minLimit Min limit
18
+ * @param {Number} maxLimit Max limit
19
+ * @param {Number} segments Number of segments
20
+ */
21
+ static trapezoid(func: fx, minLimit?: number, maxLimit?: number, segments?: number): number;
22
+ }
23
+ export {};
@@ -1,8 +1,8 @@
1
- /**
2
- * Find index where value[index] =< searchValue and value[index+1] >= searchValue using binary search
3
- * @param {Number} values Array of sorted values
4
- * @param {Number} searchValue Value to search for
5
- */
6
- export declare class BinarySearch {
7
- static search(values: number[], searchValue: number): number;
8
- }
1
+ /**
2
+ * Find index where value[index] =< searchValue and value[index+1] >= searchValue using binary search
3
+ * @param {Number} values Array of sorted values
4
+ * @param {Number} searchValue Value to search for
5
+ */
6
+ export declare class BinarySearch {
7
+ static search(values: number[], searchValue: number): number;
8
+ }
@@ -1,5 +1,5 @@
1
- /**
2
- * Convert color string to number
3
- */
4
- export declare function convertColor(colorStr: string): number;
5
- export declare function colorToCSSColor(color: number | string): string;
1
+ /**
2
+ * Convert color string to number
3
+ */
4
+ export declare function convertColor(colorStr: string): number;
5
+ export declare function colorToCSSColor(color: number | string): string;
@@ -1 +1 @@
1
- export * from './text';
1
+ export * from './text';
@@ -1,34 +1,34 @@
1
- type fx = (n: number) => number;
2
- export declare class RootFinder {
3
- /**
4
- * Find root using newthons method
5
- * @param {Number} func f(x)
6
- * @param {Number} precision Accuracy of result
7
- * @param {Number} maxIterations Max number of iterations to use
8
- * @param {Number} start Starting position
9
- * @param {Number} minLimit Min limit of result
10
- * @param {Number} maxLimit Max limit of result
11
- */
12
- static newton(func: fx, precision?: number, maxIterations?: number, start?: number, minLimit?: number, maxLimit?: number): number;
13
- /**
14
- * Find root using bisect method
15
- * @param {Number} func f(x)
16
- * @param {Number} precision Accuracy of result
17
- * @param {Number} maxIterations Max number of iterations to use
18
- * @param {Number} start Starting position
19
- * @param {Number} minLimit Min limit of result
20
- * @param {Number} maxLimit Max limit of result
21
- */
22
- static bisect(func: fx, precision?: number, maxIterations?: number, start?: number, minLimit?: number, maxLimit?: number): number;
23
- /**
24
- * Find root by trying available methods
25
- * @param {Number} func f(x)
26
- * @param {Number} precision Accuracy of result
27
- * @param {Number} maxIterations Max number of iterations to use
28
- * @param {Number} start Starting position
29
- * @param {Number} minLimit Min limit of result
30
- * @param {Number} maxLimit Max limit of result
31
- */
32
- static findRoot(func: fx, precision?: number, maxIterations?: number, start?: number, minLimit?: number, maxLimit?: number): number;
33
- }
34
- export {};
1
+ declare type fx = (n: number) => number;
2
+ export declare class RootFinder {
3
+ /**
4
+ * Find root using newthons method
5
+ * @param {Number} func f(x)
6
+ * @param {Number} precision Accuracy of result
7
+ * @param {Number} maxIterations Max number of iterations to use
8
+ * @param {Number} start Starting position
9
+ * @param {Number} minLimit Min limit of result
10
+ * @param {Number} maxLimit Max limit of result
11
+ */
12
+ static newton(func: fx, precision?: number, maxIterations?: number, start?: number, minLimit?: number, maxLimit?: number): number;
13
+ /**
14
+ * Find root using bisect method
15
+ * @param {Number} func f(x)
16
+ * @param {Number} precision Accuracy of result
17
+ * @param {Number} maxIterations Max number of iterations to use
18
+ * @param {Number} start Starting position
19
+ * @param {Number} minLimit Min limit of result
20
+ * @param {Number} maxLimit Max limit of result
21
+ */
22
+ static bisect(func: fx, precision?: number, maxIterations?: number, start?: number, minLimit?: number, maxLimit?: number): number;
23
+ /**
24
+ * Find root by trying available methods
25
+ * @param {Number} func f(x)
26
+ * @param {Number} precision Accuracy of result
27
+ * @param {Number} maxIterations Max number of iterations to use
28
+ * @param {Number} start Starting position
29
+ * @param {Number} minLimit Min limit of result
30
+ * @param {Number} maxLimit Max limit of result
31
+ */
32
+ static findRoot(func: fx, precision?: number, maxIterations?: number, start?: number, minLimit?: number, maxLimit?: number): number;
33
+ }
34
+ export {};
@@ -1,14 +1,14 @@
1
- import { BoundingBox } from '../interfaces';
2
- import { ScaleLinear } from 'd3-scale';
3
- export declare function pixelsPerUnit(x: ScaleLinear<number, number>): number;
4
- export declare function calcSize(factor: number, min: number, max: number, x: ScaleLinear<number, number>): number;
5
- export declare function isOverlappingHorizontally(r1: BoundingBox, r2: BoundingBox): boolean;
6
- export declare function isOverlapping(r1: BoundingBox, r2: BoundingBox, horizontalPadding?: number, verticalPadding?: number): boolean;
7
- export declare function getOverlap(r1: BoundingBox, r2: BoundingBox): {
8
- dx: number;
9
- dy: number;
10
- };
11
- export declare function getOverlapOffset(r1: BoundingBox, r2: BoundingBox, horizontalPadding?: number, verticalPadding?: number): {
12
- dx: number;
13
- dy: number;
14
- };
1
+ import { BoundingBox } from '../interfaces';
2
+ import { ScaleLinear } from 'd3-scale';
3
+ export declare function pixelsPerUnit(x: ScaleLinear<number, number>): number;
4
+ export declare function calcSize(factor: number, min: number, max: number, x: ScaleLinear<number, number>): number;
5
+ export declare function isOverlappingHorizontally(r1: BoundingBox, r2: BoundingBox): boolean;
6
+ export declare function isOverlapping(r1: BoundingBox, r2: BoundingBox, horizontalPadding?: number, verticalPadding?: number): boolean;
7
+ export declare function getOverlap(r1: BoundingBox, r2: BoundingBox): {
8
+ dx: number;
9
+ dy: number;
10
+ };
11
+ export declare function getOverlapOffset(r1: BoundingBox, r2: BoundingBox, horizontalPadding?: number, verticalPadding?: number): {
12
+ dx: number;
13
+ dy: number;
14
+ };
@@ -1,15 +1,15 @@
1
- import { IPoint, Point } from 'pixi.js';
2
- import Vector2 from '@equinor/videx-vector2';
3
- export declare const pointToVector: (p: IPoint) => Vector2;
4
- export declare const pointToArray: (p: IPoint) => [number, number];
5
- export declare const vectorToPoint: (v: Vector2) => Point;
6
- export declare const vectorToArray: (v: Vector2) => [number, number];
7
- export declare const arrayToPoint: (a: number[]) => Point;
8
- export declare const arrayToVector: (a: number[]) => Vector2;
9
- export declare const calcDist: (prev: [number, number], point: [number, number]) => number;
10
- export declare const calcDistPoint: (prev: Point, point: Point) => number;
11
- export declare const calcNormal: (p1: Point, p2: Point) => Point;
12
- export declare const convertToUnitVector: (p: Point) => Point;
13
- export declare const createNormals: (points: IPoint[]) => Vector2[];
14
- export declare const offsetPoint: (point: IPoint, vector: Vector2, offset: number) => Point;
15
- export declare const offsetPoints: (points: IPoint[], vectors: Vector2[], offset: number) => Point[];
1
+ import { IPoint, Point } from 'pixi.js';
2
+ import Vector2 from '@equinor/videx-vector2';
3
+ export declare const pointToVector: (p: IPoint) => Vector2;
4
+ export declare const pointToArray: (p: IPoint) => [number, number];
5
+ export declare const vectorToPoint: (v: Vector2) => Point;
6
+ export declare const vectorToArray: (v: Vector2) => [number, number];
7
+ export declare const arrayToPoint: (a: number[]) => Point;
8
+ export declare const arrayToVector: (a: number[]) => Vector2;
9
+ export declare const calcDist: (prev: [number, number], point: [number, number]) => number;
10
+ export declare const calcDistPoint: (prev: Point, point: Point) => number;
11
+ export declare const calcNormal: (p1: Point, p2: Point) => Point;
12
+ export declare const convertToUnitVector: (p: Point) => Point;
13
+ export declare const createNormals: (points: IPoint[]) => Vector2[];
14
+ export declare const offsetPoint: (point: IPoint, vector: Vector2, offset: number) => Point;
15
+ export declare const offsetPoints: (points: IPoint[], vectors: Vector2[], offset: number) => Point[];