modern-canvas 0.27.0 → 0.27.1

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 (2) hide show
  1. package/dist/index.js +5 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -8366,8 +8366,11 @@ var Da = class extends Gr {
8366
8366
  return new Ot(this._getPointArray().map((e) => (e.x += t.x, e.y += t.y, e)), this.rotation);
8367
8367
  }
8368
8368
  getGlobalObb() {
8369
- let e = this.pivot, t = this.globalTransform.apply(e).sub(e);
8370
- return new Ot(this._getPointArray().map((e) => (e.x += t.x, e.y += t.y, e)), this.globalRotation);
8369
+ let e = this.pivot, t = this.globalScale, n = this.globalTransform.apply(e).sub(e);
8370
+ return new Ot(this._getPointArray().map((r) => ({
8371
+ x: e.x + (r.x - e.x) * t.x + n.x,
8372
+ y: e.y + (r.y - e.y) * t.y + n.y
8373
+ })), this.globalRotation);
8371
8374
  }
8372
8375
  _draw() {
8373
8376
  super._draw(), this._background.isValid() && (this._shape.draw(!this._background.fillWithShape), this._background.draw()), this._fill.isValid() && (this._shape.draw(), this._fill.draw()), this._outline.isValid() && (this._shape.draw(), this._outline.draw()), this._foreground.isValid() && (this._shape.draw(!this._foreground.fillWithShape), this._foreground.draw()), this._text.isValid() && this._text.draw(), this._chart.isValid() && this._chart.draw(), this._drawContent();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "modern-canvas",
3
3
  "type": "module",
4
- "version": "0.27.0",
4
+ "version": "0.27.1",
5
5
  "packageManager": "pnpm@10.19.0",
6
6
  "description": "A JavaScript WebGL rendering engine. only the ESM.",
7
7
  "author": "wxm",