@nodecraft/rendermite 1.1.3 → 1.1.4
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/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{run-BPfpBZyZ.js → run-U9pM9wKU.js} +5 -2
- package/dist/run.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -4,7 +4,7 @@ import { n as LayeredResourceManager, t as FolderResourceManager } from "./manag
|
|
|
4
4
|
import { t as curatedModelOverrides } from "./models-BKxGkPS7.js";
|
|
5
5
|
import { n as harvestTintOverrides, t as curatedTintOverrides } from "./tints-CebmvjmP.js";
|
|
6
6
|
import { t as JarResourceManager } from "./jar-D9z-X7tA.js";
|
|
7
|
-
import { t as run } from "./run-
|
|
7
|
+
import { t as run } from "./run-U9pM9wKU.js";
|
|
8
8
|
import { t as downloadClientJar } from "./download-D9aARBFp.js";
|
|
9
9
|
import { a as prepareVersionResources, i as eraForVersion, n as GEOMETRY_DONOR_VERSIONS } from "./prepare-Cc8QZ3j0.js";
|
|
10
10
|
import path from "node:path";
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import { a as renderModelFrames, i as renderModel, n as boxDownscale, r as point
|
|
|
14
14
|
import { a as resolveTints, i as resolveTint, n as InvalidTinterDefinitionError, r as parseTintValue, t as DYE_COLORS } from "./tints-3VI_2SNy.js";
|
|
15
15
|
import { o as createAtlasResolver, s as parseAtlasSources, t as AtlasSourceError } from "./sources-Bxk-WOzH.js";
|
|
16
16
|
import { n as TextureLoader, r as TextureResolutionError, t as AnimatedTexture } from "./loader-Lb0ZeILz.js";
|
|
17
|
-
import { t as run } from "./run-
|
|
17
|
+
import { t as run } from "./run-U9pM9wKU.js";
|
|
18
18
|
import { a as prepareVersionResources, i as eraForVersion, r as compareVersions } from "./prepare-Cc8QZ3j0.js";
|
|
19
19
|
import { n as prepareModResources } from "./prepare-D56Z-9cg.js";
|
|
20
20
|
export { AnimatedTexture, AtlasSourceError, DYE_COLORS, FolderResourceManager, InvalidItemDefinitionError, InvalidResourceLocatorError, InvalidTinterDefinitionError, ItemRenderError, ItemResolutionError, JarResourceManager, LayeredResourceManager, LightingProfile, ModelLoader, ModelResolutionError, ResourceKind, ResourceLocator, TextureLoader, TextureResolutionError, UNKNOWN_MODEL, UnsafeJarError, boxDownscale, builtinDynamicResources, compareVersions, createAtlasResolver, defaultProperties, discoverItems, encodeAnimatedIcon, encodeIcon, eraForVersion, evaluateItemModel, generateStylesheet, isUnsafeEntryPath, itemClass, lightsForProfile, minifyStylesheet, parseAtlasSources, parseTintValue, pointResize, prepareModResources, prepareVersionResources, renderModel, renderModelFrames, resolveItem, resolveTexture, resolveTint, resolveTints, run, salvageJson, toByteTexture, toFloatTexture };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { n as ResourceLocator } from "./locator-ycZzh_6z.js";
|
|
2
|
+
import { n as LayeredResourceManager } from "./manager-CkletR5K.js";
|
|
3
|
+
import { t as curatedModelOverrides } from "./models-BKxGkPS7.js";
|
|
2
4
|
import { n as discoverItems } from "./discovery-B9aqV_Rz.js";
|
|
3
5
|
import { r as encodeRasterAsset } from "./encode-LR9wxigC.js";
|
|
4
6
|
import { t as classifyItemStyle } from "./item-styles-upgEO1yP.js";
|
|
@@ -39,9 +41,10 @@ async function run(options) {
|
|
|
39
41
|
lightingProfile,
|
|
40
42
|
animation: options.animation
|
|
41
43
|
};
|
|
44
|
+
const resourceTree = new LayeredResourceManager([curatedModelOverrides(), options.resources]);
|
|
42
45
|
const concurrency = Math.max(1, options.concurrency ?? 8);
|
|
43
46
|
const requestedWorkers = resolveWorkerCount(options.workers);
|
|
44
|
-
const descriptor = requestedWorkers > 1 ? describeResources(
|
|
47
|
+
const descriptor = requestedWorkers > 1 ? describeResources(resourceTree) : null;
|
|
45
48
|
const pool = descriptor ? new WorkerRenderPool({
|
|
46
49
|
workerUrl: workerUrl(),
|
|
47
50
|
workerData: {
|
|
@@ -53,7 +56,7 @@ async function run(options) {
|
|
|
53
56
|
inFlight: concurrency
|
|
54
57
|
}) : null;
|
|
55
58
|
const usedWorkers = pool ? requestedWorkers : 1;
|
|
56
|
-
const pipeline = await ItemPipeline.create(
|
|
59
|
+
const pipeline = await ItemPipeline.create(resourceTree, settings).catch(async (err) => {
|
|
57
60
|
await pool?.close();
|
|
58
61
|
throw err;
|
|
59
62
|
});
|
package/dist/run.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nodecraft/rendermite",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "Minecraft item icon renderer: renders inventory-identical item icons from vanilla and modded assets across game versions, outputting optimized PNG/WebP/AVIF plus CSS and a JSON item library.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|