@cobbfan9/asset-studio-web 3.0.1 → 3.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/dist/{chunk-TMQ7M77Q.js → chunk-KKRALHMZ.js} +2 -2
- package/dist/{chunk-JGPF42GU.js → chunk-NNFBMJLF.js} +10 -5
- package/dist/{chunk-JGPF42GU.js.map → chunk-NNFBMJLF.js.map} +1 -1
- package/dist/index.default.js +2 -2
- package/dist/index.node.js +2 -2
- package/dist/index.web.js +2 -2
- package/dist/node/worker.js +1 -1
- package/dist/web/worker.js +1 -1
- package/package.json +4 -2
- /package/dist/{chunk-TMQ7M77Q.js.map → chunk-KKRALHMZ.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AssetsManager
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NNFBMJLF.js";
|
|
4
4
|
|
|
5
5
|
// src/Managers/AssetsManager.raw.ts
|
|
6
6
|
var AssetsManagerRaw = class {
|
|
@@ -28,4 +28,4 @@ var AssetsManagerRaw = class {
|
|
|
28
28
|
export {
|
|
29
29
|
AssetsManagerRaw
|
|
30
30
|
};
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
31
|
+
//# sourceMappingURL=chunk-KKRALHMZ.js.map
|
|
@@ -6074,7 +6074,8 @@ function decodeImage(inputBuffer, imageFormat, layer) {
|
|
|
6074
6074
|
}
|
|
6075
6075
|
|
|
6076
6076
|
// src/Exporters/Texture2D.ts
|
|
6077
|
-
import {
|
|
6077
|
+
import { encode } from "png-tools";
|
|
6078
|
+
import { deflate } from "pako";
|
|
6078
6079
|
async function ExportTexture2D(m_Texture2D) {
|
|
6079
6080
|
logger.debug(`Starting export of ${m_Texture2D.m_Name}`);
|
|
6080
6081
|
if (m_Texture2D.image_data.size === 0 || m_Texture2D.m_Width <= 0 || m_Texture2D.m_Height <= 0) {
|
|
@@ -6118,10 +6119,14 @@ async function ExportTexture2D(m_Texture2D) {
|
|
|
6118
6119
|
flipped[dstIndex + 3] = outputImage[srcIndex + 3];
|
|
6119
6120
|
}
|
|
6120
6121
|
}
|
|
6121
|
-
const pngData =
|
|
6122
|
+
const pngData = encode({
|
|
6123
|
+
data: flipped,
|
|
6124
|
+
width: m_Texture2D.m_Width,
|
|
6125
|
+
height: m_Texture2D.m_Height
|
|
6126
|
+
}, deflate);
|
|
6122
6127
|
let binary = "";
|
|
6123
|
-
for (let i = 0; i < pngData.
|
|
6124
|
-
binary += String.fromCharCode(pngData
|
|
6128
|
+
for (let i = 0; i < pngData.length; i++) {
|
|
6129
|
+
binary += String.fromCharCode(pngData[i]);
|
|
6125
6130
|
}
|
|
6126
6131
|
const base64 = btoa(binary);
|
|
6127
6132
|
return `data:image/png;base64,${base64}`;
|
|
@@ -6418,4 +6423,4 @@ export {
|
|
|
6418
6423
|
Texture2D,
|
|
6419
6424
|
AssetsManager
|
|
6420
6425
|
};
|
|
6421
|
-
//# sourceMappingURL=chunk-
|
|
6426
|
+
//# sourceMappingURL=chunk-NNFBMJLF.js.map
|