@postermywall/fabricjs-2 6.4.3-pmw-34 → 6.4.3-pmw-35

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 (45) hide show
  1. package/dist/index.js +4 -53
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.min.js +1 -1
  4. package/dist/index.min.js.map +1 -1
  5. package/dist/index.min.mjs +1 -1
  6. package/dist/index.min.mjs.map +1 -1
  7. package/dist/index.mjs +4 -53
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/index.node.cjs +4 -53
  10. package/dist/index.node.cjs.map +1 -1
  11. package/dist/index.node.mjs +4 -53
  12. package/dist/index.node.mjs.map +1 -1
  13. package/dist/package.json.min.mjs +1 -1
  14. package/dist/package.json.mjs +1 -1
  15. package/dist/src/canvas/StaticCanvas.d.ts.map +1 -1
  16. package/dist/src/canvas/StaticCanvas.min.mjs +1 -1
  17. package/dist/src/canvas/StaticCanvas.min.mjs.map +1 -1
  18. package/dist/src/canvas/StaticCanvas.mjs +0 -27
  19. package/dist/src/canvas/StaticCanvas.mjs.map +1 -1
  20. package/dist/src/shapes/Group.d.ts +1 -0
  21. package/dist/src/shapes/Group.d.ts.map +1 -1
  22. package/dist/src/shapes/Group.min.mjs +1 -1
  23. package/dist/src/shapes/Group.min.mjs.map +1 -1
  24. package/dist/src/shapes/Group.mjs +3 -0
  25. package/dist/src/shapes/Group.mjs.map +1 -1
  26. package/dist/src/shapes/Image.d.ts.map +1 -1
  27. package/dist/src/shapes/Image.min.mjs +1 -1
  28. package/dist/src/shapes/Image.min.mjs.map +1 -1
  29. package/dist/src/shapes/Image.mjs +0 -3
  30. package/dist/src/shapes/Image.mjs.map +1 -1
  31. package/dist/src/shapes/Object/Object.d.ts.map +1 -1
  32. package/dist/src/shapes/Object/Object.min.mjs +1 -1
  33. package/dist/src/shapes/Object/Object.min.mjs.map +1 -1
  34. package/dist/src/shapes/Object/Object.mjs +0 -22
  35. package/dist/src/shapes/Object/Object.mjs.map +1 -1
  36. package/dist-extensions/src/canvas/StaticCanvas.d.ts.map +1 -1
  37. package/dist-extensions/src/shapes/Group.d.ts +1 -0
  38. package/dist-extensions/src/shapes/Group.d.ts.map +1 -1
  39. package/dist-extensions/src/shapes/Image.d.ts.map +1 -1
  40. package/dist-extensions/src/shapes/Object/Object.d.ts.map +1 -1
  41. package/package.json +1 -1
  42. package/src/canvas/StaticCanvas.ts +0 -27
  43. package/src/shapes/Group.ts +4 -0
  44. package/src/shapes/Image.ts +0 -3
  45. package/src/shapes/Object/Object.ts +0 -22
package/dist/index.js CHANGED
@@ -428,7 +428,7 @@
428
428
  }
429
429
  const cache = new Cache();
430
430
 
431
- var version = "6.4.3-pmw-34";
431
+ var version = "6.4.3-pmw-35";
432
432
 
433
433
  // use this syntax so babel plugin see this import here
434
434
  const VERSION = version;
@@ -3469,7 +3469,6 @@
3469
3469
  if (this.destroyed) {
3470
3470
  return;
3471
3471
  }
3472
- const t1 = performance.now();
3473
3472
  const v = this.viewportTransform,
3474
3473
  path = this.clipPath;
3475
3474
  this.calcViewportBoundaries();
@@ -3480,20 +3479,15 @@
3480
3479
  this.fire('before:render', {
3481
3480
  ctx
3482
3481
  });
3483
- const t2 = performance.now();
3484
3482
  this._renderBackground(ctx);
3485
- const t3 = performance.now();
3486
3483
  ctx.save();
3487
3484
  //apply viewport transform once for all rendering process
3488
3485
  ctx.transform(v[0], v[1], v[2], v[3], v[4], v[5]);
3489
- const t4 = performance.now();
3490
3486
  this._renderObjects(ctx, objects);
3491
- const t5 = performance.now();
3492
3487
  ctx.restore();
3493
3488
  if (!this.controlsAboveOverlay && !this.skipControlsDrawing) {
3494
3489
  this.drawControls(ctx);
3495
3490
  }
3496
- const t6 = performance.now();
3497
3491
  if (path) {
3498
3492
  path._set('canvas', this);
3499
3493
  // needed to setup a couple of variables
@@ -3505,13 +3499,10 @@
3505
3499
  });
3506
3500
  this.drawClipPathOnCanvas(ctx, path);
3507
3501
  }
3508
- const t7 = performance.now();
3509
3502
  this._renderOverlay(ctx);
3510
- const t8 = performance.now();
3511
3503
  if (this.controlsAboveOverlay && !this.skipControlsDrawing) {
3512
3504
  this.drawControls(ctx);
3513
3505
  }
3514
- const t9 = performance.now();
3515
3506
  this.fire('after:render', {
3516
3507
  ctx
3517
3508
  });
@@ -3519,24 +3510,6 @@
3519
3510
  this.__cleanupTask();
3520
3511
  this.__cleanupTask = undefined;
3521
3512
  }
3522
- const t10 = performance.now();
3523
- const times = {
3524
- randomStartTime: t2 - t1,
3525
- renderBackground: t3 - t2,
3526
- transform: t4 - t3,
3527
- renderObjects: t5 - t4,
3528
- drawControls: t6 - t5,
3529
- pathThingy: t7 - t6,
3530
- renderOverlay: t8 - t7,
3531
- drawControlsOverlay: t9 - t8,
3532
- cleanup: t10 - t9,
3533
- totalTime: t10 - t1
3534
- };
3535
- let logMessage = '';
3536
- for (const [key, value] of Object.entries(times)) {
3537
- logMessage += "".concat(key, " ").concat(String(Math.round(value)), "ms ");
3538
- }
3539
- console.log(logMessage);
3540
3513
  }
3541
3514
 
3542
3515
  /**
@@ -7126,41 +7099,19 @@
7126
7099
  return;
7127
7100
  }
7128
7101
  ctx.save();
7129
- const t1 = performance.now();
7130
7102
  this._setupCompositeOperation(ctx);
7131
7103
  this.drawSelectionBackground(ctx);
7132
- const t2 = performance.now();
7133
7104
  this.transform(ctx);
7134
7105
  this._setOpacity(ctx);
7135
7106
  this._setShadow(ctx);
7136
- const t3 = performance.now();
7137
- let t4 = performance.now();
7138
- let t5 = performance.now();
7139
7107
  if (this.shouldCache()) {
7140
7108
  this.renderCache();
7141
- t4 = performance.now();
7142
7109
  this.drawCacheOnCanvas(ctx);
7143
- t5 = performance.now();
7144
7110
  } else {
7145
7111
  this._removeCacheCanvas();
7146
- t4 = performance.now();
7147
7112
  this.drawObject(ctx, false, {});
7148
- t5 = performance.now();
7149
7113
  this.dirty = false;
7150
7114
  }
7151
- const times = {
7152
- drawSelectonBackground: t2 - t1,
7153
- setBackgroundShadow: t3 - t2,
7154
- shoudCache: this.shouldCache() ? 1 : 0,
7155
- rendercacheOrRemoveCache: t4 - t3,
7156
- drawObject: t5 - t4,
7157
- total: t5 - t1
7158
- };
7159
- let logMessage = '';
7160
- for (const [key, value] of Object.entries(times)) {
7161
- logMessage += "".concat(key, " ").concat(String(Math.round(value)), "ms ");
7162
- }
7163
- console.log(logMessage);
7164
7115
  ctx.restore();
7165
7116
  }
7166
7117
  drawSelectionBackground(_ctx) {
@@ -11999,6 +11950,9 @@
11999
11950
  }
12000
11951
  return false;
12001
11952
  }
11953
+ isGroup() {
11954
+ return true;
11955
+ }
12002
11956
 
12003
11957
  /**
12004
11958
  * Check if instance or its group are caching, recursively up
@@ -25564,10 +25518,7 @@
25564
25518
  if (this._element.nodeName === 'VIDEO') {
25565
25519
  elementToDraw = this._applyVideoFilter(this._element);
25566
25520
  }
25567
- const t1 = performance.now();
25568
25521
  elementToDraw && ctx.drawImage(elementToDraw, sX, sY, sW, sH, x, y, maxDestW, maxDestH);
25569
- const t2 = performance.now();
25570
- console.log('Draw image ctx', t2 - t1);
25571
25522
  }
25572
25523
 
25573
25524
  /**