@inditextech/weave-sdk 0.64.0 → 0.64.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.
- package/dist/sdk.cjs +24 -28
- package/dist/sdk.js +24 -28
- package/dist/sdk.js.map +1 -1
- package/package.json +2 -2
package/dist/sdk.cjs
CHANGED
|
@@ -22053,7 +22053,7 @@ var WeaveRegisterManager = class {
|
|
|
22053
22053
|
|
|
22054
22054
|
//#endregion
|
|
22055
22055
|
//#region package.json
|
|
22056
|
-
var version = "0.64.
|
|
22056
|
+
var version = "0.64.1";
|
|
22057
22057
|
|
|
22058
22058
|
//#endregion
|
|
22059
22059
|
//#region src/managers/setup.ts
|
|
@@ -22448,35 +22448,31 @@ var WeaveExportManager = class {
|
|
|
22448
22448
|
const backgroundRect = background.getClientRect();
|
|
22449
22449
|
stage.batchDraw();
|
|
22450
22450
|
const composites = [];
|
|
22451
|
-
const maxRenderSize = 1920;
|
|
22452
|
-
const tileSize = Math.floor(maxRenderSize / pixelRatio);
|
|
22453
22451
|
const imageWidth = Math.round(backgroundRect.width);
|
|
22454
22452
|
const imageHeight = Math.round(backgroundRect.height);
|
|
22455
|
-
|
|
22456
|
-
|
|
22457
|
-
|
|
22458
|
-
|
|
22459
|
-
|
|
22460
|
-
|
|
22461
|
-
|
|
22462
|
-
|
|
22463
|
-
|
|
22464
|
-
|
|
22465
|
-
|
|
22466
|
-
|
|
22467
|
-
|
|
22468
|
-
|
|
22469
|
-
|
|
22470
|
-
|
|
22471
|
-
|
|
22472
|
-
|
|
22473
|
-
|
|
22474
|
-
|
|
22475
|
-
|
|
22476
|
-
|
|
22477
|
-
|
|
22478
|
-
}
|
|
22479
|
-
compositeY = compositeY + tileSize;
|
|
22453
|
+
const maxRenderSize = 1920;
|
|
22454
|
+
const cols = Math.ceil(imageWidth / maxRenderSize);
|
|
22455
|
+
const rows = Math.ceil(imageHeight / maxRenderSize);
|
|
22456
|
+
const tileWidth = Math.floor(imageWidth / cols);
|
|
22457
|
+
const tileHeight = Math.floor(imageHeight / rows);
|
|
22458
|
+
for (let y = 0; y < imageHeight; y += tileHeight) for (let x = 0; x < imageWidth; x += tileWidth) {
|
|
22459
|
+
const width = Math.min(tileWidth, imageWidth - x);
|
|
22460
|
+
const height = Math.min(tileHeight, imageHeight - y);
|
|
22461
|
+
const canvas = await exportGroup.toCanvas({
|
|
22462
|
+
x: Math.round(backgroundRect.x) + x,
|
|
22463
|
+
y: Math.round(backgroundRect.y) + y,
|
|
22464
|
+
width,
|
|
22465
|
+
height,
|
|
22466
|
+
mimeType: format$2,
|
|
22467
|
+
pixelRatio,
|
|
22468
|
+
quality: options.quality ?? 1
|
|
22469
|
+
});
|
|
22470
|
+
const buffer = canvas.toBuffer();
|
|
22471
|
+
composites.push({
|
|
22472
|
+
top: y * pixelRatio,
|
|
22473
|
+
left: x * pixelRatio,
|
|
22474
|
+
input: buffer
|
|
22475
|
+
});
|
|
22480
22476
|
}
|
|
22481
22477
|
exportGroup.destroy();
|
|
22482
22478
|
stage.position(originalPosition);
|
package/dist/sdk.js
CHANGED
|
@@ -22053,7 +22053,7 @@ var WeaveRegisterManager = class {
|
|
|
22053
22053
|
|
|
22054
22054
|
//#endregion
|
|
22055
22055
|
//#region package.json
|
|
22056
|
-
var version = "0.64.
|
|
22056
|
+
var version = "0.64.1";
|
|
22057
22057
|
|
|
22058
22058
|
//#endregion
|
|
22059
22059
|
//#region src/managers/setup.ts
|
|
@@ -22448,35 +22448,31 @@ var WeaveExportManager = class {
|
|
|
22448
22448
|
const backgroundRect = background.getClientRect();
|
|
22449
22449
|
stage.batchDraw();
|
|
22450
22450
|
const composites = [];
|
|
22451
|
-
const maxRenderSize = 1920;
|
|
22452
|
-
const tileSize = Math.floor(maxRenderSize / pixelRatio);
|
|
22453
22451
|
const imageWidth = Math.round(backgroundRect.width);
|
|
22454
22452
|
const imageHeight = Math.round(backgroundRect.height);
|
|
22455
|
-
|
|
22456
|
-
|
|
22457
|
-
|
|
22458
|
-
|
|
22459
|
-
|
|
22460
|
-
|
|
22461
|
-
|
|
22462
|
-
|
|
22463
|
-
|
|
22464
|
-
|
|
22465
|
-
|
|
22466
|
-
|
|
22467
|
-
|
|
22468
|
-
|
|
22469
|
-
|
|
22470
|
-
|
|
22471
|
-
|
|
22472
|
-
|
|
22473
|
-
|
|
22474
|
-
|
|
22475
|
-
|
|
22476
|
-
|
|
22477
|
-
|
|
22478
|
-
}
|
|
22479
|
-
compositeY = compositeY + tileSize;
|
|
22453
|
+
const maxRenderSize = 1920;
|
|
22454
|
+
const cols = Math.ceil(imageWidth / maxRenderSize);
|
|
22455
|
+
const rows = Math.ceil(imageHeight / maxRenderSize);
|
|
22456
|
+
const tileWidth = Math.floor(imageWidth / cols);
|
|
22457
|
+
const tileHeight = Math.floor(imageHeight / rows);
|
|
22458
|
+
for (let y = 0; y < imageHeight; y += tileHeight) for (let x = 0; x < imageWidth; x += tileWidth) {
|
|
22459
|
+
const width = Math.min(tileWidth, imageWidth - x);
|
|
22460
|
+
const height = Math.min(tileHeight, imageHeight - y);
|
|
22461
|
+
const canvas = await exportGroup.toCanvas({
|
|
22462
|
+
x: Math.round(backgroundRect.x) + x,
|
|
22463
|
+
y: Math.round(backgroundRect.y) + y,
|
|
22464
|
+
width,
|
|
22465
|
+
height,
|
|
22466
|
+
mimeType: format$2,
|
|
22467
|
+
pixelRatio,
|
|
22468
|
+
quality: options.quality ?? 1
|
|
22469
|
+
});
|
|
22470
|
+
const buffer = canvas.toBuffer();
|
|
22471
|
+
composites.push({
|
|
22472
|
+
top: y * pixelRatio,
|
|
22473
|
+
left: x * pixelRatio,
|
|
22474
|
+
input: buffer
|
|
22475
|
+
});
|
|
22480
22476
|
}
|
|
22481
22477
|
exportGroup.destroy();
|
|
22482
22478
|
stage.position(originalPosition);
|