modern-canvas 0.4.36 → 0.4.38

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.mjs CHANGED
@@ -2557,7 +2557,7 @@ class Transform2D extends Matrix3 {
2557
2557
  scale(x, y, z = 1) {
2558
2558
  return this.premultiply(Transform2D._t2d.makeScale(x, y, z));
2559
2559
  }
2560
- makeScale(x, y, z = 1) {
2560
+ makeScale(x, y, _z = 1) {
2561
2561
  this.set([
2562
2562
  x,
2563
2563
  0,
@@ -2567,7 +2567,7 @@ class Transform2D extends Matrix3 {
2567
2567
  0,
2568
2568
  0,
2569
2569
  0,
2570
- z
2570
+ 1
2571
2571
  ]);
2572
2572
  return this;
2573
2573
  }
@@ -5655,10 +5655,6 @@ class GradientTexture extends Texture2D {
5655
5655
  return this.regExp.test(value);
5656
5656
  }
5657
5657
  constructor(value, width, height) {
5658
- if (width === Infinity)
5659
- width = 0;
5660
- if (height === Infinity)
5661
- height = 0;
5662
5658
  super(
5663
5659
  LinearGradient.from(value).parse(width, height)
5664
5660
  );
@@ -10205,7 +10201,7 @@ let BaseElement2D = class extends Node2D {
10205
10201
  const offsetY = originY * height;
10206
10202
  this.transform.identity().translate(-offsetX, -offsetY).scale(this.scale.x, this.scale.y).skew(this.skew.x, this.skew.y).rotate(this.rotation);
10207
10203
  parseCSSTransform(this.style.transform, width, height, this.transform);
10208
- this.transform.translate(offsetX + this.position.x, offsetY + this.position.y);
10204
+ this.transform.translate(this.position.x, this.position.y).translate(offsetX, offsetY);
10209
10205
  }
10210
10206
  _updateGlobalTransform() {
10211
10207
  super._updateGlobalTransform();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "modern-canvas",
3
3
  "type": "module",
4
- "version": "0.4.36",
4
+ "version": "0.4.38",
5
5
  "packageManager": "pnpm@9.15.1",
6
6
  "description": "A JavaScript WebGL rendering engine.",
7
7
  "author": "wxm",
@@ -71,7 +71,7 @@
71
71
  "earcut": "^3.0.1",
72
72
  "modern-font": "^0.4.1",
73
73
  "modern-idoc": "^0.5.4",
74
- "modern-path2d": "^1.2.19",
74
+ "modern-path2d": "^1.3.0",
75
75
  "modern-text": "^1.3.10",
76
76
  "yoga-layout": "^3.2.1"
77
77
  },
@@ -82,7 +82,7 @@
82
82
  "bumpp": "^10.1.0",
83
83
  "conventional-changelog-cli": "^5.0.0",
84
84
  "eslint": "^9.26.0",
85
- "lint-staged": "^15.5.2",
85
+ "lint-staged": "^16.0.0",
86
86
  "lottie-web": "^5.12.2",
87
87
  "modern-gif": "^2.0.4",
88
88
  "simple-git-hooks": "^2.13.0",