@equinor/esv-intersection 1.6.0 → 2.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.
- package/dist/index.esm.js +2 -2
- package/dist/index.js +1 -1
- package/dist/index.umd.js +89 -104
- package/dist/interfaces.d.ts +6 -3
- package/dist/layers/CasingLayer.d.ts +1 -1
- package/dist/layers/CementLayer.d.ts +1 -1
- package/dist/layers/CompletionLayer.d.ts +4 -2
- package/dist/layers/GeomodelLayerV2.d.ts +3 -3
- package/dist/layers/HoleSizeLayer.d.ts +1 -1
- package/dist/layers/WellboreBaseComponentLayer.d.ts +2 -2
- package/dist/layers/base/PixiLayer.d.ts +14 -3
- package/package.json +14 -11
package/dist/interfaces.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ZoomTransform } from 'd3-zoom';
|
|
2
|
-
import { Graphics } from 'pixi.js';
|
|
2
|
+
import { Graphics, IApplicationOptions } from 'pixi.js';
|
|
3
3
|
import { Layer } from './layers/base/Layer';
|
|
4
4
|
import { IntersectionReferenceSystem } from './control/IntersectionReferenceSystem';
|
|
5
5
|
import Vector2 from '@equinor/videx-vector2';
|
|
@@ -55,7 +55,7 @@ export interface WellborepathLayerOptions extends LayerOptions {
|
|
|
55
55
|
}
|
|
56
56
|
export interface GeomodelLayerOptions extends LayerOptions {
|
|
57
57
|
}
|
|
58
|
-
export interface CompletionLayerOptions extends
|
|
58
|
+
export interface CompletionLayerOptions extends PixiLayerOptions {
|
|
59
59
|
}
|
|
60
60
|
export interface GeomodelLayerLabelsOptions extends LayerOptions {
|
|
61
61
|
margins?: number;
|
|
@@ -77,7 +77,10 @@ export interface CementLayerOptions extends WellComponentBaseOptions {
|
|
|
77
77
|
firstColor?: string;
|
|
78
78
|
secondColor?: string;
|
|
79
79
|
}
|
|
80
|
-
export interface
|
|
80
|
+
export interface PixiLayerOptions extends LayerOptions {
|
|
81
|
+
pixiApplicationOptions?: IApplicationOptions;
|
|
82
|
+
}
|
|
83
|
+
export interface WellComponentBaseOptions extends PixiLayerOptions {
|
|
81
84
|
exaggerationFactor?: number;
|
|
82
85
|
}
|
|
83
86
|
export interface ZoomAndPanOptions {
|
|
@@ -12,7 +12,7 @@ export interface CasingRenderObject {
|
|
|
12
12
|
}
|
|
13
13
|
export declare class CasingLayer extends WellboreBaseComponentLayer {
|
|
14
14
|
constructor(id?: string, options?: CasingLayerOptions);
|
|
15
|
-
|
|
15
|
+
preRender(): void;
|
|
16
16
|
prepareCasingRenderObject: (casing: Casing) => CasingRenderObject;
|
|
17
17
|
drawCasing: (zippedRenderObject: [Casing, CasingRenderObject]) => void;
|
|
18
18
|
drawShoe(casingEnd: number, casingRadius: number): void;
|
|
@@ -8,7 +8,7 @@ interface CementShape {
|
|
|
8
8
|
}
|
|
9
9
|
export declare class CementLayer extends WellboreBaseComponentLayer {
|
|
10
10
|
constructor(id?: string, options?: CementLayerOptions);
|
|
11
|
-
|
|
11
|
+
preRender(): void;
|
|
12
12
|
createCementShape: (cement: Cement, casings: Casing[], holes: HoleSize[]) => CementShape;
|
|
13
13
|
createTexture(): Texture;
|
|
14
14
|
}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { Graphics } from 'pixi.js';
|
|
2
2
|
import { PixiLayer } from './base/PixiLayer';
|
|
3
3
|
import { OnUpdateEvent } from '..';
|
|
4
|
-
import { CompletionLayerOptions } from '../interfaces';
|
|
4
|
+
import { CompletionLayerOptions, OnRescaleEvent } from '../interfaces';
|
|
5
5
|
interface CompletionItem {
|
|
6
6
|
}
|
|
7
7
|
export declare class CompletionLayer extends PixiLayer {
|
|
8
8
|
constructor(id: string, options: CompletionLayerOptions);
|
|
9
|
+
onRescale(event: OnRescaleEvent): void;
|
|
9
10
|
onUpdate(event: OnUpdateEvent): void;
|
|
10
|
-
|
|
11
|
+
preRender(): void;
|
|
12
|
+
clearStage(): void;
|
|
11
13
|
getShape(type: string): Graphics;
|
|
12
14
|
getScale(type: string, length: number, width: number): {
|
|
13
15
|
scaleX: number;
|
|
@@ -2,11 +2,11 @@ import { PixiLayer } from './base/PixiLayer';
|
|
|
2
2
|
import { OnRescaleEvent, OnUpdateEvent } from '../interfaces';
|
|
3
3
|
import { SurfaceArea, SurfaceLine } from '../datautils';
|
|
4
4
|
export declare class GeomodelLayerV2 extends PixiLayer {
|
|
5
|
-
private
|
|
5
|
+
private isPreRendered;
|
|
6
6
|
onRescale(event: OnRescaleEvent): void;
|
|
7
7
|
onUpdate(event: OnUpdateEvent): void;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
clearStage(): void;
|
|
9
|
+
preRender(): void;
|
|
10
10
|
createPolygons: (data: any) => number[][];
|
|
11
11
|
generateAreaPolygon: (s: SurfaceArea) => void;
|
|
12
12
|
generateSurfaceLine: (s: SurfaceLine) => void;
|
|
@@ -4,7 +4,7 @@ import { HoleSizeLayerOptions, HoleSize } from '..';
|
|
|
4
4
|
export declare class HoleSizeLayer extends WellboreBaseComponentLayer {
|
|
5
5
|
maxDiameter: number;
|
|
6
6
|
constructor(id?: string, options?: HoleSizeLayerOptions);
|
|
7
|
-
|
|
7
|
+
preRender(): void;
|
|
8
8
|
drawHoleSize: (holeObject: HoleSize) => void;
|
|
9
9
|
createTexture(diameter: number): Texture;
|
|
10
10
|
createBaseTexture(width: number, height: number): Texture;
|
|
@@ -5,11 +5,11 @@ export declare abstract class WellboreBaseComponentLayer extends PixiLayer {
|
|
|
5
5
|
_textureCache: Texture;
|
|
6
6
|
rescaleEvent: OnRescaleEvent;
|
|
7
7
|
constructor(id?: string, options?: WellComponentBaseOptions);
|
|
8
|
+
abstract preRender(): void;
|
|
8
9
|
onUnmount(event?: OnUnmountEvent): void;
|
|
9
10
|
onUpdate(event: OnUpdateEvent): void;
|
|
10
11
|
onRescale(event: OnRescaleEvent): void;
|
|
11
|
-
|
|
12
|
-
abstract render(): void;
|
|
12
|
+
clearStage(): void;
|
|
13
13
|
/**
|
|
14
14
|
* Calculate yRatio without zFactor
|
|
15
15
|
* TODO consider to move this into ZoomPanHandler
|
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AbstractRenderer, Container, IRendererOptionsAuto, RENDERER_TYPE } from 'pixi.js';
|
|
2
2
|
import { Layer } from './Layer';
|
|
3
|
-
import { OnMountEvent, OnRescaleEvent, OnResizeEvent, OnUnmountEvent } from '../../interfaces';
|
|
3
|
+
import { OnMountEvent, OnRescaleEvent, OnResizeEvent, OnUnmountEvent, PixiLayerOptions } from '../../interfaces';
|
|
4
|
+
declare class PixiRenderApplication {
|
|
5
|
+
stage: Container;
|
|
6
|
+
renderer: AbstractRenderer;
|
|
7
|
+
constructor(pixiRenderOptions: IRendererOptionsAuto);
|
|
8
|
+
destroy(): void;
|
|
9
|
+
get view(): HTMLCanvasElement;
|
|
10
|
+
render(): void;
|
|
11
|
+
}
|
|
4
12
|
export declare abstract class PixiLayer extends Layer {
|
|
5
13
|
elm: HTMLElement;
|
|
6
|
-
ctx:
|
|
14
|
+
ctx: PixiRenderApplication;
|
|
15
|
+
constructor(id?: string, options?: PixiLayerOptions);
|
|
7
16
|
onMount(event: OnMountEvent): void;
|
|
17
|
+
render(): void;
|
|
8
18
|
onUnmount(event?: OnUnmountEvent): void;
|
|
9
19
|
onResize(event: OnResizeEvent): void;
|
|
10
20
|
onRescale(event: OnRescaleEvent): void;
|
|
@@ -15,3 +25,4 @@ export declare abstract class PixiLayer extends Layer {
|
|
|
15
25
|
onInteractivityChanged(interactive: boolean): void;
|
|
16
26
|
renderType(): RENDERER_TYPE;
|
|
17
27
|
}
|
|
28
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/esv-intersection",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Intersection component package with testing and automatic documentation.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"@babel/core": "^7.16.7",
|
|
44
44
|
"@babel/preset-env": "^7.16.8",
|
|
45
45
|
"@babel/preset-typescript": "^7.16.7",
|
|
46
|
-
"@storybook/addon-docs": "^6.4.
|
|
47
|
-
"@storybook/addon-storysource": "^6.4.
|
|
48
|
-
"@storybook/html": "^6.4.
|
|
46
|
+
"@storybook/addon-docs": "^6.4.22",
|
|
47
|
+
"@storybook/addon-storysource": "^6.4.22",
|
|
48
|
+
"@storybook/html": "^6.4.22",
|
|
49
49
|
"@types/d3": "^7.1.0",
|
|
50
50
|
"@types/jest": "^27.4.0",
|
|
51
51
|
"@types/mock-raf": "^1.0.2",
|
|
@@ -56,20 +56,21 @@
|
|
|
56
56
|
"eslint": "^7.20.0",
|
|
57
57
|
"eslint-config-prettier": "^8.1.0",
|
|
58
58
|
"eslint-plugin-prettier": "^3.3.1",
|
|
59
|
+
"eslint-plugin-storybook": "^0.5.10",
|
|
59
60
|
"jest": "^27.4.7",
|
|
60
61
|
"jest-canvas-mock": "^2.3.1",
|
|
61
62
|
"mock-raf": "^1.0.1",
|
|
62
|
-
"pixi.js": "^
|
|
63
|
-
"prettier": "^2.
|
|
63
|
+
"pixi.js": "^6.4.2",
|
|
64
|
+
"prettier": "^2.6.1",
|
|
64
65
|
"rimraf": "^3.0.2",
|
|
65
66
|
"rollup": "^2.39.1",
|
|
66
67
|
"rollup-plugin-commonjs": "^10.1.0",
|
|
67
68
|
"rollup-plugin-node-resolve": "^5.2.0",
|
|
68
69
|
"rollup-plugin-terser": "^7.0.2",
|
|
69
70
|
"rollup-plugin-typescript2": "^0.30.0",
|
|
70
|
-
"storybook-dark-mode": "^1.0.
|
|
71
|
+
"storybook-dark-mode": "^1.0.9",
|
|
71
72
|
"tslib": "^2.1.0",
|
|
72
|
-
"typedoc": "^0.
|
|
73
|
+
"typedoc": "^0.22.13",
|
|
73
74
|
"typescript": "^4.2.2"
|
|
74
75
|
},
|
|
75
76
|
"jest": {
|
|
@@ -83,16 +84,18 @@
|
|
|
83
84
|
"js"
|
|
84
85
|
],
|
|
85
86
|
"testEnvironment": "jsdom",
|
|
86
|
-
"transformIgnorePatterns": [
|
|
87
|
+
"transformIgnorePatterns": [
|
|
88
|
+
"/node_modules/(?!d3)"
|
|
89
|
+
]
|
|
87
90
|
},
|
|
88
91
|
"peerDependencies": {
|
|
89
|
-
"pixi.js": "^
|
|
92
|
+
"pixi.js": "^6.4.2"
|
|
90
93
|
},
|
|
91
94
|
"dependencies": {
|
|
92
95
|
"@equinor/videx-math": "^1.0.12",
|
|
93
96
|
"@equinor/videx-vector2": "^1.0.44",
|
|
94
97
|
"curve-interpolator": "2.0.8",
|
|
95
|
-
"d3-array": "^3.1.
|
|
98
|
+
"d3-array": "^3.1.6",
|
|
96
99
|
"d3-axis": "^3.0.0",
|
|
97
100
|
"d3-scale": "^4.0.2",
|
|
98
101
|
"d3-selection": "^3.0.0",
|