@nodecraft/rendermite 1.0.7 → 1.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.
Files changed (171) hide show
  1. package/assets/README.md +6 -2
  2. package/assets/builtin/renderchest/models/item/trident.json +372 -0
  3. package/assets/builtin-legacy/renderchest/models/item/trident.json +372 -0
  4. package/assets/mod-models/README.md +130 -0
  5. package/assets/mod-models/ad_astra/models/item/tier_1_rocket.json +4559 -0
  6. package/assets/mod-models/ad_astra/models/item/tier_1_rover.json +6021 -0
  7. package/assets/mod-models/ad_astra/models/item/tier_2_rocket.json +6832 -0
  8. package/assets/mod-models/ad_astra/models/item/tier_3_rocket.json +8522 -0
  9. package/assets/mod-models/ad_astra/models/item/tier_4_rocket.json +7498 -0
  10. package/assets/mod-models/botania/models/item/avatar.json +574 -0
  11. package/assets/mod-models/botania/models/item/bellows.json +423 -0
  12. package/assets/mod-models/botania/models/item/brewery.json +894 -0
  13. package/assets/mod-models/botania/models/item/corporea_index.json +349 -0
  14. package/assets/mod-models/botania/models/item/gaia_pylon.json +1057 -0
  15. package/assets/mod-models/botania/models/item/hourglass.json +502 -0
  16. package/assets/mod-models/botania/models/item/mana_pylon.json +741 -0
  17. package/assets/mod-models/botania/models/item/natura_pylon.json +1057 -0
  18. package/assets/mod-models/botania/models/item/teru_teru_bozu.json +347 -0
  19. package/assets/mod-models/mekanism/models/item/atomic_disassembler.json +1391 -0
  20. package/assets/mod-models/mekanism/models/item/flamethrower.json +1926 -0
  21. package/assets/mod-models/mekanism/models/item/free_runners.json +595 -0
  22. package/assets/mod-models/mekanism/models/item/jetpack.json +1767 -0
  23. package/assets/mod-models/mekanism/models/item/scuba_mask.json +2305 -0
  24. package/assets/mod-models/mekanism/models/item/scuba_tank.json +833 -0
  25. package/assets/mod-tints/README.md +19 -0
  26. package/assets/mod-tints/mysticalagriculture/items/absorption_i_augment.json +16 -0
  27. package/assets/mod-tints/mysticalagriculture/items/absorption_ii_augment.json +16 -0
  28. package/assets/mod-tints/mysticalagriculture/items/absorption_iii_augment.json +16 -0
  29. package/assets/mod-tints/mysticalagriculture/items/absorption_iv_augment.json +16 -0
  30. package/assets/mod-tints/mysticalagriculture/items/absorption_v_augment.json +16 -0
  31. package/assets/mod-tints/mysticalagriculture/items/attack_aoe_i_augment.json +16 -0
  32. package/assets/mod-tints/mysticalagriculture/items/attack_aoe_ii_augment.json +16 -0
  33. package/assets/mod-tints/mysticalagriculture/items/attack_aoe_iii_augment.json +16 -0
  34. package/assets/mod-tints/mysticalagriculture/items/blindness_resistance_augment.json +16 -0
  35. package/assets/mod-tints/mysticalagriculture/items/fire_resistance_augment.json +16 -0
  36. package/assets/mod-tints/mysticalagriculture/items/flight_augment.json +16 -0
  37. package/assets/mod-tints/mysticalagriculture/items/haste_i_augment.json +16 -0
  38. package/assets/mod-tints/mysticalagriculture/items/haste_ii_augment.json +16 -0
  39. package/assets/mod-tints/mysticalagriculture/items/haste_iii_augment.json +16 -0
  40. package/assets/mod-tints/mysticalagriculture/items/health_boost_i_augment.json +16 -0
  41. package/assets/mod-tints/mysticalagriculture/items/health_boost_ii_augment.json +16 -0
  42. package/assets/mod-tints/mysticalagriculture/items/health_boost_iii_augment.json +16 -0
  43. package/assets/mod-tints/mysticalagriculture/items/health_boost_iv_augment.json +16 -0
  44. package/assets/mod-tints/mysticalagriculture/items/health_boost_v_augment.json +16 -0
  45. package/assets/mod-tints/mysticalagriculture/items/hunger_resistance_augment.json +16 -0
  46. package/assets/mod-tints/mysticalagriculture/items/jump_boost_i_augment.json +16 -0
  47. package/assets/mod-tints/mysticalagriculture/items/jump_boost_ii_augment.json +16 -0
  48. package/assets/mod-tints/mysticalagriculture/items/jump_boost_iii_augment.json +16 -0
  49. package/assets/mod-tints/mysticalagriculture/items/luck_i_augment.json +16 -0
  50. package/assets/mod-tints/mysticalagriculture/items/luck_ii_augment.json +16 -0
  51. package/assets/mod-tints/mysticalagriculture/items/luck_iii_augment.json +16 -0
  52. package/assets/mod-tints/mysticalagriculture/items/mining_aoe_i_augment.json +16 -0
  53. package/assets/mod-tints/mysticalagriculture/items/mining_aoe_ii_augment.json +16 -0
  54. package/assets/mod-tints/mysticalagriculture/items/mining_aoe_iii_augment.json +16 -0
  55. package/assets/mod-tints/mysticalagriculture/items/mining_aoe_iv_augment.json +16 -0
  56. package/assets/mod-tints/mysticalagriculture/items/mining_fatigue_resistance_augment.json +16 -0
  57. package/assets/mod-tints/mysticalagriculture/items/nausea_resistance_augment.json +16 -0
  58. package/assets/mod-tints/mysticalagriculture/items/night_vision_augment.json +16 -0
  59. package/assets/mod-tints/mysticalagriculture/items/pathing_aoe_i_augment.json +16 -0
  60. package/assets/mod-tints/mysticalagriculture/items/pathing_aoe_ii_augment.json +16 -0
  61. package/assets/mod-tints/mysticalagriculture/items/pathing_aoe_iii_augment.json +16 -0
  62. package/assets/mod-tints/mysticalagriculture/items/pathing_aoe_iv_augment.json +16 -0
  63. package/assets/mod-tints/mysticalagriculture/items/poison_resistance_augment.json +16 -0
  64. package/assets/mod-tints/mysticalagriculture/items/slow_falling_augment.json +16 -0
  65. package/assets/mod-tints/mysticalagriculture/items/slowness_resistance_augment.json +16 -0
  66. package/assets/mod-tints/mysticalagriculture/items/speed_i_augment.json +16 -0
  67. package/assets/mod-tints/mysticalagriculture/items/speed_ii_augment.json +16 -0
  68. package/assets/mod-tints/mysticalagriculture/items/speed_iii_augment.json +16 -0
  69. package/assets/mod-tints/mysticalagriculture/items/step_assist_augment.json +16 -0
  70. package/assets/mod-tints/mysticalagriculture/items/strength_i_augment.json +16 -0
  71. package/assets/mod-tints/mysticalagriculture/items/strength_ii_augment.json +16 -0
  72. package/assets/mod-tints/mysticalagriculture/items/strength_iii_augment.json +16 -0
  73. package/assets/mod-tints/mysticalagriculture/items/tilling_aoe_i_augment.json +16 -0
  74. package/assets/mod-tints/mysticalagriculture/items/tilling_aoe_ii_augment.json +16 -0
  75. package/assets/mod-tints/mysticalagriculture/items/tilling_aoe_iii_augment.json +16 -0
  76. package/assets/mod-tints/mysticalagriculture/items/tilling_aoe_iv_augment.json +16 -0
  77. package/assets/mod-tints/mysticalagriculture/items/water_breathing_augment.json +16 -0
  78. package/assets/mod-tints/mysticalagriculture/items/weakness_resistance_augment.json +16 -0
  79. package/assets/mod-tints/mysticalagriculture/items/wither_resistance_augment.json +16 -0
  80. package/dist/atlas/registry.js +1 -1
  81. package/dist/blend-8lnfxtLe.d.ts +79 -0
  82. package/dist/blend-KXMclcHk.js +199 -0
  83. package/dist/blockstate-CdstnW2-.js +104 -0
  84. package/dist/{builtin-caYjESh0.js → builtin-WkWjATeh.js} +5 -1
  85. package/dist/builtin.d.ts +3 -1
  86. package/dist/builtin.js +2 -2
  87. package/dist/cli.js +5 -3
  88. package/dist/{compose-lWPrB7wh.js → compose-BGsNFR12.js} +1 -1
  89. package/dist/{definition-3MBm8ar_.js → definition-ColsvWrH.js} +20 -1
  90. package/dist/{definition-BwX6Xxv0.d.ts → definition-ricL7Jqf.d.ts} +2 -0
  91. package/dist/{discovery-0SM0cTLw.js → discovery-B9aqV_Rz.js} +13 -3
  92. package/dist/{discovery-wiJBGryo.d.ts → discovery-BPSUtdm4.d.ts} +1 -1
  93. package/dist/{encode-CaSK8-mi.d.ts → encode-DNcXXvYe.d.ts} +1 -1
  94. package/dist/{encode-Df_tWzkl.js → encode-LR9wxigC.js} +1 -1
  95. package/dist/{entity-fallback-D9QTGU9X.js → entity-fallback-BnFMSHS6.js} +180 -10
  96. package/dist/{face-Cl1O4m2i.js → face-CMJ3b3Ae.js} +44 -18
  97. package/dist/face-cQ-pVHoe.d.ts +44 -0
  98. package/dist/{fluid-bucket-D-GpUQjg.js → fluid-bucket-BzoLofB_.js} +7 -2
  99. package/dist/{geo-DHiWBa-C.js → geo-w9HHIrb5.js} +87 -13
  100. package/dist/{geometry-uIDha8S4.js → geometry-Bi-Bf5rb.js} +7 -1
  101. package/dist/{geometry-BSVmKx5b.d.ts → geometry-w0yQbzDZ.d.ts} +5 -1
  102. package/dist/index.d.ts +9 -9
  103. package/dist/index.js +10 -10
  104. package/dist/items/blockstate.d.ts +23 -0
  105. package/dist/items/blockstate.js +2 -0
  106. package/dist/items/definition.d.ts +1 -1
  107. package/dist/items/definition.js +1 -1
  108. package/dist/items/discovery.d.ts +1 -1
  109. package/dist/items/discovery.js +1 -1
  110. package/dist/{loader-D22zZME7.d.ts → loader-DD83d80u.d.ts} +2 -1
  111. package/dist/{loader-B8NJO7pR.js → loader-DwkA9LR5.js} +267 -15
  112. package/dist/{loader-CfXMxcEV.js → loader-Lb0ZeILz.js} +19 -7
  113. package/dist/models/loader.d.ts +1 -1
  114. package/dist/models/loader.js +1 -1
  115. package/dist/models/types.d.ts +1 -1
  116. package/dist/models-BKxGkPS7.js +18 -0
  117. package/dist/mods/models.d.ts +5 -0
  118. package/dist/mods/models.js +2 -0
  119. package/dist/mods/prepare.d.ts +1 -1
  120. package/dist/mods/prepare.js +1 -1
  121. package/dist/mods/tints.js +1 -1
  122. package/dist/output/encode.d.ts +1 -1
  123. package/dist/output/encode.js +1 -1
  124. package/dist/{pipeline-Da2Kavba.js → pipeline-BVYj7OP0.js} +72 -19
  125. package/dist/{pipeline-HiA3DC71.d.ts → pipeline-CJNiQG-1.d.ts} +15 -5
  126. package/dist/{prepare-BESRrh6K.js → prepare-D56Z-9cg.js} +7 -2
  127. package/dist/{prepare-CPxO0kKz.d.ts → prepare-Dce7-HAe.d.ts} +8 -0
  128. package/dist/{rasterizer-B9ZGJI3-.d.ts → rasterizer-BSQHEhJ-.d.ts} +4 -2
  129. package/dist/{rasterizer-76qO8TDh.js → rasterizer-DcVJzkxz.js} +13 -5
  130. package/dist/{registry-B9TcjVbs.js → registry-DS5PZ57l.js} +8 -1
  131. package/dist/render/blend.d.ts +2 -2
  132. package/dist/render/blend.js +2 -2
  133. package/dist/render/compose.d.ts +2 -2
  134. package/dist/render/compose.js +1 -1
  135. package/dist/render/entity-fallback.d.ts +19 -5
  136. package/dist/render/entity-fallback.js +2 -2
  137. package/dist/render/face.d.ts +2 -2
  138. package/dist/render/face.js +2 -2
  139. package/dist/render/fluid-bucket.js +1 -1
  140. package/dist/render/geo.d.ts +3 -3
  141. package/dist/render/geo.js +1 -1
  142. package/dist/render/geometry.d.ts +1 -1
  143. package/dist/render/geometry.js +1 -1
  144. package/dist/render/legacy-tints.d.ts +1 -1
  145. package/dist/render/obj.d.ts +5 -3
  146. package/dist/render/obj.js +1 -1
  147. package/dist/render/pipeline.d.ts +1 -1
  148. package/dist/render/pipeline.js +1 -1
  149. package/dist/render/rasterizer.d.ts +1 -1
  150. package/dist/render/rasterizer.js +1 -1
  151. package/dist/render/renderer.d.ts +1 -1
  152. package/dist/render/renderer.js +1 -1
  153. package/dist/render/tints.d.ts +1 -1
  154. package/dist/render/tints.js +1 -1
  155. package/dist/{renderer-B20ssjRm.d.ts → renderer-C79EQDSn.d.ts} +3 -3
  156. package/dist/{renderer-gQW_I7YG.js → renderer-oi1MSF3Y.js} +21 -10
  157. package/dist/{run-B0qPw3zf.js → run-C6AP3Bn8.js} +3 -3
  158. package/dist/{run-CT3VtFqg.d.ts → run-uq8_hUx9.d.ts} +1 -1
  159. package/dist/run.d.ts +2 -2
  160. package/dist/run.js +2 -2
  161. package/dist/textures/loader.js +1 -1
  162. package/dist/{tints-BtbHegpI.js → tints-3VI_2SNy.js} +107 -1
  163. package/dist/{tints-B8UJmZMu.js → tints-CebmvjmP.js} +2 -2
  164. package/dist/{tints-BH9l0ND0.d.ts → tints-Do9Sh3dg.d.ts} +2 -2
  165. package/dist/{types-COGbtA1t.d.ts → types-DpRSF9Vj.d.ts} +8 -0
  166. package/dist/workers/render-worker.d.ts +1 -1
  167. package/dist/workers/render-worker.js +1 -1
  168. package/package.json +1 -1
  169. package/dist/blend-CEHoJ7tM.d.ts +0 -37
  170. package/dist/blend-D0XWgVQr.js +0 -102
  171. package/dist/face-C49L66sQ.d.ts +0 -30
@@ -1,5 +1,6 @@
1
1
  import { n as LayeredResourceManager } from "./manager-CkletR5K.js";
2
- import { n as harvestTintOverrides, t as curatedTintOverrides } from "./tints-B8UJmZMu.js";
2
+ import { t as curatedModelOverrides } from "./models-BKxGkPS7.js";
3
+ import { n as harvestTintOverrides, t as curatedTintOverrides } from "./tints-CebmvjmP.js";
3
4
  import { n as UnsafeJarError, t as JarResourceManager } from "./jar-D9z-X7tA.js";
4
5
  import { t as synthesizeItemModels } from "./synthesize-3Q0aaOnK.js";
5
6
  //#region src/mods/prepare.ts
@@ -47,6 +48,7 @@ async function prepareModResources(options) {
47
48
  const base = new LayeredResourceManager([
48
49
  options.vanilla,
49
50
  curatedTintOverrides(),
51
+ curatedModelOverrides(),
50
52
  ...jarLayers
51
53
  ]);
52
54
  const namespaces = [];
@@ -89,7 +91,10 @@ async function prepareModResources(options) {
89
91
  namespaces,
90
92
  synthesized,
91
93
  tintOverrides,
92
- rejected
94
+ rejected,
95
+ close: async () => {
96
+ await Promise.all(jarLayers.map(async (jar) => jar.close().catch(() => {})));
97
+ }
93
98
  };
94
99
  }
95
100
  //#endregion
@@ -15,6 +15,14 @@ interface ModPreparation {
15
15
  jar: string;
16
16
  reason: string;
17
17
  }>;
18
+ /**
19
+ * Releases the jars this opened. Jars are opened with `autoClose: false` and
20
+ * keep both a file descriptor and an entry index per archive, so anything
21
+ * preparing many trees in one process (a corpus survey) must call this —
22
+ * without it the descriptors and indexes accumulate until the process dies.
23
+ * A single-tree caller can skip it and let exit clean up.
24
+ */
25
+ close(): Promise<void>;
18
26
  }
19
27
  interface PrepareModsOptions {
20
28
  jars: string[];
@@ -1,4 +1,4 @@
1
- import { t as FloatTexture } from "./blend-CEHoJ7tM.js";
1
+ import { n as FloatTexture, t as FaceShading } from "./blend-8lnfxtLe.js";
2
2
  //#region src/render/rasterizer.d.ts
3
3
  /** The rectangle of a buffer written since it was last cleared. */
4
4
  interface DirtyRect {
@@ -64,6 +64,8 @@ declare class RowCursor {
64
64
  }
65
65
  /** PHP round(): half away from zero, unlike Math.round's half toward +Infinity. */
66
66
  declare function phpRound(value: number): number;
67
- declare function drawTexturedTriangle(p1in: RasterPoint, p2in: RasterPoint, p3in: RasterPoint, buffer: FaceBuffer, texture: FloatTexture, cursor?: RowCursor): void;
67
+ declare function drawTexturedTriangle(p1in: RasterPoint, p2in: RasterPoint, p3in: RasterPoint, buffer: FaceBuffer, texture: FloatTexture, cursor?: RowCursor,
68
+ /** Applied per sample; null leaves the texel as-is. */
69
+ shading?: FaceShading | null): void;
68
70
  //#endregion
69
71
  export { clearFaceBuffer as a, drawTexturedTriangle as c, RowCursor as i, phpRound as l, FaceBuffer as n, compactFaceBuffer as o, RasterPoint as r, createFaceBuffer as s, DirtyRect as t };
@@ -1,4 +1,10 @@
1
+ import { o as shadeTexel } from "./blend-KXMclcHk.js";
1
2
  //#region src/render/rasterizer.ts
3
+ /**
4
+ * Faithful port of renderchest's TriangleRasterizer (scanline, nearest-neighbour
5
+ * sampling by truncation, 0.3 sub-texel start bias, 1px color overdraw with
6
+ * depth written only inside the span). See docs/research/renderchest-spec.md §4.4.
7
+ */
2
8
  function createFaceBuffer(width, height) {
3
9
  return {
4
10
  x: 0,
@@ -111,7 +117,7 @@ var RowCursor = class {
111
117
  function phpRound(value) {
112
118
  return value < 0 ? -Math.round(-value) : Math.round(value);
113
119
  }
114
- function drawTexturedTriangle(p1in, p2in, p3in, buffer, texture, cursor = new RowCursor()) {
120
+ function drawTexturedTriangle(p1in, p2in, p3in, buffer, texture, cursor = new RowCursor(), shading = null) {
115
121
  const { width, height } = buffer;
116
122
  const [p1, p2, p3] = [
117
123
  p1in,
@@ -185,10 +191,12 @@ function drawTexturedTriangle(p1in, p2in, p3in, buffer, texture, cursor = new Ro
185
191
  texY = texY < 0 ? 0 : texY >= texture.height ? texture.height - 1 : texY;
186
192
  const src = (texY * texture.width + texX) * 4;
187
193
  const dst = (rowOffset + x) * 4;
188
- buffer.colors[dst] = texture.data[src];
189
- buffer.colors[dst + 1] = texture.data[src + 1];
190
- buffer.colors[dst + 2] = texture.data[src + 2];
191
- buffer.colors[dst + 3] = texture.data[src + 3];
194
+ if (shading === null) {
195
+ buffer.colors[dst] = texture.data[src];
196
+ buffer.colors[dst + 1] = texture.data[src + 1];
197
+ buffer.colors[dst + 2] = texture.data[src + 2];
198
+ buffer.colors[dst + 3] = texture.data[src + 3];
199
+ } else shadeTexel(buffer.colors, dst, texture.data, src, shading, texX, texY);
192
200
  }
193
201
  if (x >= startX && x < endX && x >= 0 && x < width) {
194
202
  const clamped = currentDepth < 0 ? 0 : Math.min(currentDepth, 1);
@@ -33,7 +33,14 @@ var InferredItemTrimSource = class {
33
33
  const base = new ResourceLocator(locator.namespace, basePath);
34
34
  if (!await this.resources.hasResource("texture", base)) return null;
35
35
  const key = await this.firstTexture([new ResourceLocator(locator.namespace, "trims/color_palettes/trim_palette"), ResourceLocator.parse("minecraft:trims/color_palettes/trim_palette")]);
36
- const palette = await this.firstTexture([new ResourceLocator(locator.namespace, `trims/color_palettes/${variant}`), ResourceLocator.parse(`minecraft:trims/color_palettes/${variant}`)]);
36
+ const separator = variant.indexOf("-");
37
+ const namespaced = (await this.resources.listNamespaces()).filter((namespace) => variant.startsWith(`${namespace}_`)).map((namespace) => new ResourceLocator(namespace, `trims/color_palettes/${variant.slice(namespace.length + 1)}`));
38
+ const palette = await this.firstTexture([
39
+ new ResourceLocator(locator.namespace, `trims/color_palettes/${variant}`),
40
+ ResourceLocator.parse(`minecraft:trims/color_palettes/${variant}`),
41
+ ...separator > 0 ? [new ResourceLocator(variant.slice(0, separator), `trims/color_palettes/${variant.slice(separator + 1)}`)] : [],
42
+ ...namespaced
43
+ ]);
37
44
  if (!key || !palette) return null;
38
45
  return new PalettedPermutationsSource({
39
46
  textures: [base.toString()],
@@ -1,2 +1,2 @@
1
- import { a as q16, c as toFloatTexture, i as darkenTexture, n as blendPixel, o as tintTexture, r as cloneFloatTexture, s as toByteTexture, t as FloatTexture } from "../blend-CEHoJ7tM.js";
2
- export { FloatTexture, blendPixel, cloneFloatTexture, darkenTexture, q16, tintTexture, toByteTexture, toFloatTexture };
1
+ import { a as darkenTexture, c as shadeTexel, d as toFloatTexture, f as uvWindow, i as cloneFloatTexture, l as tintTexture, n as FloatTexture, o as q16, r as blendPixel, s as scaleTextureAlpha, t as FaceShading, u as toByteTexture } from "../blend-8lnfxtLe.js";
2
+ export { FaceShading, FloatTexture, blendPixel, cloneFloatTexture, darkenTexture, q16, scaleTextureAlpha, shadeTexel, tintTexture, toByteTexture, toFloatTexture, uvWindow };
@@ -1,2 +1,2 @@
1
- import { a as tintTexture, i as q16, n as cloneFloatTexture, o as toByteTexture, r as darkenTexture, s as toFloatTexture, t as blendPixel } from "../blend-D0XWgVQr.js";
2
- export { blendPixel, cloneFloatTexture, darkenTexture, q16, tintTexture, toByteTexture, toFloatTexture };
1
+ import { a as scaleTextureAlpha, c as toByteTexture, i as q16, l as toFloatTexture, n as cloneFloatTexture, o as shadeTexel, r as darkenTexture, s as tintTexture, t as blendPixel, u as uvWindow } from "../blend-KXMclcHk.js";
2
+ export { blendPixel, cloneFloatTexture, darkenTexture, q16, scaleTextureAlpha, shadeTexel, tintTexture, toByteTexture, toFloatTexture, uvWindow };
@@ -1,5 +1,5 @@
1
- import { t as FloatTexture } from "../blend-CEHoJ7tM.js";
2
- import { n as FaceBuffer } from "../rasterizer-B9ZGJI3-.js";
1
+ import { n as FloatTexture } from "../blend-8lnfxtLe.js";
2
+ import { n as FaceBuffer } from "../rasterizer-BSQHEhJ-.js";
3
3
  //#region src/render/compose.d.ts
4
4
  declare function combineFaceBuffers(width: number, height: number, faces: FaceBuffer[]): FloatTexture;
5
5
  //#endregion
@@ -1,2 +1,2 @@
1
- import { t as combineFaceBuffers } from "../compose-lWPrB7wh.js";
1
+ import { t as combineFaceBuffers } from "../compose-BGsNFR12.js";
2
2
  export { combineFaceBuffers };
@@ -1,10 +1,24 @@
1
1
  import { a as ResourceManager } from "../manager-Cv1NeFyF.js";
2
2
  import { i as TextureLoader } from "../loader-Myy22TDL.js";
3
- import { t as ModelLoader } from "../loader-D22zZME7.js";
4
- import { t as FloatTexture } from "../blend-CEHoJ7tM.js";
5
- import { r as TintColor } from "../face-C49L66sQ.js";
6
- import { i as RenderOptions } from "../renderer-B20ssjRm.js";
3
+ import { t as ModelLoader } from "../loader-DD83d80u.js";
4
+ import { n as FloatTexture } from "../blend-8lnfxtLe.js";
5
+ import { r as TintColor } from "../face-cQ-pVHoe.js";
6
+ import { i as RenderOptions } from "../renderer-C79EQDSn.js";
7
7
  //#region src/render/entity-fallback.d.ts
8
+ /** The dye name a `<dye>_<thing>` mod item is prefixed with, or null. */
9
+ declare function dyeVariantName(id: string): string | null;
10
+ /**
11
+ * The dye color a `<dye>_<thing>` item name implies, or null. Mods that name
12
+ * variants after dyes sometimes register the matching DyeColor as the tint in
13
+ * client code, where no asset states it (waystones' sharestones call
14
+ * `DyeColor.getTextColor()`), so the name is the only record of it left.
15
+ *
16
+ * Only ever right for variants that SHARE one uncoloured sprite. A mod that
17
+ * draws each colour its own texture is already the right colour, and tinting it
18
+ * again multiplies the dye in — chipped's blue_paper_lantern came out near
19
+ * black. Callers must check the model's textures; see `dyeVariantName`.
20
+ */
21
+ declare function dyedVariantTint(id: string): TintColor | null;
8
22
  /**
9
23
  * Dyed variants of vanilla items whose models mods generate at runtime (quark's
10
24
  * `black_frame_empty` parents a block model that exists nowhere on disk): render
@@ -27,4 +41,4 @@ declare function spawnEggTints(id: string, resources: ResourceManager, textures:
27
41
  */
28
42
  declare function renderEntityFallback(id: string, models: ModelLoader, textures: TextureLoader, resources: ResourceManager, options: RenderOptions): Promise<FloatTexture | null>;
29
43
  //#endregion
30
- export { renderDyedVariantFallback, renderEntityFallback, spawnEggTints };
44
+ export { dyeVariantName, dyedVariantTint, renderDyedVariantFallback, renderEntityFallback, spawnEggTints };
@@ -1,2 +1,2 @@
1
- import { n as renderEntityFallback, r as spawnEggTints, t as renderDyedVariantFallback } from "../entity-fallback-D9QTGU9X.js";
2
- export { renderDyedVariantFallback, renderEntityFallback, spawnEggTints };
1
+ import { a as spawnEggTints, i as renderEntityFallback, n as dyedVariantTint, r as renderDyedVariantFallback, t as dyeVariantName } from "../entity-fallback-BnFMSHS6.js";
2
+ export { dyeVariantName, dyedVariantTint, renderDyedVariantFallback, renderEntityFallback, spawnEggTints };
@@ -1,2 +1,2 @@
1
- import { a as renderFace, i as faceMaxZ, n as RenderableFace, r as TintColor, t as FaceShadeCache } from "../face-C49L66sQ.js";
2
- export { FaceShadeCache, RenderableFace, TintColor, faceMaxZ, renderFace };
1
+ import { a as faceMaxZ, i as createShadeCache, n as RenderableFace, o as renderFace, r as TintColor, t as FaceShadeCache } from "../face-cQ-pVHoe.js";
2
+ export { FaceShadeCache, RenderableFace, TintColor, createShadeCache, faceMaxZ, renderFace };
@@ -1,2 +1,2 @@
1
- import { n as renderFace, t as faceMaxZ } from "../face-Cl1O4m2i.js";
2
- export { faceMaxZ, renderFace };
1
+ import { n as faceMaxZ, r as renderFace, t as createShadeCache } from "../face-CMJ3b3Ae.js";
2
+ export { createShadeCache, faceMaxZ, renderFace };
@@ -1,2 +1,2 @@
1
- import { t as paintBucketFluid } from "../fluid-bucket-D-GpUQjg.js";
1
+ import { t as paintBucketFluid } from "../fluid-bucket-BzoLofB_.js";
2
2
  export { paintBucketFluid };
@@ -1,9 +1,9 @@
1
1
  import { n as ResourceLocator } from "../locator-jDbdUeTd.js";
2
2
  import { a as ResourceManager } from "../manager-Cv1NeFyF.js";
3
3
  import { i as TextureLoader } from "../loader-Myy22TDL.js";
4
- import { t as FloatTexture } from "../blend-CEHoJ7tM.js";
5
- import { n as FaceGeometry } from "../geometry-BSVmKx5b.js";
6
- import { i as RenderOptions } from "../renderer-B20ssjRm.js";
4
+ import { n as FloatTexture } from "../blend-8lnfxtLe.js";
5
+ import { n as FaceGeometry } from "../geometry-w0yQbzDZ.js";
6
+ import { i as RenderOptions } from "../renderer-C79EQDSn.js";
7
7
  //#region src/render/geo.d.ts
8
8
  interface GeoCube {
9
9
  origin?: number[];
@@ -1,2 +1,2 @@
1
- import { i as renderGeo, n as geoToFaces, r as parseGeo, t as findGeoForItem } from "../geo-DHiWBa-C.js";
1
+ import { i as renderGeo, n as geoToFaces, r as parseGeo, t as findGeoForItem } from "../geo-w9HHIrb5.js";
2
2
  export { findGeoForItem, geoToFaces, parseGeo, renderGeo };
@@ -1,2 +1,2 @@
1
- import { i as buildElementFaces, n as FaceGeometry, r as applyElementRotation, t as FACE_NORMALS } from "../geometry-BSVmKx5b.js";
1
+ import { i as buildElementFaces, n as FaceGeometry, r as applyElementRotation, t as FACE_NORMALS } from "../geometry-w0yQbzDZ.js";
2
2
  export { FACE_NORMALS, FaceGeometry, applyElementRotation, buildElementFaces };
@@ -1,2 +1,2 @@
1
- import { n as applyElementRotation, r as buildElementFaces, t as FACE_NORMALS } from "../geometry-uIDha8S4.js";
1
+ import { n as applyElementRotation, r as buildElementFaces, t as FACE_NORMALS } from "../geometry-Bi-Bf5rb.js";
2
2
  export { FACE_NORMALS, applyElementRotation, buildElementFaces };
@@ -1,5 +1,5 @@
1
1
  import { i as TextureLoader } from "../loader-Myy22TDL.js";
2
- import { r as TintColor } from "../face-C49L66sQ.js";
2
+ import { r as TintColor } from "../face-cQ-pVHoe.js";
3
3
  //#region src/render/legacy-tints.d.ts
4
4
  /**
5
5
  * Tints for a model rendered without an item definition (pre-1.21.4 eras and
@@ -1,14 +1,16 @@
1
1
  import { a as ResourceManager } from "../manager-Cv1NeFyF.js";
2
2
  import { i as TextureLoader } from "../loader-Myy22TDL.js";
3
- import { r as ResolvedModel } from "../loader-D22zZME7.js";
4
- import { t as FloatTexture } from "../blend-CEHoJ7tM.js";
3
+ import { r as ResolvedModel } from "../loader-DD83d80u.js";
4
+ import { n as FloatTexture } from "../blend-8lnfxtLe.js";
5
5
  import { n as Vec3 } from "../vector-DRKRi4--.js";
6
- import { i as RenderOptions } from "../renderer-B20ssjRm.js";
6
+ import { i as RenderOptions } from "../renderer-C79EQDSn.js";
7
7
  //#region src/render/obj.d.ts
8
8
  interface ObjTriangle {
9
9
  positions: [Vec3, Vec3, Vec3];
10
10
  uvs: [[number, number], [number, number], [number, number]];
11
11
  material: string;
12
+ /** The `o`/`g` name in effect, so a loader can draw one state of many. */
13
+ object: string;
12
14
  }
13
15
  interface ParsedObj {
14
16
  triangles: ObjTriangle[];
@@ -1,2 +1,2 @@
1
- import { c as renderObjModel, o as parseMtl, s as parseObj } from "../renderer-gQW_I7YG.js";
1
+ import { c as renderObjModel, o as parseMtl, s as parseObj } from "../renderer-oi1MSF3Y.js";
2
2
  export { parseMtl, parseObj, renderObjModel };
@@ -1,2 +1,2 @@
1
- import { i as RenderedFrames, n as ItemRenderOutcome, r as PipelineSettings, t as ItemPipeline } from "../pipeline-HiA3DC71.js";
1
+ import { i as RenderedFrames, n as ItemRenderOutcome, r as PipelineSettings, t as ItemPipeline } from "../pipeline-CJNiQG-1.js";
2
2
  export { ItemPipeline, ItemRenderOutcome, PipelineSettings, RenderedFrames };
@@ -1,2 +1,2 @@
1
- import { t as ItemPipeline } from "../pipeline-Da2Kavba.js";
1
+ import { t as ItemPipeline } from "../pipeline-BVYj7OP0.js";
2
2
  export { ItemPipeline };
@@ -1,2 +1,2 @@
1
- import { a as clearFaceBuffer, c as drawTexturedTriangle, i as RowCursor, l as phpRound, n as FaceBuffer, o as compactFaceBuffer, r as RasterPoint, s as createFaceBuffer, t as DirtyRect } from "../rasterizer-B9ZGJI3-.js";
1
+ import { a as clearFaceBuffer, c as drawTexturedTriangle, i as RowCursor, l as phpRound, n as FaceBuffer, o as compactFaceBuffer, r as RasterPoint, s as createFaceBuffer, t as DirtyRect } from "../rasterizer-BSQHEhJ-.js";
2
2
  export { DirtyRect, FaceBuffer, RasterPoint, RowCursor, clearFaceBuffer, compactFaceBuffer, createFaceBuffer, drawTexturedTriangle, phpRound };
@@ -1,2 +1,2 @@
1
- import { a as drawTexturedTriangle, i as createFaceBuffer, n as clearFaceBuffer, o as phpRound, r as compactFaceBuffer, t as RowCursor } from "../rasterizer-76qO8TDh.js";
1
+ import { a as drawTexturedTriangle, i as createFaceBuffer, n as clearFaceBuffer, o as phpRound, r as compactFaceBuffer, t as RowCursor } from "../rasterizer-DcVJzkxz.js";
2
2
  export { RowCursor, clearFaceBuffer, compactFaceBuffer, createFaceBuffer, drawTexturedTriangle, phpRound };
@@ -1,2 +1,2 @@
1
- import { a as RenderedFrames, c as renderModel, i as RenderOptions, l as renderModelFrames, n as AnimationLimits, o as boxDownscale, r as ItemRenderError, s as pointResize, t as AnimationDiagnostics } from "../renderer-B20ssjRm.js";
1
+ import { a as RenderedFrames, c as renderModel, i as RenderOptions, l as renderModelFrames, n as AnimationLimits, o as boxDownscale, r as ItemRenderError, s as pointResize, t as AnimationDiagnostics } from "../renderer-C79EQDSn.js";
2
2
  export { AnimationDiagnostics, AnimationLimits, ItemRenderError, RenderOptions, RenderedFrames, boxDownscale, pointResize, renderModel, renderModelFrames };
@@ -1,2 +1,2 @@
1
- import { a as renderModelFrames, i as renderModel, n as boxDownscale, r as pointResize, t as ItemRenderError } from "../renderer-gQW_I7YG.js";
1
+ import { a as renderModelFrames, i as renderModel, n as boxDownscale, r as pointResize, t as ItemRenderError } from "../renderer-oi1MSF3Y.js";
2
2
  export { ItemRenderError, boxDownscale, pointResize, renderModel, renderModelFrames };
@@ -1,2 +1,2 @@
1
- import { a as resolveTint, i as parseTintValue, n as InvalidTinterDefinitionError, o as resolveTints, r as TintContext, t as DYE_COLORS } from "../tints-BH9l0ND0.js";
1
+ import { a as resolveTint, i as parseTintValue, n as InvalidTinterDefinitionError, o as resolveTints, r as TintContext, t as DYE_COLORS } from "../tints-Do9Sh3dg.js";
2
2
  export { DYE_COLORS, InvalidTinterDefinitionError, TintContext, parseTintValue, resolveTint, resolveTints };
@@ -1,2 +1,2 @@
1
- import { a as resolveTints, i as resolveTint, n as InvalidTinterDefinitionError, r as parseTintValue, t as DYE_COLORS } from "../tints-BtbHegpI.js";
1
+ import { a as resolveTints, i as resolveTint, n as InvalidTinterDefinitionError, r as parseTintValue, t as DYE_COLORS } from "../tints-3VI_2SNy.js";
2
2
  export { DYE_COLORS, InvalidTinterDefinitionError, parseTintValue, resolveTint, resolveTints };
@@ -1,10 +1,10 @@
1
1
  import { a as ResourceManager } from "./manager-Cv1NeFyF.js";
2
2
  import { i as TextureLoader } from "./loader-Myy22TDL.js";
3
- import { r as ResolvedModel } from "./loader-D22zZME7.js";
4
- import { t as FloatTexture } from "./blend-CEHoJ7tM.js";
3
+ import { r as ResolvedModel } from "./loader-DD83d80u.js";
4
+ import { n as FloatTexture } from "./blend-8lnfxtLe.js";
5
5
  import { t as Mat4 } from "./vector-DRKRi4--.js";
6
6
  import { a as LightingProfileName } from "./lighting-3FGRC3Af.js";
7
- import { r as TintColor } from "./face-C49L66sQ.js";
7
+ import { r as TintColor } from "./face-cQ-pVHoe.js";
8
8
  //#region src/render/renderer.d.ts
9
9
  interface AnimationLimits {
10
10
  /** Emitted frames per icon (default 128). */
@@ -1,13 +1,13 @@
1
- import { c as normalize, g as transformVector, m as sub, n as displayMatrix, o as identity, r as dot, s as multiply, t as cross } from "./vector-CCxLae_T.js";
2
1
  import { n as ResourceLocator } from "./locator-ycZzh_6z.js";
3
- import { a as tintTexture, n as cloneFloatTexture, r as darkenTexture, s as toFloatTexture, t as blendPixel } from "./blend-D0XWgVQr.js";
4
- import { t as combineFaceBuffers } from "./compose-lWPrB7wh.js";
5
- import { a as drawTexturedTriangle, i as createFaceBuffer, n as clearFaceBuffer, o as phpRound, t as RowCursor } from "./rasterizer-76qO8TDh.js";
6
- import { n as renderFace, t as faceMaxZ } from "./face-Cl1O4m2i.js";
7
- import { t as paintBucketFluid } from "./fluid-bucket-D-GpUQjg.js";
8
- import { r as buildElementFaces } from "./geometry-uIDha8S4.js";
2
+ import { c as normalize, g as transformVector, m as sub, n as displayMatrix, o as identity, r as dot, s as multiply, t as cross } from "./vector-CCxLae_T.js";
3
+ import { l as toFloatTexture, n as cloneFloatTexture, r as darkenTexture, s as tintTexture, t as blendPixel } from "./blend-KXMclcHk.js";
4
+ import { t as combineFaceBuffers } from "./compose-BGsNFR12.js";
5
+ import { a as drawTexturedTriangle, i as createFaceBuffer, n as clearFaceBuffer, o as phpRound, t as RowCursor } from "./rasterizer-DcVJzkxz.js";
6
+ import { n as faceMaxZ, r as renderFace, t as createShadeCache } from "./face-CMJ3b3Ae.js";
7
+ import { t as paintBucketFluid } from "./fluid-bucket-BzoLofB_.js";
8
+ import { r as buildElementFaces } from "./geometry-Bi-Bf5rb.js";
9
9
  import { c as lightsForProfile } from "./lighting--5myudVu.js";
10
- import { i as resolveTexture } from "./loader-B8NJO7pR.js";
10
+ import { i as resolveTexture } from "./loader-DwkA9LR5.js";
11
11
  //#region src/render/obj.ts
12
12
  /**
13
13
  * Forge/NeoForge OBJ model rendering — the class the old pipeline left
@@ -23,6 +23,7 @@ function parseObj(text, flipV) {
23
23
  const triangles = [];
24
24
  const materialLibs = [];
25
25
  let material = "";
26
+ let object = "";
26
27
  for (const rawLine of text.split("\n")) {
27
28
  const line = rawLine.trim();
28
29
  if (line === "" || line.startsWith("#")) continue;
@@ -44,6 +45,10 @@ function parseObj(text, flipV) {
44
45
  case "usemtl":
45
46
  material = parts.slice(1).join(" ");
46
47
  break;
48
+ case "o":
49
+ case "g":
50
+ object = parts.slice(1).join(" ");
51
+ break;
47
52
  case "mtllib":
48
53
  materialLibs.push(parts.slice(1).join(" "));
49
54
  break;
@@ -71,7 +76,8 @@ function parseObj(text, flipV) {
71
76
  corners[i - 1].uv,
72
77
  corners[i].uv
73
78
  ],
74
- material
79
+ material,
80
+ object
75
81
  });
76
82
  }
77
83
  break;
@@ -112,6 +118,11 @@ async function renderObjModel(model, resources, textures, options) {
112
118
  const objSource = await resources.getResource("raw", objLocator);
113
119
  if (!objSource) throw new ItemRenderError(`OBJ file not found: ${model.obj.model} for ${model.locator}`);
114
120
  const parsed = parseObj(objSource.toString("utf8"), model.obj.flipV);
121
+ const wanted = model.obj.objects;
122
+ if (wanted) {
123
+ const allowed = new Set(wanted);
124
+ parsed.triangles = parsed.triangles.filter((triangle) => allowed.has(triangle.object));
125
+ }
115
126
  if (parsed.triangles.length === 0) throw new ItemRenderError(`OBJ has no faces: ${model.obj.model}`);
116
127
  const materials = /* @__PURE__ */ new Map();
117
128
  const objDirectory = objLocator.path.split("/").slice(0, -1).join("/");
@@ -441,7 +452,7 @@ function createSession() {
441
452
  order: null,
442
453
  transformation: null,
443
454
  scratch: null,
444
- shadeCache: /* @__PURE__ */ new WeakMap(),
455
+ shadeCache: createShadeCache(),
445
456
  floatTextures: /* @__PURE__ */ new Map(),
446
457
  faceBuffers: []
447
458
  };
@@ -1,10 +1,10 @@
1
1
  import { n as ResourceLocator } from "./locator-ycZzh_6z.js";
2
- import { n as discoverItems } from "./discovery-0SM0cTLw.js";
3
- import { r as encodeRasterAsset } from "./encode-Df_tWzkl.js";
2
+ import { n as discoverItems } from "./discovery-B9aqV_Rz.js";
3
+ import { r as encodeRasterAsset } from "./encode-LR9wxigC.js";
4
4
  import { t as classifyItemStyle } from "./item-styles-upgEO1yP.js";
5
5
  import { t as minifyStylesheet } from "./minify-bjMRmr5J.js";
6
6
  import { t as generateStylesheet } from "./stylesheet-CovT3B2S.js";
7
- import { t as ItemPipeline } from "./pipeline-Da2Kavba.js";
7
+ import { t as ItemPipeline } from "./pipeline-BVYj7OP0.js";
8
8
  import { t as describeResources } from "./descriptor-DWebtkI1.js";
9
9
  import { t as WorkerRenderPool } from "./pool-CKGp1qup.js";
10
10
  import path from "node:path";
@@ -1,6 +1,6 @@
1
1
  import { a as ResourceManager } from "./manager-Cv1NeFyF.js";
2
2
  import { a as LightingProfileName } from "./lighting-3FGRC3Af.js";
3
- import { n as AnimationLimits } from "./renderer-B20ssjRm.js";
3
+ import { n as AnimationLimits } from "./renderer-C79EQDSn.js";
4
4
  //#region src/run.d.ts
5
5
  interface RunOptions {
6
6
  resources: ResourceManager;
package/dist/run.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { l as evaluateItemModel } from "./definition-BwX6Xxv0.js";
2
- import { i as run, n as RunOptions, r as RunResult, t as ItemFailure } from "./run-CT3VtFqg.js";
1
+ import { l as evaluateItemModel } from "./definition-ricL7Jqf.js";
2
+ import { i as run, n as RunOptions, r as RunResult, t as ItemFailure } from "./run-uq8_hUx9.js";
3
3
  export { ItemFailure, RunOptions, RunResult, evaluateItemModel, run };
package/dist/run.js CHANGED
@@ -1,3 +1,3 @@
1
- import { o as evaluateItemModel } from "./definition-3MBm8ar_.js";
2
- import { t as run } from "./run-B0qPw3zf.js";
1
+ import { o as evaluateItemModel } from "./definition-ColsvWrH.js";
2
+ import { t as run } from "./run-C6AP3Bn8.js";
3
3
  export { evaluateItemModel, run };
@@ -1,2 +1,2 @@
1
- import { n as TextureLoader, r as TextureResolutionError, t as AnimatedTexture } from "../loader-CfXMxcEV.js";
1
+ import { n as TextureLoader, r as TextureResolutionError, t as AnimatedTexture } from "../loader-Lb0ZeILz.js";
2
2
  export { AnimatedTexture, TextureLoader, TextureResolutionError };
@@ -61,6 +61,103 @@ const DEFAULT_READING_TYPES = /* @__PURE__ */ new Set([
61
61
  "minecraft:map_color",
62
62
  "minecraft:team"
63
63
  ]);
64
+ /**
65
+ * appeng.api.util.AEColor's dark/medium/bright variants, read out of the enum's
66
+ * static initialiser in AE2 26.1.10. Every `ae2:color` tint names one of these
67
+ * plus a variant, and nothing in the mod's assets states the values.
68
+ */
69
+ const AE_COLORS = {
70
+ white: [
71
+ 11842740,
72
+ 14737632,
73
+ 16382457
74
+ ],
75
+ light_gray: [
76
+ 8289918,
77
+ 10526624,
78
+ 12895428
79
+ ],
80
+ gray: [
81
+ 5197647,
82
+ 7105388,
83
+ 9736852
84
+ ],
85
+ black: [
86
+ 1250067,
87
+ 2565927,
88
+ 3881787
89
+ ],
90
+ lime: [
91
+ 5161038,
92
+ 7397977,
93
+ 11794541
94
+ ],
95
+ yellow: [
96
+ 16764736,
97
+ 16769881,
98
+ 16056192
99
+ ],
100
+ orange: [
101
+ 14252079,
102
+ 15508028,
103
+ 15907401
104
+ ],
105
+ brown: [
106
+ 7227922,
107
+ 8281110,
108
+ 9334298
109
+ ],
110
+ red: [
111
+ 11149611,
112
+ 14106178,
113
+ 15758949
114
+ ],
115
+ pink: [
116
+ 14184106,
117
+ 16751035,
118
+ 16501461
119
+ ],
120
+ magenta: [
121
+ 12669321,
122
+ 13988252,
123
+ 15113919
124
+ ],
125
+ purple: [
126
+ 7232696,
127
+ 9526733,
128
+ 11562973
129
+ ],
130
+ blue: [
131
+ 3375088,
132
+ 3708159,
133
+ 4243967
134
+ ],
135
+ light_blue: [
136
+ 6928895,
137
+ 7394047,
138
+ 8452095
139
+ ],
140
+ cyan: [
141
+ 2273454,
142
+ 3132599,
143
+ 6678729
144
+ ],
145
+ green: [
146
+ 498539,
147
+ 1554541,
148
+ 3332176
149
+ ],
150
+ fluix: [
151
+ 5916574,
152
+ 9526733,
153
+ 14853091
154
+ ]
155
+ };
156
+ const VARIANT_INDEX = {
157
+ dark: 0,
158
+ medium: 1,
159
+ bright: 2
160
+ };
64
161
  async function resolveTint(definition, context) {
65
162
  const type = definition.type.includes(":") ? definition.type : `minecraft:${definition.type}`;
66
163
  switch (type) {
@@ -75,9 +172,18 @@ async function resolveTint(definition, context) {
75
172
  const index = context.randomIndex ?? Math.floor(Math.random() * DYE_COLORS.length);
76
173
  return hexColor(DYE_COLORS[index % DYE_COLORS.length]);
77
174
  }
175
+ case "ae2:storage_cell_state": return parseTintValue(65280);
176
+ case "ae2:portable_cell_color": return parseTintValue(8441855);
177
+ case "ae2:color": {
178
+ const named = String(definition.color ?? "");
179
+ const palette = AE_COLORS[named];
180
+ if (!palette) throw new InvalidTinterDefinitionError(`Unknown ae2:color colour: ${named}`);
181
+ const variant = String(definition.variant ?? "medium");
182
+ return parseTintValue(palette[VARIANT_INDEX[variant] ?? 1]);
183
+ }
78
184
  default:
79
185
  if (DEFAULT_READING_TYPES.has(type) || Object.hasOwn(definition, "default")) return parseTintValue(definition.default);
80
- throw new InvalidTinterDefinitionError(`Unknown tint type: ${definition.type}`);
186
+ return null;
81
187
  }
82
188
  }
83
189
  async function resolveTints(definitions, context) {
@@ -1,7 +1,7 @@
1
- import { r as modTintPackPath } from "./builtin-caYjESh0.js";
2
- import { a as defaultProperties, o as evaluateItemModel } from "./definition-3MBm8ar_.js";
1
+ import { i as modTintPackPath } from "./builtin-WkWjATeh.js";
3
2
  import { n as ResourceLocator } from "./locator-ycZzh_6z.js";
4
3
  import { t as FolderResourceManager } from "./manager-CkletR5K.js";
4
+ import { a as defaultProperties, o as evaluateItemModel } from "./definition-ColsvWrH.js";
5
5
  import { n as MapResourceManager } from "./synthetic-ZAUjXT7E.js";
6
6
  //#region src/mods/tints.ts
7
7
  /**
@@ -1,6 +1,6 @@
1
1
  import { i as TextureLoader } from "./loader-Myy22TDL.js";
2
- import { r as TintColor } from "./face-C49L66sQ.js";
3
- import { o as TintDefinition } from "./definition-BwX6Xxv0.js";
2
+ import { r as TintColor } from "./face-cQ-pVHoe.js";
3
+ import { o as TintDefinition } from "./definition-ricL7Jqf.js";
4
4
  //#region src/render/tints.d.ts
5
5
  declare class InvalidTinterDefinitionError extends Error {}
6
6
  /** The 16 dye colors upstream's renderchest:random picks from. */
@@ -40,6 +40,14 @@ interface ModelElementJson {
40
40
  rotation?: ElementRotationJson;
41
41
  shade?: boolean;
42
42
  light_emission?: number;
43
+ /**
44
+ * Ours, not vanilla: skip directional shading for this element. Mods draw
45
+ * emissive parts in code with a fullbright render type (Mekanism's disassembler
46
+ * blade), which no vanilla model field can express.
47
+ */
48
+ emissive_rc?: boolean;
49
+ /** Ours, not vanilla: constant opacity multiplier for a translucent element. */
50
+ alpha_rc?: number;
43
51
  faces: Partial<Record<FaceDirectionName, ModelFaceJson>>;
44
52
  }
45
53
  interface DisplayTransformJson {
@@ -1,5 +1,5 @@
1
1
  import { s as ResourceDescriptor } from "../manager-Cv1NeFyF.js";
2
- import { n as ItemRenderOutcome, r as PipelineSettings } from "../pipeline-HiA3DC71.js";
2
+ import { n as ItemRenderOutcome, r as PipelineSettings } from "../pipeline-CJNiQG-1.js";
3
3
  //#region src/workers/render-worker.d.ts
4
4
  interface RenderWorkerData {
5
5
  resources: ResourceDescriptor;
@@ -1,4 +1,4 @@
1
- import { t as ItemPipeline } from "../pipeline-Da2Kavba.js";
1
+ import { t as ItemPipeline } from "../pipeline-BVYj7OP0.js";
2
2
  import { n as restoreResources } from "../descriptor-DWebtkI1.js";
3
3
  import sharp from "sharp";
4
4
  import { parentPort, workerData } from "node:worker_threads";