@equinor/esv-intersection 3.1.9 → 4.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.
Files changed (41) hide show
  1. package/dist/datautils/schematicShapeGenerator.d.ts +5 -5
  2. package/dist/datautils/schematicShapeGenerator.d.ts.map +1 -1
  3. package/dist/index.cjs +2 -2
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.mjs +1386 -1381
  6. package/dist/index.mjs.map +1 -1
  7. package/dist/index.umd.js +2 -2
  8. package/dist/index.umd.js.map +1 -1
  9. package/dist/layers/CustomDisplayObjects/ComplexRope.d.ts +2 -3
  10. package/dist/layers/CustomDisplayObjects/ComplexRope.d.ts.map +1 -1
  11. package/dist/layers/CustomDisplayObjects/ComplexRopeGeometry.d.ts.map +1 -1
  12. package/dist/layers/CustomDisplayObjects/FixedWidthSimpleRope.d.ts +3 -4
  13. package/dist/layers/CustomDisplayObjects/FixedWidthSimpleRope.d.ts.map +1 -1
  14. package/dist/layers/CustomDisplayObjects/FixedWidthSimpleRopeGeometry.d.ts +4 -4
  15. package/dist/layers/CustomDisplayObjects/FixedWidthSimpleRopeGeometry.d.ts.map +1 -1
  16. package/dist/layers/CustomDisplayObjects/UniformTextureStretchRope.d.ts +3 -4
  17. package/dist/layers/CustomDisplayObjects/UniformTextureStretchRope.d.ts.map +1 -1
  18. package/dist/layers/CustomDisplayObjects/UniformTextureStretchRopeGeometry.d.ts +4 -4
  19. package/dist/layers/CustomDisplayObjects/UniformTextureStretchRopeGeometry.d.ts.map +1 -1
  20. package/dist/layers/GeomodelLayerV2.d.ts.map +1 -1
  21. package/dist/layers/SchematicLayer.d.ts +6 -6
  22. package/dist/layers/SchematicLayer.d.ts.map +1 -1
  23. package/dist/layers/base/PixiLayer.d.ts +7 -8
  24. package/dist/layers/base/PixiLayer.d.ts.map +1 -1
  25. package/dist/utils/vectorUtils.d.ts +6 -6
  26. package/dist/utils/vectorUtils.d.ts.map +1 -1
  27. package/dist/vendor/pixi-dashed-line/index.d.ts +13 -13
  28. package/dist/vendor/pixi-dashed-line/index.d.ts.map +1 -1
  29. package/package.json +3 -3
  30. package/src/datautils/schematicShapeGenerator.ts +23 -21
  31. package/src/layers/CustomDisplayObjects/ComplexRope.ts +10 -13
  32. package/src/layers/CustomDisplayObjects/ComplexRopeGeometry.ts +9 -8
  33. package/src/layers/CustomDisplayObjects/FixedWidthSimpleRope.ts +11 -14
  34. package/src/layers/CustomDisplayObjects/FixedWidthSimpleRopeGeometry.ts +13 -12
  35. package/src/layers/CustomDisplayObjects/UniformTextureStretchRope.ts +11 -16
  36. package/src/layers/CustomDisplayObjects/UniformTextureStretchRopeGeometry.ts +11 -11
  37. package/src/layers/GeomodelLayerV2.ts +4 -5
  38. package/src/layers/SchematicLayer.ts +42 -31
  39. package/src/layers/base/PixiLayer.ts +11 -38
  40. package/src/utils/vectorUtils.ts +6 -6
  41. package/src/vendor/pixi-dashed-line/index.ts +33 -32
@@ -1,6 +1,6 @@
1
- import { Mesh, IPoint, Renderer, Texture } from 'pixi.js';
1
+ import { Mesh, Point, Texture } from 'pixi.js';
2
2
  export type ComplexRopeSegment = {
3
- points: IPoint[];
3
+ points: Point[];
4
4
  diameter: number;
5
5
  };
6
6
  /**
@@ -17,6 +17,5 @@ export declare class ComplexRope extends Mesh {
17
17
  * @param segments - An array of segments with points and diaeter to construct this rope.
18
18
  */
19
19
  constructor(texture: Texture, segments: ComplexRopeSegment[]);
20
- _render(renderer: Renderer): void;
21
20
  }
22
21
  //# sourceMappingURL=ComplexRope.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ComplexRope.d.ts","sourceRoot":"","sources":["../../../src/layers/CustomDisplayObjects/ComplexRope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAgB,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAc,MAAM,SAAS,CAAC;AAGpF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,qBAAa,WAAY,SAAQ,IAAI;IACnC;;;OAGG;IACI,UAAU,EAAE,OAAO,CAAC;IAE3B;;;OAGG;gBACS,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE;IAYnD,OAAO,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;CAS3C"}
1
+ {"version":3,"file":"ComplexRope.d.ts","sourceRoot":"","sources":["../../../src/layers/CustomDisplayObjects/ComplexRope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAG/C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,qBAAa,WAAY,SAAQ,IAAI;IACnC;;;OAGG;IACI,UAAU,EAAE,OAAO,CAAC;IAE3B;;;OAGG;gBACS,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE;CAkB7D"}
@@ -1 +1 @@
1
- {"version":3,"file":"ComplexRopeGeometry.d.ts","sourceRoot":"","sources":["../../../src/layers/CustomDisplayObjects/ComplexRopeGeometry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,YAAY;IACnD,6EAA6E;IAC7E,OAAO,CAAC,QAAQ,CAAuB;IAEvC;;OAEG;gBACS,QAAQ,EAAE,kBAAkB,EAAE;IAW1C;;;OAGG;IACH,IAAI,KAAK,IAAI,MAAM,CAElB;IAED,qCAAqC;IACrC,OAAO,CAAC,KAAK;IA0Fb,sCAAsC;IAC/B,cAAc,IAAI,IAAI;IAwDtB,MAAM,IAAI,IAAI;CAQtB"}
1
+ {"version":3,"file":"ComplexRopeGeometry.d.ts","sourceRoot":"","sources":["../../../src/layers/CustomDisplayObjects/ComplexRopeGeometry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,YAAY;IACnD,6EAA6E;IAC7E,OAAO,CAAC,QAAQ,CAAuB;IAEvC;;OAEG;gBACS,QAAQ,EAAE,kBAAkB,EAAE;IAe1C;;;OAGG;IACH,IAAI,KAAK,IAAI,MAAM,CAElB;IAED,qCAAqC;IACrC,OAAO,CAAC,KAAK;IAuFb,sCAAsC;IAC/B,cAAc,IAAI,IAAI;IAwDtB,MAAM,IAAI,IAAI;CAQtB"}
@@ -1,4 +1,4 @@
1
- import { IPoint, Mesh, Renderer, Texture } from 'pixi.js';
1
+ import { Point, Mesh, Texture } from 'pixi.js';
2
2
  /**
3
3
  * The rope allows you to draw a texture across several points and then manipulate these points
4
4
  * Width of rope is given in constructor
@@ -12,10 +12,9 @@ export declare class FixedWidthSimpleRope extends Mesh {
12
12
  /**
13
13
  * Note: The wrap mode of the texture is set to REPEAT if `textureScale` is positive.
14
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.
15
+ * @param points - An array of {@link Point} objects to construct this rope.
16
16
  * @param width - Width of rope
17
17
  */
18
- constructor(texture: Texture, points: IPoint[], width: number);
19
- _render(renderer: Renderer): void;
18
+ constructor(texture: Texture, points: Point[], width: number);
20
19
  }
21
20
  //# sourceMappingURL=FixedWidthSimpleRope.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FixedWidthSimpleRope.d.ts","sourceRoot":"","sources":["../../../src/layers/CustomDisplayObjects/FixedWidthSimpleRope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAgB,QAAQ,EAAgB,OAAO,EAAc,MAAM,SAAS,CAAC;AAGlG;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,IAAI;IAC5C;;;OAGG;IACI,UAAU,EAAE,OAAO,CAAC;IAE3B;;;;;OAKG;gBACS,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM;IAWpD,OAAO,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;CAS3C"}
1
+ {"version":3,"file":"FixedWidthSimpleRope.d.ts","sourceRoot":"","sources":["../../../src/layers/CustomDisplayObjects/FixedWidthSimpleRope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAgB,OAAO,EAAE,MAAM,SAAS,CAAC;AAG7D;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,IAAI;IAC5C;;;OAGG;IACI,UAAU,EAAE,OAAO,CAAC;IAE3B;;;;;OAKG;gBACS,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM;CAiB7D"}
@@ -1,12 +1,12 @@
1
- import { IPoint, MeshGeometry } from 'pixi.js';
1
+ import { Point, MeshGeometry } from 'pixi.js';
2
2
  export declare class FixedWidthSimpleRopeGeometry extends MeshGeometry {
3
- points: IPoint[];
3
+ points: Point[];
4
4
  _width: number;
5
5
  /**
6
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.
7
+ * @param {Point[]} [points] - An array of Point objects to construct this rope.
8
8
  */
9
- constructor(points: IPoint[], width?: number);
9
+ constructor(points: Point[], width?: number);
10
10
  /**
11
11
  * The width (i.e., thickness) of the rope.
12
12
  * @member {number}
@@ -1 +1 @@
1
- {"version":3,"file":"FixedWidthSimpleRopeGeometry.d.ts","sourceRoot":"","sources":["../../../src/layers/CustomDisplayObjects/FixedWidthSimpleRopeGeometry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE/C,qBAAa,4BAA6B,SAAQ,YAAY;IACrD,MAAM,EAAE,MAAM,EAAE,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;gBACS,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,SAAM;IAqBzC;;;;OAIG;IACH,IAAI,KAAK,IAAI,MAAM,CAElB;IACD;;;OAGG;IACH,OAAO,CAAC,KAAK;IA6Db;;OAEG;IACI,cAAc,IAAI,IAAI;IAyCtB,MAAM,IAAI,IAAI;CAGtB"}
1
+ {"version":3,"file":"FixedWidthSimpleRopeGeometry.d.ts","sourceRoot":"","sources":["../../../src/layers/CustomDisplayObjects/FixedWidthSimpleRopeGeometry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE9C,qBAAa,4BAA6B,SAAQ,YAAY;IACrD,MAAM,EAAE,KAAK,EAAE,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;gBACS,MAAM,EAAE,KAAK,EAAE,EAAE,KAAK,SAAM;IAwBxC;;;;OAIG;IACH,IAAI,KAAK,IAAI,MAAM,CAElB;IACD;;;OAGG;IACH,OAAO,CAAC,KAAK;IA2Db;;OAEG;IACI,cAAc,IAAI,IAAI;IAyCtB,MAAM,IAAI,IAAI;CAGtB"}
@@ -1,4 +1,4 @@
1
- import { IPoint, Mesh, Renderer, Texture } from 'pixi.js';
1
+ import { Point, Mesh, Texture } from 'pixi.js';
2
2
  /**
3
3
  * The UniformTextureStretchRope allows you to draw a texture across several points and then manipulate these points
4
4
  */
@@ -10,9 +10,8 @@ export declare class UniformTextureStretchRope extends Mesh {
10
10
  autoUpdate: boolean;
11
11
  /**
12
12
  * @param texture - The texture to use on the rope.
13
- * @param points - An array of {@link PIXI.Point} objects to construct this rope.
13
+ * @param points - An array of {@link Point} objects to construct this rope.
14
14
  */
15
- constructor(texture: Texture, points: IPoint[]);
16
- _render(renderer: Renderer): void;
15
+ constructor(texture: Texture, points: Point[]);
17
16
  }
18
17
  //# sourceMappingURL=UniformTextureStretchRope.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UniformTextureStretchRope.d.ts","sourceRoot":"","sources":["../../../src/layers/CustomDisplayObjects/UniformTextureStretchRope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAgB,QAAQ,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGxE;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,IAAI;IACjD;;;OAGG;IACI,UAAU,EAAE,OAAO,CAAC;IAE3B;;;OAGG;gBACS,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE;IASrC,OAAO,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;CAY3C"}
1
+ {"version":3,"file":"UniformTextureStretchRope.d.ts","sourceRoot":"","sources":["../../../src/layers/CustomDisplayObjects/UniformTextureStretchRope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAG/C;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,IAAI;IACjD;;;OAGG;IACI,UAAU,EAAE,OAAO,CAAC;IAE3B;;;OAGG;gBACS,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE;CAgB9C"}
@@ -1,10 +1,10 @@
1
- import { MeshGeometry, IPoint } from 'pixi.js';
1
+ import { MeshGeometry, Point } from 'pixi.js';
2
2
  /**
3
3
  * UniformTextureStretchRopeGeometry allows you to draw a geometry across several points and then manipulate these points.
4
4
  */
5
5
  export declare class UniformTextureStretchRopeGeometry extends MeshGeometry {
6
6
  /** An array of points that determine the rope. */
7
- points: IPoint[];
7
+ points: Point[];
8
8
  /**
9
9
  * The width (i.e., thickness) of the rope.
10
10
  * @readonly
@@ -12,9 +12,9 @@ export declare class UniformTextureStretchRopeGeometry extends MeshGeometry {
12
12
  _width: number;
13
13
  /**
14
14
  * @param width - The width (i.e., thickness) of the rope.
15
- * @param points - An array of PIXI.Point objects to construct this rope.
15
+ * @param points - An array of Point objects to construct this rope.
16
16
  */
17
- constructor(points: IPoint[], width?: number);
17
+ constructor(points: Point[], width?: number);
18
18
  /** Refreshes Rope indices and uvs */
19
19
  private build;
20
20
  /** refreshes vertices of Rope mesh */
@@ -1 +1 @@
1
- {"version":3,"file":"UniformTextureStretchRopeGeometry.d.ts","sourceRoot":"","sources":["../../../src/layers/CustomDisplayObjects/UniformTextureStretchRopeGeometry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEtC;;GAEG;AACH,qBAAa,iCAAkC,SAAQ,YAAY;IACjE,kDAAkD;IAC3C,MAAM,EAAE,MAAM,EAAE,CAAC;IAExB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;gBACS,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,SAAM;IAUzC,qCAAqC;IACrC,OAAO,CAAC,KAAK;IA6Fb,sCAAsC;IAC/B,cAAc,IAAI,IAAI;IAgDtB,MAAM,IAAI,IAAI;CAGtB"}
1
+ {"version":3,"file":"UniformTextureStretchRopeGeometry.d.ts","sourceRoot":"","sources":["../../../src/layers/CustomDisplayObjects/UniformTextureStretchRopeGeometry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC;;GAEG;AACH,qBAAa,iCAAkC,SAAQ,YAAY;IACjE,kDAAkD;IAC3C,MAAM,EAAE,KAAK,EAAE,CAAC;IAEvB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;gBACS,MAAM,EAAE,KAAK,EAAE,EAAE,KAAK,SAAM;IAaxC,qCAAqC;IACrC,OAAO,CAAC,KAAK;IA0Fb,sCAAsC;IAC/B,cAAc,IAAI,IAAI;IAgDtB,MAAM,IAAI,IAAI;CAGtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"GeomodelLayerV2.d.ts","sourceRoot":"","sources":["../../src/layers/GeomodelLayerV2.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAKrE,qBAAa,eAAe,CAAC,CAAC,SAAS,WAAW,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IACtE,OAAO,CAAC,aAAa,CAAS;IAErB,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI;IAWtC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,IAAI;IAShD,SAAS,IAAI,IAAI;IAajB,cAAc,GAAI,MAAM,MAAM,EAAE,EAAE,KAAG,MAAM,EAAE,EAAE,CA+B7C;IAEF,mBAAmB,GAAI,GAAG,WAAW,KAAG,IAAI,CAQ1C;IAEF,mBAAmB,GAAI,GAAG,WAAW,KAAG,IAAI,CAsB1C;CACH"}
1
+ {"version":3,"file":"GeomodelLayerV2.d.ts","sourceRoot":"","sources":["../../src/layers/GeomodelLayerV2.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAKrE,qBAAa,eAAe,CAAC,CAAC,SAAS,WAAW,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IACtE,OAAO,CAAC,aAAa,CAAS;IAErB,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI;IAWtC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,IAAI;IAShD,SAAS,IAAI,IAAI;IAajB,cAAc,GAAI,MAAM,MAAM,EAAE,EAAE,KAAG,MAAM,EAAE,EAAE,CA+B7C;IAEF,mBAAmB,GAAI,GAAG,WAAW,KAAG,IAAI,CAO1C;IAEF,mBAAmB,GAAI,GAAG,WAAW,KAAG,IAAI,CAsB1C;CACH"}
@@ -1,5 +1,5 @@
1
1
  import { ScaleLinear } from 'd3-scale';
2
- import { IPoint, Point, Texture } from 'pixi.js';
2
+ import { Point, Texture } from 'pixi.js';
3
3
  import { LayerOptions, PixiLayer, PixiRenderApplication } from '.';
4
4
  import { CasingOptions, CementOptions, CementPlugOptions, CementSqueezeOptions, HoleOptions, SchematicData, ScreenOptions, TubingOptions, InternalLayerOptions, PerforationOptions, OutlineClosure } from './schematicInterfaces';
5
5
  import { OnUpdateEvent, OnRescaleEvent, OnUnmountEvent } from '../interfaces';
@@ -32,9 +32,9 @@ export declare class SchematicLayer<T extends SchematicData> extends PixiLayer<T
32
32
  protected scalingFactors: ScalingFactors;
33
33
  constructor(ctx: PixiRenderApplication, id?: string, options?: SchematicLayerOptions<T>);
34
34
  onUnmount(event?: OnUnmountEvent): void;
35
- onUpdate(event: OnUpdateEvent<T>): void;
36
- onRescale(event: OnRescaleEvent): void;
37
- setVisibility(isVisible: boolean, layerId: string): void;
35
+ onUpdate(event: OnUpdateEvent<T>): Promise<void>;
36
+ onRescale(event: OnRescaleEvent): Promise<void>;
37
+ setVisibility(isVisible: boolean, layerId: string): Promise<void>;
38
38
  getInternalLayerIds(): string[];
39
39
  /**
40
40
  * Calculate yRatio without zFactor
@@ -42,7 +42,7 @@ export declare class SchematicLayer<T extends SchematicData> extends PixiLayer<T
42
42
  */
43
43
  protected yRatio(): number;
44
44
  protected getZFactorScaledPathForPoints: (start: number, end: number) => Point[];
45
- protected drawBigPolygon: (coords: IPoint[], color?: number) => void;
45
+ protected drawBigPolygon: (coords: Point[], color?: number) => void;
46
46
  protected drawRope(path: Point[], texture: Texture, tint?: number): void;
47
47
  /**
48
48
  *
@@ -65,7 +65,7 @@ export declare class SchematicLayer<T extends SchematicData> extends PixiLayer<T
65
65
  */
66
66
  protected drawCasingWindowOutline(leftPath: Point[], rightPath: Point[], { lineColor, windowOptions }: CasingOptions, lineWidth?: number): void;
67
67
  private perforationRopeAndTextureReferences;
68
- preRender(): void;
68
+ preRender(): Promise<void>;
69
69
  private updateSymbolCache;
70
70
  private drawCementPlug;
71
71
  private createCasingRenderObject;
@@ -1 +1 @@
1
- {"version":3,"file":"SchematicLayer.d.ts","sourceRoot":"","sources":["../../src/layers/SchematicLayer.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAqB,MAAM,EAAE,KAAK,EAAyB,OAAO,EAAE,MAAM,SAAS,CAAC;AAE3F,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,GAAG,CAAC;AAEnE,OAAO,EAGL,aAAa,EAEb,aAAa,EACb,iBAAiB,EAEjB,oBAAoB,EAEpB,WAAW,EAIX,aAAa,EACb,aAAa,EACb,aAAa,EAQb,oBAAoB,EAUpB,kBAAkB,EAGlB,cAAc,EAIf,MAAM,uBAAuB,CAAC;AAoB/B,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAO9E,UAAU,cAAc;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;CAC5C;AAuCD,MAAM,WAAW,qBAAqB,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AWhB,OAAO,CAAC,YAAY,CAclB;IAEF,OAAO,CAAC,wBAAwB,CAQ9B;IAEF,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,sBAAsB,CAG5B;IAEF,OAAO,CAAC,uBAAuB;IAQ/B,OAAO,CAAC,UAAU;IAclB,OAAO,CAAC,UAAU;IAUlB,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,kBAAkB;CAQ3B"}
@@ -1,21 +1,20 @@
1
- import { IRenderer, Application, Container, DisplayObject, IRendererOptionsAuto, RENDERER_TYPE } from 'pixi.js';
1
+ import { AutoDetectOptions, Container, ContainerChild, Renderer, RendererType } from 'pixi.js';
2
2
  import { Layer, LayerOptions } from './Layer';
3
3
  import { OnMountEvent, OnRescaleEvent, OnResizeEvent, OnUnmountEvent } from '../../interfaces';
4
4
  export declare class PixiRenderApplication {
5
5
  stage: Container | undefined;
6
- renderer: IRenderer<HTMLCanvasElement> | undefined;
7
- constructor(pixiRenderOptions?: IRendererOptionsAuto);
8
- destroy(): void;
9
- get view(): HTMLCanvasElement | undefined;
6
+ renderer: Renderer<HTMLCanvasElement> | undefined;
7
+ init(pixiRenderOptions?: Partial<AutoDetectOptions>): Promise<void>;
8
+ get canvas(): HTMLCanvasElement | undefined;
10
9
  render(): void;
11
10
  }
12
11
  export declare abstract class PixiLayer<T> extends Layer<T> {
13
12
  private pixiViewContainer;
14
13
  private ctx;
15
14
  private container;
16
- constructor(ctx: Application<HTMLCanvasElement> | PixiRenderApplication, id?: string, options?: LayerOptions<T>);
15
+ constructor(ctx: PixiRenderApplication, id?: string, options?: LayerOptions<T>);
17
16
  render(): void;
18
- addChild(child: DisplayObject): void;
17
+ addChild(child: ContainerChild): void;
19
18
  clearLayer(): void;
20
19
  onMount(event: OnMountEvent): void;
21
20
  onUnmount(event?: OnUnmountEvent): void;
@@ -28,6 +27,6 @@ export declare abstract class PixiLayer<T> extends Layer<T> {
28
27
  onOpacityChanged(_opacity: number): void;
29
28
  onOrderChanged(_order: number): void;
30
29
  onInteractivityChanged(_interactive: boolean): void;
31
- renderType(): RENDERER_TYPE | undefined;
30
+ renderType(): RendererType | undefined;
32
31
  }
33
32
  //# sourceMappingURL=PixiLayer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PixiLayer.d.ts","sourceRoot":"","sources":["../../../src/layers/base/PixiLayer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAsB,SAAS,EAAE,aAAa,EAAE,oBAAoB,EAAY,aAAa,EAAE,MAAM,SAAS,CAAC;AAC9I,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAQ/F,qBAAa,qBAAqB;IAChC,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;IAE7B,QAAQ,EAAE,SAAS,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAAC;gBAEvC,iBAAiB,CAAC,EAAE,oBAAoB;IAepD,OAAO;IA0BP,IAAI,IAAI,kCAEP;IAED,MAAM;CAKP;AAED,8BAAsB,SAAS,CAAC,CAAC,CAAE,SAAQ,KAAK,CAAC,CAAC,CAAC;IACjD,OAAO,CAAC,iBAAiB,CAA0B;IACnD,OAAO,CAAC,GAAG,CAAwB;IACnC,OAAO,CAAC,SAAS,CAAY;gBAEjB,GAAG,EAAE,WAAW,CAAC,iBAAiB,CAAC,GAAG,qBAAqB,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC;IAS/G,MAAM,IAAI,IAAI;IAId,QAAQ,CAAC,KAAK,EAAE,aAAa;IAI7B,UAAU;IAOD,OAAO,CAAC,KAAK,EAAE,YAAY;IAoB3B,SAAS,CAAC,KAAK,CAAC,EAAE,cAAc;IAUhC,QAAQ,CAAC,KAAK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jD,OAAO,CAAC,iBAAiB,CAA0B;IACnD,OAAO,CAAC,GAAG,CAAwB;IACnC,OAAO,CAAC,SAAS,CAAY;gBAEjB,GAAG,EAAE,qBAAqB,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC;IAQ9E,MAAM,IAAI,IAAI;IAId,QAAQ,CAAC,KAAK,EAAE,cAAc;IAI9B,UAAU;IAOD,OAAO,CAAC,KAAK,EAAE,YAAY;IAoB3B,SAAS,CAAC,KAAK,CAAC,EAAE,cAAc;IAUhC,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAKpC,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI;IAS/C,SAAS,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM;IAIrD,SAAS,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM;IAIlD,WAAW,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI;IAiB3B,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAOhE,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAMxC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAMpC,sBAAsB,CAAC,YAAY,EAAE,OAAO,GAAG,IAAI;IAMnD,UAAU,IAAI,YAAY,GAAG,SAAS;CAGvC"}
@@ -1,7 +1,7 @@
1
- import { IPoint, Point } from 'pixi.js';
1
+ import { Point } from 'pixi.js';
2
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];
3
+ export declare const pointToVector: (p: Point) => Vector2;
4
+ export declare const pointToArray: (p: Point) => [number, number];
5
5
  export declare const vectorToPoint: (v: Vector2) => Point;
6
6
  export declare const vectorToArray: (v: Vector2) => [number, number];
7
7
  export declare const arrayToPoint: (a: number[]) => Point;
@@ -10,7 +10,7 @@ export declare const calcDist: (prev: [number, number], point: [number, number])
10
10
  export declare const calcDistPoint: (prev: Point, point: Point) => number;
11
11
  export declare const calcNormal: (p1: Point, p2: Point) => Point;
12
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[];
13
+ export declare const createNormals: (points: Point[]) => Vector2[];
14
+ export declare const offsetPoint: (point: Point, vector: Vector2, offset: number) => Point;
15
+ export declare const offsetPoints: (points: Point[], vectors: Vector2[], offset: number) => Point[];
16
16
  //# sourceMappingURL=vectorUtils.d.ts.map
@@ -1 +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,E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AM,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,KAAK,EAAE,KAAG,OAAO,EAuBtD,CAAC;AAGF,eAAO,MAAM,WAAW,GAAI,OAAO,KAAK,EAAE,QAAQ,OAAO,EAAE,QAAQ,MAAM,KAAG,KAG3E,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,QAAQ,KAAK,EAAE,EAAE,SAAS,OAAO,EAAE,EAAE,QAAQ,MAAM,KAAG,KAAK,EAavF,CAAC"}
@@ -1,4 +1,4 @@
1
- import * as PIXI from 'pixi.js';
1
+ import { Graphics, Matrix, Point, Texture } from 'pixi.js';
2
2
  /** Define the dash: [dash length, gap size, dash size, gap size, ...] */
3
3
  export type Dashes = number[];
4
4
  export interface DashLineOptions {
@@ -9,16 +9,16 @@ export interface DashLineOptions {
9
9
  scale?: number;
10
10
  useTexture?: boolean;
11
11
  useDots?: boolean;
12
- cap?: PIXI.LINE_CAP;
13
- join?: PIXI.LINE_JOIN;
12
+ cap?: LINE_CAP;
13
+ join?: LINE_JOIN;
14
14
  alignment?: number;
15
15
  }
16
16
  export declare class DashLine {
17
- graphics: PIXI.Graphics;
17
+ graphics: Graphics;
18
18
  /** current length of the line */
19
19
  lineLength: number;
20
20
  /** cursor location */
21
- cursor: PIXI.Point;
21
+ cursor: Point;
22
22
  /** desired scale of line */
23
23
  scale: number;
24
24
  private start;
@@ -26,7 +26,7 @@ export declare class DashLine {
26
26
  private dash;
27
27
  private useTexture;
28
28
  private options;
29
- static dashTextureCache: Record<string, PIXI.Texture>;
29
+ static dashTextureCache: Record<string, Texture>;
30
30
  /**
31
31
  * Create a DashLine
32
32
  * @param graphics
@@ -36,21 +36,21 @@ export declare class DashLine {
36
36
  * @param [options.width=1] - width of the dashed line
37
37
  * @param [options.alpha=1] - alpha of the dashed line
38
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)
39
+ * @param [options.cap] - add a LINE_CAP style to dashed lines (only works for useTexture: false)
40
+ * @param [options.join] - add a LINE_JOIN style to the dashed lines (only works for useTexture: false)
41
41
  * @param [options.alignment] - The alignment of any lines drawn (0.5 = middle, 1 = outer, 0 = inner)
42
42
  */
43
- constructor(graphics: PIXI.Graphics, options?: DashLineOptions);
43
+ constructor(graphics: Graphics, options?: DashLineOptions);
44
44
  /** resets line style to enable dashed line (useful if lineStyle was changed on graphics element) */
45
45
  setLineStyle(): void;
46
46
  private static distance;
47
47
  moveTo(x: number, y: number): this;
48
48
  lineTo(x: number, y: number, closePath?: boolean): this;
49
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;
50
+ drawCircle(x: number, y: number, radius: number, points?: number, matrix?: Matrix): this;
51
+ drawEllipse(x: number, y: number, radiusX: number, radiusY: number, points?: number, matrix?: Matrix): this;
52
+ drawPolygon(points: Point[] | number[], matrix?: Matrix): this;
53
+ drawRect(x: number, y: number, width: number, height: number, matrix?: Matrix): this;
54
54
  private adjustLineStyle;
55
55
  private static getTexture;
56
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":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,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAwBvG,WAAW,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IA0C9D,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAuCpF,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.9",
3
+ "version": "4.0.0",
4
4
  "description": "Intersection component package with testing and automatic documentation.",
5
5
  "type": "module",
6
6
  "module": "dist/index.mjs",
@@ -65,7 +65,7 @@
65
65
  "jsdom": "^27.4.0",
66
66
  "lint-staged": "^15.5.2",
67
67
  "mock-raf": "^1.0.1",
68
- "pixi.js": "^7.3.1",
68
+ "pixi.js": "^8.16.0",
69
69
  "prettier": "^3.0.3",
70
70
  "rimraf": "^6.1.2",
71
71
  "storybook": "^9.1.17",
@@ -78,7 +78,7 @@
78
78
  "vitest-canvas-mock": "^0.3.3"
79
79
  },
80
80
  "peerDependencies": {
81
- "pixi.js": "^7.1.0"
81
+ "pixi.js": "^8.16.0"
82
82
  },
83
83
  "dependencies": {
84
84
  "@equinor/videx-math": "^1.1.4",
@@ -1,4 +1,4 @@
1
- import { groupD8, IPoint, Point, Rectangle, Texture, WRAP_MODES } from 'pixi.js';
1
+ import { CanvasSource, groupD8, Point, Rectangle, Texture } from 'pixi.js';
2
2
  import { DEFAULT_TEXTURE_SIZE } from '../constants';
3
3
  import {
4
4
  Casing,
@@ -51,15 +51,15 @@ export interface CasingRenderObject {
51
51
  }
52
52
 
53
53
  export const getEndLines = (
54
- rightPath: [IPoint, IPoint, ...IPoint[]],
55
- leftPath: [IPoint, IPoint, ...IPoint[]],
54
+ rightPath: [Point, Point, ...Point[]],
55
+ leftPath: [Point, Point, ...Point[]],
56
56
  ): {
57
- top: [IPoint, IPoint];
58
- bottom: [IPoint, IPoint];
57
+ top: [Point, Point];
58
+ bottom: [Point, Point];
59
59
  } => {
60
60
  return {
61
61
  top: [rightPath[0], leftPath[0]],
62
- bottom: [rightPath[rightPath.length - 1] as IPoint, leftPath[leftPath.length - 1] as IPoint],
62
+ bottom: [rightPath[rightPath.length - 1] as Point, leftPath[leftPath.length - 1] as Point],
63
63
  };
64
64
  };
65
65
 
@@ -516,7 +516,7 @@ export const createCementSqueezeTexture = ({ firstColor, secondColor, scalingFac
516
516
  return Texture.from(canvas);
517
517
  };
518
518
 
519
- export const createTubularRenderingObject = (radius: number, pathPoints: IPoint[]): TubularRenderingObject => {
519
+ export const createTubularRenderingObject = (radius: number, pathPoints: Point[]): TubularRenderingObject => {
520
520
  const normals = createNormals(pathPoints);
521
521
  const rightPath = offsetPoints(pathPoints, normals, radius);
522
522
  const leftPath = offsetPoints(pathPoints, normals, -radius);
@@ -798,13 +798,15 @@ const errorTexture = (errorMessage = 'Error!', existingContext?: { canvas: HTMLC
798
798
  canvasCtx.fillStyle = '#ff00ff';
799
799
  canvasCtx.fillRect(...xy, ...wh);
800
800
 
801
- const texture = new Texture(
802
- Texture.from(canvas, { wrapMode: WRAP_MODES.CLAMP }).baseTexture,
803
- undefined,
804
- new Rectangle(0, 0, canvas.width, canvas.height),
805
- undefined,
806
- groupD8.MIRROR_HORIZONTAL,
807
- );
801
+ const texture = new Texture({
802
+ source: new CanvasSource({
803
+ resource: canvas,
804
+ wrapMode: 'clamp-to-edge',
805
+ }),
806
+ orig: new Rectangle(0, 0, canvas.width, canvas.height),
807
+ rotate: groupD8.MIRROR_HORIZONTAL,
808
+ });
809
+
808
810
  return texture;
809
811
  };
810
812
 
@@ -827,13 +829,13 @@ const createPerforationCanvas = (
827
829
  };
828
830
 
829
831
  const createPerforationTexture = (canvas: HTMLCanvasElement) => {
830
- const texture = new Texture(
831
- Texture.from(canvas, { wrapMode: WRAP_MODES.CLAMP }).baseTexture,
832
- undefined,
833
- new Rectangle(0, 0, canvas.width, canvas.height),
834
- undefined,
835
- groupD8.MIRROR_HORIZONTAL,
836
- );
832
+ const texture = new Texture({
833
+ source: new CanvasSource({
834
+ resource: canvas,
835
+ }),
836
+ orig: new Rectangle(0, 0, canvas.width, canvas.height),
837
+ rotate: groupD8.MIRROR_HORIZONTAL,
838
+ });
837
839
  return texture;
838
840
  };
839
841
 
@@ -1,8 +1,8 @@
1
- import { Mesh, MeshMaterial, IPoint, Renderer, Texture, WRAP_MODES } from 'pixi.js';
1
+ import { Mesh, Point, Texture } from 'pixi.js';
2
2
  import { ComplexRopeGeometry } from './ComplexRopeGeometry';
3
3
 
4
4
  export type ComplexRopeSegment = {
5
- points: IPoint[];
5
+ points: Point[];
6
6
  diameter: number;
7
7
  };
8
8
 
@@ -22,23 +22,20 @@ export class ComplexRope extends Mesh {
22
22
  */
23
23
  constructor(texture: Texture, segments: ComplexRopeSegment[]) {
24
24
  const ropeGeometry = new ComplexRopeGeometry(segments);
25
- const meshMaterial = new MeshMaterial(texture);
26
25
 
27
26
  // attempt to set UV wrapping, will fail on non-power of two textures
28
- texture.baseTexture.wrapMode = WRAP_MODES.REPEAT;
27
+ texture.source.addressMode = 'repeat';
29
28
 
30
- super(ropeGeometry, meshMaterial);
29
+ super({ geometry: ropeGeometry, texture });
31
30
 
32
31
  this.autoUpdate = true;
33
- }
34
-
35
- override _render(renderer: Renderer): void {
36
- const geometry: ComplexRopeGeometry = this.geometry as ComplexRopeGeometry;
37
32
 
38
- if (this.autoUpdate) {
39
- geometry.update();
40
- }
33
+ this.onRender = () => {
34
+ const geometry: ComplexRopeGeometry = this.geometry as ComplexRopeGeometry;
41
35
 
42
- super._render(renderer);
36
+ if (this.autoUpdate) {
37
+ geometry.update();
38
+ }
39
+ };
43
40
  }
44
41
  }
@@ -15,8 +15,12 @@ export class ComplexRopeGeometry extends MeshGeometry {
15
15
  constructor(segments: ComplexRopeSegment[]) {
16
16
  const pointCount = sum(segments, (segment) => segment.points.length);
17
17
 
18
- // @ts-expect-error Temporary fix until pixi.js is updated
19
- super(new Float32Array(pointCount * 4), new Float32Array(pointCount * 4), new Uint16Array((pointCount - 1) * 6));
18
+ super({
19
+ positions: new Float32Array(pointCount * 4),
20
+ uvs: new Float32Array(pointCount * 4),
21
+ indices: new Uint32Array((pointCount - 1) * 6),
22
+ shrinkBuffersToFit: true,
23
+ });
20
24
 
21
25
  this.segments = segments;
22
26
 
@@ -39,8 +43,8 @@ export class ComplexRopeGeometry extends MeshGeometry {
39
43
  return;
40
44
  }
41
45
 
42
- const vertexBuffer = this.getBuffer('aVertexPosition');
43
- const uvBuffer = this.getBuffer('aTextureCoord');
46
+ const vertexBuffer = this.getBuffer('aPosition');
47
+ const uvBuffer = this.getBuffer('aUV');
44
48
  const indexBuffer = this.getIndex();
45
49
 
46
50
  const pointCount = sum(segments, (segment) => segment.points.length);
@@ -52,11 +56,8 @@ export class ComplexRopeGeometry extends MeshGeometry {
52
56
 
53
57
  // if the number of points has changed we will need to recreate the arraybuffers
54
58
  if (vertexBuffer.data.length / 4 !== pointCount) {
55
- // @ts-expect-error Temporary fix until pixi.js is updated
56
59
  vertexBuffer.data = new Float32Array(pointCount * 4);
57
- // @ts-expect-error Temporary fix until pixi.js is updated
58
60
  uvBuffer.data = new Float32Array(pointCount * 4);
59
- // @ts-expect-error Temporary fix until pixi.js is updated
60
61
  indexBuffer.data = new Uint16Array((pointCount - 1) * 6);
61
62
  }
62
63
 
@@ -182,7 +183,7 @@ export class ComplexRopeGeometry extends MeshGeometry {
182
183
  public update(): void {
183
184
  // TODO: Possible optimiztion to be had here
184
185
  // Figure out if/when it is enough to only update verticies with this.updateVertices()
185
- // See PIXI.SimpleRope.update() for ideas
186
+ // See MeshRope.update() for ideas
186
187
 
187
188
  // build() sets indicies and uvs and then calls this.updateVertices()
188
189
  this.build();
@@ -1,4 +1,4 @@
1
- import { IPoint, Mesh, MeshMaterial, Renderer, RopeGeometry, Texture, WRAP_MODES } from 'pixi.js';
1
+ import { Point, Mesh, RopeGeometry, Texture } from 'pixi.js';
2
2
  import { FixedWidthSimpleRopeGeometry } from './FixedWidthSimpleRopeGeometry';
3
3
 
4
4
  /**
@@ -15,27 +15,24 @@ export class FixedWidthSimpleRope extends Mesh {
15
15
  /**
16
16
  * Note: The wrap mode of the texture is set to REPEAT if `textureScale` is positive.
17
17
  * @param texture - The texture to use on the rope. (attempt to set UV wrapping, will fail on non-power of two textures)
18
- * @param points - An array of {@link PIXI.Point} objects to construct this rope.
18
+ * @param points - An array of {@link Point} objects to construct this rope.
19
19
  * @param width - Width of rope
20
20
  */
21
- constructor(texture: Texture, points: IPoint[], width: number) {
21
+ constructor(texture: Texture, points: Point[], width: number) {
22
22
  const ropeGeometry = new FixedWidthSimpleRopeGeometry(points, width);
23
- const meshMaterial = new MeshMaterial(texture);
24
23
 
25
- texture.baseTexture.wrapMode = WRAP_MODES.REPEAT;
24
+ texture.source.addressMode = 'repeat';
26
25
 
27
- super(ropeGeometry, meshMaterial);
26
+ super({ geometry: ropeGeometry, texture });
28
27
 
29
28
  this.autoUpdate = true;
30
- }
31
-
32
- override _render(renderer: Renderer): void {
33
- const geometry: RopeGeometry = this.geometry as RopeGeometry;
34
29
 
35
- if (this.autoUpdate) {
36
- geometry.update();
37
- }
30
+ this.onRender = () => {
31
+ const geometry: RopeGeometry = this.geometry as RopeGeometry;
38
32
 
39
- super._render(renderer);
33
+ if (this.autoUpdate) {
34
+ geometry.update();
35
+ }
36
+ };
40
37
  }
41
38
  }