@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.
- package/README.md +11 -16
- package/dist/components/axis.d.ts +47 -47
- package/dist/components/index.d.ts +1 -1
- package/dist/constants.d.ts +11 -11
- package/dist/control/ExtendedCurveInterpolator.d.ts +58 -58
- package/dist/control/IntersectionReferenceSystem.d.ts +96 -96
- package/dist/control/LayerManager.d.ts +76 -76
- package/dist/control/MainController.d.ts +154 -154
- package/dist/control/ZoomPanHandler.d.ts +158 -158
- package/dist/control/index.d.ts +5 -5
- package/dist/control/interfaces.d.ts +37 -37
- package/dist/control/overlay.d.ts +20 -20
- package/dist/datautils/colortable.d.ts +1 -1
- package/dist/datautils/findsample.d.ts +2 -2
- package/dist/datautils/index.d.ts +6 -6
- package/dist/datautils/interfaces.d.ts +63 -63
- package/dist/datautils/picks.d.ts +74 -74
- package/dist/datautils/schematicShapeGenerator.d.ts +59 -61
- package/dist/datautils/seismicimage.d.ts +45 -45
- package/dist/datautils/surfacedata.d.ts +10 -10
- package/dist/datautils/trajectory.d.ts +14 -14
- package/dist/index.cjs +15 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +6 -6
- package/dist/index.mjs +7944 -0
- package/dist/index.mjs.map +1 -0
- package/dist/index.umd.js +15 -1
- package/dist/index.umd.js.map +1 -0
- package/dist/interfaces.d.ts +86 -86
- package/dist/layers/CalloutCanvasLayer.d.ts +60 -60
- package/dist/layers/CustomDisplayObjects/ComplexRope.d.ts +22 -22
- package/dist/layers/CustomDisplayObjects/ComplexRopeGeometry.d.ts +27 -27
- package/dist/layers/CustomDisplayObjects/FixedWidthSimpleRope.d.ts +20 -20
- package/dist/layers/CustomDisplayObjects/FixedWidthSimpleRopeGeometry.d.ts +26 -26
- package/dist/layers/CustomDisplayObjects/UniformTextureStretchRope.d.ts +17 -17
- package/dist/layers/CustomDisplayObjects/UniformTextureStretchRopeGeometry.d.ts +24 -24
- package/dist/layers/GeomodelCanvasLayer.d.ts +28 -28
- package/dist/layers/GeomodelLabelsLayer.d.ts +49 -49
- package/dist/layers/GeomodelLayerV2.d.ts +12 -12
- package/dist/layers/GridLayer.d.ts +29 -29
- package/dist/layers/ImageCanvasLayer.d.ts +20 -20
- package/dist/layers/ReferenceLineLayer.d.ts +29 -29
- package/dist/layers/SchematicLayer.d.ts +113 -114
- package/dist/layers/SeismicCanvasLayer.d.ts +18 -18
- package/dist/layers/WellborePathLayer.d.ts +17 -17
- package/dist/layers/base/CanvasLayer.d.ts +19 -19
- package/dist/layers/base/HTMLLayer.d.ts +13 -13
- package/dist/layers/base/Layer.d.ts +69 -69
- package/dist/layers/base/PixiLayer.d.ts +32 -32
- package/dist/layers/base/SVGLayer.d.ts +13 -13
- package/dist/layers/base/index.d.ts +5 -5
- package/dist/layers/index.d.ts +16 -16
- package/dist/layers/schematicInterfaces.d.ts +208 -208
- package/dist/tubing1.svg +3 -0
- package/dist/tubing2.svg +6 -0
- package/dist/tubing3.svg +12 -0
- package/dist/utils/arc-length.d.ts +23 -23
- package/dist/utils/binary-search.d.ts +8 -8
- package/dist/utils/color.d.ts +5 -5
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/root-finder.d.ts +34 -34
- package/dist/utils/text.d.ts +14 -14
- package/dist/utils/vectorUtils.d.ts +15 -15
- package/dist/vendor/pixi-dashed-line/index.d.ts +57 -0
- package/package.json +30 -55
- package/src/datautils/schematicShapeGenerator.ts +2 -8
- package/src/layers/SchematicLayer.ts +12 -37
- package/src/layers/base/PixiLayer.ts +4 -4
- package/src/vendor/pixi-dashed-line/index.ts +394 -0
- package/dist/datautils/camelcase.d.ts +0 -5
- package/dist/index.esm.js +0 -1
- package/dist/index.js +0 -1
- package/src/datautils/camelcase.ts +0 -28
package/dist/interfaces.d.ts
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
import { ZoomTransform } from 'd3-zoom';
|
|
2
|
-
import { Graphics } from 'pixi.js';
|
|
3
|
-
import Vector2 from '@equinor/videx-vector2';
|
|
4
|
-
import { ScaleLinear } from 'd3-scale';
|
|
5
|
-
import { ExtendedCurveInterpolator } from './control/ExtendedCurveInterpolator';
|
|
6
|
-
import { CurveInterpolator } from 'curve-interpolator';
|
|
7
|
-
interface LayerEvent {
|
|
8
|
-
elm?: HTMLElement;
|
|
9
|
-
}
|
|
10
|
-
export interface OnMountEvent extends LayerEvent {
|
|
11
|
-
elm: HTMLElement;
|
|
12
|
-
width?: number;
|
|
13
|
-
height?: number;
|
|
14
|
-
}
|
|
15
|
-
export interface OnUnmountEvent extends LayerEvent {
|
|
16
|
-
}
|
|
17
|
-
export interface OnResizeEvent extends LayerEvent {
|
|
18
|
-
width: number;
|
|
19
|
-
height: number;
|
|
20
|
-
}
|
|
21
|
-
export interface OnRescaleEvent extends LayerEvent {
|
|
22
|
-
xScale: ScaleLinear<number, number, never>;
|
|
23
|
-
yScale: ScaleLinear<number, number, never>;
|
|
24
|
-
xBounds: [number, number];
|
|
25
|
-
yBounds: [number, number];
|
|
26
|
-
zFactor: number;
|
|
27
|
-
viewportRatio: number;
|
|
28
|
-
xRatio: number;
|
|
29
|
-
yRatio: number;
|
|
30
|
-
width: number;
|
|
31
|
-
height: number;
|
|
32
|
-
transform: ZoomTransform;
|
|
33
|
-
}
|
|
34
|
-
export interface OnUpdateEvent<T> extends LayerEvent {
|
|
35
|
-
data?: T;
|
|
36
|
-
}
|
|
37
|
-
export interface ZoomAndPanOptions {
|
|
38
|
-
maxZoomLevel: number;
|
|
39
|
-
minZoomLevel: number;
|
|
40
|
-
}
|
|
41
|
-
export interface Connector {
|
|
42
|
-
end: string;
|
|
43
|
-
endScale: number;
|
|
44
|
-
}
|
|
45
|
-
export interface Annotation {
|
|
46
|
-
title: string;
|
|
47
|
-
label: string;
|
|
48
|
-
color: string;
|
|
49
|
-
group: string;
|
|
50
|
-
md?: number;
|
|
51
|
-
pos?: [number, number];
|
|
52
|
-
}
|
|
53
|
-
export interface MDPoint {
|
|
54
|
-
point: number[];
|
|
55
|
-
normal?: Vector2;
|
|
56
|
-
md: number;
|
|
57
|
-
}
|
|
58
|
-
export interface WellItemGraphics {
|
|
59
|
-
graphics: Graphics;
|
|
60
|
-
}
|
|
61
|
-
export interface ScaleOptions {
|
|
62
|
-
xMin?: number;
|
|
63
|
-
xMax?: number;
|
|
64
|
-
yMin?: number;
|
|
65
|
-
yMax?: number;
|
|
66
|
-
xBounds?: [number, number];
|
|
67
|
-
yBounds?: [number, number];
|
|
68
|
-
}
|
|
69
|
-
export interface Interpolators {
|
|
70
|
-
trajectory: CurveInterpolator;
|
|
71
|
-
curtain: ExtendedCurveInterpolator;
|
|
72
|
-
curve?: ExtendedCurveInterpolator;
|
|
73
|
-
}
|
|
74
|
-
export interface Trajectory {
|
|
75
|
-
points: number[][];
|
|
76
|
-
offset: number;
|
|
77
|
-
}
|
|
78
|
-
export type BoundingBox = {
|
|
79
|
-
x: number;
|
|
80
|
-
y: number;
|
|
81
|
-
width: number;
|
|
82
|
-
height: number;
|
|
83
|
-
offsetX?: number;
|
|
84
|
-
offsetY?: number;
|
|
85
|
-
};
|
|
86
|
-
export {};
|
|
1
|
+
import { ZoomTransform } from 'd3-zoom';
|
|
2
|
+
import { Graphics } from 'pixi.js';
|
|
3
|
+
import Vector2 from '@equinor/videx-vector2';
|
|
4
|
+
import { ScaleLinear } from 'd3-scale';
|
|
5
|
+
import { ExtendedCurveInterpolator } from './control/ExtendedCurveInterpolator';
|
|
6
|
+
import { CurveInterpolator } from 'curve-interpolator';
|
|
7
|
+
interface LayerEvent {
|
|
8
|
+
elm?: HTMLElement;
|
|
9
|
+
}
|
|
10
|
+
export interface OnMountEvent extends LayerEvent {
|
|
11
|
+
elm: HTMLElement;
|
|
12
|
+
width?: number;
|
|
13
|
+
height?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface OnUnmountEvent extends LayerEvent {
|
|
16
|
+
}
|
|
17
|
+
export interface OnResizeEvent extends LayerEvent {
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
}
|
|
21
|
+
export interface OnRescaleEvent extends LayerEvent {
|
|
22
|
+
xScale: ScaleLinear<number, number, never>;
|
|
23
|
+
yScale: ScaleLinear<number, number, never>;
|
|
24
|
+
xBounds: [number, number];
|
|
25
|
+
yBounds: [number, number];
|
|
26
|
+
zFactor: number;
|
|
27
|
+
viewportRatio: number;
|
|
28
|
+
xRatio: number;
|
|
29
|
+
yRatio: number;
|
|
30
|
+
width: number;
|
|
31
|
+
height: number;
|
|
32
|
+
transform: ZoomTransform;
|
|
33
|
+
}
|
|
34
|
+
export interface OnUpdateEvent<T> extends LayerEvent {
|
|
35
|
+
data?: T;
|
|
36
|
+
}
|
|
37
|
+
export interface ZoomAndPanOptions {
|
|
38
|
+
maxZoomLevel: number;
|
|
39
|
+
minZoomLevel: number;
|
|
40
|
+
}
|
|
41
|
+
export interface Connector {
|
|
42
|
+
end: string;
|
|
43
|
+
endScale: number;
|
|
44
|
+
}
|
|
45
|
+
export interface Annotation {
|
|
46
|
+
title: string;
|
|
47
|
+
label: string;
|
|
48
|
+
color: string;
|
|
49
|
+
group: string;
|
|
50
|
+
md?: number;
|
|
51
|
+
pos?: [number, number];
|
|
52
|
+
}
|
|
53
|
+
export interface MDPoint {
|
|
54
|
+
point: number[];
|
|
55
|
+
normal?: Vector2;
|
|
56
|
+
md: number;
|
|
57
|
+
}
|
|
58
|
+
export interface WellItemGraphics {
|
|
59
|
+
graphics: Graphics;
|
|
60
|
+
}
|
|
61
|
+
export interface ScaleOptions {
|
|
62
|
+
xMin?: number;
|
|
63
|
+
xMax?: number;
|
|
64
|
+
yMin?: number;
|
|
65
|
+
yMax?: number;
|
|
66
|
+
xBounds?: [number, number];
|
|
67
|
+
yBounds?: [number, number];
|
|
68
|
+
}
|
|
69
|
+
export interface Interpolators {
|
|
70
|
+
trajectory: CurveInterpolator;
|
|
71
|
+
curtain: ExtendedCurveInterpolator;
|
|
72
|
+
curve?: ExtendedCurveInterpolator;
|
|
73
|
+
}
|
|
74
|
+
export interface Trajectory {
|
|
75
|
+
points: number[][];
|
|
76
|
+
offset: number;
|
|
77
|
+
}
|
|
78
|
+
export declare type BoundingBox = {
|
|
79
|
+
x: number;
|
|
80
|
+
y: number;
|
|
81
|
+
width: number;
|
|
82
|
+
height: number;
|
|
83
|
+
offsetX?: number;
|
|
84
|
+
offsetY?: number;
|
|
85
|
+
};
|
|
86
|
+
export {};
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { ScaleLinear } from 'd3-scale';
|
|
2
|
-
import { CanvasLayer } from './base/CanvasLayer';
|
|
3
|
-
import { OnUpdateEvent, Annotation, OnRescaleEvent, BoundingBox } from '../interfaces';
|
|
4
|
-
import { LayerOptions } from './base/Layer';
|
|
5
|
-
export type Point = {
|
|
6
|
-
x: number;
|
|
7
|
-
y: number;
|
|
8
|
-
};
|
|
9
|
-
export type Callout = {
|
|
10
|
-
title: string;
|
|
11
|
-
label: string;
|
|
12
|
-
color: string;
|
|
13
|
-
pos: Point;
|
|
14
|
-
group: string;
|
|
15
|
-
alignment: string;
|
|
16
|
-
boundingBox: BoundingBox;
|
|
17
|
-
dx: number;
|
|
18
|
-
dy: number;
|
|
19
|
-
};
|
|
20
|
-
export interface CalloutOptions<T extends Annotation[]> extends LayerOptions<T> {
|
|
21
|
-
minFontSize?: number;
|
|
22
|
-
maxFontSize?: number;
|
|
23
|
-
fontSizeFactor?: number;
|
|
24
|
-
offsetMin?: number;
|
|
25
|
-
offsetMax?: number;
|
|
26
|
-
offsetFactor?: number;
|
|
27
|
-
}
|
|
28
|
-
export declare class CalloutCanvasLayer<T extends Annotation[]> extends CanvasLayer<T> {
|
|
29
|
-
rescaleEvent: OnRescaleEvent;
|
|
30
|
-
xRatio: number;
|
|
31
|
-
callouts: Callout[];
|
|
32
|
-
groupFilter: string[];
|
|
33
|
-
minFontSize: number;
|
|
34
|
-
maxFontSize: number;
|
|
35
|
-
fontSizeFactor: number;
|
|
36
|
-
offsetMin: number;
|
|
37
|
-
offsetMax: number;
|
|
38
|
-
offsetFactor: number;
|
|
39
|
-
constructor(id?: string, options?: CalloutOptions<T>);
|
|
40
|
-
setGroupFilter(filter: string[]): void;
|
|
41
|
-
onUpdate(event: OnUpdateEvent<T>): void;
|
|
42
|
-
onRescale(event: OnRescaleEvent): void;
|
|
43
|
-
render(isPanning?: boolean): void;
|
|
44
|
-
private renderAnnotation;
|
|
45
|
-
private renderText;
|
|
46
|
-
private renderPoint;
|
|
47
|
-
private renderCallout;
|
|
48
|
-
private renderLine;
|
|
49
|
-
private getPosition;
|
|
50
|
-
positionCallouts(annotations: Annotation[], isLeftToRight: boolean, xScale: ScaleLinear<number, number>, yScale: ScaleLinear<number, number>, _scale: number, fontSize: number, offset?: number): Callout[];
|
|
51
|
-
getAnnotationBoundingBox(title: string, label: string, pos: number[], xScale: ScaleLinear<number, number>, yScale: ScaleLinear<number, number>, height: number): {
|
|
52
|
-
x: number;
|
|
53
|
-
y: number;
|
|
54
|
-
width: number;
|
|
55
|
-
height: number;
|
|
56
|
-
};
|
|
57
|
-
chooseTopOrBottomPosition(nodes: Callout[], bottom: Callout[], top: Callout[]): void;
|
|
58
|
-
adjustTopPositions(top: Callout[]): void;
|
|
59
|
-
adjustBottomPositions(bottom: Callout[]): void;
|
|
60
|
-
}
|
|
1
|
+
import { ScaleLinear } from 'd3-scale';
|
|
2
|
+
import { CanvasLayer } from './base/CanvasLayer';
|
|
3
|
+
import { OnUpdateEvent, Annotation, OnRescaleEvent, BoundingBox } from '../interfaces';
|
|
4
|
+
import { LayerOptions } from './base/Layer';
|
|
5
|
+
export declare type Point = {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
};
|
|
9
|
+
export declare type Callout = {
|
|
10
|
+
title: string;
|
|
11
|
+
label: string;
|
|
12
|
+
color: string;
|
|
13
|
+
pos: Point;
|
|
14
|
+
group: string;
|
|
15
|
+
alignment: string;
|
|
16
|
+
boundingBox: BoundingBox;
|
|
17
|
+
dx: number;
|
|
18
|
+
dy: number;
|
|
19
|
+
};
|
|
20
|
+
export interface CalloutOptions<T extends Annotation[]> extends LayerOptions<T> {
|
|
21
|
+
minFontSize?: number;
|
|
22
|
+
maxFontSize?: number;
|
|
23
|
+
fontSizeFactor?: number;
|
|
24
|
+
offsetMin?: number;
|
|
25
|
+
offsetMax?: number;
|
|
26
|
+
offsetFactor?: number;
|
|
27
|
+
}
|
|
28
|
+
export declare class CalloutCanvasLayer<T extends Annotation[]> extends CanvasLayer<T> {
|
|
29
|
+
rescaleEvent: OnRescaleEvent;
|
|
30
|
+
xRatio: number;
|
|
31
|
+
callouts: Callout[];
|
|
32
|
+
groupFilter: string[];
|
|
33
|
+
minFontSize: number;
|
|
34
|
+
maxFontSize: number;
|
|
35
|
+
fontSizeFactor: number;
|
|
36
|
+
offsetMin: number;
|
|
37
|
+
offsetMax: number;
|
|
38
|
+
offsetFactor: number;
|
|
39
|
+
constructor(id?: string, options?: CalloutOptions<T>);
|
|
40
|
+
setGroupFilter(filter: string[]): void;
|
|
41
|
+
onUpdate(event: OnUpdateEvent<T>): void;
|
|
42
|
+
onRescale(event: OnRescaleEvent): void;
|
|
43
|
+
render(isPanning?: boolean): void;
|
|
44
|
+
private renderAnnotation;
|
|
45
|
+
private renderText;
|
|
46
|
+
private renderPoint;
|
|
47
|
+
private renderCallout;
|
|
48
|
+
private renderLine;
|
|
49
|
+
private getPosition;
|
|
50
|
+
positionCallouts(annotations: Annotation[], isLeftToRight: boolean, xScale: ScaleLinear<number, number>, yScale: ScaleLinear<number, number>, _scale: number, fontSize: number, offset?: number): Callout[];
|
|
51
|
+
getAnnotationBoundingBox(title: string, label: string, pos: number[], xScale: ScaleLinear<number, number>, yScale: ScaleLinear<number, number>, height: number): {
|
|
52
|
+
x: number;
|
|
53
|
+
y: number;
|
|
54
|
+
width: number;
|
|
55
|
+
height: number;
|
|
56
|
+
};
|
|
57
|
+
chooseTopOrBottomPosition(nodes: Callout[], bottom: Callout[], top: Callout[]): void;
|
|
58
|
+
adjustTopPositions(top: Callout[]): void;
|
|
59
|
+
adjustBottomPositions(bottom: Callout[]): void;
|
|
60
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { Mesh, IPoint, Renderer, Texture } from 'pixi.js';
|
|
2
|
-
export type ComplexRopeSegment = {
|
|
3
|
-
points: IPoint[];
|
|
4
|
-
diameter: number;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* The ComplexRope allows you to draw a texture across several segments of points and then manipulate these points
|
|
8
|
-
*/
|
|
9
|
-
export declare class ComplexRope extends Mesh {
|
|
10
|
-
/**
|
|
11
|
-
* re-calculate vertices by rope segment-points each frame
|
|
12
|
-
* @member {boolean}
|
|
13
|
-
*/
|
|
14
|
-
autoUpdate: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* @param texture - The texture to use on the rope.
|
|
17
|
-
* @param segments - An array of segments with points and diaeter to construct this rope.
|
|
18
|
-
* @param {number} textureScale - Optional. Adjust interval of repeated texture
|
|
19
|
-
*/
|
|
20
|
-
constructor(texture: Texture, segments: ComplexRopeSegment[], textureScale?: number);
|
|
21
|
-
_render(renderer: Renderer): void;
|
|
22
|
-
}
|
|
1
|
+
import { Mesh, IPoint, Renderer, Texture } from 'pixi.js';
|
|
2
|
+
export declare type ComplexRopeSegment = {
|
|
3
|
+
points: IPoint[];
|
|
4
|
+
diameter: number;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* The ComplexRope allows you to draw a texture across several segments of points and then manipulate these points
|
|
8
|
+
*/
|
|
9
|
+
export declare class ComplexRope extends Mesh {
|
|
10
|
+
/**
|
|
11
|
+
* re-calculate vertices by rope segment-points each frame
|
|
12
|
+
* @member {boolean}
|
|
13
|
+
*/
|
|
14
|
+
autoUpdate: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* @param texture - The texture to use on the rope.
|
|
17
|
+
* @param segments - An array of segments with points and diaeter to construct this rope.
|
|
18
|
+
* @param {number} textureScale - Optional. Adjust interval of repeated texture
|
|
19
|
+
*/
|
|
20
|
+
constructor(texture: Texture, segments: ComplexRopeSegment[], textureScale?: number);
|
|
21
|
+
_render(renderer: Renderer): void;
|
|
22
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { MeshGeometry } from 'pixi.js';
|
|
2
|
-
import { ComplexRopeSegment } from './ComplexRope';
|
|
3
|
-
/**
|
|
4
|
-
* RopeGeometry allows you to draw a geometry across several several segments of points and then manipulate these points.
|
|
5
|
-
*/
|
|
6
|
-
export declare class ComplexRopeGeometry extends MeshGeometry {
|
|
7
|
-
/** An array of segments with points and diameter that determine the rope. */
|
|
8
|
-
private segments;
|
|
9
|
-
/** Rope texture scale. */
|
|
10
|
-
private readonly textureScale;
|
|
11
|
-
/**
|
|
12
|
-
* @param segments - An array of segments with points and diameter to construct this rope.
|
|
13
|
-
* @param textureScale - scaling factor for repeated texture. To create a tiling rope
|
|
14
|
-
* set baseTexture.wrapMode to PIXI.WRAP_MODES.REPEAT and use a power of two texture.
|
|
15
|
-
*/
|
|
16
|
-
constructor(segments: ComplexRopeSegment[], textureScale?: number);
|
|
17
|
-
/**
|
|
18
|
-
* The max width (i.e., thickness) of the rope.
|
|
19
|
-
* @readonly
|
|
20
|
-
*/
|
|
21
|
-
get width(): number;
|
|
22
|
-
/** Refreshes Rope indices and uvs */
|
|
23
|
-
private build;
|
|
24
|
-
/** refreshes vertices of Rope mesh */
|
|
25
|
-
updateVertices(): void;
|
|
26
|
-
update(): void;
|
|
27
|
-
}
|
|
1
|
+
import { MeshGeometry } from 'pixi.js';
|
|
2
|
+
import { ComplexRopeSegment } from './ComplexRope';
|
|
3
|
+
/**
|
|
4
|
+
* RopeGeometry allows you to draw a geometry across several several segments of points and then manipulate these points.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ComplexRopeGeometry extends MeshGeometry {
|
|
7
|
+
/** An array of segments with points and diameter that determine the rope. */
|
|
8
|
+
private segments;
|
|
9
|
+
/** Rope texture scale. */
|
|
10
|
+
private readonly textureScale;
|
|
11
|
+
/**
|
|
12
|
+
* @param segments - An array of segments with points and diameter to construct this rope.
|
|
13
|
+
* @param textureScale - scaling factor for repeated texture. To create a tiling rope
|
|
14
|
+
* set baseTexture.wrapMode to PIXI.WRAP_MODES.REPEAT and use a power of two texture.
|
|
15
|
+
*/
|
|
16
|
+
constructor(segments: ComplexRopeSegment[], textureScale?: number);
|
|
17
|
+
/**
|
|
18
|
+
* The max width (i.e., thickness) of the rope.
|
|
19
|
+
* @readonly
|
|
20
|
+
*/
|
|
21
|
+
get width(): number;
|
|
22
|
+
/** Refreshes Rope indices and uvs */
|
|
23
|
+
private build;
|
|
24
|
+
/** refreshes vertices of Rope mesh */
|
|
25
|
+
updateVertices(): void;
|
|
26
|
+
update(): void;
|
|
27
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { IPoint, Mesh, Renderer, Texture } from 'pixi.js';
|
|
2
|
-
/**
|
|
3
|
-
* The rope allows you to draw a texture across several points and then manipulate these points
|
|
4
|
-
* Width of rope is given in constructor
|
|
5
|
-
*/
|
|
6
|
-
export declare class FixedWidthSimpleRope extends Mesh {
|
|
7
|
-
/**
|
|
8
|
-
* re-calculate vertices by rope points each frame
|
|
9
|
-
* @member {boolean}
|
|
10
|
-
*/
|
|
11
|
-
autoUpdate: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Note: The wrap mode of the texture is set to REPEAT if `textureScale` is positive.
|
|
14
|
-
* @param texture - The texture to use on the rope. (attempt to set UV wrapping, will fail on non-power of two textures)
|
|
15
|
-
* @param points - An array of {@link PIXI.Point} objects to construct this rope.
|
|
16
|
-
* @param width - Width of rope
|
|
17
|
-
*/
|
|
18
|
-
constructor(texture: Texture, points: IPoint[], width: number);
|
|
19
|
-
_render(renderer: Renderer): void;
|
|
20
|
-
}
|
|
1
|
+
import { IPoint, Mesh, Renderer, Texture } from 'pixi.js';
|
|
2
|
+
/**
|
|
3
|
+
* The rope allows you to draw a texture across several points and then manipulate these points
|
|
4
|
+
* Width of rope is given in constructor
|
|
5
|
+
*/
|
|
6
|
+
export declare class FixedWidthSimpleRope extends Mesh {
|
|
7
|
+
/**
|
|
8
|
+
* re-calculate vertices by rope points each frame
|
|
9
|
+
* @member {boolean}
|
|
10
|
+
*/
|
|
11
|
+
autoUpdate: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Note: The wrap mode of the texture is set to REPEAT if `textureScale` is positive.
|
|
14
|
+
* @param texture - The texture to use on the rope. (attempt to set UV wrapping, will fail on non-power of two textures)
|
|
15
|
+
* @param points - An array of {@link PIXI.Point} objects to construct this rope.
|
|
16
|
+
* @param width - Width of rope
|
|
17
|
+
*/
|
|
18
|
+
constructor(texture: Texture, points: IPoint[], width: number);
|
|
19
|
+
_render(renderer: Renderer): void;
|
|
20
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { IPoint, MeshGeometry } from 'pixi.js';
|
|
2
|
-
export declare class FixedWidthSimpleRopeGeometry extends MeshGeometry {
|
|
3
|
-
points: IPoint[];
|
|
4
|
-
_width: number;
|
|
5
|
-
/**
|
|
6
|
-
* @param {number} [width=200] - The width (i.e., thickness) of the rope.
|
|
7
|
-
* @param {PIXI.Point[]} [points] - An array of PIXI.Point objects to construct this rope.
|
|
8
|
-
*/
|
|
9
|
-
constructor(points: IPoint[], width?: number);
|
|
10
|
-
/**
|
|
11
|
-
* The width (i.e., thickness) of the rope.
|
|
12
|
-
* @member {number}
|
|
13
|
-
* @readOnly
|
|
14
|
-
*/
|
|
15
|
-
get width(): number;
|
|
16
|
-
/**
|
|
17
|
-
* Refreshes Rope indices and uvs
|
|
18
|
-
* @private
|
|
19
|
-
*/
|
|
20
|
-
private build;
|
|
21
|
-
/**
|
|
22
|
-
* refreshes vertices of Rope mesh
|
|
23
|
-
*/
|
|
24
|
-
updateVertices(): void;
|
|
25
|
-
update(): void;
|
|
26
|
-
}
|
|
1
|
+
import { IPoint, MeshGeometry } from 'pixi.js';
|
|
2
|
+
export declare class FixedWidthSimpleRopeGeometry extends MeshGeometry {
|
|
3
|
+
points: IPoint[];
|
|
4
|
+
_width: number;
|
|
5
|
+
/**
|
|
6
|
+
* @param {number} [width=200] - The width (i.e., thickness) of the rope.
|
|
7
|
+
* @param {PIXI.Point[]} [points] - An array of PIXI.Point objects to construct this rope.
|
|
8
|
+
*/
|
|
9
|
+
constructor(points: IPoint[], width?: number);
|
|
10
|
+
/**
|
|
11
|
+
* The width (i.e., thickness) of the rope.
|
|
12
|
+
* @member {number}
|
|
13
|
+
* @readOnly
|
|
14
|
+
*/
|
|
15
|
+
get width(): number;
|
|
16
|
+
/**
|
|
17
|
+
* Refreshes Rope indices and uvs
|
|
18
|
+
* @private
|
|
19
|
+
*/
|
|
20
|
+
private build;
|
|
21
|
+
/**
|
|
22
|
+
* refreshes vertices of Rope mesh
|
|
23
|
+
*/
|
|
24
|
+
updateVertices(): void;
|
|
25
|
+
update(): void;
|
|
26
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { IPoint, Mesh, Renderer, Texture } from 'pixi.js';
|
|
2
|
-
/**
|
|
3
|
-
* The UniformTextureStretchRope allows you to draw a texture across several points and then manipulate these points
|
|
4
|
-
*/
|
|
5
|
-
export declare class UniformTextureStretchRope extends Mesh {
|
|
6
|
-
/**
|
|
7
|
-
* re-calculate vertices by rope points each frame
|
|
8
|
-
* @member {boolean}
|
|
9
|
-
*/
|
|
10
|
-
autoUpdate: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* @param texture - The texture to use on the rope.
|
|
13
|
-
* @param points - An array of {@link PIXI.Point} objects to construct this rope.
|
|
14
|
-
*/
|
|
15
|
-
constructor(texture: Texture, points: IPoint[]);
|
|
16
|
-
_render(renderer: Renderer): void;
|
|
17
|
-
}
|
|
1
|
+
import { IPoint, Mesh, Renderer, Texture } from 'pixi.js';
|
|
2
|
+
/**
|
|
3
|
+
* The UniformTextureStretchRope allows you to draw a texture across several points and then manipulate these points
|
|
4
|
+
*/
|
|
5
|
+
export declare class UniformTextureStretchRope extends Mesh {
|
|
6
|
+
/**
|
|
7
|
+
* re-calculate vertices by rope points each frame
|
|
8
|
+
* @member {boolean}
|
|
9
|
+
*/
|
|
10
|
+
autoUpdate: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* @param texture - The texture to use on the rope.
|
|
13
|
+
* @param points - An array of {@link PIXI.Point} objects to construct this rope.
|
|
14
|
+
*/
|
|
15
|
+
constructor(texture: Texture, points: IPoint[]);
|
|
16
|
+
_render(renderer: Renderer): void;
|
|
17
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { MeshGeometry } from 'pixi.js';
|
|
2
|
-
import type { IPoint } from 'pixi.js';
|
|
3
|
-
/**
|
|
4
|
-
* UniformTextureStretchRopeGeometry allows you to draw a geometry across several points and then manipulate these points.
|
|
5
|
-
*/
|
|
6
|
-
export declare class UniformTextureStretchRopeGeometry extends MeshGeometry {
|
|
7
|
-
/** An array of points that determine the rope. */
|
|
8
|
-
points: IPoint[];
|
|
9
|
-
/**
|
|
10
|
-
* The width (i.e., thickness) of the rope.
|
|
11
|
-
* @readonly
|
|
12
|
-
*/
|
|
13
|
-
_width: number;
|
|
14
|
-
/**
|
|
15
|
-
* @param width - The width (i.e., thickness) of the rope.
|
|
16
|
-
* @param points - An array of PIXI.Point objects to construct this rope.
|
|
17
|
-
*/
|
|
18
|
-
constructor(points: IPoint[], width?: number);
|
|
19
|
-
/** Refreshes Rope indices and uvs */
|
|
20
|
-
private build;
|
|
21
|
-
/** refreshes vertices of Rope mesh */
|
|
22
|
-
updateVertices(): void;
|
|
23
|
-
update(): void;
|
|
24
|
-
}
|
|
1
|
+
import { MeshGeometry } from 'pixi.js';
|
|
2
|
+
import type { IPoint } from 'pixi.js';
|
|
3
|
+
/**
|
|
4
|
+
* UniformTextureStretchRopeGeometry allows you to draw a geometry across several points and then manipulate these points.
|
|
5
|
+
*/
|
|
6
|
+
export declare class UniformTextureStretchRopeGeometry extends MeshGeometry {
|
|
7
|
+
/** An array of points that determine the rope. */
|
|
8
|
+
points: IPoint[];
|
|
9
|
+
/**
|
|
10
|
+
* The width (i.e., thickness) of the rope.
|
|
11
|
+
* @readonly
|
|
12
|
+
*/
|
|
13
|
+
_width: number;
|
|
14
|
+
/**
|
|
15
|
+
* @param width - The width (i.e., thickness) of the rope.
|
|
16
|
+
* @param points - An array of PIXI.Point objects to construct this rope.
|
|
17
|
+
*/
|
|
18
|
+
constructor(points: IPoint[], width?: number);
|
|
19
|
+
/** Refreshes Rope indices and uvs */
|
|
20
|
+
private build;
|
|
21
|
+
/** refreshes vertices of Rope mesh */
|
|
22
|
+
updateVertices(): void;
|
|
23
|
+
update(): void;
|
|
24
|
+
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { SurfaceData, SurfaceLine } from '../datautils';
|
|
2
|
-
import { OnUpdateEvent, OnRescaleEvent } from '../interfaces';
|
|
3
|
-
import { LayerOptions } from './base';
|
|
4
|
-
import { CanvasLayer } from './base/CanvasLayer';
|
|
5
|
-
type SurfacePaths = {
|
|
6
|
-
color: string;
|
|
7
|
-
path: Path2D;
|
|
8
|
-
};
|
|
9
|
-
export declare class GeomodelCanvasLayer<T extends SurfaceData> extends CanvasLayer<T> {
|
|
10
|
-
rescaleEvent: OnRescaleEvent;
|
|
11
|
-
surfaceAreasPaths: SurfacePaths[];
|
|
12
|
-
surfaceLinesPaths: SurfacePaths[];
|
|
13
|
-
maxDepth: number;
|
|
14
|
-
constructor(id?: string, options?: LayerOptions<T>);
|
|
15
|
-
onUpdate(event: OnUpdateEvent<T>): void;
|
|
16
|
-
onRescale(event: OnRescaleEvent): void;
|
|
17
|
-
updatePaths(): void;
|
|
18
|
-
render(): void;
|
|
19
|
-
colorToCSSColor(color: number | string): string;
|
|
20
|
-
generateSurfaceAreasPaths(): void;
|
|
21
|
-
generateSurfaceLinesPaths(): void;
|
|
22
|
-
drawPolygonPath: (color: string, path: Path2D) => void;
|
|
23
|
-
drawLinePath: (color: string, path: Path2D) => void;
|
|
24
|
-
createPolygons: (data: number[][]) => number[][];
|
|
25
|
-
generatePolygonPath: (polygon: number[]) => Path2D;
|
|
26
|
-
generateLinePaths: (s: SurfaceLine) => Path2D[];
|
|
27
|
-
}
|
|
28
|
-
export {};
|
|
1
|
+
import { SurfaceData, SurfaceLine } from '../datautils';
|
|
2
|
+
import { OnUpdateEvent, OnRescaleEvent } from '../interfaces';
|
|
3
|
+
import { LayerOptions } from './base';
|
|
4
|
+
import { CanvasLayer } from './base/CanvasLayer';
|
|
5
|
+
declare type SurfacePaths = {
|
|
6
|
+
color: string;
|
|
7
|
+
path: Path2D;
|
|
8
|
+
};
|
|
9
|
+
export declare class GeomodelCanvasLayer<T extends SurfaceData> extends CanvasLayer<T> {
|
|
10
|
+
rescaleEvent: OnRescaleEvent;
|
|
11
|
+
surfaceAreasPaths: SurfacePaths[];
|
|
12
|
+
surfaceLinesPaths: SurfacePaths[];
|
|
13
|
+
maxDepth: number;
|
|
14
|
+
constructor(id?: string, options?: LayerOptions<T>);
|
|
15
|
+
onUpdate(event: OnUpdateEvent<T>): void;
|
|
16
|
+
onRescale(event: OnRescaleEvent): void;
|
|
17
|
+
updatePaths(): void;
|
|
18
|
+
render(): void;
|
|
19
|
+
colorToCSSColor(color: number | string): string;
|
|
20
|
+
generateSurfaceAreasPaths(): void;
|
|
21
|
+
generateSurfaceLinesPaths(): void;
|
|
22
|
+
drawPolygonPath: (color: string, path: Path2D) => void;
|
|
23
|
+
drawLinePath: (color: string, path: Path2D) => void;
|
|
24
|
+
createPolygons: (data: number[][]) => number[][];
|
|
25
|
+
generatePolygonPath: (polygon: number[]) => Path2D;
|
|
26
|
+
generateLinePaths: (s: SurfaceLine) => Path2D[];
|
|
27
|
+
}
|
|
28
|
+
export {};
|