plotboilerplate 1.29.0 → 1.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +194 -16
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.esm.min.js.map +1 -1
- package/dist/plotboilerplate.browser.min.js +1 -1
- package/dist/plotboilerplate.browser.min.js.map +1 -1
- package/dist/plotboilerplate.js +195 -16
- package/dist/plotboilerplate.min.js +1 -1
- package/package.json +1 -1
- package/src/cjs/Circle.d.ts +17 -1
- package/src/cjs/Circle.js +21 -1
- package/src/cjs/Circle.js.map +1 -1
- package/src/cjs/CubicBezierCurve.d.ts +34 -3
- package/src/cjs/CubicBezierCurve.js +79 -12
- package/src/cjs/CubicBezierCurve.js.map +1 -1
- package/src/cjs/Line.d.ts +46 -1
- package/src/cjs/Line.js +80 -1
- package/src/cjs/Line.js.map +1 -1
- package/src/cjs/VertTuple.d.ts +13 -2
- package/src/cjs/VertTuple.js +15 -2
- package/src/cjs/VertTuple.js.map +1 -1
- package/src/esm/Circle.d.ts +17 -1
- package/src/esm/Circle.js +21 -1
- package/src/esm/Circle.js.map +1 -1
- package/src/esm/CubicBezierCurve.d.ts +34 -3
- package/src/esm/CubicBezierCurve.js +79 -12
- package/src/esm/CubicBezierCurve.js.map +1 -1
- package/src/esm/Line.d.ts +46 -1
- package/src/esm/Line.js +80 -1
- package/src/esm/Line.js.map +1 -1
- package/src/esm/VertTuple.d.ts +13 -2
- package/src/esm/VertTuple.js +15 -2
- package/src/esm/VertTuple.js.map +1 -1
- package/src/index-gl.js +1 -2
- package/src/ts/Circle.ts +23 -1
- package/src/ts/CubicBezierCurve.ts +133 -48
- package/src/ts/Line.ts +84 -1
- package/src/ts/VertTuple.ts +16 -2
package/src/ts/VertTuple.ts
CHANGED
|
@@ -17,13 +17,15 @@
|
|
|
17
17
|
* @modified 2025-04-15 Changed param of `VertTuple.moveTo` method from `Vertex` to `XYCoords`.
|
|
18
18
|
* @modified 2025-04-15 Added method `VertTuple.move` method.
|
|
19
19
|
* @modified 2026-06-10 Adding helper function `VertTuple.utils.calcCircumcircle`.
|
|
20
|
-
* @
|
|
20
|
+
* @modified 2026-06-17 Adding method `VertTuple.asLine` for converting Vector to Line instances.
|
|
21
|
+
* @version 1.6.0
|
|
21
22
|
*/
|
|
22
23
|
|
|
23
24
|
import { Vertex } from "./Vertex";
|
|
24
25
|
import { UIDGenerator } from "./UIDGenerator";
|
|
25
26
|
import { XYCoords, UID } from "./interfaces";
|
|
26
27
|
import { ICircle } from "./Circle";
|
|
28
|
+
import { Line } from "./Line";
|
|
27
29
|
|
|
28
30
|
/**
|
|
29
31
|
* @classdesc An abstract base classes for vertex tuple constructs, like Lines or Vectors.
|
|
@@ -360,7 +362,7 @@ export class VertTuple<T extends VertTuple<T>> {
|
|
|
360
362
|
/**
|
|
361
363
|
* Create a deep clone of this instance.
|
|
362
364
|
*
|
|
363
|
-
* @method
|
|
365
|
+
* @method clone
|
|
364
366
|
* @return {T} A type safe clone if this instance.
|
|
365
367
|
* @instance
|
|
366
368
|
* @memberof VertTuple
|
|
@@ -369,6 +371,18 @@ export class VertTuple<T extends VertTuple<T>> {
|
|
|
369
371
|
return this.factory(this.a.clone(), this.b.clone());
|
|
370
372
|
}
|
|
371
373
|
|
|
374
|
+
/**
|
|
375
|
+
* Converts this `Vector` to a `Line` (segment).
|
|
376
|
+
*
|
|
377
|
+
* @method asLine
|
|
378
|
+
* @return {T} A type safe clone if this instance.
|
|
379
|
+
* @instance
|
|
380
|
+
* @memberof VertTuple
|
|
381
|
+
**/
|
|
382
|
+
asLine(): Line {
|
|
383
|
+
return new Line(this.a, this.b);
|
|
384
|
+
}
|
|
385
|
+
|
|
372
386
|
/**
|
|
373
387
|
* Create a string representation of this line.
|
|
374
388
|
*
|