@nodecraft/rendermite 1.7.2 → 1.7.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/atlas/registry.d.ts +1 -1
- package/dist/atlas/registry.js +1 -1
- package/dist/atlas/sources.d.ts +1 -1
- package/dist/atlas/sources.js +1 -1
- package/dist/blocks/cli.js +1 -1
- package/dist/blocks/export.js +1 -1
- package/dist/blocks/geo-blocks.js +1 -1
- package/dist/{cli-BvKFacki.js → cli-DBNuCnry.js} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{export-DFEIL7yt.js → export-Ds1EelMa.js} +2 -2
- package/dist/{geo-blocks-BcSEBhko.js → geo-blocks-W79q5A0f.js} +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/{pipeline-Cci24Kb4.js → pipeline-BTlk9-s5.js} +1 -1
- package/dist/{registry-DlduyjtM.js → registry-DafxsAhG.js} +1 -1
- package/dist/render/pipeline.js +1 -1
- package/dist/{run--oW_h01E.js → run-Ctt_1iTd.js} +1 -1
- package/dist/run.js +1 -1
- package/dist/{sources-BlUriDCs.js → sources-DYY5Qu-t.js} +11 -2
- package/dist/{sources-DYYiyvRW.d.ts → sources-e5D09Jz_.d.ts} +7 -0
- package/dist/workers/render-worker.js +1 -1
- package/package.json +1 -1
package/dist/atlas/registry.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as ResourceLocator } from "../locator-jDbdUeTd.js";
|
|
2
2
|
import { a as ResourceManager } from "../manager-exOIcdyx.js";
|
|
3
3
|
import { r as Texture } from "../loader-59_eMa8e.js";
|
|
4
|
-
import { t as AtlasResolver } from "../sources-
|
|
4
|
+
import { t as AtlasResolver } from "../sources-e5D09Jz_.js";
|
|
5
5
|
//#region src/atlas/registry.d.ts
|
|
6
6
|
declare function loadAtlasResolver(resources: ResourceManager, loadTexture: (locator: ResourceLocator) => Promise<Texture | null>, onWarning?: (message: string) => void): Promise<AtlasResolver>;
|
|
7
7
|
//#endregion
|
package/dist/atlas/registry.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as loadAtlasResolver } from "../registry-
|
|
1
|
+
import { t as loadAtlasResolver } from "../registry-DafxsAhG.js";
|
|
2
2
|
export { loadAtlasResolver };
|
package/dist/atlas/sources.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as HasTexture, c as SingleAtlasSource, d as parseAtlasSources, i as DirectoryAtlasSource, l as UnstitchAtlasSource, n as AtlasSource, o as PalettedPermutationsSource, r as AtlasSourceError, s as ResolvedSprite, t as AtlasResolver, u as createAtlasResolver } from "../sources-
|
|
1
|
+
import { a as HasTexture, c as SingleAtlasSource, d as parseAtlasSources, i as DirectoryAtlasSource, l as UnstitchAtlasSource, n as AtlasSource, o as PalettedPermutationsSource, r as AtlasSourceError, s as ResolvedSprite, t as AtlasResolver, u as createAtlasResolver } from "../sources-e5D09Jz_.js";
|
|
2
2
|
export { AtlasResolver, AtlasSource, AtlasSourceError, DirectoryAtlasSource, HasTexture, PalettedPermutationsSource, ResolvedSprite, SingleAtlasSource, UnstitchAtlasSource, createAtlasResolver, parseAtlasSources };
|
package/dist/atlas/sources.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as UnstitchAtlasSource, i as SingleAtlasSource, n as DirectoryAtlasSource, o as createAtlasResolver, r as PalettedPermutationsSource, s as parseAtlasSources, t as AtlasSourceError } from "../sources-
|
|
1
|
+
import { a as UnstitchAtlasSource, i as SingleAtlasSource, n as DirectoryAtlasSource, o as createAtlasResolver, r as PalettedPermutationsSource, s as parseAtlasSources, t as AtlasSourceError } from "../sources-DYY5Qu-t.js";
|
|
2
2
|
export { AtlasSourceError, DirectoryAtlasSource, PalettedPermutationsSource, SingleAtlasSource, UnstitchAtlasSource, createAtlasResolver, parseAtlasSources };
|
package/dist/blocks/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as runBlocksCli } from "../cli-
|
|
1
|
+
import { t as runBlocksCli } from "../cli-DBNuCnry.js";
|
|
2
2
|
export { runBlocksCli };
|
package/dist/blocks/export.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as exportBlockPack } from "../export-
|
|
1
|
+
import { t as exportBlockPack } from "../export-Ds1EelMa.js";
|
|
2
2
|
export { exportBlockPack };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as geoBlockModel } from "../geo-blocks-
|
|
1
|
+
import { t as geoBlockModel } from "../geo-blocks-W79q5A0f.js";
|
|
2
2
|
export { geoBlockModel };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as builtinPackPath } from "./builtin-WkWjATeh.js";
|
|
2
2
|
import { n as LayeredResourceManager, t as FolderResourceManager } from "./manager-BNibYkmI.js";
|
|
3
|
-
import { t as exportBlockPack } from "./export-
|
|
3
|
+
import { t as exportBlockPack } from "./export-Ds1EelMa.js";
|
|
4
4
|
import { n as layeredClasses, t as JarClassReader } from "./jar-classes-3GVCJZT7.js";
|
|
5
5
|
import { n as prepareModResources } from "./prepare-Myd_ec4v.js";
|
|
6
6
|
import { t as downloadClientJar } from "./download-1wAfrGKx.js";
|
package/dist/cli.js
CHANGED
|
@@ -6,8 +6,8 @@ import { t as curatedModelOverrides } from "./models-CZjCOjs4.js";
|
|
|
6
6
|
import { n as harvestTintOverrides, t as curatedTintOverrides } from "./tints-BspVCz2G.js";
|
|
7
7
|
import { t as downloadClientJar } from "./download-1wAfrGKx.js";
|
|
8
8
|
import { a as prepareVersionResources, i as eraForVersion, n as GEOMETRY_DONOR_VERSIONS } from "./prepare-D49Gu4Lv.js";
|
|
9
|
-
import { t as runBlocksCli } from "./cli-
|
|
10
|
-
import { t as run } from "./run
|
|
9
|
+
import { t as runBlocksCli } from "./cli-DBNuCnry.js";
|
|
10
|
+
import { t as run } from "./run-Ctt_1iTd.js";
|
|
11
11
|
import path from "node:path";
|
|
12
12
|
import os from "node:os";
|
|
13
13
|
import { parseArgs } from "node:util";
|
|
@@ -6,13 +6,13 @@ import { a as salvageJson, i as resolveTexture, t as ModelLoader } from "./loade
|
|
|
6
6
|
import { t as enderStorageBlockModel } from "./ender-storage-Dgomp6r2.js";
|
|
7
7
|
import { t as collectEntities } from "./entities-rQ4TZjEo.js";
|
|
8
8
|
import { n as collectEntityGeometry } from "./entity-models-DUKiHpn1.js";
|
|
9
|
-
import { t as geoBlockModel } from "./geo-blocks-
|
|
9
|
+
import { t as geoBlockModel } from "./geo-blocks-W79q5A0f.js";
|
|
10
10
|
import { n as discoverItems } from "./discovery-CD0QqxSF.js";
|
|
11
11
|
import { t as collectItemSprites } from "./item-sprites-CwiEBEAJ.js";
|
|
12
12
|
import { n as buildObjMesh } from "./obj-mesh-BFhtTBXX.js";
|
|
13
13
|
import { n as buildSpriteSheet, t as MISSING_SPRITE } from "./sprite-sheet-LQAEtGkp.js";
|
|
14
14
|
import { n as buildBlockTints, t as UNREGISTERED_TINTS } from "./tints-Cl0r-Ol3.js";
|
|
15
|
-
import { t as loadAtlasResolver } from "./registry-
|
|
15
|
+
import { t as loadAtlasResolver } from "./registry-DafxsAhG.js";
|
|
16
16
|
import { n as LayeredResourceManager, t as FolderResourceManager } from "./manager-BNibYkmI.js";
|
|
17
17
|
import { n as TextureLoader } from "./loader-CsgtBuBo.js";
|
|
18
18
|
import path from "node:path";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as ResourceLocator, t as InvalidResourceLocatorError } from "./locator-jDbdUeTd.js";
|
|
2
2
|
import { a as ResourceManager, i as ResourceKindName, n as LayeredResourceManager, r as ResourceKind, t as FolderResourceManager } from "./manager-exOIcdyx.js";
|
|
3
3
|
import { a as TextureMeta, i as TextureLoader, o as TextureResolutionError, r as Texture, t as AnimatedTexture } from "./loader-59_eMa8e.js";
|
|
4
|
-
import { d as parseAtlasSources, n as AtlasSource, r as AtlasSourceError, s as ResolvedSprite, t as AtlasResolver, u as createAtlasResolver } from "./sources-
|
|
4
|
+
import { d as parseAtlasSources, n as AtlasSource, r as AtlasSourceError, s as ResolvedSprite, t as AtlasResolver, u as createAtlasResolver } from "./sources-e5D09Jz_.js";
|
|
5
5
|
import { a as PackedRect, i as PackedPage, n as PackOptions, o as packAtlas, r as PackedAtlas, t as PackEntry } from "./atlas-pack-C56gzqAg.js";
|
|
6
6
|
import { a as buildBiomeClimates, i as VANILLA_BIOME_CLIMATES, n as BiomeClimatePack, o as parseBiomeClimate, r as DEFAULT_WATER_COLOR, t as BiomeClimate } from "./biomes-CJDJQqJb.js";
|
|
7
7
|
import { a as resolveTexture, n as ModelResolutionError, o as salvageJson, r as ResolvedModel, t as ModelLoader } from "./loader-DSir1-P0.js";
|
package/dist/index.js
CHANGED
|
@@ -11,10 +11,10 @@ import { a as resolveTints, i as resolveTint, n as InvalidTinterDefinitionError,
|
|
|
11
11
|
import { n as buildObjMesh, t as ObjMeshError } from "./obj-mesh-BFhtTBXX.js";
|
|
12
12
|
import { t as packAtlas } from "./atlas-pack-CoOih7By.js";
|
|
13
13
|
import { n as buildBlockTints, t as UNREGISTERED_TINTS } from "./tints-Cl0r-Ol3.js";
|
|
14
|
-
import { o as createAtlasResolver, s as parseAtlasSources, t as AtlasSourceError } from "./sources-
|
|
14
|
+
import { o as createAtlasResolver, s as parseAtlasSources, t as AtlasSourceError } from "./sources-DYY5Qu-t.js";
|
|
15
15
|
import { n as LayeredResourceManager, r as ResourceKind, t as FolderResourceManager } from "./manager-BNibYkmI.js";
|
|
16
16
|
import { n as TextureLoader, r as TextureResolutionError, t as AnimatedTexture } from "./loader-CsgtBuBo.js";
|
|
17
|
-
import { t as exportBlockPack } from "./export-
|
|
17
|
+
import { t as exportBlockPack } from "./export-Ds1EelMa.js";
|
|
18
18
|
import { n as UnsafeJarError, r as isUnsafeEntryPath, t as JarResourceManager } from "./jar-W2cV2ZVO.js";
|
|
19
19
|
import { n as prepareModResources } from "./prepare-Myd_ec4v.js";
|
|
20
20
|
import { a as prepareVersionResources, i as eraForVersion, r as compareVersions } from "./prepare-D49Gu4Lv.js";
|
|
@@ -22,5 +22,5 @@ import { n as encodeIcon, t as encodeAnimatedIcon } from "./encode-LR9wxigC.js";
|
|
|
22
22
|
import { a as builtinDynamicResources } from "./generators-D6giKoab.js";
|
|
23
23
|
import { t as minifyStylesheet } from "./minify-bjMRmr5J.js";
|
|
24
24
|
import { n as itemClass, t as generateStylesheet } from "./stylesheet-CovT3B2S.js";
|
|
25
|
-
import { t as run } from "./run
|
|
25
|
+
import { t as run } from "./run-Ctt_1iTd.js";
|
|
26
26
|
export { AnimatedTexture, AtlasSourceError, BlockStateError, DEFAULT_WATER_COLOR, DYE_COLORS, FolderResourceManager, InvalidItemDefinitionError, InvalidResourceLocatorError, InvalidTinterDefinitionError, ItemRenderError, ItemResolutionError, JarResourceManager, LayeredResourceManager, LightingProfile, ModelLoader, ModelResolutionError, ObjMeshError, ResourceKind, ResourceLocator, TextureLoader, TextureResolutionError, UNKNOWN_MODEL, UNREGISTERED_TINTS, UnsafeJarError, VANILLA_BIOME_CLIMATES, boxDownscale, buildBiomeClimates, buildBlockTints, buildObjMesh, builtinDynamicResources, collectModels, compareVersions, createAtlasResolver, defaultProperties, discoverItems, encodeAnimatedIcon, encodeIcon, eraForVersion, evaluateBlockState, evaluateItemModel, exportBlockPack, generateStylesheet, isUnsafeEntryPath, itemClass, lightsForProfile, matchesCondition, minifyStylesheet, packAtlas, parseAtlasSources, parseBiomeClimate, parseBlockState, parseTintValue, pointResize, prepareModResources, prepareVersionResources, renderModel, renderModelFrames, resolveItem, resolveTexture, resolveTint, resolveTints, run, salvageJson, toByteTexture, toFloatTexture, weightedVariantIndex };
|
|
@@ -6,7 +6,7 @@ import { a as renderGeo, t as findGeoForItem } from "./geo-BoDxwvz5.js";
|
|
|
6
6
|
import { a as defaultProperties } from "./definition-ColsvWrH.js";
|
|
7
7
|
import { i as resolveItem } from "./discovery-CD0QqxSF.js";
|
|
8
8
|
import { a as resolveTints } from "./tints-B3WQcPtx.js";
|
|
9
|
-
import { t as loadAtlasResolver } from "./registry-
|
|
9
|
+
import { t as loadAtlasResolver } from "./registry-DafxsAhG.js";
|
|
10
10
|
import { n as LayeredResourceManager, t as FolderResourceManager } from "./manager-BNibYkmI.js";
|
|
11
11
|
import { n as TextureLoader } from "./loader-CsgtBuBo.js";
|
|
12
12
|
import { t as encodeAnimatedIcon } from "./encode-LR9wxigC.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as ResourceLocator } from "./locator-COMEtEn9.js";
|
|
2
|
-
import { o as createAtlasResolver, r as PalettedPermutationsSource, s as parseAtlasSources } from "./sources-
|
|
2
|
+
import { o as createAtlasResolver, r as PalettedPermutationsSource, s as parseAtlasSources } from "./sources-DYY5Qu-t.js";
|
|
3
3
|
//#region src/atlas/registry.ts
|
|
4
4
|
/**
|
|
5
5
|
* Collects every `atlases/*.json` across namespaces into one resolver.
|
package/dist/render/pipeline.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as ItemPipeline } from "../pipeline-
|
|
1
|
+
import { t as ItemPipeline } from "../pipeline-BTlk9-s5.js";
|
|
2
2
|
export { ItemPipeline };
|
|
@@ -6,7 +6,7 @@ import { r as encodeRasterAsset } from "./encode-LR9wxigC.js";
|
|
|
6
6
|
import { t as classifyItemStyle } from "./item-styles-BAeneY1R.js";
|
|
7
7
|
import { t as minifyStylesheet } from "./minify-bjMRmr5J.js";
|
|
8
8
|
import { t as generateStylesheet } from "./stylesheet-CovT3B2S.js";
|
|
9
|
-
import { t as ItemPipeline } from "./pipeline-
|
|
9
|
+
import { t as ItemPipeline } from "./pipeline-BTlk9-s5.js";
|
|
10
10
|
import { t as describeResources } from "./descriptor-JyXhfd-c.js";
|
|
11
11
|
import { t as WorkerRenderPool } from "./pool-CKGp1qup.js";
|
|
12
12
|
import path from "node:path";
|
package/dist/run.js
CHANGED
|
@@ -84,9 +84,18 @@ var PalettedPermutationsSource = class PalettedPermutationsSource {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* 26.3 moved palettes out of the texture tree: atlas palette ids resolve
|
|
89
|
+
* under textures/palettes/ (palette_key "minecraft:trim_base" is
|
|
90
|
+
* textures/palettes/trim_base.png). Older packs keep full texture paths, so
|
|
91
|
+
* the direct lookup is tried first.
|
|
92
|
+
*/
|
|
93
|
+
async loadPalette(locator) {
|
|
94
|
+
return await this.loadTexture(locator) ?? await this.loadTexture(new ResourceLocator(locator.namespace, `palettes/${locator.path}`));
|
|
95
|
+
}
|
|
87
96
|
async getKeyPalette() {
|
|
88
97
|
if (this.keyPalette) return this.keyPalette;
|
|
89
|
-
const keyTexture = await this.
|
|
98
|
+
const keyTexture = await this.loadPalette(ResourceLocator.parse(this.settings.palette_key));
|
|
90
99
|
if (!keyTexture) throw new AtlasSourceError(`Missing palette key ${this.settings.palette_key}`);
|
|
91
100
|
const palette = /* @__PURE__ */ new Map();
|
|
92
101
|
for (let index = 0; index < keyTexture.width * keyTexture.height; index++) {
|
|
@@ -104,7 +113,7 @@ var PalettedPermutationsSource = class PalettedPermutationsSource {
|
|
|
104
113
|
if (!sprite) return null;
|
|
105
114
|
const base = await this.loadTexture(sprite.base);
|
|
106
115
|
if (!base) return null;
|
|
107
|
-
const permutation = await this.
|
|
116
|
+
const permutation = await this.loadPalette(sprite.palette);
|
|
108
117
|
if (!permutation) return null;
|
|
109
118
|
const keyPalette = await this.getKeyPalette();
|
|
110
119
|
const data = new Uint8ClampedArray(base.data);
|
|
@@ -63,6 +63,13 @@ declare class PalettedPermutationsSource implements AtlasSource {
|
|
|
63
63
|
private keyPalette;
|
|
64
64
|
private readonly loadTexture;
|
|
65
65
|
constructor(settings: PalettedPermutationsSettings, loadTexture: (locator: ResourceLocator) => Promise<Texture | null>);
|
|
66
|
+
/**
|
|
67
|
+
* 26.3 moved palettes out of the texture tree: atlas palette ids resolve
|
|
68
|
+
* under textures/palettes/ (palette_key "minecraft:trim_base" is
|
|
69
|
+
* textures/palettes/trim_base.png). Older packs keep full texture paths, so
|
|
70
|
+
* the direct lookup is tried first.
|
|
71
|
+
*/
|
|
72
|
+
private loadPalette;
|
|
66
73
|
private getKeyPalette;
|
|
67
74
|
has(locator: ResourceLocator): boolean;
|
|
68
75
|
resolve(locator: ResourceLocator): Promise<ResolvedSprite | null>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ItemPipeline } from "../pipeline-
|
|
1
|
+
import { t as ItemPipeline } from "../pipeline-BTlk9-s5.js";
|
|
2
2
|
import { n as restoreResources } from "../descriptor-JyXhfd-c.js";
|
|
3
3
|
import sharp from "sharp";
|
|
4
4
|
import { parentPort, workerData } from "node:worker_threads";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nodecraft/rendermite",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.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",
|