minerender 2.1.0-alpha.63 → 2.1.0-alpha.65
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/browser/index.d.mts +5 -1
- package/dist/browser/index.d.ts +5 -1
- package/dist/browser/index.js +18 -6
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.mjs +19 -7
- package/dist/browser/index.mjs.map +1 -1
- package/dist/bundle.js +18 -6
- package/dist/bundle.js.map +1 -1
- package/dist/node/index.d.mts +5 -1
- package/dist/node/index.d.ts +5 -1
- package/dist/node/index.js +18 -6
- package/dist/node/index.js.map +1 -1
- package/dist/node/index.mjs +19 -7
- package/dist/node/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -33207,8 +33207,15 @@ var MineRender = (() => {
|
|
|
33207
33207
|
material.blending = CustomBlending;
|
|
33208
33208
|
material.blendSrc = OneFactor;
|
|
33209
33209
|
material.blendDst = OneFactor;
|
|
33210
|
-
material.blendSrcAlpha =
|
|
33211
|
-
material.blendDstAlpha =
|
|
33210
|
+
material.blendSrcAlpha = OneFactor;
|
|
33211
|
+
material.blendDstAlpha = OneMinusSrcAlphaFactor;
|
|
33212
|
+
material.onBeforeCompile = (shader) => {
|
|
33213
|
+
shader.fragmentShader = shader.fragmentShader.replace(
|
|
33214
|
+
"#include <dithering_fragment>",
|
|
33215
|
+
"gl_FragColor.a = max(gl_FragColor.r, max(gl_FragColor.g, gl_FragColor.b));\n#include <dithering_fragment>"
|
|
33216
|
+
);
|
|
33217
|
+
};
|
|
33218
|
+
material.customProgramCacheKey = () => "energy_swirl";
|
|
33212
33219
|
material.color.set(8421504);
|
|
33213
33220
|
break;
|
|
33214
33221
|
case "water_mask":
|
|
@@ -90112,7 +90119,11 @@ property list uchar int vertex_index
|
|
|
90112
90119
|
|
|
90113
90120
|
// src/model/multiblock/SchematicParser.ts
|
|
90114
90121
|
var SchematicParser = class {
|
|
90115
|
-
|
|
90122
|
+
/**
|
|
90123
|
+
* Parses a legacy schematic using custom mappings before the bundled defaults.
|
|
90124
|
+
* Keys are `id:metadata`; values are block states such as `minecraft:oak_log[axis=x]`.
|
|
90125
|
+
*/
|
|
90126
|
+
static async parse(nbt, customMappings = {}) {
|
|
90116
90127
|
const tags = nbt.value;
|
|
90117
90128
|
if (tags.Materials?.type !== "string" || tags.Materials.value !== "Alpha") {
|
|
90118
90129
|
throw new MineRenderError("Schematic Materials must be Alpha");
|
|
@@ -90154,15 +90165,16 @@ property list uchar int vertex_index
|
|
|
90154
90165
|
const high = packed >> (index & 1) * 4 & 15;
|
|
90155
90166
|
const id = high << 8 | ids.value[index] & 255;
|
|
90156
90167
|
const metadata = data.value[index] & 255;
|
|
90157
|
-
const
|
|
90168
|
+
const key = `${id}:${metadata}`;
|
|
90169
|
+
const mapped = customMappings[key] ?? mapping[key];
|
|
90158
90170
|
if (!mapped) throw new MineRenderError(`Unsupported legacy block ${id}:${metadata} at schematic index ${index}`);
|
|
90159
90171
|
const [type, state] = mapped.split("[");
|
|
90160
90172
|
if (type === "minecraft:air") continue;
|
|
90161
90173
|
const properties = {};
|
|
90162
90174
|
if (state) {
|
|
90163
90175
|
for (const property of state.slice(0, -1).split(",")) {
|
|
90164
|
-
const [
|
|
90165
|
-
properties[
|
|
90176
|
+
const [key2, value] = property.split("=");
|
|
90177
|
+
properties[key2] = value;
|
|
90166
90178
|
}
|
|
90167
90179
|
}
|
|
90168
90180
|
blocks.push({
|