@equinor/videx-map 1.14.6 → 1.14.8
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 +21 -21
- package/README.md +120 -119
- package/dist/FaultlineModule.d.ts +2 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +108 -114
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2019 Equinor
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Equinor
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,119 +1,120 @@
|
|
|
1
|
-
[](https://badge.fury.io/js/%40equinor%2Fvidex-map)
|
|
2
|
-

|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- [
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
- <b>
|
|
34
|
-
- <b>
|
|
35
|
-
- <b>
|
|
36
|
-
- <b>
|
|
37
|
-
- <b>
|
|
38
|
-
- <b>
|
|
39
|
-
- <b>
|
|
40
|
-
- <b>
|
|
41
|
-
- <b>
|
|
42
|
-
- <b>
|
|
43
|
-
- <b>
|
|
44
|
-
- <b>
|
|
45
|
-
- <b>
|
|
46
|
-
- <b>
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
- <b>
|
|
78
|
-
- <b>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
- <b>
|
|
94
|
-
- <b>
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
$
|
|
114
|
-
$ npm
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
1
|
+
[](https://badge.fury.io/js/%40equinor%2Fvidex-map)
|
|
2
|
+

|
|
3
|
+
[](https://scm-compliance-api.radix.equinor.com/repos/equinor/videx-map/badge)
|
|
4
|
+
|
|
5
|
+
# Videx map
|
|
6
|
+
|
|
7
|
+
A leaflet layer for visualizing wellbore related data.
|
|
8
|
+
|
|
9
|
+
- [GitHub Repository](https://github.com/equinor/videx-map)
|
|
10
|
+
- [Documentation](https://equinor.github.io/videx-map/)
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
```
|
|
14
|
+
npm install --save @equinor/videx-map
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
```js
|
|
19
|
+
// ES6
|
|
20
|
+
import { WellboreModule, FaultlineModule, ... } from '@equinor/videx-map';
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
<br/>
|
|
24
|
+
|
|
25
|
+
# Modules
|
|
26
|
+
Videx map is divided into various modules with specific purposes. These modules can be used individually or combined into a single WebGL context.
|
|
27
|
+
|
|
28
|
+
## Wellbore Module
|
|
29
|
+
Module responsible for visualizing wellbores with roots and paths.
|
|
30
|
+
|
|
31
|
+
### Configurations
|
|
32
|
+
|
|
33
|
+
- <b>scale</b> - Relative scale of everything. (Default: 1.0)
|
|
34
|
+
- <b>wellboreWidth</b> - Width of wellbore. (Default: 0.15)
|
|
35
|
+
- <b>rootRadius</b> - Width of root. (Default: 0.4)
|
|
36
|
+
- <b>labelScale</b> - Scale of labels. (Default: 0.011)
|
|
37
|
+
- <b>labelBgOpacity</b> - Opacity of label background. (Default: 0.5)
|
|
38
|
+
- <b>fontSize</b> - Size of font. (Default: 24)
|
|
39
|
+
- <b>batchSize</b> - Amount of wellbores per batch. (Default: 25)
|
|
40
|
+
- <b>zoomOrigin</b> - Origin zoom level, i.e. where input for scaling function is 0. (Default: 0)
|
|
41
|
+
- <b>customEventHandler</b> - Provide your custom event handler.
|
|
42
|
+
- <b>scaling</b> - Zoom event handler.
|
|
43
|
+
- <b>gridSize</b> - Grid size to control resolution of spatial indexing.
|
|
44
|
+
- <b>rootResize</b> - Resize configurations of roots.
|
|
45
|
+
- <b>onWellboreClick</b> - Function to be called when a wellbore is selected.
|
|
46
|
+
- <b>onHighlightOn</b> - Function to be called when wellbores are highlighted.
|
|
47
|
+
- <b>onHighlightOff</b> - Function to be called when highlight is removed.
|
|
48
|
+
|
|
49
|
+
```js
|
|
50
|
+
// Example configuration
|
|
51
|
+
const wellbores: WellboreModule = new WellboreModule({
|
|
52
|
+
rootRadius: 0.3,
|
|
53
|
+
scale: 1.5,
|
|
54
|
+
labelBgOpacity: 0.2,
|
|
55
|
+
zoomOrigin: 0,
|
|
56
|
+
scaling: zoom => factors[zoom] || 0,
|
|
57
|
+
rootResize: {
|
|
58
|
+
base: 1.75,
|
|
59
|
+
multiplier: 0.5,
|
|
60
|
+
zoomReference: 12.0,
|
|
61
|
+
},
|
|
62
|
+
onHighlightOn: event => {
|
|
63
|
+
// Special 'HighlightOn' logic ...
|
|
64
|
+
},
|
|
65
|
+
onHighlightOff: () => {
|
|
66
|
+
// Special 'HighlightOff' logic ...
|
|
67
|
+
},
|
|
68
|
+
onWellboreClick: wellbore => {
|
|
69
|
+
// Special 'WellboreClick' logic ...
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Faultline Module
|
|
75
|
+
Module responsible for visualizing faultlines on fields.
|
|
76
|
+
|
|
77
|
+
- <b>color</b> - Color of faultline on format 0xRRGGBB. (Default: 0x727D88)
|
|
78
|
+
- <b>alpha</b> - Alpha of faultlines. (Default: 1.0)
|
|
79
|
+
- <b>outlineWidth</b> - Width of outline. (Default: 0.125)
|
|
80
|
+
|
|
81
|
+
```js
|
|
82
|
+
// Example configuration
|
|
83
|
+
const faultlines: FaultlineModule = new FaultlineModule({
|
|
84
|
+
color: 0xFF00FF,
|
|
85
|
+
alpha: 0.75,
|
|
86
|
+
outlineWidth: 0.13,
|
|
87
|
+
});
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Outline Module
|
|
91
|
+
Module responsible for visualizing field outlines.
|
|
92
|
+
|
|
93
|
+
- <b>zoomOrigin</b> - Origin zoom level, i.e. where input for scaling function is 0. (Default: 0)
|
|
94
|
+
- <b>lineWidth</b> - Width of line. (Default: 0.125)
|
|
95
|
+
- <b>scaling</b> - Zoom event handler.
|
|
96
|
+
|
|
97
|
+
```js
|
|
98
|
+
// Example configuration
|
|
99
|
+
const outlines: OutlineModule = new OutlineModule({
|
|
100
|
+
zoomOrigin: 12,
|
|
101
|
+
lineWidth: 0.1,
|
|
102
|
+
scaling: zoom => (1.5 ** -zoom),
|
|
103
|
+
});
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
<br/>
|
|
107
|
+
|
|
108
|
+
## Contribution
|
|
109
|
+
We greatly appreciate contributions to this repository, see our [contribution page](CONTRIBUTION.md) on how to get started.
|
|
110
|
+
|
|
111
|
+
### Quick start
|
|
112
|
+
```
|
|
113
|
+
$ git clone https://github.com/equinor/videx-map.git
|
|
114
|
+
$ npm install
|
|
115
|
+
$ npm start
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+

|
|
@@ -42,8 +42,9 @@ export default class FaultlineModule extends ModuleInterface {
|
|
|
42
42
|
/**
|
|
43
43
|
* Set collection of faultlines to display. Clears previous content on execution.
|
|
44
44
|
* @param data Faultlines to draw
|
|
45
|
+
* @param redraw Should pixiOverlay be redrawn after setting data? (Default: false)
|
|
45
46
|
*/
|
|
46
|
-
set(data: FaultlineData[]): void;
|
|
47
|
+
set(data: FaultlineData[], redraw?: boolean): void;
|
|
47
48
|
/** Clear all spawned graphic elements and return to pool. */
|
|
48
49
|
clear(): void;
|
|
49
50
|
resize(_zoom: number): void;
|