@nodecraft/rendermite 1.7.3 → 1.8.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/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/ender-storage.d.ts +1 -1
- package/dist/blocks/entities.d.ts +1 -1
- package/dist/blocks/entity-models.d.ts +3 -3
- package/dist/blocks/entity-models.js +1 -1
- package/dist/blocks/export.d.ts +1 -1
- package/dist/blocks/export.js +1 -1
- package/dist/blocks/geo-blocks.d.ts +1 -1
- package/dist/blocks/item-sprites.d.ts +1 -1
- package/dist/blocks/light-bytecode.d.ts +174 -0
- package/dist/blocks/light-bytecode.js +2 -0
- package/dist/blocks/light-eval.d.ts +2 -0
- package/dist/blocks/light-eval.js +2 -0
- package/dist/blocks/light.d.ts +38 -0
- package/dist/blocks/light.js +2 -0
- package/dist/blocks/pack-format.d.ts +2 -2
- package/dist/blocks/sprite-sheet.d.ts +1 -1
- package/dist/{classfile-Bo7FUrrD.js → classfile-CiIDF3vc.js} +23 -1
- package/dist/{classfile-BdLIk4Pe.d.ts → classfile-CsLXlh5z.d.ts} +23 -0
- package/dist/{cli-BuKutEzb.js → cli-Dw1Q5CPR.js} +5 -4
- package/dist/cli.js +5 -5
- package/dist/{descriptor-JyXhfd-c.js → descriptor-CmkIkDKL.js} +2 -2
- package/dist/entities/classfile.d.ts +1 -1
- package/dist/entities/classfile.js +1 -1
- package/dist/entities/inherit.d.ts +2 -2
- package/dist/entities/inherit.js +1 -1
- package/dist/entities/jar-classes.js +1 -1
- package/dist/entities/link.d.ts +2 -2
- package/dist/entities/link.js +1 -1
- package/dist/entities/mappings.d.ts +2 -2
- package/dist/entities/mappings.js +2 -2
- package/dist/entities/model-bytecode.d.ts +7 -2
- package/dist/entities/model-bytecode.js +2 -2
- package/dist/entities/model-code.d.ts +1 -1
- package/dist/entities/model-code.js +1 -1
- package/dist/{entity-models-DUKiHpn1.js → entity-models-BGiy3pey.js} +5 -5
- package/dist/{export-B8tPsf4K.d.ts → export-J13L9Lqu.d.ts} +3 -1
- package/dist/{export-CVXvPLv8.js → export-t8X_oRws.js} +23 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -7
- package/dist/{inherit-BYLi3Q28.js → inherit-BUn0Cve9.js} +2 -2
- package/dist/{jar-W2cV2ZVO.js → jar-CBYPMbw7.js} +1 -1
- package/dist/{jar-classes-3GVCJZT7.js → jar-classes-CSm7qq1R.js} +2 -2
- package/dist/light-CyRhYulM.js +582 -0
- package/dist/light-bytecode-Cpyuxo9b.js +1749 -0
- package/dist/light-eval-BsJJoSv4.js +23 -0
- package/dist/light-eval-D9x0ufZx.d.ts +13 -0
- package/dist/{link-5GmBLTzk.js → link-Cuhyrz07.js} +1 -1
- package/dist/{mappings-BEPVaiwE.js → mappings-Ep6ko0rg.js} +77 -9
- package/dist/{mappings-DxX4KoZl.d.ts → mappings-USwcjtcH.d.ts} +28 -2
- package/dist/{model-bytecode-B43uSqet.js → model-bytecode-VaLUQfGO.js} +2 -2
- package/dist/{model-code-BY44ao27.d.ts → model-code-Csc3bs3h.d.ts} +1 -1
- package/dist/{model-code-1Vuk-zj_.js → model-code-DbN2uVhp.js} +1 -1
- package/dist/mods/prepare.js +1 -1
- package/dist/mods/tints.js +1 -1
- package/dist/{pack-format-Baoc_aSZ.d.ts → pack-format-BqWf-DNc.d.ts} +23 -1
- package/dist/pack.d.ts +3 -2
- package/dist/pack.js +2 -1
- package/dist/{pipeline-Cci24Kb4.js → pipeline-CRTQGba7.js} +1 -1
- package/dist/{prepare-D49Gu4Lv.js → prepare-C61BcwFA.js} +2 -2
- package/dist/{prepare-Myd_ec4v.js → prepare-DxPEu9mo.js} +2 -2
- package/dist/{registry-DlduyjtM.js → registry-DafxsAhG.js} +1 -1
- package/dist/render/pipeline.js +1 -1
- package/dist/resources/descriptor.js +1 -1
- package/dist/resources/jar.js +1 -1
- package/dist/resources/zip-reader.js +1 -1
- package/dist/{run--oW_h01E.js → run-DYcem_Vv.js} +2 -2
- 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/versions/prepare.js +1 -1
- package/dist/workers/render-worker.js +2 -2
- package/package.json +6 -6
- package/dist/{tints-BspVCz2G.js → tints-CWQz6UkM.js} +1 -1
- package/dist/{zip-reader-BSbJKUT1.js → zip-reader-zx3kdSq4.js} +1 -1
|
@@ -5,15 +5,16 @@ import { a as parseBlockState, n as collectModels } from "./blockstate-eval-CV_L
|
|
|
5
5
|
import { a as salvageJson, i as resolveTexture, t as ModelLoader } from "./loader-qOH0Jynq.js";
|
|
6
6
|
import { t as enderStorageBlockModel } from "./ender-storage-Dgomp6r2.js";
|
|
7
7
|
import { t as collectEntities } from "./entities-rQ4TZjEo.js";
|
|
8
|
-
import { n as collectEntityGeometry } from "./entity-models-
|
|
8
|
+
import { n as collectEntityGeometry } from "./entity-models-BGiy3pey.js";
|
|
9
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
|
+
import { n as LayeredResourceManager, t as FolderResourceManager } from "./manager-BNibYkmI.js";
|
|
13
|
+
import { n as collectBlockLight } from "./light-CyRhYulM.js";
|
|
12
14
|
import { n as buildObjMesh } from "./obj-mesh-BFhtTBXX.js";
|
|
13
15
|
import { n as buildSpriteSheet, t as MISSING_SPRITE } from "./sprite-sheet-LQAEtGkp.js";
|
|
14
16
|
import { n as buildBlockTints, t as UNREGISTERED_TINTS } from "./tints-Cl0r-Ol3.js";
|
|
15
|
-
import { t as loadAtlasResolver } from "./registry-
|
|
16
|
-
import { n as LayeredResourceManager, t as FolderResourceManager } from "./manager-BNibYkmI.js";
|
|
17
|
+
import { t as loadAtlasResolver } from "./registry-DafxsAhG.js";
|
|
17
18
|
import { n as TextureLoader } from "./loader-CsgtBuBo.js";
|
|
18
19
|
import path from "node:path";
|
|
19
20
|
import { createHash } from "node:crypto";
|
|
@@ -693,6 +694,23 @@ async function exportBlockPack(options) {
|
|
|
693
694
|
});
|
|
694
695
|
}
|
|
695
696
|
}
|
|
697
|
+
let lightPack = {};
|
|
698
|
+
if (options.classes) {
|
|
699
|
+
const collected = await collectBlockLight({
|
|
700
|
+
version,
|
|
701
|
+
cacheDir: options.cacheDir ?? output,
|
|
702
|
+
classes: options.classes,
|
|
703
|
+
blockIds: [.../* @__PURE__ */ new Set([...blockLocators.map((locator) => locator.toString()), ...Object.keys(blockStates)])],
|
|
704
|
+
onProgress: (count, total) => report("light", count, total)
|
|
705
|
+
});
|
|
706
|
+
lightPack = sortedByKey(collected.light);
|
|
707
|
+
for (const failure of collected.failures) failures.push({
|
|
708
|
+
id: failure.id,
|
|
709
|
+
kind: "light",
|
|
710
|
+
reason: failure.reason
|
|
711
|
+
});
|
|
712
|
+
if (process.env.RENDERMITE_LIGHT_DEBUG) console.error(collected.notes.join("\n"));
|
|
713
|
+
}
|
|
696
714
|
const biomes = await buildBiomeClimates(resources, namespaces);
|
|
697
715
|
let itemPack = null;
|
|
698
716
|
let itemPages = [];
|
|
@@ -885,6 +903,7 @@ async function exportBlockPack(options) {
|
|
|
885
903
|
await emit("models.json", JSON.stringify(sortedByKey(emittedModels)));
|
|
886
904
|
await emit("blockstates.json", JSON.stringify(sortedByKey(blockStates)));
|
|
887
905
|
await emit("tints.json", JSON.stringify(tints.pack));
|
|
906
|
+
if (Object.keys(lightPack).length > 0) await emit("light.json", JSON.stringify(lightPack));
|
|
888
907
|
if (Object.keys(biomes.pack).length > 0) await emit("biomes.json", JSON.stringify(sortedByKey(biomes.pack)));
|
|
889
908
|
for (const biome of biomes.unreadable) failures.push({
|
|
890
909
|
id: biome,
|
|
@@ -902,6 +921,7 @@ async function exportBlockPack(options) {
|
|
|
902
921
|
items: Object.keys(itemPack?.items ?? {}).length,
|
|
903
922
|
entities: Object.keys(entityPack ?? {}).length,
|
|
904
923
|
entityModels: Object.keys(entityModelPack?.models ?? {}).length,
|
|
924
|
+
light: Object.keys(lightPack).length,
|
|
905
925
|
failures: failures.length
|
|
906
926
|
};
|
|
907
927
|
await emit("meta.json", JSON.stringify({
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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";
|
|
8
8
|
import { a as BlockStateMultipartCase, d as matchesCondition, f as parseBlockState, i as BlockStateError, l as collectModels, n as BlockProperties, o as BlockStateVariantCase, p as weightedVariantIndex, r as BlockStateDefinition, s as MultipartCondition, t as BlockModelVariant, u as evaluateBlockState } from "./blockstate-eval-BzznRcVY.js";
|
|
9
9
|
import { i as buildObjMesh, n as ObjMesh, r as ObjMeshError, t as MeshGroup } from "./obj-mesh-ydhVfLKs.js";
|
|
10
10
|
import { a as buildBlockTints, i as UNREGISTERED_TINTS, n as BlockTintPack, t as BlockTint } from "./tints-CQX8a1F0.js";
|
|
11
|
-
import { i as exportBlockPack, n as BlockPackResult, r as ExportBlockPackOptions, t as BlockPackFailure } from "./export-
|
|
11
|
+
import { i as exportBlockPack, n as BlockPackResult, r as ExportBlockPackOptions, t as BlockPackFailure } from "./export-J13L9Lqu.js";
|
|
12
12
|
import { s as builtinDynamicResources } from "./generators-BnIzAftW.js";
|
|
13
13
|
import { d as toFloatTexture, n as FloatTexture, u as toByteTexture } from "./blend-C5UYzink.js";
|
|
14
14
|
import { a as LightingProfileName, i as LightingProfile, r as LightSource, u as lightsForProfile } from "./lighting-3FGRC3Af.js";
|
package/dist/index.js
CHANGED
|
@@ -8,19 +8,19 @@ import { a as ItemRenderError, c as renderModel, l as renderModelFrames, o as bo
|
|
|
8
8
|
import { a as defaultProperties, i as UNKNOWN_MODEL, n as InvalidItemDefinitionError, o as evaluateItemModel } from "./definition-ColsvWrH.js";
|
|
9
9
|
import { i as resolveItem, n as discoverItems, t as ItemResolutionError } from "./discovery-CD0QqxSF.js";
|
|
10
10
|
import { a as resolveTints, i as resolveTint, n as InvalidTinterDefinitionError, r as parseTintValue, t as DYE_COLORS } from "./tints-B3WQcPtx.js";
|
|
11
|
+
import { n as LayeredResourceManager, r as ResourceKind, t as FolderResourceManager } from "./manager-BNibYkmI.js";
|
|
12
|
+
import { n as UnsafeJarError, r as isUnsafeEntryPath, t as JarResourceManager } from "./jar-CBYPMbw7.js";
|
|
13
|
+
import { a as prepareVersionResources, i as eraForVersion, r as compareVersions } from "./prepare-C61BcwFA.js";
|
|
11
14
|
import { n as buildObjMesh, t as ObjMeshError } from "./obj-mesh-BFhtTBXX.js";
|
|
12
15
|
import { t as packAtlas } from "./atlas-pack-CoOih7By.js";
|
|
13
16
|
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-
|
|
15
|
-
import { n as LayeredResourceManager, r as ResourceKind, t as FolderResourceManager } from "./manager-BNibYkmI.js";
|
|
17
|
+
import { o as createAtlasResolver, s as parseAtlasSources, t as AtlasSourceError } from "./sources-DYY5Qu-t.js";
|
|
16
18
|
import { n as TextureLoader, r as TextureResolutionError, t as AnimatedTexture } from "./loader-CsgtBuBo.js";
|
|
17
|
-
import { t as exportBlockPack } from "./export-
|
|
18
|
-
import { n as
|
|
19
|
-
import { n as prepareModResources } from "./prepare-Myd_ec4v.js";
|
|
20
|
-
import { a as prepareVersionResources, i as eraForVersion, r as compareVersions } from "./prepare-D49Gu4Lv.js";
|
|
19
|
+
import { t as exportBlockPack } from "./export-t8X_oRws.js";
|
|
20
|
+
import { n as prepareModResources } from "./prepare-DxPEu9mo.js";
|
|
21
21
|
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-DYcem_Vv.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 };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as parseClassFile } from "./classfile-
|
|
1
|
+
import { t as parseClassFile } from "./classfile-CiIDF3vc.js";
|
|
2
2
|
import { a as mergeModels, i as dedupeCubes } from "./merge-DeHruviG.js";
|
|
3
|
-
import { n as extractModel } from "./model-bytecode-
|
|
3
|
+
import { n as extractModel } from "./model-bytecode-VaLUQfGO.js";
|
|
4
4
|
//#region src/entities/inherit.ts
|
|
5
5
|
/**
|
|
6
6
|
* A model class read together with its ancestors.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as ResourceLocator } from "./locator-COMEtEn9.js";
|
|
2
2
|
import { r as ResourceKind } from "./manager-BNibYkmI.js";
|
|
3
|
-
import { t as openZip } from "./zip-reader-
|
|
3
|
+
import { t as openZip } from "./zip-reader-zx3kdSq4.js";
|
|
4
4
|
//#region src/resources/jar.ts
|
|
5
5
|
/**
|
|
6
6
|
* Reads resources directly out of a jar/zip — no extraction step, unlike the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as openZip } from "./zip-reader-
|
|
2
|
-
import { n as UnsafeJarError, r as isUnsafeEntryPath } from "./jar-
|
|
1
|
+
import { t as openZip } from "./zip-reader-zx3kdSq4.js";
|
|
2
|
+
import { n as UnsafeJarError, r as isUnsafeEntryPath } from "./jar-CBYPMbw7.js";
|
|
3
3
|
//#region src/entities/jar-classes.ts
|
|
4
4
|
/**
|
|
5
5
|
* Reading `.class` entries out of a jar.
|