@equinor/esv-intersection 3.1.3 → 3.1.5
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 +47 -0
- package/dist/components/axis.d.ts.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/constants.d.ts +12 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/control/ExtendedCurveInterpolator.d.ts +59 -0
- package/dist/control/ExtendedCurveInterpolator.d.ts.map +1 -0
- package/dist/control/IntersectionReferenceSystem.d.ts +93 -0
- package/dist/control/IntersectionReferenceSystem.d.ts.map +1 -0
- package/dist/control/LayerManager.d.ts +77 -0
- package/dist/control/LayerManager.d.ts.map +1 -0
- package/dist/control/MainController.d.ts +155 -0
- package/dist/control/MainController.d.ts.map +1 -0
- package/dist/control/ZoomPanHandler.d.ts +160 -0
- package/dist/control/ZoomPanHandler.d.ts.map +1 -0
- package/dist/control/index.d.ts +6 -0
- package/dist/control/index.d.ts.map +1 -0
- package/dist/control/interfaces.d.ts +37 -0
- package/dist/control/interfaces.d.ts.map +1 -0
- package/dist/control/overlay.d.ts +21 -0
- package/dist/control/overlay.d.ts.map +1 -0
- package/dist/datautils/colortable.d.ts +2 -0
- package/dist/datautils/colortable.d.ts.map +1 -0
- package/dist/datautils/findsample.d.ts +3 -0
- package/dist/datautils/findsample.d.ts.map +1 -0
- package/dist/datautils/index.d.ts +7 -0
- package/dist/datautils/index.d.ts.map +1 -0
- package/dist/datautils/interfaces.d.ts +64 -0
- package/dist/datautils/interfaces.d.ts.map +1 -0
- package/dist/datautils/picks.d.ts +75 -0
- package/dist/datautils/picks.d.ts.map +1 -0
- package/dist/datautils/schematicShapeGenerator.d.ts +60 -0
- package/dist/datautils/schematicShapeGenerator.d.ts.map +1 -0
- package/dist/datautils/seismicimage.d.ts +46 -0
- package/dist/datautils/seismicimage.d.ts.map +1 -0
- package/dist/datautils/surfacedata.d.ts +11 -0
- package/dist/datautils/surfacedata.d.ts.map +1 -0
- package/dist/datautils/trajectory.d.ts +15 -0
- package/dist/datautils/trajectory.d.ts.map +1 -0
- package/dist/index.cjs +15 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +8200 -0
- package/dist/index.mjs.map +1 -0
- package/dist/index.umd.js +15 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/interfaces.d.ts +86 -0
- package/dist/interfaces.d.ts.map +1 -0
- package/dist/layers/CalloutCanvasLayer.d.ts +72 -0
- package/dist/layers/CalloutCanvasLayer.d.ts.map +1 -0
- package/dist/layers/CustomDisplayObjects/ComplexRope.d.ts +22 -0
- package/dist/layers/CustomDisplayObjects/ComplexRope.d.ts.map +1 -0
- package/dist/layers/CustomDisplayObjects/ComplexRopeGeometry.d.ts +24 -0
- package/dist/layers/CustomDisplayObjects/ComplexRopeGeometry.d.ts.map +1 -0
- package/dist/layers/CustomDisplayObjects/FixedWidthSimpleRope.d.ts +21 -0
- package/dist/layers/CustomDisplayObjects/FixedWidthSimpleRope.d.ts.map +1 -0
- package/dist/layers/CustomDisplayObjects/FixedWidthSimpleRopeGeometry.d.ts +27 -0
- package/dist/layers/CustomDisplayObjects/FixedWidthSimpleRopeGeometry.d.ts.map +1 -0
- package/dist/layers/CustomDisplayObjects/UniformTextureStretchRope.d.ts +18 -0
- package/dist/layers/CustomDisplayObjects/UniformTextureStretchRope.d.ts.map +1 -0
- package/dist/layers/CustomDisplayObjects/UniformTextureStretchRopeGeometry.d.ts +24 -0
- package/dist/layers/CustomDisplayObjects/UniformTextureStretchRopeGeometry.d.ts.map +1 -0
- package/dist/layers/GeomodelCanvasLayer.d.ts +29 -0
- package/dist/layers/GeomodelCanvasLayer.d.ts.map +1 -0
- package/dist/layers/GeomodelLabelsLayer.d.ts +50 -0
- package/dist/layers/GeomodelLabelsLayer.d.ts.map +1 -0
- package/dist/layers/GeomodelLayerV2.d.ts +13 -0
- package/dist/layers/GeomodelLayerV2.d.ts.map +1 -0
- package/dist/layers/GridLayer.d.ts +30 -0
- package/dist/layers/GridLayer.d.ts.map +1 -0
- package/dist/layers/ImageCanvasLayer.d.ts +21 -0
- package/dist/layers/ImageCanvasLayer.d.ts.map +1 -0
- package/dist/layers/ReferenceLineLayer.d.ts +29 -0
- package/dist/layers/ReferenceLineLayer.d.ts.map +1 -0
- package/dist/layers/SchematicLayer.d.ts +114 -0
- package/dist/layers/SchematicLayer.d.ts.map +1 -0
- package/dist/layers/SeismicCanvasLayer.d.ts +19 -0
- package/dist/layers/SeismicCanvasLayer.d.ts.map +1 -0
- package/dist/layers/WellborePathLayer.d.ts +18 -0
- package/dist/layers/WellborePathLayer.d.ts.map +1 -0
- package/dist/layers/base/CanvasLayer.d.ts +20 -0
- package/dist/layers/base/CanvasLayer.d.ts.map +1 -0
- package/dist/layers/base/HTMLLayer.d.ts +14 -0
- package/dist/layers/base/HTMLLayer.d.ts.map +1 -0
- package/dist/layers/base/Layer.d.ts +70 -0
- package/dist/layers/base/Layer.d.ts.map +1 -0
- package/dist/layers/base/PixiLayer.d.ts +33 -0
- package/dist/layers/base/PixiLayer.d.ts.map +1 -0
- package/dist/layers/base/SVGLayer.d.ts +14 -0
- package/dist/layers/base/SVGLayer.d.ts.map +1 -0
- package/dist/layers/base/index.d.ts +6 -0
- package/dist/layers/base/index.d.ts.map +1 -0
- package/dist/layers/index.d.ts +17 -0
- package/dist/layers/index.d.ts.map +1 -0
- package/dist/layers/schematicInterfaces.d.ts +210 -0
- package/dist/layers/schematicInterfaces.d.ts.map +1 -0
- package/dist/utils/arc-length.d.ts +24 -0
- package/dist/utils/arc-length.d.ts.map +1 -0
- package/dist/utils/binary-search.d.ts +9 -0
- package/dist/utils/binary-search.d.ts.map +1 -0
- package/dist/utils/color.d.ts +6 -0
- package/dist/utils/color.d.ts.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/root-finder.d.ts +35 -0
- package/dist/utils/root-finder.d.ts.map +1 -0
- package/dist/utils/text.d.ts +15 -0
- package/dist/utils/text.d.ts.map +1 -0
- package/dist/utils/vectorUtils.d.ts +16 -0
- package/dist/utils/vectorUtils.d.ts.map +1 -0
- package/dist/vendor/pixi-dashed-line/index.d.ts +57 -0
- package/dist/vendor/pixi-dashed-line/index.d.ts.map +1 -0
- package/package.json +23 -25
- package/src/datautils/schematicShapeGenerator.ts +6 -6
- package/src/datautils/surfacedata.ts +0 -1
- package/src/layers/CustomDisplayObjects/ComplexRopeGeometry.ts +5 -2
- package/src/layers/CustomDisplayObjects/FixedWidthSimpleRopeGeometry.ts +5 -2
- package/src/layers/CustomDisplayObjects/UniformTextureStretchRopeGeometry.ts +5 -2
- package/src/layers/SchematicLayer.ts +0 -1
- package/src/tsconfig.tsbuildinfo +1 -1
- package/src/vendor/pixi-dashed-line/index.ts +3 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../src/utils/color.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CASrD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAO9D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
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 | undefined;
|
|
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 {};
|
|
35
|
+
//# sourceMappingURL=root-finder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root-finder.d.ts","sourceRoot":"","sources":["../../src/utils/root-finder.ts"],"names":[],"mappings":"AAEA,KAAK,EAAE,GAAG,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;AAKhC,qBAAa,UAAU;IACrB;;;;;;;;OAQG;IACH,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,SAAO,EAAE,aAAa,SAAO,EAAE,KAAK,SAAM,EAAE,QAAQ,SAAI,EAAE,QAAQ,SAAI,GAAG,MAAM,GAAG,SAAS;IAc5H;;;;;;;;OAQG;IACH,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,SAAO,EAAE,aAAa,SAAO,EAAE,KAAK,SAAM,EAAE,QAAQ,SAAI,EAAE,QAAQ,SAAI,GAAG,MAAM;IAqBhH;;;;;;;;OAQG;IACH,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,SAAO,EAAE,aAAa,SAAO,EAAE,KAAK,SAAM,EAAE,QAAQ,SAAI,EAAE,QAAQ,SAAI,GAAG,MAAM;CAOnH"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
} | undefined;
|
|
11
|
+
export declare function getOverlapOffset(r1: BoundingBox, r2: BoundingBox, horizontalPadding?: number, verticalPadding?: number): {
|
|
12
|
+
dx: number;
|
|
13
|
+
dy: number;
|
|
14
|
+
} | undefined;
|
|
15
|
+
//# sourceMappingURL=text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/utils/text.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAKvC,wBAAgB,aAAa,CAAC,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAGpE;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAEzG;AAED,wBAAgB,yBAAyB,CAAC,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,GAAG,OAAO,CAQnF;AAED,wBAAgB,aAAa,CAC3B,EAAE,EAAE,WAAW,EACf,EAAE,EAAE,WAAW,EACf,iBAAiB,GAAE,MAAmC,EACtD,eAAe,GAAE,MAAiC,GACjD,OAAO,CAUT;AAED,wBAAgB,UAAU,CAAC,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAkBnG;AAED,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,WAAW,EACf,EAAE,EAAE,WAAW,EACf,iBAAiB,SAA6B,EAC9C,eAAe,SAA2B,GACzC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAkBxC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IPoint, Point } from 'pixi.js';
|
|
2
|
+
import { default as 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[];
|
|
16
|
+
//# sourceMappingURL=vectorUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vectorUtils.d.ts","sourceRoot":"","sources":["../../src/utils/vectorUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,OAAO,MAAM,wBAAwB,CAAC;AAE7C,eAAO,MAAM,aAAa,GAAI,GAAG,MAAM,KAAG,OAAgC,CAAC;AAC3E,eAAO,MAAM,YAAY,GAAI,GAAG,MAAM,KAAG,CAAC,MAAM,EAAE,MAAM,CAAe,CAAC;AACxE,eAAO,MAAM,aAAa,GAAI,GAAG,OAAO,KAAG,KAA8B,CAAC;AAC1E,eAAO,MAAM,aAAa,GAAI,GAAG,OAAO,KAAG,CAAC,MAAM,EAAE,MAAM,CAA2B,CAAC;AACtF,eAAO,MAAM,YAAY,GAAI,GAAG,MAAM,EAAE,KAAG,KAA8B,CAAC;AAC1E,eAAO,MAAM,aAAa,GAAI,GAAG,MAAM,EAAE,KAAG,OAA4C,CAAC;AAEzF,eAAO,MAAM,QAAQ,GAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,KAAG,MAE1E,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,MAAM,KAAK,EAAE,OAAO,KAAK,KAAG,MAEzD,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,IAAI,KAAK,EAAE,IAAI,KAAK,KAAG,KAKjD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,GAAG,KAAK,KAAG,KAE9C,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,QAAQ,MAAM,EAAE,KAAG,OAAO,EAuBvD,CAAC;AAGF,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,EAAE,QAAQ,OAAO,EAAE,QAAQ,MAAM,KAAG,KAG5E,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,QAAQ,MAAM,EAAE,EAAE,SAAS,OAAO,EAAE,EAAE,QAAQ,MAAM,KAAG,KAAK,EAaxF,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as PIXI from 'pixi.js';
|
|
2
|
+
/** Define the dash: [dash length, gap size, dash size, gap size, ...] */
|
|
3
|
+
export type Dashes = number[];
|
|
4
|
+
export interface DashLineOptions {
|
|
5
|
+
dash?: Dashes;
|
|
6
|
+
width?: number;
|
|
7
|
+
color?: number;
|
|
8
|
+
alpha?: number;
|
|
9
|
+
scale?: number;
|
|
10
|
+
useTexture?: boolean;
|
|
11
|
+
useDots?: boolean;
|
|
12
|
+
cap?: PIXI.LINE_CAP;
|
|
13
|
+
join?: PIXI.LINE_JOIN;
|
|
14
|
+
alignment?: number;
|
|
15
|
+
}
|
|
16
|
+
export declare class DashLine {
|
|
17
|
+
graphics: PIXI.Graphics;
|
|
18
|
+
/** current length of the line */
|
|
19
|
+
lineLength: number;
|
|
20
|
+
/** cursor location */
|
|
21
|
+
cursor: PIXI.Point;
|
|
22
|
+
/** desired scale of line */
|
|
23
|
+
scale: number;
|
|
24
|
+
private start;
|
|
25
|
+
private dashSize;
|
|
26
|
+
private dash;
|
|
27
|
+
private useTexture;
|
|
28
|
+
private options;
|
|
29
|
+
static dashTextureCache: Record<string, PIXI.Texture>;
|
|
30
|
+
/**
|
|
31
|
+
* Create a DashLine
|
|
32
|
+
* @param graphics
|
|
33
|
+
* @param [options]
|
|
34
|
+
* @param [options.useTexture=false] - use the texture based render (useful for very large or very small dashed lines)
|
|
35
|
+
* @param [options.dashes=[10,5] - an array holding the dash and gap (eg, [10, 5, 20, 5, ...])
|
|
36
|
+
* @param [options.width=1] - width of the dashed line
|
|
37
|
+
* @param [options.alpha=1] - alpha of the dashed line
|
|
38
|
+
* @param [options.color=0xffffff] - color of the dashed line
|
|
39
|
+
* @param [options.cap] - add a PIXI.LINE_CAP style to dashed lines (only works for useTexture: false)
|
|
40
|
+
* @param [options.join] - add a PIXI.LINE_JOIN style to the dashed lines (only works for useTexture: false)
|
|
41
|
+
* @param [options.alignment] - The alignment of any lines drawn (0.5 = middle, 1 = outer, 0 = inner)
|
|
42
|
+
*/
|
|
43
|
+
constructor(graphics: PIXI.Graphics, options?: DashLineOptions);
|
|
44
|
+
/** resets line style to enable dashed line (useful if lineStyle was changed on graphics element) */
|
|
45
|
+
setLineStyle(): void;
|
|
46
|
+
private static distance;
|
|
47
|
+
moveTo(x: number, y: number): this;
|
|
48
|
+
lineTo(x: number, y: number, closePath?: boolean): this;
|
|
49
|
+
closePath(): void;
|
|
50
|
+
drawCircle(x: number, y: number, radius: number, points?: number, matrix?: PIXI.Matrix): this;
|
|
51
|
+
drawEllipse(x: number, y: number, radiusX: number, radiusY: number, points?: number, matrix?: PIXI.Matrix): this;
|
|
52
|
+
drawPolygon(points: PIXI.Point[] | number[], matrix?: PIXI.Matrix): this;
|
|
53
|
+
drawRect(x: number, y: number, width: number, height: number, matrix?: PIXI.Matrix): this;
|
|
54
|
+
private adjustLineStyle;
|
|
55
|
+
private static getTexture;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vendor/pixi-dashed-line/index.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,yEAAyE;AACzE,MAAM,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC;AAE9B,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC;IACpB,IAAI,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAYD,qBAAa,QAAQ;IACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC;IAExB,iCAAiC;IACjC,UAAU,EAAE,MAAM,CAAC;IAEnB,sBAAsB;IACtB,MAAM,aAAoB;IAE1B,4BAA4B;IAC5B,KAAK,SAAK;IAEV,OAAO,CAAC,KAAK,CAAa;IAE1B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,IAAI,CAAW;IAEvB,OAAO,CAAC,UAAU,CAAU;IAC5B,OAAO,CAAC,OAAO,CAAkB;IAGjC,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAM;IAE3D;;;;;;;;;;;;OAYG;gBACS,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,GAAE,eAAoB;IAUlE,oGAAoG;IACpG,YAAY;IAwBZ,OAAO,CAAC,MAAM,CAAC,QAAQ;IAIvB,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI;IAQlC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI;IA+EvD,SAAS;IAIT,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAK,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI;IAyBzF,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAK,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI;IAwB5G,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI;IA0CxE,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI;IAuCzF,OAAO,CAAC,eAAe;IAevB,OAAO,CAAC,MAAM,CAAC,UAAU;CAgC1B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/esv-intersection",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.5",
|
|
4
4
|
"description": "Intersection component package with testing and automatic documentation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"postdocs": "copyfiles images/* docs_out && copyfiles .nojekyll docs_out",
|
|
29
29
|
"storybook": "storybook dev -p 6006",
|
|
30
30
|
"build-storybook": "storybook build",
|
|
31
|
-
"prepare": "husky
|
|
31
|
+
"prepare": "husky",
|
|
32
32
|
"version": "changeset version && npm install --package-lock-only",
|
|
33
33
|
"release:npm": "npm run build && changeset publish",
|
|
34
34
|
"release:github": "npm run build && changeset publish --no-git-tag"
|
|
@@ -53,39 +53,37 @@
|
|
|
53
53
|
"homepage": "https://github.com/equinor/esv-intersection#readme",
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@changesets/cli": "^2.27.10",
|
|
56
|
-
"@storybook/addon-
|
|
57
|
-
"@storybook/html-vite": "^
|
|
58
|
-
"@types/d3": "^7.4.
|
|
59
|
-
"@types/mock-raf": "^1.0.
|
|
60
|
-
"@typescript-eslint/eslint-plugin": "^6.8.0",
|
|
61
|
-
"@typescript-eslint/parser": "^6.8.0",
|
|
56
|
+
"@storybook/addon-docs": "^9.1.5",
|
|
57
|
+
"@storybook/html-vite": "^9.1.5",
|
|
58
|
+
"@types/d3": "^7.4.3",
|
|
59
|
+
"@types/mock-raf": "^1.0.6",
|
|
62
60
|
"copyfiles": "^2.4.1",
|
|
63
|
-
"eslint": "^
|
|
64
|
-
"eslint-config-prettier": "^
|
|
65
|
-
"eslint-plugin-prettier": "^5.
|
|
66
|
-
"eslint-plugin-storybook": "^
|
|
67
|
-
"husky": "^
|
|
68
|
-
"lint-staged": "^15.2
|
|
61
|
+
"eslint": "^9.35.0",
|
|
62
|
+
"eslint-config-prettier": "^10.1.8",
|
|
63
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
64
|
+
"eslint-plugin-storybook": "^9.1.5",
|
|
65
|
+
"husky": "^9.1.7",
|
|
66
|
+
"lint-staged": "^15.5.2",
|
|
69
67
|
"mock-raf": "^1.0.1",
|
|
70
68
|
"pixi.js": "^7.3.1",
|
|
71
69
|
"prettier": "^3.0.3",
|
|
72
|
-
"rimraf": "^
|
|
73
|
-
"storybook": "^
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"typescript": "^
|
|
77
|
-
"vite": "^
|
|
78
|
-
"vite-plugin-dts": "^4.5.
|
|
79
|
-
"vitest": "^3.
|
|
70
|
+
"rimraf": "^6.0.1",
|
|
71
|
+
"storybook": "^9.1.5",
|
|
72
|
+
"typedoc": "^0.28.12",
|
|
73
|
+
"typescript": "^5.9.2",
|
|
74
|
+
"typescript-eslint": "^8.43.0",
|
|
75
|
+
"vite": "^6.3.5",
|
|
76
|
+
"vite-plugin-dts": "^4.5.4",
|
|
77
|
+
"vitest": "^3.2.4",
|
|
80
78
|
"vitest-canvas-mock": "^0.3.3"
|
|
81
79
|
},
|
|
82
80
|
"peerDependencies": {
|
|
83
81
|
"pixi.js": "^7.1.0"
|
|
84
82
|
},
|
|
85
83
|
"dependencies": {
|
|
86
|
-
"@equinor/videx-math": "^1.1.
|
|
87
|
-
"@equinor/videx-vector2": "^1.0.
|
|
88
|
-
"curve-interpolator": "3.
|
|
84
|
+
"@equinor/videx-math": "^1.1.3",
|
|
85
|
+
"@equinor/videx-vector2": "^1.0.47",
|
|
86
|
+
"curve-interpolator": "3.3.1",
|
|
89
87
|
"d3-array": "^3.2.4",
|
|
90
88
|
"d3-axis": "^3.0.0",
|
|
91
89
|
"d3-scale": "^4.0.2",
|
|
@@ -387,7 +387,7 @@ export const createScreenTexture = ({ scalingFactor }: ScreenOptions): Texture =
|
|
|
387
387
|
canvasCtx.fillStyle = 'white';
|
|
388
388
|
canvasCtx.fillRect(0, 0, canvas.width, canvas.height);
|
|
389
389
|
|
|
390
|
-
const baseLineWidth = size / 10;
|
|
390
|
+
const baseLineWidth = size / 10;
|
|
391
391
|
canvasCtx.strokeStyle = '#AAAAAA';
|
|
392
392
|
canvasCtx.lineWidth = baseLineWidth;
|
|
393
393
|
canvasCtx.beginPath();
|
|
@@ -446,7 +446,7 @@ export const createCementTexture = ({ firstColor, secondColor, scalingFactor }:
|
|
|
446
446
|
canvasCtx.fillStyle = secondColor;
|
|
447
447
|
canvasCtx.beginPath();
|
|
448
448
|
|
|
449
|
-
const distanceBetweenLines = size / 12;
|
|
449
|
+
const distanceBetweenLines = size / 12;
|
|
450
450
|
for (let i = -canvas.width; i < canvas.width; i++) {
|
|
451
451
|
canvasCtx.moveTo(-canvas.width + distanceBetweenLines * i, -canvas.height);
|
|
452
452
|
canvasCtx.lineTo(canvas.width + distanceBetweenLines * i, canvas.height);
|
|
@@ -474,8 +474,8 @@ export const createCementPlugTexture = ({ firstColor, secondColor, scalingFactor
|
|
|
474
474
|
canvasCtx.strokeStyle = secondColor;
|
|
475
475
|
canvasCtx.beginPath();
|
|
476
476
|
|
|
477
|
-
canvasCtx.setLineDash([20, 10]);
|
|
478
|
-
const distanceBetweenLines = size / 12;
|
|
477
|
+
canvasCtx.setLineDash([20, 10]);
|
|
478
|
+
const distanceBetweenLines = size / 12;
|
|
479
479
|
for (let i = -canvas.width; i < canvas.width; i++) {
|
|
480
480
|
canvasCtx.moveTo(-canvas.width + distanceBetweenLines * i, -canvas.height);
|
|
481
481
|
canvasCtx.lineTo(canvas.width + distanceBetweenLines * i, canvas.height * 2);
|
|
@@ -505,8 +505,8 @@ export const createCementSqueezeTexture = ({ firstColor, secondColor, scalingFac
|
|
|
505
505
|
canvasCtx.fillRect(0, 0, canvas.width, canvas.height);
|
|
506
506
|
canvasCtx.beginPath();
|
|
507
507
|
|
|
508
|
-
canvasCtx.setLineDash([20, 10]);
|
|
509
|
-
const distanceBetweenLines = size / 12;
|
|
508
|
+
canvasCtx.setLineDash([20, 10]);
|
|
509
|
+
const distanceBetweenLines = size / 12;
|
|
510
510
|
for (let i = -canvas.width; i < canvas.width; i++) {
|
|
511
511
|
canvasCtx.moveTo(-canvas.width + distanceBetweenLines * i, -canvas.height);
|
|
512
512
|
canvasCtx.lineTo(canvas.width + distanceBetweenLines * i, canvas.height * 2);
|
|
@@ -242,7 +242,6 @@ function getColorFromUnit(unit: StratUnit): number {
|
|
|
242
242
|
|
|
243
243
|
const unassignedColorScale = scaleOrdinal<number, string>()
|
|
244
244
|
.domain([0, 100])
|
|
245
|
-
// eslint-disable-next-line no-magic-numbers
|
|
246
245
|
.range(quantize(interpolateRgb('#e6f1cf', '#85906d'), 10));
|
|
247
246
|
|
|
248
247
|
/**
|
|
@@ -15,7 +15,7 @@ export class ComplexRopeGeometry extends MeshGeometry {
|
|
|
15
15
|
constructor(segments: ComplexRopeSegment[]) {
|
|
16
16
|
const pointCount = sum(segments, (segment) => segment.points.length);
|
|
17
17
|
|
|
18
|
-
//
|
|
18
|
+
// @ts-expect-error Temporary fix until pixi.js is updated
|
|
19
19
|
super(new Float32Array(pointCount * 4), new Float32Array(pointCount * 4), new Uint16Array((pointCount - 1) * 6));
|
|
20
20
|
|
|
21
21
|
this.segments = segments;
|
|
@@ -52,9 +52,12 @@ export class ComplexRopeGeometry extends MeshGeometry {
|
|
|
52
52
|
|
|
53
53
|
// if the number of points has changed we will need to recreate the arraybuffers
|
|
54
54
|
if (vertexBuffer.data.length / 4 !== pointCount) {
|
|
55
|
+
// @ts-expect-error Temporary fix until pixi.js is updated
|
|
55
56
|
vertexBuffer.data = new Float32Array(pointCount * 4);
|
|
57
|
+
// @ts-expect-error Temporary fix until pixi.js is updated
|
|
56
58
|
uvBuffer.data = new Float32Array(pointCount * 4);
|
|
57
|
-
|
|
59
|
+
// @ts-expect-error Temporary fix until pixi.js is updated
|
|
60
|
+
indexBuffer.data = new Uint16Array((pointCount - 1) * 6);
|
|
58
61
|
}
|
|
59
62
|
|
|
60
63
|
const uvs = uvBuffer.data;
|
|
@@ -8,6 +8,7 @@ export class FixedWidthSimpleRopeGeometry extends MeshGeometry {
|
|
|
8
8
|
* @param {PIXI.Point[]} [points] - An array of PIXI.Point objects to construct this rope.
|
|
9
9
|
*/
|
|
10
10
|
constructor(points: IPoint[], width = 200) {
|
|
11
|
+
// @ts-expect-error Temporary fix until pixi.js is updated
|
|
11
12
|
super(new Float32Array(points.length * 4), new Float32Array(points.length * 4), new Uint16Array((points.length - 1) * 6));
|
|
12
13
|
/**
|
|
13
14
|
* An array of points that determine the rope
|
|
@@ -53,9 +54,11 @@ export class FixedWidthSimpleRopeGeometry extends MeshGeometry {
|
|
|
53
54
|
}
|
|
54
55
|
// if the number of points has changed we will need to recreate the arraybuffers
|
|
55
56
|
if (vertexBuffer.data.length / 4 !== points.length) {
|
|
57
|
+
// @ts-expect-error Temporary fix until pixi.js is updated
|
|
56
58
|
vertexBuffer.data = new Float32Array(points.length * 4);
|
|
59
|
+
// @ts-expect-error Temporary fix until pixi.js is updated
|
|
57
60
|
uvBuffer.data = new Float32Array(points.length * 4);
|
|
58
|
-
//
|
|
61
|
+
// @ts-expect-error Temporary fix until pixi.js is updated
|
|
59
62
|
indexBuffer.data = new Uint16Array((points.length - 1) * 6);
|
|
60
63
|
}
|
|
61
64
|
const uvs = uvBuffer.data;
|
|
@@ -122,7 +125,7 @@ export class FixedWidthSimpleRopeGeometry extends MeshGeometry {
|
|
|
122
125
|
}
|
|
123
126
|
perpY = -(nextPoint.x - lastPoint.x);
|
|
124
127
|
perpX = nextPoint.y - lastPoint.y;
|
|
125
|
-
|
|
128
|
+
|
|
126
129
|
let ratio = (1 - i / (total - 1)) * 10;
|
|
127
130
|
if (ratio > 1) {
|
|
128
131
|
ratio = 1;
|
|
@@ -19,7 +19,7 @@ export class UniformTextureStretchRopeGeometry extends MeshGeometry {
|
|
|
19
19
|
* @param points - An array of PIXI.Point objects to construct this rope.
|
|
20
20
|
*/
|
|
21
21
|
constructor(points: IPoint[], width = 200) {
|
|
22
|
-
//
|
|
22
|
+
// @ts-expect-error Temporary fix until pixi.js is updated
|
|
23
23
|
super(new Float32Array(points.length * 4), new Float32Array(points.length * 4), new Uint16Array((points.length - 1) * 6));
|
|
24
24
|
|
|
25
25
|
this.points = points;
|
|
@@ -47,9 +47,12 @@ export class UniformTextureStretchRopeGeometry extends MeshGeometry {
|
|
|
47
47
|
|
|
48
48
|
// if the number of points has changed we will need to recreate the arraybuffers
|
|
49
49
|
if (vertexBuffer.data.length / 4 !== points.length) {
|
|
50
|
+
// @ts-expect-error Temporary fix until pixi.js is updated
|
|
50
51
|
vertexBuffer.data = new Float32Array(points.length * 4);
|
|
52
|
+
// @ts-expect-error Temporary fix until pixi.js is updated
|
|
51
53
|
uvBuffer.data = new Float32Array(points.length * 4);
|
|
52
|
-
|
|
54
|
+
// @ts-expect-error Temporary fix until pixi.js is updated
|
|
55
|
+
indexBuffer.data = new Uint16Array((points.length - 1) * 6);
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
const total = points.length; // - 1;
|
|
@@ -564,7 +564,6 @@ export class SchematicLayer<T extends SchematicData> extends PixiLayer<T> {
|
|
|
564
564
|
},
|
|
565
565
|
{ rightPath: [], leftPath: [] },
|
|
566
566
|
);
|
|
567
|
-
// eslint-disable-next-line no-magic-numbers
|
|
568
567
|
this.drawOutline(leftPath, rightPath, convertColor('black'), 0.25, 'TopAndBottom');
|
|
569
568
|
}
|
|
570
569
|
|