@fbltd/math 1.0.46 → 1.0.47

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.
@@ -4,10 +4,6 @@ export class BaseGradient {
4
4
  colors;
5
5
  constructor(...colors) {
6
6
  this.colors = [...colors].sort((a, b) => a.percentage - b.percentage);
7
- this.colors.push({
8
- percentage: 1,
9
- color: this.colors[0].color
10
- });
11
7
  }
12
8
  /**
13
9
  * Получить цвет по углу от оси X по часовой стрелке
@@ -1,5 +1,12 @@
1
1
  import { BaseGradient } from "./base.gradient.js";
2
2
  export class ConicGradient extends BaseGradient {
3
+ constructor(...colors) {
4
+ super(...colors);
5
+ this.colors.push({
6
+ percentage: 1,
7
+ color: this.colors[0].color
8
+ });
9
+ }
3
10
  /**
4
11
  * Для использования метода, углы должны быть в Turn единицах измерения
5
12
  */
@@ -1,6 +1,11 @@
1
1
  import type { IPoint2 } from "../../figures/index.ts";
2
2
  import { BaseGradient } from "./base.gradient.ts";
3
+ import { Color } from "../color.js";
3
4
  export declare class ConicGradient extends BaseGradient {
5
+ constructor(...colors: {
6
+ percentage: number;
7
+ color: Color;
8
+ }[]);
4
9
  /**
5
10
  * Для использования метода, углы должны быть в Turn единицах измерения
6
11
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fbltd/math",
3
- "version": "1.0.46",
3
+ "version": "1.0.47",
4
4
  "description": "Math and geometry utilities",
5
5
  "sideEffects": false,
6
6
  "main": "dist/bin/index.js",