brs-js 3.2.0 → 3.2.1
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/dist.js +1 -1
- package/dist/dist.js.map +1 -1
- package/dist/dist.mjs +10 -13
- package/dist/dist.mjs.map +1 -1
- package/dist/dist.node.js +1 -1
- package/dist/dist.node.js.map +1 -1
- package/dist/dist.web.js +1 -1
- package/dist/dist.web.js.map +1 -1
- package/dist/src/brdb/world.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/dist.mjs
CHANGED
|
@@ -13044,8 +13044,8 @@ function co(e, t = {}) {
|
|
|
13044
13044
|
dependencies: [],
|
|
13045
13045
|
gameVersion: "CL0",
|
|
13046
13046
|
...t.bundle
|
|
13047
|
-
}, ee = (e) => {
|
|
13048
|
-
let t = [["ChunkIndex.mps", X(x.encode("BRSavedBrickChunkIndexSoA", {
|
|
13047
|
+
}, ee = (e, t) => {
|
|
13048
|
+
let n = t ? 0 : Qa, r = [["ChunkIndex.mps", X(x.encode("BRSavedBrickChunkIndexSoA", {
|
|
13049
13049
|
Chunk3DIndices: e.chunkOrder.map((t) => {
|
|
13050
13050
|
let [n, r, i] = e.chunks.get(t).index;
|
|
13051
13051
|
return {
|
|
@@ -13054,20 +13054,17 @@ function co(e, t = {}) {
|
|
|
13054
13054
|
Z: i
|
|
13055
13055
|
};
|
|
13056
13056
|
}),
|
|
13057
|
-
ChunkOffsets: e.chunkOrder.map((
|
|
13058
|
-
|
|
13059
|
-
|
|
13060
|
-
|
|
13061
|
-
|
|
13062
|
-
Z: n
|
|
13063
|
-
};
|
|
13064
|
-
}),
|
|
13057
|
+
ChunkOffsets: e.chunkOrder.map(() => ({
|
|
13058
|
+
X: n,
|
|
13059
|
+
Y: n,
|
|
13060
|
+
Z: n
|
|
13061
|
+
})),
|
|
13065
13062
|
ChunkSizes: e.chunkOrder.map(() => Za),
|
|
13066
13063
|
NumBricks: e.chunkOrder.map((t) => e.chunks.get(t).builder.numBricks),
|
|
13067
13064
|
NumComponents: e.chunkOrder.map((t) => e.componentChunks.get(t)?.numComponents ?? 0),
|
|
13068
13065
|
NumWires: e.chunkOrder.map((t) => e.chunkWireCounts.get(t) ?? 0)
|
|
13069
13066
|
}))]];
|
|
13070
|
-
return e.chunkOrder.length > 0 &&
|
|
13067
|
+
return e.chunkOrder.length > 0 && r.push(["Chunks", ca(e.chunkOrder.map((t) => [`${t}.mps`, X(S.encode("BRSavedBrickChunkSoA", e.chunks.get(t).builder.toValue(s)))]))]), e.componentChunks.size > 0 && r.push(["Components", ca(e.chunkOrder.filter((t) => e.componentChunks.has(t)).map((t) => [`${t}.mps`, X(e.componentChunks.get(t).toBytes(p))]))]), e.wireChunks.size > 0 && r.push(["Wires", ca(e.chunkOrder.filter((t) => e.wireChunks.has(t)).map((t) => {
|
|
13071
13068
|
let n = e.wireChunks.get(t);
|
|
13072
13069
|
return [`${t}.mps`, X(C.encode("BRSavedWireChunkSoA", {
|
|
13073
13070
|
RemoteWireSources: n.remoteSources,
|
|
@@ -13076,7 +13073,7 @@ function co(e, t = {}) {
|
|
|
13076
13073
|
LocalWireTargets: n.localTargets,
|
|
13077
13074
|
PendingPropagationFlags: { Flags: [] }
|
|
13078
13075
|
}))];
|
|
13079
|
-
}))]),
|
|
13076
|
+
}))]), r;
|
|
13080
13077
|
}, te = [["Bundle.json", X(j.encode(JSON.stringify(M)))]];
|
|
13081
13078
|
e.prefab ? te.push(["Prefab.json", X(j.encode(JSON.stringify(e.prefab)))]) : te.push(["World.json", X(j.encode(JSON.stringify({ environment: t.environment ?? "Plate" })))]);
|
|
13082
13079
|
let ne = [
|
|
@@ -13094,7 +13091,7 @@ function co(e, t = {}) {
|
|
|
13094
13091
|
["ChunksShared.schema", X(S.toBinary())],
|
|
13095
13092
|
["WiresShared.schema", X(C.toBinary())],
|
|
13096
13093
|
["ComponentsShared.schema", X(p.toBinary())],
|
|
13097
|
-
["Grids", ca(v.map((t, n) => [String(e.gridIds[n]), ca(ee(t))]))]
|
|
13094
|
+
["Grids", ca(v.map((t, n) => [String(e.gridIds[n]), ca(ee(t, e.gridIds[n] === 1))]))]
|
|
13098
13095
|
])],
|
|
13099
13096
|
["Entities", ca(ne)]
|
|
13100
13097
|
])]])]];
|