@equinor/esv-intersection 1.8.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 +2 -4
- 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 +12 -2
- package/package.json +3 -3
package/dist/interfaces.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ZoomTransform } from 'd3-zoom';
|
|
2
|
-
import {
|
|
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';
|
|
@@ -78,7 +78,7 @@ export interface CementLayerOptions extends WellComponentBaseOptions {
|
|
|
78
78
|
secondColor?: string;
|
|
79
79
|
}
|
|
80
80
|
export interface PixiLayerOptions extends LayerOptions {
|
|
81
|
-
pixiApplicationOptions?:
|
|
81
|
+
pixiApplicationOptions?: IApplicationOptions;
|
|
82
82
|
}
|
|
83
83
|
export interface WellComponentBaseOptions extends PixiLayerOptions {
|
|
84
84
|
exaggerationFactor?: number;
|
|
@@ -178,6 +178,4 @@ export interface CalloutOptions extends LayerOptions {
|
|
|
178
178
|
offsetMax?: number;
|
|
179
179
|
offsetFactor?: number;
|
|
180
180
|
}
|
|
181
|
-
declare type PixiApplicationConstructorParameters = ConstructorParameters<typeof Application>;
|
|
182
|
-
declare type PixiApplicationOptions = PixiApplicationConstructorParameters[0];
|
|
183
181
|
export {};
|
|
@@ -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,11 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AbstractRenderer, Container, IRendererOptionsAuto, RENDERER_TYPE } from 'pixi.js';
|
|
2
2
|
import { Layer } from './Layer';
|
|
3
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;
|
|
7
15
|
constructor(id?: string, options?: PixiLayerOptions);
|
|
8
16
|
onMount(event: OnMountEvent): void;
|
|
17
|
+
render(): void;
|
|
9
18
|
onUnmount(event?: OnUnmountEvent): void;
|
|
10
19
|
onResize(event: OnResizeEvent): void;
|
|
11
20
|
onRescale(event: OnRescaleEvent): void;
|
|
@@ -16,3 +25,4 @@ export declare abstract class PixiLayer extends Layer {
|
|
|
16
25
|
onInteractivityChanged(interactive: boolean): void;
|
|
17
26
|
renderType(): RENDERER_TYPE;
|
|
18
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",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"jest": "^27.4.7",
|
|
61
61
|
"jest-canvas-mock": "^2.3.1",
|
|
62
62
|
"mock-raf": "^1.0.1",
|
|
63
|
-
"pixi.js": "^
|
|
63
|
+
"pixi.js": "^6.4.2",
|
|
64
64
|
"prettier": "^2.6.1",
|
|
65
65
|
"rimraf": "^3.0.2",
|
|
66
66
|
"rollup": "^2.39.1",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
]
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
|
-
"pixi.js": "^
|
|
92
|
+
"pixi.js": "^6.4.2"
|
|
93
93
|
},
|
|
94
94
|
"dependencies": {
|
|
95
95
|
"@equinor/videx-math": "^1.0.12",
|