ag-psd 23.0.0 → 23.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## v23.1.0
4
+ - Added support for perspective warp filter
5
+
3
6
  ## v23.0.0
4
7
  - Fixed handling externally linked files in smart object layers
5
8
 
@@ -1300,11 +1300,22 @@ function parseFilterFXItem(f, options) {
1300
1300
  lightDirection: f.Fltr.LghD,
1301
1301
  specularity: f.Fltr.specularity,
1302
1302
  } });
1303
- case 'LqFy': {
1304
- return __assign(__assign({}, base), { type: 'liquify', filter: {
1305
- liquifyMesh: f.Fltr.LqMe,
1306
- } });
1307
- }
1303
+ case 'LqFy':
1304
+ {
1305
+ return __assign(__assign({}, base), { type: 'liquify', filter: {
1306
+ liquifyMesh: f.Fltr.LqMe,
1307
+ } });
1308
+ }
1309
+ ;
1310
+ case 'perspectiveWarpTransform':
1311
+ {
1312
+ return __assign(__assign({}, base), { type: 'perspective warp', filter: {
1313
+ vertices: f.Fltr.vertices.map(hrznVrtcToPoint),
1314
+ warpedVertices: f.Fltr.warpedVertices.map(hrznVrtcToPoint),
1315
+ quads: f.Fltr.quads.map(function (q) { return q.indices; }),
1316
+ } });
1317
+ }
1318
+ ;
1308
1319
  default:
1309
1320
  if (options.throwForMissingFeatures) {
1310
1321
  throw new Error("Unknown filter classId: ".concat(f.Fltr._classID));
@@ -1777,6 +1788,13 @@ function serializeFilterFXItem(f) {
1777
1788
  _classID: 'LqFy',
1778
1789
  LqMe: f.filter.liquifyMesh,
1779
1790
  }, filterID: 1282492025 });
1791
+ case 'perspective warp': return __assign(__assign({}, base), { Fltr: {
1792
+ _name: 'Perspective Warp',
1793
+ _classID: 'perspectiveWarpTransform',
1794
+ vertices: f.filter.vertices.map(pointToHrznVrtc),
1795
+ warpedVertices: f.filter.warpedVertices.map(pointToHrznVrtc),
1796
+ quads: f.filter.quads.map(function (indices) { return ({ indices: indices }); }),
1797
+ }, filterID: 442 });
1780
1798
  default: throw new Error("Unknow filter type: ".concat(f.type));
1781
1799
  }
1782
1800
  }